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
bdd71966
Commit
bdd71966
authored
Aug 27, 2024
by
yanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 发送短信时添加收货人是否为空的判断
parent
cf96645e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
31 deletions
+35
-31
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+35
-31
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
bdd71966
...
...
@@ -2272,24 +2272,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
String
consignorPhone
=
orderConsignorDO
.
getPhone
();
Long
consignorCustomerId
=
orderConsignorDO
.
getCustomerId
();
OrderConsigneeDO
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
orderDO
.
getOrderId
())
.
orderByDesc
(
OrderConsigneeDO:
:
getId
)
.
last
(
"limit 1"
));
// 收货人 短信发送信息
String
consigneeCountryCode
=
orderConsigneeDO
.
getCountryCode
();
String
consigneePhone
=
orderConsigneeDO
.
getPhone
();
Long
consigneeCustomerId
=
orderConsigneeDO
.
getCustomerId
();
// 查询仓库
LogisticsInfoDto
logisticsInfoDto
=
warehouseLineMapper
.
getStartInfoAndDestInfoByLineId
(
orderDO
.
getLineId
());
String
consignorStartWarehouseName
=
consignorCountryCode
.
equals
(
"86"
)
?
logisticsInfoDto
.
getStartTitleZh
()
:
logisticsInfoDto
.
getStartTitleEn
();
String
consignorDestWearehouseName
=
consignorCountryCode
.
equals
(
"86"
)
?
logisticsInfoDto
.
getDestTitleZh
()
:
logisticsInfoDto
.
getDestTitleEn
();
String
consigneeStartWarehouseName
=
consigneeCountryCode
.
equals
(
"86"
)
?
logisticsInfoDto
.
getStartTitleZh
()
:
logisticsInfoDto
.
getStartTitleEn
();
String
consigneeDestWearehouseName
=
consigneeCountryCode
.
equals
(
"86"
)
?
logisticsInfoDto
.
getDestTitleZh
()
:
logisticsInfoDto
.
getDestTitleEn
();
DateTime
ruchang
=
DateTime
.
of
(
orderDO
.
getRucangTime
());
// 追加短信
...
...
@@ -2396,22 +2384,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
consignorParamMap
.
put
(
"cmb"
,
chargeVolume
);
consignorParamMap
.
put
(
"kg"
,
chargeWeight
);
Map
<
String
,
Object
>
consigneeParamMap
=
new
HashMap
<>();
if
(!
StringUtils
.
equals
(
consignorCountryCode
.
concat
(
consignorPhone
),
consigneeCountryCode
.
concat
(
consigneePhone
)))
{
consigneeParamMap
.
put
(
"date"
,
DateUtils
.
formatDateTime
(
orderDO
.
getRucangTime
()));
consigneeParamMap
.
put
(
"cnts"
,
orderDO
.
getSumNum
());
// 多少箱
consigneeParamMap
.
put
(
"warehouse"
,
consigneeStartWarehouseName
);
// 入仓名
consigneeParamMap
.
put
(
"year"
,
ruchang
.
year
());
consigneeParamMap
.
put
(
"month"
,
ruchang
.
month
()
+
1
);
consigneeParamMap
.
put
(
"day"
,
ruchang
.
dayOfMonth
());
consigneeParamMap
.
put
(
"order"
,
orderDO
.
getOrderNo
());
// orderNo
consigneeParamMap
.
put
(
"branch"
,
consigneeDestWearehouseName
);
// 提货点
consigneeParamMap
.
put
(
"box"
,
orderDO
.
getSumNum
());
// 多少箱
consigneeParamMap
.
put
(
"marks"
,
marks
);
consigneeParamMap
.
put
(
"cmb"
,
chargeVolume
);
consigneeParamMap
.
put
(
"kg"
,
chargeWeight
);
}
if
(
orderDO
.
getIsCollection
())
{
Map
<
Integer
,
CurrencyRespDTO
>
currencyRespDTOMap
=
currencyApi
.
getAllCurrency
();
...
...
@@ -2430,9 +2404,39 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}
// 给发货人发送短信
this
.
smsSendNotice
(
consignorCountryCode
,
consignorPhone
,
consignorCustomerId
,
templateCode
,
consignorParamMap
);
if
(!
StringUtils
.
equals
(
consignorCountryCode
.
concat
(
consignorPhone
),
consigneeCountryCode
.
concat
(
consigneePhone
)))
{
// 给收货人发送短信
this
.
smsSendNotice
(
consigneeCountryCode
,
consigneePhone
,
consigneeCustomerId
,
templateCode
,
consigneeParamMap
);
// 收货人 短信发送信息
OrderConsigneeDO
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
orderDO
.
getOrderId
())
.
orderByDesc
(
OrderConsigneeDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
orderConsigneeDO
!=
null
)
{
String
consigneeCountryCode
=
orderConsigneeDO
.
getCountryCode
();
String
consigneePhone
=
orderConsigneeDO
.
getPhone
();
Long
consigneeCustomerId
=
orderConsigneeDO
.
getCustomerId
();
String
consigneeStartWarehouseName
=
consigneeCountryCode
.
equals
(
"86"
)
?
logisticsInfoDto
.
getStartTitleZh
()
:
logisticsInfoDto
.
getStartTitleEn
();
String
consigneeDestWearehouseName
=
consigneeCountryCode
.
equals
(
"86"
)
?
logisticsInfoDto
.
getDestTitleZh
()
:
logisticsInfoDto
.
getDestTitleEn
();
if
(!
StringUtils
.
equals
(
consignorCountryCode
.
concat
(
consignorPhone
),
consigneeCountryCode
.
concat
(
consigneePhone
)))
{
consigneeParamMap
.
put
(
"date"
,
DateUtils
.
formatDateTime
(
orderDO
.
getRucangTime
()));
consigneeParamMap
.
put
(
"cnts"
,
orderDO
.
getSumNum
());
// 多少箱
consigneeParamMap
.
put
(
"warehouse"
,
consigneeStartWarehouseName
);
// 入仓名
consigneeParamMap
.
put
(
"year"
,
ruchang
.
year
());
consigneeParamMap
.
put
(
"month"
,
ruchang
.
month
()
+
1
);
consigneeParamMap
.
put
(
"day"
,
ruchang
.
dayOfMonth
());
consigneeParamMap
.
put
(
"order"
,
orderDO
.
getOrderNo
());
// orderNo
consigneeParamMap
.
put
(
"branch"
,
consigneeDestWearehouseName
);
// 提货点
consigneeParamMap
.
put
(
"box"
,
orderDO
.
getSumNum
());
// 多少箱
consigneeParamMap
.
put
(
"marks"
,
marks
);
consigneeParamMap
.
put
(
"cmb"
,
chargeVolume
);
consigneeParamMap
.
put
(
"kg"
,
chargeWeight
);
}
if
(!
StringUtils
.
equals
(
consignorCountryCode
.
concat
(
consignorPhone
),
consigneeCountryCode
.
concat
(
consigneePhone
)))
{
// 给收货人发送短信
this
.
smsSendNotice
(
consigneeCountryCode
,
consigneePhone
,
consigneeCustomerId
,
templateCode
,
consigneeParamMap
);
}
}
}
...
...
@@ -2482,7 +2486,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 收货人
OrderConsigneeDO
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
orderDO
.
getOrderId
())
.
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
if
(
orderConsigneeDO
.
getCustomerId
()
!=
null
)
{
if
(
orderConsigneeDO
!=
null
&&
orderConsigneeDO
.
getCustomerId
()
!=
null
)
{
Long
consigneeUserId
=
getUserId
(
orderConsigneeDO
.
getCustomerId
());
if
(
consigneeUserId
!=
null
)
{
internalMsgUserIdSet
.
add
(
consigneeUserId
);
...
...
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