Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-Connect-Pre-Clearance
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
2025-01-02 10:04:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e476d696f45e3a5c4625102ea36ba62593110f26
e476d696
1 parent
06fc8f18
customer|添加ce标志
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
6 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/data/bo/ConsignmentBo.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/ConsignmentQueryUtil.java
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/ConsignmentUtil.java
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/UserConsignmentMappingUtil.java
server/biz-customer/src/main/java/com/fedex/connect/customer/data/bo/ConsignmentBo.java
View file @
e476d69
...
...
@@ -31,4 +31,6 @@ public class ConsignmentBo {
//文件业务类型AWB,INV,PKL,OTH(分运单,发票,箱单和其它这四种类型)
@BaseNotBlank
(
describe
=
"business_field_31008"
)
private
List
<
Attachment
>
attachmentBizTypeList
;
//是否使用DM005标志
private
Long
ceFlag
;
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
View file @
e476d69
...
...
@@ -146,7 +146,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
/**
* 保存运单相关信息
*/
consignmentUtil
.
submitInfo
(
consignment
,
attachmentList
,
uploadRecord
,
user
);
consignmentUtil
.
submitInfo
(
consignment
,
attachmentList
,
uploadRecord
,
user
,
consignmentBo
.
getCeFlag
()
);
}
catch
(
OpErrorException
ex
){
/**
* 提交异常,需要删除对应已上传附件,已上传文件不进行删除
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/ConsignmentQueryUtil.java
View file @
e476d69
package
com
.
fedex
.
connect
.
customer
.
util
.
service
.
biz
;
import
com.fedex.connect.common.model.biz.Consignment
;
import
com.fedex.connect.common.model.biz.UserConsignmentMapping
;
import
com.fedex.connect.customer.data.query.UserConsignmentInfoQuery
;
import
com.fedex.connect.customer.repository.repo.IUserConsignmentMappingRepository
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Objects
;
...
...
@@ -15,6 +18,8 @@ import java.util.Objects;
@Slf4j
@Component
public
class
ConsignmentQueryUtil
{
@Autowired
protected
IUserConsignmentMappingRepository
userConsignmentMappingRepository
;
/**
* @Author mt
* @Description 运单查询数据筛选
...
...
@@ -24,11 +29,14 @@ public class ConsignmentQueryUtil {
* @return com.fedex.connect.common.model.biz.Consignment
*/
public
Consignment
findConsignment
(
UserConsignmentInfoQuery
userConsignmentInfoQuery
,
Consignment
consignment
){
/**
* 查询mapping表
*/
UserConsignmentMapping
byUserIdAndConsignmentCode
=
userConsignmentMappingRepository
.
findByUserIdAndConsignmentCode
(
userConsignmentInfoQuery
.
getUserId
(),
consignment
.
getConsignmentCode
());
Consignment
resultConsignment
=
null
;
if
(
Objects
.
nonNull
(
consignment
)){
//uuid相同,则将运单所有信息返回给到前端
if
((
Objects
.
nonNull
(
userConsignmentInfoQuery
.
getUserUuid
())
&&
userConsignmentInfoQuery
.
getUserUuid
().
equals
(
consignment
.
getUserUuid
()))
||
(
Objects
.
nonNull
(
userConsignmentInfoQuery
.
getShipperAccount
())
&&
userConsignmentInfoQuery
.
getShipperAccount
().
equals
(
consignment
.
getShipperAccount
()))){
if
(
Objects
.
equals
(
userConsignmentInfoQuery
.
getUserUuid
(),
consignment
.
getUserUuid
())
||
(
byUserIdAndConsignmentCode
.
getCeFlag
()
!=
null
&&
byUserIdAndConsignmentCode
.
getCeFlag
()
==
1L
)){
//1:如果运单UUID与登录账号UUID相同或者用户shipperAccount与运单shipperAccount相同,则显示运单、收发件人信息,以及501信息
resultConsignment
=
consignment
;
}
else
{
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/ConsignmentUtil.java
View file @
e476d69
...
...
@@ -278,7 +278,8 @@ public class ConsignmentUtil {
public
void
submitInfo
(
Consignment
consignment
,
List
<
Attachment
>
attachmentList
,
UploadRecord
uploadRecord
,
User
user
)
throws
Exception
{
User
user
,
Long
ceFlag
)
throws
Exception
{
if
(
Objects
.
nonNull
(
consignment
)
&&
Objects
.
nonNull
(
consignment
.
getId
())){
try
{
//增加行级锁
...
...
@@ -316,7 +317,7 @@ public class ConsignmentUtil {
/**
* 初始化插入预清关文件推送任务日志
*/
userConsignmentMapping
=
userConsignmentMappingUtil
.
initUserConsignmentMapping
(
user
.
getId
(),
consignment
.
getId
());
userConsignmentMapping
=
userConsignmentMappingUtil
.
initUserConsignmentMapping
(
user
.
getId
(),
consignment
.
getId
()
,
ceFlag
);
/**
* 初始化插入预清关文件推送任务日志
*/
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/UserConsignmentMappingUtil.java
View file @
e476d69
...
...
@@ -22,11 +22,12 @@ public class UserConsignmentMappingUtil {
* @param
* @return com.fedex.connect.common.model.biz.PushOb
*/
public
UserConsignmentMapping
initUserConsignmentMapping
(
Long
userId
,
Long
consignmentId
)
throws
Exception
{
public
UserConsignmentMapping
initUserConsignmentMapping
(
Long
userId
,
Long
consignmentId
,
Long
ceFlag
)
throws
Exception
{
UserConsignmentMapping
userConsignmentMapping
=
new
UserConsignmentMapping
();
userConsignmentMapping
.
setUserId
(
userId
);
userConsignmentMapping
.
setConsignmentId
(
consignmentId
);
userConsignmentMapping
.
setStatus
(
StatusEnum
.
YES
.
getCode
());
userConsignmentMapping
.
setCeFlag
(
ceFlag
);
AssignmentFieldUtils
.
assignmentTableBaseField
(
userConsignmentMapping
);
return
userConsignmentMapping
;
}
...
...
Please
register
or
login
to post a comment