Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
ae6857ff
Commit
ae6857ff
authored
Sep 04, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提单制作的查询中对无发货人的订单bug做兼容处理
parent
501f413a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
18 deletions
+20
-18
MakeBillOfLadingServiceImpl.java
...service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
+20
-18
No files found.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
View file @
ae6857ff
...
...
@@ -476,8 +476,8 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
}
CustomerDO
customer
=
customerService
.
getCustomer
(
info
.
getCustomerId
());
//订单基本信息
orderInfoMap
.
put
(
"consignee"
,
info
.
getConsigneeVO
().
getName
()
);
orderInfoMap
.
put
(
"consigneePhone"
,
"+"
+
info
.
getConsigneeVO
().
getCountryCode
()
+
info
.
getConsigneeVO
().
getPhone
()
);
orderInfoMap
.
put
(
"consignee"
,
Objects
.
nonNull
(
info
.
getConsigneeVO
())
?
info
.
getConsigneeVO
().
getName
():
""
);
orderInfoMap
.
put
(
"consigneePhone"
,
Objects
.
nonNull
(
info
.
getConsigneeVO
())
?
"+"
+
info
.
getConsigneeVO
().
getCountryCode
()
+
info
.
getConsigneeVO
().
getPhone
()
:
""
);
orderInfoMap
.
put
(
"consignor"
,
info
.
getConsignorVO
().
getName
());
orderInfoMap
.
put
(
"consignorPhone"
,
"+"
+
info
.
getConsignorVO
().
getCountryCode
()
+
info
.
getConsignorVO
().
getPhone
());
if
(
info
.
getDrawee
()
==
1
)
{
...
...
@@ -486,7 +486,7 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
orderInfoMap
.
put
(
"consignor"
,
shipperName
);
}
else
if
(
info
.
getDrawee
()
==
2
)
{
//订单付款人为收货人
String
consigneeName
=
getShipperNameAndConsignee
(
info
,
2
,
orderInfoMap
)
;
String
consigneeName
=
Objects
.
nonNull
(
info
.
getConsigneeVO
())
?
getShipperNameAndConsignee
(
info
,
2
,
orderInfoMap
)
:
""
;
orderInfoMap
.
put
(
"consignee"
,
consigneeName
);
}
orderInfoMap
.
put
(
"orderNo"
,
info
.
getOrderNo
());
...
...
@@ -670,26 +670,28 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
if
(
type
==
1
&&
StringUtils
.
isNotBlank
(
info
.
getConsignorVO
().
getCompanyEn
()))
{
map
.
put
(
"consignorCompany"
,
info
.
getConsignorVO
().
getCompanyEn
());
}
else
if
(
type
==
2
&&
StringUtils
.
isNotBlank
(
info
.
getConsigneeVO
().
getCompanyEn
()))
{
map
.
put
(
"consigneeCompany"
,
info
.
getConsigneeVO
().
getCompanyEn
()
);
map
.
put
(
"consigneeCompany"
,
Objects
.
nonNull
(
info
.
getConsigneeVO
())
?
info
.
getConsigneeVO
().
getCompanyEn
()
:
""
);
}
// stringBuffer.append(companyEn).append("\r\n");
CustomerDO
customer
Consignor
=
null
;
CustomerDO
customer
=
null
;
if
(
type
==
1
)
{
//当发货人为订单付款人 订单页面发货人公司英文名称客户档案付款人名字+发货人英文名字
customer
Consignor
=
customerService
.
getCustomer
(
info
.
getConsignorVO
().
getCustomerId
());
customer
=
customerService
.
getCustomer
(
info
.
getConsignorVO
().
getCustomerId
());
}
else
{
//当收货人为订单付款人 订单页面发货人公司英文名称客户档案付款人名字+发货人英文名字
customerConsignor
=
customerService
.
getCustomer
(
info
.
getConsigneeVO
().
getCustomerId
());
if
(
Objects
.
nonNull
(
info
.
getConsigneeVO
()))
{
customer
=
customerService
.
getCustomer
(
info
.
getConsigneeVO
().
getCustomerId
());
}
}
if
(
customer
Consignor
!=
null
&&
StringUtils
.
isNotBlank
(
customerConsigno
r
.
getPayerName
()))
{
String
name
=
customer
Consignor
.
getPayerName
();
if
(
customer
!=
null
&&
StringUtils
.
isNotBlank
(
custome
r
.
getPayerName
()))
{
String
name
=
customer
.
getPayerName
();
String
nameEn
=
""
;
if
(
type
==
1
)
{
nameEn
=
info
.
getConsignorVO
().
getNameEn
();
}
else
{
nameEn
=
info
.
getConsigneeVO
().
getNameEn
()
;
nameEn
=
Objects
.
nonNull
(
info
.
getConsigneeVO
())
?
info
.
getConsigneeVO
().
getNameEn
()
:
""
;
}
if
(
customer
Consignor
.
getPayerName
().
equals
(
customerConsignor
.
getNameEn
())
&&
!
pattern
.
matcher
(
customerConsigno
r
.
getPayerName
()).
find
())
{
if
(
customer
.
getPayerName
().
equals
(
customer
.
getNameEn
())
&&
!
pattern
.
matcher
(
custome
r
.
getPayerName
()).
find
())
{
stringBuffer
.
append
(
StringUtils
.
isBlank
(
name
)
?
""
:
name
);
}
else
{
stringBuffer
.
append
(
StringUtils
.
isBlank
(
name
)
?
""
:
name
).
append
(
" "
).
append
(
StringUtils
.
isBlank
(
nameEn
)
?
""
:
nameEn
);
...
...
@@ -706,10 +708,10 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
stringBuffer
.
append
(
StringUtils
.
isBlank
(
name
)
?
""
:
name
).
append
(
" "
).
append
(
StringUtils
.
isBlank
(
nameEn
)
?
""
:
nameEn
);
}
}
else
{
OrderConsigneeBackVO
consign
or
VO
=
info
.
getConsigneeVO
();
String
name
=
consign
or
VO
.
getName
();
String
nameEn
=
consign
or
VO
.
getNameEn
();
if
(
consign
orVO
.
getName
().
equals
(
consignorVO
.
getNameEn
())
&&
!
pattern
.
matcher
(
consignor
VO
.
getName
()).
find
())
{
OrderConsigneeBackVO
consign
ee
VO
=
info
.
getConsigneeVO
();
String
name
=
consign
ee
VO
.
getName
();
String
nameEn
=
consign
ee
VO
.
getNameEn
();
if
(
consign
eeVO
.
getName
().
equals
(
consigneeVO
.
getNameEn
())
&&
!
pattern
.
matcher
(
consignee
VO
.
getName
()).
find
())
{
stringBuffer
.
append
(
StringUtils
.
isBlank
(
name
)
?
""
:
name
);
}
else
{
stringBuffer
.
append
(
StringUtils
.
isBlank
(
name
)
?
""
:
name
).
append
(
" "
).
append
(
StringUtils
.
isBlank
(
nameEn
)
?
""
:
nameEn
);
...
...
@@ -988,15 +990,15 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
}
CustomerDO
customer
=
customerService
.
getCustomer
(
info
.
getCustomerId
());
//订单基本信息
orderInfoMap
.
put
(
"consignee"
,
info
.
getConsigneeVO
().
getName
()
);
orderInfoMap
.
put
(
"consigneePhone"
,
"+"
+
info
.
getConsigneeVO
().
getCountryCode
()
+
info
.
getConsigneeVO
().
getPhone
()
);
orderInfoMap
.
put
(
"consignee"
,
Objects
.
nonNull
(
info
.
getConsigneeVO
())
?
info
.
getConsigneeVO
().
getName
()
:
""
);
orderInfoMap
.
put
(
"consigneePhone"
,
Objects
.
nonNull
(
info
.
getConsigneeVO
())
?
"+"
+
info
.
getConsigneeVO
().
getCountryCode
()
+
info
.
getConsigneeVO
().
getPhone
()
:
""
);
orderInfoMap
.
put
(
"consignor"
,
info
.
getConsignorVO
().
getName
());
orderInfoMap
.
put
(
"consignorPhone"
,
"+"
+
info
.
getConsignorVO
().
getCountryCode
()
+
info
.
getConsignorVO
().
getPhone
());
if
(
info
.
getDrawee
()
==
1
)
{
//订单付款人为发货人
String
shipperName
=
getShipperNameAndConsignee
(
info
,
1
,
orderInfoMap
);
orderInfoMap
.
put
(
"consignor"
,
shipperName
);
}
else
if
(
info
.
getDrawee
()
==
2
)
{
//订单付款人为收货人
String
consigneeName
=
getShipperNameAndConsignee
(
info
,
2
,
orderInfoMap
)
;
String
consigneeName
=
Objects
.
nonNull
(
info
.
getConsigneeVO
())
?
getShipperNameAndConsignee
(
info
,
2
,
orderInfoMap
)
:
""
;
orderInfoMap
.
put
(
"consignee"
,
consigneeName
);
}
orderInfoMap
.
put
(
"orderNo"
,
info
.
getOrderNo
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment