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
77a62cdf
Commit
77a62cdf
authored
Aug 21, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入仓订单修改审批业务对控货订单发货人设置控货无收货人属性变动的业务修改
parent
e9406f71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
21 deletions
+55
-21
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+50
-21
OrderBackVO.java
...a/cn/iocoder/yudao/module/order/vo/order/OrderBackVO.java
+5
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
77a62cdf
...
...
@@ -1815,33 +1815,57 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
CustomerContactsDO
consignorContactsDO
=
customerContactsService
.
getCustomerContacts
(
updateReqVO
.
getConsignorContactsId
());
OrderConsignorBackVO
orderConsignorBackVO
=
vo
.
getConsignorVO
();
CustomerDO
consignorDO
=
null
;
boolean
noConsignee
=
false
;
if
(
Objects
.
nonNull
(
consignorContactsDO
))
{
consignorDO
=
customerService
.
getById
(
updateReqVO
.
getConsignorId
());
consignorDO
=
customerService
.
getById
(
consignorContactsDO
.
getCustomerId
());
if
(
Objects
.
nonNull
(
consignorDO
))
{
noConsignee
=
consignorDO
.
getNoConsignee
();
if
(
vo
.
getIsCargoControl
()
&&
vo
.
getHasConsignee
()
!=
noConsignee
)
{
ApplyInfoVO
infoVO
=
new
ApplyInfoVO
();
infoVO
.
setName
(
"控货订单发货人控货无收货人"
);
infoVO
.
setOrgValue
(
vo
.
getHasConsignee
()?
"是"
:
"否"
);
infoVO
.
setNewValue
(
noConsignee
?
"是"
:
"否"
);
vo
.
setHasConsignee
(
noConsignee
);
applyInfoList
.
add
(
infoVO
);
// 发货人控货无收货人属性设置变动,需要变动客户业绩
vo
.
setIsCharge
(
true
);
}
}
this
.
compareConsignorInfo
(
updateReqVO
,
consignorContactsDO
,
orderConsignorBackVO
,
applyInfoList
,
vo
);
}
vo
.
setConsignorVO
(
orderConsignorBackVO
);
// 比较收货人信息
CustomerContactsDO
consigneeContactsDO
=
customerContactsService
.
getCustomerContacts
(
updateReqVO
.
getConsigneeContactsId
());
OrderConsigneeBackVO
orderConsigneeBackVO
=
vo
.
getConsigneeVO
();
CustomerDO
consigneeDO
=
customerService
.
getById
(
updateReqVO
.
getConsignorId
());
if
(
Objects
.
isNull
(
consigneeContactsDO
))
{
//todo 需要判断手机号唯一性,判断规则:1.区号相同,2.先判断手机号码是否存在,然后再判断:a.如果是0开头,判断是否存在非0开头号码;b.如果非0开头,判断是否存在0开头号码
CustomerDO
consigneeDO
=
customerService
.
getById
(
updateReqVO
.
getConsigneeId
());
if
(
vo
.
getIsCargoControl
()
&&
!
noConsignee
)
{
if
(
Objects
.
isNull
(
consigneeContactsDO
))
{
//todo 需要判断手机号唯一性,判断规则:1.区号相同,2.先判断手机号码是否存在,然后再判断:a.如果是0开头,判断是否存在非0开头号码;b.如果非0开头,判断是否存在0开头号码
// consigneeDO = customerService.getById(updateReqVO.getConsignorId());
// 客户不存在,新增客户联系人信息 orderConsigneeDO中有值
// 20230511 收货人无客户档案时 判断发货人有无客户经理,没有 生成客户档案,进入待分配。
// 有客户经理,则暂时不生成客户档案。(放在入仓时处理)
if
(
consigneeDO
==
null
||
consigneeDO
.
getCustomerService
()
==
null
||
consigneeDO
.
getCustomerService
()
==
0
)
{
consigneeContactsDO
=
customerService
.
createConsigeeCustomer
(
orderConsigneeBackVO
.
getName
(),
orderConsigneeBackVO
.
getCountryCode
(),
orderConsigneeBackVO
.
getPhone
(),
orderConsigneeBackVO
.
getCompany
(),
orderConsigneeBackVO
.
getEmail
(),
consigneeDO
,
vo
.
getOrderNo
());
}
}
if
(
Objects
.
nonNull
(
consigneeContactsDO
))
{
this
.
compareConsigneeInfo
(
updateReqVO
,
consigneeContactsDO
,
orderConsigneeBackVO
,
applyInfoList
,
vo
,
dictDataRespDTO
);
// 客户不存在,新增客户联系人信息 orderConsigneeDO中有值
// 20230511 收货人无客户档案时 判断发货人有无客户经理,没有 生成客户档案,进入待分配。
// 有客户经理,则暂时不生成客户档案。(放在入仓时处理)
if
(
consigneeDO
==
null
||
consigneeDO
.
getCustomerService
()
==
null
||
consigneeDO
.
getCustomerService
()
==
0
)
{
consigneeContactsDO
=
customerService
.
createConsigeeCustomer
(
orderConsigneeBackVO
.
getName
(),
orderConsigneeBackVO
.
getCountryCode
(),
orderConsigneeBackVO
.
getPhone
(),
orderConsigneeBackVO
.
getCompany
(),
orderConsigneeBackVO
.
getEmail
(),
consigneeDO
,
vo
.
getOrderNo
());
}
}
if
(
Objects
.
nonNull
(
consigneeContactsDO
))
{
this
.
compareConsigneeInfo
(
updateReqVO
,
consigneeContactsDO
,
orderConsigneeBackVO
,
applyInfoList
,
vo
,
dictDataRespDTO
);
}
}
else
{
// 控货订单发货人设置为控货无收货人,这里需要处理掉订单的收货人信息
if
(
Objects
.
nonNull
(
orderConsigneeBackVO
)){
ApplyInfoVO
infoVO
=
new
ApplyInfoVO
();
infoVO
.
setName
(
"控货订单发货人设置为控货无收货人,清除订单收货人信息/Set the shipper of the controlled goods order to no consignee, and clear the consignee information of the order"
);
applyInfoList
.
add
(
infoVO
);
vo
.
setIsChargeNoConsignee
(
true
);
}
}
if
(
vo
.
getIsCharge
()
||
orderConsignorBackVO
.
getIsCharge
()
||
orderConsigneeBackVO
.
getIsCharge
())
{
...
...
@@ -2618,7 +2642,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
infoVO
.
setNewValue
(
updateReqVO
.
getIsCargoControl
()
?
"是/yes"
:
"否/no"
);
vo
.
setIsCargoControl
(
updateReqVO
.
getIsCargoControl
());
applyInfoList
.
add
(
infoVO
);
// vo.setIsCharge(true);
}
Map
<
Integer
,
CurrencyRespDTO
>
currencyMap
=
currencyApi
.
getAllCurrency
();
CurrencyRespDTO
orgCurrencyRespDTO
=
currencyMap
.
get
(
vo
.
getCollectionProxyCurrency
());
...
...
@@ -5398,7 +5421,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
OrderConsignorDO
consignorDO
=
OrderConsignorConvert
.
INSTANCE
.
convert
(
consignorVO
);
orderConsignorService
.
updateById
(
consignorDO
);
OrderConsigneeDO
consigneeDO
=
OrderConsigneeConvert
.
INSTANCE
.
convert
(
consigneeVO
);
orderConsigneeService
.
updateById
(
consigneeDO
);
// 控货订单发货人无收货人属性变动,需要清空订单收货人信息
if
(
orderBackVO
.
getIsChargeNoConsignee
()){
orderConsigneeService
.
removeById
(
consigneeDO
.
getId
());
}
else
{
orderConsigneeService
.
updateById
(
consigneeDO
);
}
// 始发地目的地更新
OrderDepartureDO
departureDO
=
OrderDepartureConvert
.
INSTANCE
.
convert
(
orderBackVO
.
getOrderDepartureVO
());
orderDepartureService
.
updateById
(
departureDO
);
...
...
@@ -5605,6 +5633,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
isConsigneeChange
&&
consigneeVO
.
getCustomerId
()
!=
null
)
{
customerService
.
updateCustomerStatusByExistedOrderAndOffer
(
consigneeVO
.
getCustomerId
(),
true
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"更新收发货人状态时出现异常"
,
e
);
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/order/OrderBackVO.java
View file @
77a62cdf
...
...
@@ -558,9 +558,14 @@ public class OrderBackVO {
@ApiModelProperty
(
value
=
"是否变动业绩归属"
)
private
Boolean
isCharge
=
false
;
@ApiModelProperty
(
value
=
"是否变动控货状态"
)
private
Boolean
isChargeCargoControl
=
false
;
@ApiModelProperty
(
value
=
"是否变动付款人信息"
)
private
Boolean
isDrawee
=
false
;
@ApiModelProperty
(
value
=
"是否变动发货人设置订单控货无收货人属性"
)
private
Boolean
isChargeNoConsignee
=
false
;
@ApiModelProperty
(
value
=
"是否需要产生未分配客户经理异常异常"
)
private
Boolean
isCreateCustomerServiceException
=
false
;
...
...
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