Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zelong.shao
2023-09-07 18:47:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d374101b201558f1e2860c257af3337842412992
d374101b
1 parent
f3bf3e01
D类提交如果有不存在的用户用customs
2023年9月7日18:47:32 szl
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
src/main/java/com/erry/iclear/dateInterface/api/CustomsDataInterface.java
src/main/java/com/erry/iclear/dateInterface/api/FedexDataInterface.java
src/main/java/com/erry/iclear/dateInterface/service/MawbService.java
src/main/java/com/erry/iclear/dateInterface/api/CustomsDataInterface.java
View file @
d374101
...
...
@@ -76,7 +76,12 @@ public class CustomsDataInterface {
String
appKey
=(
String
)
request
.
getHeader
(
"Appkey"
);
String
timeStamp
=(
String
)
request
.
getHeader
(
"TimeStamp"
);
IClearApiLog
saveIClearApiLogResult
=
iClearApiLogService
.
saveIClearApiLog
(
iClearApiLogService
.
convertToIClearApiLog
(
mawb
,
appId
,
appKey
,
new
Date
(
Long
.
valueOf
(
timeStamp
))));
String
checkUser
=
mawbService
.
checkUser
(
appId
);
if
(!
StringUtil
.
isEmpty
(
checkUser
)){
result
.
setCode
(
ErrorCodeEnum
.
ERROR_30003
.
getCode
());
result
.
setMsg
(
checkUser
);
return
result
;
}
mawb
.
setAppId
(
appId
);
if
(!
Objects
.
equals
(
saveIClearApiLogResult
,
null
)){
log
.
info
(
"请求保存成功,msgId:"
+
saveIClearApiLogResult
.
getMsgId
());
...
...
src/main/java/com/erry/iclear/dateInterface/api/FedexDataInterface.java
View file @
d374101
...
...
@@ -166,7 +166,12 @@ public class FedexDataInterface {
String
appKey
=(
String
)
request
.
getHeader
(
"Appkey"
);
String
timeStamp
=(
String
)
request
.
getHeader
(
"TimeStamp"
);
IClearApiLog
saveIClearApiLogResult
=
iClearApiLogService
.
saveIClearApiLog
(
iClearApiLogService
.
convertToIClearApiLogC
(
fedexc
,
appId
,
appKey
,
new
Date
(
Long
.
valueOf
(
timeStamp
))));
String
checkUser
=
mawbService
.
checkUser
(
appId
);
if
(!
StringUtil
.
isEmpty
(
checkUser
)){
result
.
setCode
(
ErrorCodeEnum
.
ERROR_30003
.
getCode
());
result
.
setMsg
(
checkUser
);
return
result
;
}
fedexc
.
setAppId
(
appId
);
FedexMawb
saveMawbFedexResult
=
null
;
if
(!
Objects
.
equals
(
saveIClearApiLogResult
,
null
)){
...
...
src/main/java/com/erry/iclear/dateInterface/service/MawbService.java
View file @
d374101
...
...
@@ -10,9 +10,11 @@ import com.erry.iclear.dateInterface.common.Constant;
import
com.erry.iclear.dateInterface.entity.ChmConsignment
;
import
com.erry.iclear.dateInterface.entity.ChmConsignmentDetail
;
import
com.erry.iclear.dateInterface.entity.DictionaryEntries
;
import
com.erry.iclear.dateInterface.entity.SysUser
;
import
com.erry.iclear.dateInterface.enums.ErrorCodeEnum
;
import
com.erry.iclear.dateInterface.repository.DictionaryEntriesRepository
;
import
com.erry.iclear.dateInterface.repository.MawbRepository
;
import
com.erry.iclear.dateInterface.repository.SysUserRepository
;
import
com.erry.iclear.dateInterface.util.HttpUtils
;
import
com.erry.iclear.dateInterface.util.JsonToJava
;
import
com.erry.iclear.dateInterface.util.StringUtil
;
...
...
@@ -49,6 +51,9 @@ public class MawbService {
@Autowired
private
DictionaryEntriesRepository
dictionaryEntriesRepository
;
@Autowired
private
SysUserRepository
sysUserRepository
;
/**
* 保存主单Request
* @param mawb
...
...
@@ -69,6 +74,16 @@ public class MawbService {
return
map
;
}
public
String
checkUser
(
String
loginName
){
String
result
=
null
;
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
loginName
);
if
(
sysUser
==
null
){
result
=
"该用户不存在"
;
return
result
;
}
return
result
;
}
public
String
checkMawbBaseInfo
(
Mawb
mawb
){
...
...
Please
register
or
login
to post a comment