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
2024-12-06 17:14:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a6797265ea08c66bbd9e100a30f4e226b75535cd
a6797265
1 parent
9b03ec11
customer|add代码&&查询调整
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
8 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/data/dto/ConsignmentAddDto.java
server/biz-customer/src/main/java/com/fedex/connect/customer/data/dto/FindConsignmentsDto.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/mapper/ConsignmentExtMapper.xml
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/ConsignmentRepositoryImpl.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/data/dto/ConsignmentAddDto.java
View file @
a679726
package
com
.
fedex
.
connect
.
customer
.
data
.
dto
;
import
com.fedex.connect.common.model.biz.Consignment
;
import
lombok.Data
;
@Data
...
...
@@ -8,6 +7,6 @@ public class ConsignmentAddDto {
/**
* 是否为该用户的运单 1:是 0:否
*/
Integer
isCreatorFlag
;
Consignment
consignment
;
private
Integer
isCreatorFlag
;
private
Long
consignmentId
;
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/data/dto/FindConsignmentsDto.java
View file @
a679726
...
...
@@ -24,4 +24,14 @@ public class FindConsignmentsDto {
private
Date
modifyTime
;
private
String
statusName
;
private
String
userUuid
;
private
String
userInputShipperAccount
;
private
String
shipperAccount
;
private
String
userInputOriginCountryCode
;
private
String
userInputOriginCountry
;
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/mapper/ConsignmentExtMapper.xml
View file @
a679726
...
...
@@ -28,7 +28,12 @@
c.CREATE_USER_NAME,
c.CREATE_TIME,
c.MODIFY_TIME,
c.STATUS_NAME
c.STATUS_NAME,
c.USER_UUID,
c.SHIPPER_ACCOUNT,
c.USER_INPUT_SHIPPER_ACCOUNT,
c.USER_INPUT_ORIGIN_COUNTRY_CODE,
c.USER_INPUT_ORIGIN_COUNTRY
</sql>
<select
id=
"findConsignments"
resultType=
"com.fedex.connect.customer.data.dto.FindConsignmentsDto"
>
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/ConsignmentRepositoryImpl.java
View file @
a679726
...
...
@@ -45,6 +45,18 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe
if
(
SystemDefaultUserConstants
.
SYSTEM_USER_KEYS
.
USER_NAME
.
equals
(
consignment
.
getCreateUserName
())){
consignment
.
setCreateUserName
(
user
.
getUserName
());
}
if
(!
user
.
getUserUuid
().
equals
(
consignment
.
getUserUuid
())
&&
!
user
.
getAccountNo
().
equals
(
consignment
.
getShipperAccount
())){
consignment
.
setRecipientContactName
(
null
);
consignment
.
setRecipientCompany
(
null
);
consignment
.
setDocNondocFlag
(
null
);
consignment
.
setCreateUserName
(
null
);
consignment
.
setCreateTime
(
null
);
consignment
.
setModifyTime
(
null
);
consignment
.
setStatusName
(
null
);
consignment
.
setUserUuid
(
null
);
consignment
.
setShipperAccount
(
null
);
consignment
.
setOriginCountry
(
consignment
.
getUserInputOriginCountry
());
}
});
return
consignments
;
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/ConsignmentUtil.java
View file @
a679726
...
...
@@ -99,12 +99,13 @@ public class ConsignmentUtil {
*/
public
ResponseVo
consignmentCheckWithNotCe
(
Consignment
consignment
,
AddBo
bo
){
ConsignmentAddDto
consignmentAddDto
=
new
ConsignmentAddDto
();
consignmentAddDto
.
setConsignment
(
consignment
);
consignmentAddDto
.
setConsignment
Id
(
consignment
.
getId
()
);
if
(
isShipperAccountMatch
(
bo
.
getShipperAccount
(),
consignment
.
getShipperAccount
())){
consignmentAddDto
.
setIsCreatorFlag
(
DigitConstants
.
DIGIT_ONE
);
return
responseUtils
.
success
(
consignmentAddDto
);
}
else
{
consignmentAddDto
.
setIsCreatorFlag
(
DigitConstants
.
DIGIT_THREE
);
consignmentAddDto
.
setConsignmentId
(
null
);
return
responseUtils
.
success
(
ResponseCode
.
MESSAGE_CODE_30011
,
consignmentAddDto
);
}
}
...
...
@@ -120,7 +121,7 @@ public class ConsignmentUtil {
*/
public
ResponseVo
consignmentCheckWithCe
(
Consignment
consignment
,
AddBo
bo
,
User
user
)
{
ConsignmentAddDto
consignmentAddDto
=
new
ConsignmentAddDto
();
consignmentAddDto
.
setConsignment
(
consignment
);
consignmentAddDto
.
setConsignment
Id
(
consignment
.
getId
()
);
/**
* uuid相同,直接返回所有运单信息
...
...
@@ -143,7 +144,7 @@ public class ConsignmentUtil {
*/
if
(!
StringUtils
.
hasText
(
bo
.
getShipperAccount
())){
consignmentAddDto
.
setIsCreatorFlag
(
DigitConstants
.
DIGIT_TWO
);
consignmentAddDto
.
setConsignment
(
null
);
consignmentAddDto
.
setConsignment
Id
(
null
);
return
responseUtils
.
success
(
ResponseCode
.
MESSAGE_CODE_30012
,
consignmentAddDto
);
}
...
...
@@ -162,7 +163,7 @@ public class ConsignmentUtil {
return
responseUtils
.
success
(
consignmentAddDto
);
}
else
{
consignmentAddDto
.
setIsCreatorFlag
(
DigitConstants
.
DIGIT_THREE
);
consignmentAddDto
.
setConsignment
(
null
);
consignmentAddDto
.
setConsignment
Id
(
null
);
return
responseUtils
.
success
(
ResponseCode
.
MESSAGE_CODE_30011
,
consignmentAddDto
);
}
}
...
...
Please
register
or
login
to post a comment