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
Show 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,15 +1815,30 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1815,15 +1815,30 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
CustomerContactsDO
consignorContactsDO
=
customerContactsService
.
getCustomerContacts
(
updateReqVO
.
getConsignorContactsId
());
CustomerContactsDO
consignorContactsDO
=
customerContactsService
.
getCustomerContacts
(
updateReqVO
.
getConsignorContactsId
());
OrderConsignorBackVO
orderConsignorBackVO
=
vo
.
getConsignorVO
();
OrderConsignorBackVO
orderConsignorBackVO
=
vo
.
getConsignorVO
();
CustomerDO
consignorDO
=
null
;
CustomerDO
consignorDO
=
null
;
boolean
noConsignee
=
false
;
if
(
Objects
.
nonNull
(
consignorContactsDO
))
{
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
);
this
.
compareConsignorInfo
(
updateReqVO
,
consignorContactsDO
,
orderConsignorBackVO
,
applyInfoList
,
vo
);
}
}
vo
.
setConsignorVO
(
orderConsignorBackVO
);
vo
.
setConsignorVO
(
orderConsignorBackVO
);
// 比较收货人信息
// 比较收货人信息
CustomerContactsDO
consigneeContactsDO
=
customerContactsService
.
getCustomerContacts
(
updateReqVO
.
getConsigneeContactsId
());
CustomerContactsDO
consigneeContactsDO
=
customerContactsService
.
getCustomerContacts
(
updateReqVO
.
getConsigneeContactsId
());
OrderConsigneeBackVO
orderConsigneeBackVO
=
vo
.
getConsigneeVO
();
OrderConsigneeBackVO
orderConsigneeBackVO
=
vo
.
getConsigneeVO
();
CustomerDO
consigneeDO
=
customerService
.
getById
(
updateReqVO
.
getConsignorId
());
CustomerDO
consigneeDO
=
customerService
.
getById
(
updateReqVO
.
getConsigneeId
());
if
(
vo
.
getIsCargoControl
()
&&
!
noConsignee
)
{
if
(
Objects
.
isNull
(
consigneeContactsDO
))
{
if
(
Objects
.
isNull
(
consigneeContactsDO
))
{
//todo 需要判断手机号唯一性,判断规则:1.区号相同,2.先判断手机号码是否存在,然后再判断:a.如果是0开头,判断是否存在非0开头号码;b.如果非0开头,判断是否存在0开头号码
//todo 需要判断手机号唯一性,判断规则:1.区号相同,2.先判断手机号码是否存在,然后再判断:a.如果是0开头,判断是否存在非0开头号码;b.如果非0开头,判断是否存在0开头号码
// consigneeDO = customerService.getById(updateReqVO.getConsignorId());
// consigneeDO = customerService.getById(updateReqVO.getConsignorId());
...
@@ -1843,6 +1858,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1843,6 +1858,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
consigneeContactsDO
))
{
if
(
Objects
.
nonNull
(
consigneeContactsDO
))
{
this
.
compareConsigneeInfo
(
updateReqVO
,
consigneeContactsDO
,
orderConsigneeBackVO
,
applyInfoList
,
vo
,
dictDataRespDTO
);
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
()
||
if
(
vo
.
getIsCharge
()
||
orderConsignorBackVO
.
getIsCharge
()
||
orderConsigneeBackVO
.
getIsCharge
())
{
orderConsigneeBackVO
.
getIsCharge
())
{
// TODO 收发货人有变动,则可能业绩归属有变动, 此变动不放入审批详情,
// TODO 收发货人有变动,则可能业绩归属有变动, 此变动不放入审批详情,
...
@@ -2618,7 +2642,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2618,7 +2642,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
infoVO
.
setNewValue
(
updateReqVO
.
getIsCargoControl
()
?
"是/yes"
:
"否/no"
);
infoVO
.
setNewValue
(
updateReqVO
.
getIsCargoControl
()
?
"是/yes"
:
"否/no"
);
vo
.
setIsCargoControl
(
updateReqVO
.
getIsCargoControl
());
vo
.
setIsCargoControl
(
updateReqVO
.
getIsCargoControl
());
applyInfoList
.
add
(
infoVO
);
applyInfoList
.
add
(
infoVO
);
// vo.setIsCharge(true);
}
}
Map
<
Integer
,
CurrencyRespDTO
>
currencyMap
=
currencyApi
.
getAllCurrency
();
Map
<
Integer
,
CurrencyRespDTO
>
currencyMap
=
currencyApi
.
getAllCurrency
();
CurrencyRespDTO
orgCurrencyRespDTO
=
currencyMap
.
get
(
vo
.
getCollectionProxyCurrency
());
CurrencyRespDTO
orgCurrencyRespDTO
=
currencyMap
.
get
(
vo
.
getCollectionProxyCurrency
());
...
@@ -5398,7 +5421,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -5398,7 +5421,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
OrderConsignorDO
consignorDO
=
OrderConsignorConvert
.
INSTANCE
.
convert
(
consignorVO
);
OrderConsignorDO
consignorDO
=
OrderConsignorConvert
.
INSTANCE
.
convert
(
consignorVO
);
orderConsignorService
.
updateById
(
consignorDO
);
orderConsignorService
.
updateById
(
consignorDO
);
OrderConsigneeDO
consigneeDO
=
OrderConsigneeConvert
.
INSTANCE
.
convert
(
consigneeVO
);
OrderConsigneeDO
consigneeDO
=
OrderConsigneeConvert
.
INSTANCE
.
convert
(
consigneeVO
);
// 控货订单发货人无收货人属性变动,需要清空订单收货人信息
if
(
orderBackVO
.
getIsChargeNoConsignee
()){
orderConsigneeService
.
removeById
(
consigneeDO
.
getId
());
}
else
{
orderConsigneeService
.
updateById
(
consigneeDO
);
orderConsigneeService
.
updateById
(
consigneeDO
);
}
// 始发地目的地更新
// 始发地目的地更新
OrderDepartureDO
departureDO
=
OrderDepartureConvert
.
INSTANCE
.
convert
(
orderBackVO
.
getOrderDepartureVO
());
OrderDepartureDO
departureDO
=
OrderDepartureConvert
.
INSTANCE
.
convert
(
orderBackVO
.
getOrderDepartureVO
());
orderDepartureService
.
updateById
(
departureDO
);
orderDepartureService
.
updateById
(
departureDO
);
...
@@ -5605,6 +5633,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -5605,6 +5633,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
isConsigneeChange
&&
consigneeVO
.
getCustomerId
()
!=
null
)
{
if
(
isConsigneeChange
&&
consigneeVO
.
getCustomerId
()
!=
null
)
{
customerService
.
updateCustomerStatusByExistedOrderAndOffer
(
consigneeVO
.
getCustomerId
(),
true
);
customerService
.
updateCustomerStatusByExistedOrderAndOffer
(
consigneeVO
.
getCustomerId
(),
true
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"更新收发货人状态时出现异常"
,
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 {
...
@@ -558,9 +558,14 @@ public class OrderBackVO {
@ApiModelProperty
(
value
=
"是否变动业绩归属"
)
@ApiModelProperty
(
value
=
"是否变动业绩归属"
)
private
Boolean
isCharge
=
false
;
private
Boolean
isCharge
=
false
;
@ApiModelProperty
(
value
=
"是否变动控货状态"
)
private
Boolean
isChargeCargoControl
=
false
;
@ApiModelProperty
(
value
=
"是否变动付款人信息"
)
@ApiModelProperty
(
value
=
"是否变动付款人信息"
)
private
Boolean
isDrawee
=
false
;
private
Boolean
isDrawee
=
false
;
@ApiModelProperty
(
value
=
"是否变动发货人设置订单控货无收货人属性"
)
private
Boolean
isChargeNoConsignee
=
false
;
@ApiModelProperty
(
value
=
"是否需要产生未分配客户经理异常异常"
)
@ApiModelProperty
(
value
=
"是否需要产生未分配客户经理异常异常"
)
private
Boolean
isCreateCustomerServiceException
=
false
;
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