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-06 10:08:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
571788a904488da7b7c4ad47c70ede6b21e72569
571788a9
1 parent
0dd7a656
D类提交如果有不存在的用户用customs
2023年9月6日10:02:40 szl
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
View file @
571788a
...
...
@@ -234,7 +234,12 @@ public class ChmConsignmentService {
//推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据
result
.
setCreateTime
(
new
Date
());
result
.
setUpdateTime
(
new
Date
());
result
.
setCreator
(
creator
);
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
if
(
sysUser
==
null
){
sysUser
=
sysUserRepository
.
findUserByLoginName
(
"CUSTOMS"
);
}
result
.
setCreatorId
(
sysUser
);
result
.
setCreator
(
sysUser
.
getUserName
());
}
catch
(
Exception
e
){
result
=
null
;
...
...
@@ -296,8 +301,11 @@ public class ChmConsignmentService {
result
.
setCreateTime
(
new
Date
());
result
.
setUpdateTime
(
pushTime
);
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
if
(
sysUser
==
null
){
sysUser
=
sysUserRepository
.
findUserByLoginName
(
"CUSTOMS"
);
}
result
.
setCreatorId
(
sysUser
);
result
.
setCreator
(
sysUser
.
get
Login
Name
());
result
.
setCreator
(
sysUser
.
get
User
Name
());
}
catch
(
Exception
e
){
result
=
null
;
...
...
@@ -527,7 +535,8 @@ public class ChmConsignmentService {
//2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入
ChmConsignment
chmConsignmentDB
=
null
;
// ChmConsignment chmConsignmentDB=this.findChmConsignmentByConsignmentCode(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7));
List
<
ChmConsignment
>
chmConsignmentDBs
=
this
.
findChmConsignmentByConsignmentCodes
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
),
creator
);
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
List
<
ChmConsignment
>
chmConsignmentDBs
=
this
.
findChmConsignmentByConsignmentCodes
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
),
sysUser
.
getUserName
());
List
<
ChmConsignment
>
newChmConsignments
=
new
ArrayList
<
ChmConsignment
>();
for
(
ChmConsignment
chmConsignments
:
chmConsignmentDBs
)
{
//如果有该用户曾经提交过得,运单状态为预审不通过或者中心审核已通过并且没有dm004的优先覆盖
...
...
@@ -547,7 +556,6 @@ public class ChmConsignmentService {
}
//获取用户账号信息
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
if
(
sysUser
==
null
){
sysUser
=
sysUserRepository
.
findUserByLoginName
(
"CUSTOMS"
);
}
...
...
@@ -673,7 +681,8 @@ public class ChmConsignmentService {
chmConsignment
.
setChmConsignmentDetailList
(
chmConsignmentDetailList
);
ChmConsignment
chmConsignmentDB
=
null
;
//2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入
List
<
ChmConsignment
>
chmConsignments
=
this
.
findChmConsignmentByConsignmentCodes
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
),
creator
);
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
List
<
ChmConsignment
>
chmConsignments
=
this
.
findChmConsignmentByConsignmentCodes
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
),
sysUser
.
getUserName
());
//如果没有C类待申报,从list中拿时间最晚的一条去覆盖
List
<
ChmConsignment
>
newChmConsignments
=
new
ArrayList
<
ChmConsignment
>();
for
(
ChmConsignment
consignment
:
chmConsignments
)
{
...
...
Please
register
or
login
to post a comment