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
tao.mo
2024-12-24 14:38:36 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
40a108544a7d2948ac452ca096e8a3bb5129af29
40a10854
1 parent
f7fe9576
biz-customer | 修改 | 运单查询逻辑处理
mt 2024年12月24日14:38:28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
2 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentQueryServiceImpl.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/service/biz/impl/ConsignmentQueryServiceImpl.java
View file @
40a1085
...
...
@@ -12,9 +12,12 @@ import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
import
com.fedex.connect.customer.enums.ResponseCode
;
import
com.fedex.connect.customer.service.base.BaseService
;
import
com.fedex.connect.customer.service.biz.IConsignmentQueryService
;
import
com.fedex.connect.customer.util.service.biz.ConsignmentQueryUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @Author Szl
...
...
@@ -23,6 +26,10 @@ import java.util.List;
*/
@Service
public
class
ConsignmentQueryServiceImpl
extends
BaseService
implements
IConsignmentQueryService
{
@Autowired
ConsignmentQueryUtil
consignmentQueryUtil
;
/**
* @Author Szl
* @Description 功能说明 运单查询
...
...
@@ -61,6 +68,10 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign
*/
public
ResponseVo
findConsignmentInfo
(
UserConsignmentInfoQuery
userConsignmentInfoQuery
)
{
Consignment
consignment
=
consignmentRepository
.
findConsignmentInfo
(
userConsignmentInfoQuery
);
return
responseUtils
.
success
(
consignment
);
/**
* 对查询数据进行筛选
*/
Consignment
resultConsignment
=
consignmentQueryUtil
.
findConsignment
(
userConsignmentInfoQuery
,
consignment
);
return
responseUtils
.
success
(
resultConsignment
);
}
}
}
\ No newline at end of file
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/ConsignmentQueryUtil.java
0 → 100644
View file @
40a1085
package
com
.
fedex
.
connect
.
customer
.
util
.
service
.
biz
;
import
com.fedex.connect.common.model.biz.Consignment
;
import
com.fedex.connect.customer.data.query.UserConsignmentInfoQuery
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
java.util.Objects
;
/**
* @Author mt
* @Description 运单数据查询处理
* @Date 2024/12/24
*/
@Slf4j
@Component
public
class
ConsignmentQueryUtil
{
/**
* @Author mt
* @Description 运单查询数据筛选
* @Date 2024/12/24
* @param userConsignmentInfoQuery
* @param consignment
* @return com.fedex.connect.common.model.biz.Consignment
*/
public
Consignment
findConsignment
(
UserConsignmentInfoQuery
userConsignmentInfoQuery
,
Consignment
consignment
){
Consignment
resultConsignment
=
null
;
if
(
Objects
.
nonNull
(
consignment
)){
//uuid相同,则将运单所有信息返回给到前端
if
(
userConsignmentInfoQuery
.
getUserUuid
().
equals
(
consignment
.
getUserUuid
())
||
userConsignmentInfoQuery
.
getShipperAccount
().
equals
(
consignment
.
getShipperAccount
())){
//1:如果运单UUID与登录账号UUID相同或者用户shipperAccount与运单shipperAccount相同,则显示运单、收发件人信息,以及501信息
resultConsignment
=
consignment
;
}
else
if
(
userConsignmentInfoQuery
.
getShipperAccount
().
equals
(
consignment
.
getUserInputShipperAccount
())
||
userConsignmentInfoQuery
.
getUserId
().
equals
(
consignment
.
getCreateUserId
())){
//如果运单UUID与登录账号UUID不同,用户shipperAccount与运单录入的shipperAccount一致,则只显示用户录入的运单号、shipperAccount、始发国
resultConsignment
=
new
Consignment
();
resultConsignment
.
setId
(
consignment
.
getId
());
resultConsignment
.
setConsignmentCode
(
consignment
.
getConsignmentCode
());
resultConsignment
.
setUserInputOriginCountry
(
consignment
.
getUserInputOriginCountry
());
resultConsignment
.
setUserInputOriginCountryCode
(
consignment
.
getUserInputOriginCountryCode
());
resultConsignment
.
setUserInputShipperAccount
(
consignment
.
getUserInputShipperAccount
());
resultConsignment
.
setDestinationCountry
(
consignment
.
getDestinationCountry
());
resultConsignment
.
setDestinationCountryCode
(
consignment
.
getDestinationCountryCode
());
}
}
return
resultConsignment
;
}
}
Please
register
or
login
to post a comment