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 09:52:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c840612651a0d03c17c5901567754d02a16ab2d1
c8406126
1 parent
16009cee
提交代码
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
View file @
c840612
...
...
@@ -248,6 +248,7 @@ public class ChmConsignmentService {
try
{
Date
pushTime
=
DateUtils
.
timeStampToDate
(
Long
.
valueOf
(
timeStamp
));
//1、将请求转换为运单
ChmConsignment
chmConsignment
=
this
.
convertToChmConsignment
(
mawb
,
pushTime
,
creator
);
List
<
ChmConsignmentDetail
>
chmConsignmentDetailList
=
new
ArrayList
<>();
mawb
.
getMawbDetailList
().
forEach
(
detail
->{
...
...
@@ -256,8 +257,11 @@ public class ChmConsignmentService {
chmConsignment
.
setChmConsignmentDetailList
(
chmConsignmentDetailList
);
//校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入
//
2、
校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入
ChmConsignment
chmConsignmentDB
=
this
.
findChmConsignmentByConsignmentCode
(
mawb
.
getBillNo
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
));
//3、新增或更新
//新增:如果没有就插入
if
(
Objects
.
equals
(
chmConsignmentDB
,
null
)){
log
.
info
(
"新增主单"
+
mawb
.
getBillNo
());
...
...
@@ -298,9 +302,8 @@ public class ChmConsignmentService {
chmConsignmentDB
.
setChmConsignmentDetailList
(
null
);
}
chmConsignment
.
setId
(
chmConsignmentDB
.
getId
());
chmConsignment
.
setCreateTime
(
chmConsignmentDB
.
getCreateTime
());
chmConsignment
.
setUpdateTime
(
pushTime
);
ChmConsignment
updateResult
=
this
.
saveChmConsignment
(
chmConsignment
);
if
(!
Objects
.
equals
(
updateResult
,
null
)){
...
...
Please
register
or
login
to post a comment