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 15:44:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
075585e38d43576b155e6c6e40de9c311109bbdf
075585e3
1 parent
571788a9
D类提交如果有不存在的用户用customs
2023年9月7日15:43:14 szl
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
View file @
075585e
...
...
@@ -236,10 +236,11 @@ public class ChmConsignmentService {
result
.
setUpdateTime
(
new
Date
());
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
if
(
sysUser
==
null
){
sysUser
=
sysUserRepository
.
findUserByLoginName
(
"CUSTOMS"
);
result
.
setCreator
(
creator
);
}
else
{
result
.
setCreatorId
(
sysUser
);
result
.
setCreator
(
sysUser
.
getUserName
());
}
result
.
setCreatorId
(
sysUser
);
result
.
setCreator
(
sysUser
.
getUserName
());
}
catch
(
Exception
e
){
result
=
null
;
...
...
@@ -302,10 +303,11 @@ public class ChmConsignmentService {
result
.
setUpdateTime
(
pushTime
);
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
if
(
sysUser
==
null
){
sysUser
=
sysUserRepository
.
findUserByLoginName
(
"CUSTOMS"
);
result
.
setCreator
(
creator
);
}
else
{
result
.
setCreatorId
(
sysUser
);
result
.
setCreator
(
sysUser
.
getUserName
());
}
result
.
setCreatorId
(
sysUser
);
result
.
setCreator
(
sysUser
.
getUserName
());
}
catch
(
Exception
e
){
result
=
null
;
...
...
@@ -536,7 +538,15 @@ public class ChmConsignmentService {
ChmConsignment
chmConsignmentDB
=
null
;
// ChmConsignment chmConsignmentDB=this.findChmConsignmentByConsignmentCode(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7));
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
List
<
ChmConsignment
>
chmConsignmentDBs
=
this
.
findChmConsignmentByConsignmentCodes
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
),
sysUser
.
getUserName
());
String
username
=
null
;
if
(
sysUser
==
null
){
username
=
creator
;
}
else
{
//设置当前运单创建人ID
chmConsignment
.
setCreatorId
(
sysUser
);
username
=
sysUser
.
getUserName
();
}
List
<
ChmConsignment
>
chmConsignmentDBs
=
this
.
findChmConsignmentByConsignmentCodes
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
),
username
);
List
<
ChmConsignment
>
newChmConsignments
=
new
ArrayList
<
ChmConsignment
>();
for
(
ChmConsignment
chmConsignments
:
chmConsignmentDBs
)
{
//如果有该用户曾经提交过得,运单状态为预审不通过或者中心审核已通过并且没有dm004的优先覆盖
...
...
@@ -556,13 +566,8 @@ public class ChmConsignmentService {
}
//获取用户账号信息
if
(
sysUser
==
null
){
sysUser
=
sysUserRepository
.
findUserByLoginName
(
"CUSTOMS"
);
}
//设置当前运单创建人ID
chmConsignment
.
setCreatorId
(
sysUser
);
//设置创建人名称
chmConsignment
.
setCreator
(
sysUser
.
getUserName
()
);
chmConsignment
.
setCreator
(
username
);
//3、新增或更新
//新增:如果没有就插入
...
...
@@ -682,7 +687,13 @@ public class ChmConsignmentService {
ChmConsignment
chmConsignmentDB
=
null
;
//2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入
SysUser
sysUser
=
sysUserRepository
.
findUserByLoginName
(
creator
);
List
<
ChmConsignment
>
chmConsignments
=
this
.
findChmConsignmentByConsignmentCodes
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
),
sysUser
.
getUserName
());
String
username
=
null
;
if
(
sysUser
==
null
){
username
=
creator
;
}
else
{
username
=
sysUser
.
getUserName
();
}
List
<
ChmConsignment
>
chmConsignments
=
this
.
findChmConsignmentByConsignmentCodes
(
chmConsignment
.
getConsignmentCode
(),
DateUtils
.
addDate
(
DateUtils
.
getCurrentDate
(),-
7
),
username
);
//如果没有C类待申报,从list中拿时间最晚的一条去覆盖
List
<
ChmConsignment
>
newChmConsignments
=
new
ArrayList
<
ChmConsignment
>();
for
(
ChmConsignment
consignment
:
chmConsignments
)
{
...
...
Please
register
or
login
to post a comment