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-20 18:04:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5372e89554ed679513b1c2f22d9898c955278bd0
5372e895
1 parent
43661b23
customer|运单号校验
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/enums/ResponseCode.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
server/biz-customer/src/main/resources/message_en_US.properties
server/biz-customer/src/main/resources/message_zh_CN.properties
server/biz-customer/src/main/java/com/fedex/connect/customer/enums/ResponseCode.java
View file @
5372e89
...
...
@@ -34,6 +34,7 @@ public enum ResponseCode {
MESSAGE_CODE_30014
(
30014
,
"business_exception_30014"
),
MESSAGE_CODE_30015
(
30015
,
"business_success_30015"
),
MESSAGE_CODE_30016
(
30016
,
"business_exception_30016"
),
MESSAGE_CODE_30017
(
30017
,
"business_exception_30017"
),
/******打个样,编写样例*****/
// MESSAGE_CODE_30001(30001,"business_exception_30001"),
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
View file @
5372e89
...
...
@@ -58,6 +58,11 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
* @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
*/
public
ResponseVo
add
(
AddBo
bo
,
User
user
){
ConsignmentAddDto
consignmentAddDto
=
new
ConsignmentAddDto
();
if
(
StringUtils
.
isEmpty
(
bo
.
getConsignmentCode
())
||
!
bo
.
getConsignmentCode
().
matches
(
"\\d{12}"
))
{
consignmentAddDto
.
setIsCreatorFlag
(
DigitConstants
.
DIGIT_TWO
);
return
responseUtils
.
success
(
ResponseCode
.
MESSAGE_CODE_30004
,
consignmentAddDto
);
}
//查询运单表是否存在已提交的运单
LocalDate
thirtyDaysAgo
=
LocalDate
.
now
().
minusDays
(
30
);
Consignment
consignment
=
consignmentRepository
.
findByConsignmentCode
(
bo
.
getConsignmentCode
(),
thirtyDaysAgo
);
...
...
@@ -65,7 +70,6 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
* 不存在则直接返回
*/
if
(
consignment
==
null
){
ConsignmentAddDto
consignmentAddDto
=
new
ConsignmentAddDto
();
consignmentAddDto
.
setIsCreatorFlag
(
DigitConstants
.
DIGIT_ZERO
);
if
(!
StringUtils
.
isEmpty
(
bo
.
getShipperAccount
())){
if
(
Objects
.
equals
(
user
.
getAccountNo
(),
bo
.
getShipperAccount
())){
...
...
@@ -91,7 +95,6 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
* 非501数据
*/
if
(
StringUtils
.
isEmpty
(
bo
.
getShipperAccount
())){
ConsignmentAddDto
consignmentAddDto
=
new
ConsignmentAddDto
();
consignmentAddDto
.
setIsCreatorFlag
(
DigitConstants
.
DIGIT_ZERO
);
return
responseUtils
.
success
(
consignmentAddDto
);
}
...
...
server/biz-customer/src/main/resources/message_en_US.properties
View file @
5372e89
...
...
@@ -45,4 +45,5 @@ business_exception_30012=UUID不一致
business_exception_30013
=
文件名为:{0},上传失败,请检查后重试
business_exception_30014
=
运单信息加载失败,请稍后重试
business_success_30015
=
上传成功
business_exception_30016
=
运单提交失败
\ No newline at end of file
business_exception_30016
=
运单提交失败
business_exception_30017
=
运单号填写错误
\ No newline at end of file
...
...
server/biz-customer/src/main/resources/message_zh_CN.properties
View file @
5372e89
...
...
@@ -45,4 +45,5 @@ business_exception_30012=UUID不一致
business_exception_30013
=
文件名为:{0},上传失败,请检查后重试
business_exception_30014
=
运单信息加载失败,请稍后重试
business_success_30015
=
上传成功
business_exception_30016
=
运单提交失败
\ No newline at end of file
business_exception_30016
=
运单提交失败
business_exception_30017
=
运单号填写错误
\ No newline at end of file
...
...
Please
register
or
login
to post a comment