Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wei.zhou
/
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
wei.zhou
2021-06-28 10:54:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ef637d64f0bb71bbd98a235cf7c343d104b895ac
ef637d64
1 parent
c8406126
提交代码
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
src/main/java/com/erry/iclear/dateInterface/api/CustomsDataInterface.java
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
src/main/java/com/erry/iclear/dateInterface/api/CustomsDataInterface.java
View file @
ef637d6
...
...
@@ -112,7 +112,10 @@ public class CustomsDataInterface {
//if(result.getSuccess()){
//TODO 等待校验逻辑完善后,由result.getSuccess() 判断
if
(
true
){
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
,
appId
);
result
=
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
,
appId
);
if
(!
result
.
getSuccess
()){
return
result
;
}
}
sw
.
stop
();
...
...
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
View file @
ef637d6
...
...
@@ -2,6 +2,7 @@ package com.erry.iclear.dateInterface.service;
//import cn.hutool.core.date.DateUtil;
import
com.erry.iclear.dateInterface.api.request.Mawb
;
import
com.erry.iclear.dateInterface.api.response.ResultRS
;
import
com.erry.iclear.dateInterface.common.Constant
;
import
com.erry.iclear.dateInterface.entity.ChmCarryPort
;
import
com.erry.iclear.dateInterface.entity.ChmConsignment
;
...
...
@@ -244,12 +245,18 @@ public class ChmConsignmentService {
* @param mawb
* @param timeStamp
*/
public
void
processChmConsignment
(
Mawb
mawb
,
String
timeStamp
,
String
creator
)
{
public
ResultRS
processChmConsignment
(
Mawb
mawb
,
String
timeStamp
,
String
creator
)
{
ResultRS
result
=
new
ResultRS
(
Boolean
.
FALSE
,
null
,
null
);
try
{
Date
pushTime
=
DateUtils
.
timeStampToDate
(
Long
.
valueOf
(
timeStamp
));
//1、将请求转换为运单
ChmConsignment
chmConsignment
=
this
.
convertToChmConsignment
(
mawb
,
pushTime
,
creator
);
if
(
Objects
.
equals
(
chmConsignment
,
null
)){
result
.
setCode
(
"30001"
);
result
.
setMsg
(
"数据格式不正确"
);
return
result
;
}
List
<
ChmConsignmentDetail
>
chmConsignmentDetailList
=
new
ArrayList
<>();
mawb
.
getMawbDetailList
().
forEach
(
detail
->{
chmConsignmentDetailList
.
add
(
chmConsignmentDetailService
.
convertToChmConsignmentDetail
(
detail
,
chmConsignment
));
...
...
@@ -316,6 +323,8 @@ public class ChmConsignmentService {
}
catch
(
Exception
e
){
log
.
error
(
""
+
e
.
getMessage
());
}
return
result
;
}
...
...
Please
register
or
login
to post a comment