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
0d5f9725
Commit
0d5f9725
authored
Sep 24, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单有无收货人的选择由前端选择确定
parent
26c696cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
34 deletions
+33
-34
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+30
-34
OrderBaseVO.java
...a/cn/iocoder/yudao/module/order/vo/order/OrderBaseVO.java
+3
-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 @
0d5f9725
...
@@ -523,7 +523,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -523,7 +523,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
.
eq
(
CustomerContactsDO:
:
getPhoneNew
,
memberUserDO
.
getMobile
())
.
eq
(
CustomerContactsDO:
:
getPhoneNew
,
memberUserDO
.
getMobile
())
.
eq
(
CustomerContactsDO:
:
getAreaCode
,
memberUserDO
.
getAreaCode
())).
eq
(
CustomerContactsDO:
:
getDeleted
,
0
).
last
(
"limit 1"
));
.
eq
(
CustomerContactsDO:
:
getAreaCode
,
memberUserDO
.
getAreaCode
())).
eq
(
CustomerContactsDO:
:
getDeleted
,
0
).
last
(
"limit 1"
));
}
}
boolean
noConsignee
=
fals
e
;
boolean
hasConsignee
=
Objects
.
nonNull
(
createReqVO
.
getHasConsignee
())
?
createReqVO
.
getHasConsignee
()
:
tru
e
;
if
(
Objects
.
nonNull
(
customerContacts
))
{
if
(
Objects
.
nonNull
(
customerContacts
))
{
//发货人联系人
//发货人联系人
consignorCustomerDO
=
customerService
.
getCustomer
(
customerContacts
.
getCustomerId
());
consignorCustomerDO
=
customerService
.
getCustomer
(
customerContacts
.
getCustomerId
());
...
@@ -535,7 +535,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -535,7 +535,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
consignorCountryDO
!=
null
)
{
if
(
consignorCountryDO
!=
null
)
{
orderConsignorDO
.
setCountryAbbreviation
(
consignorCountryDO
.
getNameShort
());
orderConsignorDO
.
setCountryAbbreviation
(
consignorCountryDO
.
getNameShort
());
}
}
noConsignee
=
Objects
.
nonNull
(
consignorCustomerDO
.
getNoConsignee
())
&&
consignorCustomerDO
.
getNoConsignee
();
}
}
if
(
StringUtils
.
isBlank
(
customerContacts
.
getPhoneNew
()))
{
if
(
StringUtils
.
isBlank
(
customerContacts
.
getPhoneNew
()))
{
throw
exception
(
CONSIGNOR_PHONE_NOT_NULL
);
throw
exception
(
CONSIGNOR_PHONE_NOT_NULL
);
...
@@ -593,7 +592,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -593,7 +592,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
OrderConsigneeDO
orderConsigneeDO
=
null
;
OrderConsigneeDO
orderConsigneeDO
=
null
;
// 当订单为控货订单,且发货人客户档案未设置控货无收货人,则需要校验收货人信息
// 当订单为控货订单,且发货人客户档案未设置控货无收货人,则需要校验收货人信息
if
(!
order
.
getIsCargoControl
()
||
!
no
Consignee
)
{
if
(!
order
.
getIsCargoControl
()
||
has
Consignee
)
{
// 控货订单有收货人则限制修改收货人
// 控货订单有收货人则限制修改收货人
if
(
order
.
getIsCargoControl
())
{
if
(
order
.
getIsCargoControl
())
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
order
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
...
@@ -710,7 +709,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -710,7 +709,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsignorDO
.
setUpdater
(
creator
);
orderConsignorDO
.
setUpdater
(
creator
);
CustomerDO
consignorDO
=
CustomerDO
consignorDO
=
customerService
.
getCustomer
(
createReqVO
.
getConsignorId
());
customerService
.
getCustomer
(
createReqVO
.
getConsignorId
());
boolean
noConsignee
=
fals
e
;
boolean
hasConsignee
=
Objects
.
nonNull
(
createReqVO
.
getHasConsignee
())
?
createReqVO
.
getHasConsignee
()
:
tru
e
;
if
(
Objects
.
nonNull
(
consignorDO
))
{
if
(
Objects
.
nonNull
(
consignorDO
))
{
orderConsignorDO
.
setCompany
(
consignorDO
.
getCompany
());
orderConsignorDO
.
setCompany
(
consignorDO
.
getCompany
());
orderConsignorDO
.
setCompanyEn
(
consignorDO
.
getCompanyEn
());
orderConsignorDO
.
setCompanyEn
(
consignorDO
.
getCompanyEn
());
...
@@ -718,7 +717,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -718,7 +717,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
consignorCountryDO
))
{
if
(
Objects
.
nonNull
(
consignorCountryDO
))
{
orderConsignorDO
.
setCountryAbbreviation
(
consignorCountryDO
.
getNameShort
());
orderConsignorDO
.
setCountryAbbreviation
(
consignorCountryDO
.
getNameShort
());
}
}
noConsignee
=
consignorDO
.
getNoConsignee
();
orderConsignorDO
.
setCustomerNumber
(
consignorDO
.
getNumber
());
orderConsignorDO
.
setCustomerNumber
(
consignorDO
.
getNumber
());
}
}
CustomerContactsDO
consignorContactsDO
=
CustomerContactsDO
consignorContactsDO
=
...
@@ -814,7 +812,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -814,7 +812,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderBusinessService
.
createOrderControlLog
(
orderCargoControlDO
.
getOrderId
(),
1
,
"创建控货信息"
,
msg
,
0L
);
orderBusinessService
.
createOrderControlLog
(
orderCargoControlDO
.
getOrderId
(),
1
,
"创建控货信息"
,
msg
,
0L
);
}
}
OrderConsigneeDO
orderConsigneeDO
=
null
;
OrderConsigneeDO
orderConsigneeDO
=
null
;
if
(!
order
.
getIsCargoControl
()
||
!
no
Consignee
)
{
if
(!
order
.
getIsCargoControl
()
||
has
Consignee
)
{
// 控货订单有收货人则限制修改收货人
// 控货订单有收货人则限制修改收货人
if
(
order
.
getIsCargoControl
())
{
if
(
order
.
getIsCargoControl
())
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
order
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
...
@@ -1858,7 +1856,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1858,7 +1856,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
vo
.
getShipmentState
()
==
0
||
vo
.
getShipmentState
()
==
305
||
vo
.
getShipmentState
()
==
307
)
{
if
(
vo
.
getShipmentState
()
==
0
||
vo
.
getShipmentState
()
==
305
||
vo
.
getShipmentState
()
==
307
)
{
if
(
vo
.
getTransportId
()
==
TransportTypeShortEnum
.
SEA_CONTAINER
.
getValue
())
{
if
(
vo
.
getTransportId
()
==
TransportTypeShortEnum
.
SEA_CONTAINER
.
getValue
())
{
throw
exception
(
ORDER_PRE_INSTALLATION_UNPACKAGED_CONTAINER_NOT_UPDATE
);
throw
exception
(
ORDER_PRE_INSTALLATION_UNPACKAGED_CONTAINER_NOT_UPDATE
);
}
else
{
}
else
{
// TODO 当前不是海运就是空运
// TODO 当前不是海运就是空运
throw
exception
(
ORDER_SORTING_NOT_SHIPMENT_NOT_UPDATE
);
throw
exception
(
ORDER_SORTING_NOT_SHIPMENT_NOT_UPDATE
);
}
}
...
@@ -1879,29 +1877,29 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1879,29 +1877,29 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw
exception
(
NOT_UPDATE_DEST_COUNTRY
);
throw
exception
(
NOT_UPDATE_DEST_COUNTRY
);
}
}
// 海外仓业务变动申请
// 海外仓业务变动申请
if
(!
vo
.
getType
().
contains
(
"2"
)
&&
updateReqVO
.
getType
().
contains
(
"2"
)){
if
(!
vo
.
getType
().
contains
(
"2"
)
&&
updateReqVO
.
getType
().
contains
(
"2"
))
{
// TODO 订单如果转海外仓需要单独申请, 订单如果是海外仓改为非海外仓呢?
// TODO 订单如果转海外仓需要单独申请, 订单如果是海外仓改为非海外仓呢?
throw
exception
(
ORDER_OVERSEAS_WAREHOUSE_UPDATE_NEED_APPLY
);
throw
exception
(
ORDER_OVERSEAS_WAREHOUSE_UPDATE_NEED_APPLY
);
}
}
// 当是否控货从是修改成否,需校验订单是否有放货记录状态≠已取消,有则弹出提示“订单已放货,无法修改为不控货”
// 当是否控货从是修改成否,需校验订单是否有放货记录状态≠已取消,有则弹出提示“订单已放货,无法修改为不控货”
if
(
vo
.
getIsCargoControl
()
&&
!
updateReqVO
.
getIsCargoControl
()){
if
(
vo
.
getIsCargoControl
()
&&
!
updateReqVO
.
getIsCargoControl
())
{
// TODO 校验订单是否有放货记录
// TODO 校验订单是否有放货记录
long
pickCount
=
orderCargoControlPickMapper
.
selectCount
(
new
LambdaQueryWrapper
<
OrderCargoControlPickDO
>()
long
pickCount
=
orderCargoControlPickMapper
.
selectCount
(
new
LambdaQueryWrapper
<
OrderCargoControlPickDO
>()
.
eq
(
OrderCargoControlPickDO:
:
getOrderId
,
updateReqVO
.
getOrderId
())
.
eq
(
OrderCargoControlPickDO:
:
getOrderId
,
updateReqVO
.
getOrderId
())
.
in
(
OrderCargoControlPickDO:
:
getStatus
,
1
,
2
,
3
,
4
,
5
,
6
));
.
in
(
OrderCargoControlPickDO:
:
getStatus
,
1
,
2
,
3
,
4
,
5
,
6
));
if
(
pickCount
>
0
)
{
if
(
pickCount
>
0
)
{
// 订单存在放货记录,不能取消控货
// 订单存在放货记录,不能取消控货
throw
exception
(
ORDER_EXISTS_PICK_NOT_CANCEL_CARGO_CONTROL
);
throw
exception
(
ORDER_EXISTS_PICK_NOT_CANCEL_CARGO_CONTROL
);
}
}
}
}
// 当是否控货从否修改成是,校验订单是否有提货记录,有则弹出提示“订单已有提货记录,无法修改成控货”
// 当是否控货从否修改成是,校验订单是否有提货记录,有则弹出提示“订单已有提货记录,无法修改成控货”
if
(!
vo
.
getIsCargoControl
()
&&
updateReqVO
.
getIsCargoControl
()){
if
(!
vo
.
getIsCargoControl
()
&&
updateReqVO
.
getIsCargoControl
())
{
// TODO 校验订单是否有提货记录
// TODO 校验订单是否有提货记录
long
pickupCount
=
orderPickupMapper
.
selectCount
(
new
LambdaQueryWrapper
<
OrderPickupDO
>()
long
pickupCount
=
orderPickupMapper
.
selectCount
(
new
LambdaQueryWrapper
<
OrderPickupDO
>()
.
eq
(
OrderPickupDO:
:
getOrderId
,
vo
.
getOrderNo
()));
.
eq
(
OrderPickupDO:
:
getOrderId
,
vo
.
getOrderNo
()));
if
(
pickupCount
>
0
)
{
if
(
pickupCount
>
0
)
{
// 订单存在提货记录,不能进行控货
// 订单存在提货记录,不能进行控货
throw
exception
(
ORDER_EXISTS_PICKUP_NOT_CARGO_CONTROL
);
throw
exception
(
ORDER_EXISTS_PICKUP_NOT_CARGO_CONTROL
);
}
}
}
}
// 执行订单审批申请业务
// 执行订单审批申请业务
...
@@ -1918,8 +1916,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1918,8 +1916,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
*/
*/
private
void
orderAuditApplyUpdate
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
LogisticsInfoDto
logisticsInfoDto
,
private
void
orderAuditApplyUpdate
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
LogisticsInfoDto
logisticsInfoDto
,
DictDataRespDTO
dictDataRespDTO
,
boolean
isShipment
)
{
DictDataRespDTO
dictDataRespDTO
,
boolean
isShipment
)
{
String
statusName
=
""
;
String
statusName
=
""
;
if
(
isShipment
){
if
(
isShipment
)
{
if
(!
Objects
.
equals
(
vo
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
())
&&
!
Objects
.
equals
(
vo
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_SEA_COMBINED_TRANSPORT
.
getValue
()))
{
if
(!
Objects
.
equals
(
vo
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
())
&&
!
Objects
.
equals
(
vo
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_SEA_COMBINED_TRANSPORT
.
getValue
()))
{
statusName
=
OrderStatusEnum
.
valueOf
(
vo
.
getStatus
()).
getNameZh
();
statusName
=
OrderStatusEnum
.
valueOf
(
vo
.
getStatus
()).
getNameZh
();
}
else
{
}
else
{
...
@@ -1987,17 +1985,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1987,17 +1985,17 @@ 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
=
fals
e
;
boolean
hasConsignee
=
Objects
.
nonNull
(
updateReqVO
.
getHasConsignee
())
?
updateReqVO
.
getHasConsignee
()
:
tru
e
;
if
(
Objects
.
nonNull
(
consignorContactsDO
))
{
if
(
Objects
.
nonNull
(
consignorContactsDO
))
{
consignorDO
=
customerService
.
getById
(
consignorContactsDO
.
getCustomerId
());
consignorDO
=
customerService
.
getById
(
consignorContactsDO
.
getCustomerId
());
if
(
Objects
.
nonNull
(
consignorDO
))
{
if
(
Objects
.
nonNull
(
consignorDO
))
{
noConsignee
=
consignorDO
.
getNoConsignee
();
// TODO 非控货订单是否必须有收货人
if
(
vo
.
getIsCargoControl
()
&&
vo
.
getHasConsignee
()
!=
no
Consignee
)
{
if
(
vo
.
getIsCargoControl
()
&&
vo
.
getHasConsignee
()
!=
has
Consignee
)
{
ApplyInfoVO
infoVO
=
new
ApplyInfoVO
();
ApplyInfoVO
infoVO
=
new
ApplyInfoVO
();
infoVO
.
setName
(
"控货订单发货人控货无收货人"
);
infoVO
.
setName
(
"控货订单发货人控货无收货人"
);
infoVO
.
setOrgValue
(
vo
.
getHasConsignee
()
?
"有"
:
"无"
);
infoVO
.
setOrgValue
(
vo
.
getHasConsignee
()
?
"有"
:
"无"
);
infoVO
.
setNewValue
(
noConsignee
?
"无"
:
"有
"
);
infoVO
.
setNewValue
(
hasConsignee
?
"有"
:
"无
"
);
vo
.
setHasConsignee
(
no
Consignee
);
vo
.
setHasConsignee
(
has
Consignee
);
applyInfoList
.
add
(
infoVO
);
applyInfoList
.
add
(
infoVO
);
// 发货人控货无收货人属性设置变动,需要变动客户业绩
// 发货人控货无收货人属性设置变动,需要变动客户业绩
vo
.
setIsCharge
(
true
);
vo
.
setIsCharge
(
true
);
...
@@ -2014,7 +2012,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2014,7 +2012,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
consigneeDO
))
{
if
(
Objects
.
nonNull
(
consigneeDO
))
{
orderConsigneeBackVO
.
setCustomerNumber
(
consigneeDO
.
getNumber
());
orderConsigneeBackVO
.
setCustomerNumber
(
consigneeDO
.
getNumber
());
}
}
if
(
vo
.
getIsCargoControl
()
&&
!
no
Consignee
)
{
if
(
vo
.
getIsCargoControl
()
&&
has
Consignee
)
{
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());
...
@@ -2125,7 +2123,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2125,7 +2123,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw
exception
(
ORDER_UPDATE_APPROVAL_MUST_BE_WAREHOUSE_IN
);
throw
exception
(
ORDER_UPDATE_APPROVAL_MUST_BE_WAREHOUSE_IN
);
}
}
}
}
if
(
isShipment
){
if
(
isShipment
)
{
// TODO 出货阶段的修改,需要将当前订单状态值标出,放首位
// TODO 出货阶段的修改,需要将当前订单状态值标出,放首位
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
statusName
);
applyInfoVO
.
setName
(
statusName
);
...
@@ -3100,7 +3098,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3100,7 +3098,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
.
eq
(
CustomerContactsDO:
:
getAreaCode
,
memberUserDO
.
getAreaCode
())).
eq
(
CustomerContactsDO:
:
getDeleted
,
0
).
last
(
"limit 1"
));
.
eq
(
CustomerContactsDO:
:
getAreaCode
,
memberUserDO
.
getAreaCode
())).
eq
(
CustomerContactsDO:
:
getDeleted
,
0
).
last
(
"limit 1"
));
}
}
CustomerDO
consignorCustomerDO
=
null
;
CustomerDO
consignorCustomerDO
=
null
;
boolean
noConsignee
=
fals
e
;
boolean
hasConsignee
=
Objects
.
nonNull
(
updateReqVO
.
getHasConsignee
())
?
updateReqVO
.
getHasConsignee
()
:
tru
e
;
if
(
Objects
.
nonNull
(
customerContacts
))
{
if
(
Objects
.
nonNull
(
customerContacts
))
{
consignorCustomerDO
=
customerService
.
getCustomer
(
customerContacts
.
getCustomerId
());
consignorCustomerDO
=
customerService
.
getCustomer
(
customerContacts
.
getCustomerId
());
if
(
consignorCustomerDO
!=
null
)
{
if
(
consignorCustomerDO
!=
null
)
{
...
@@ -3111,7 +3109,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3111,7 +3109,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
consignorCountryDO
!=
null
)
{
if
(
consignorCountryDO
!=
null
)
{
orderConsignorDO
.
setCountryAbbreviation
(
consignorCountryDO
.
getNameShort
());
orderConsignorDO
.
setCountryAbbreviation
(
consignorCountryDO
.
getNameShort
());
}
}
noConsignee
=
consignorCustomerDO
.
getNoConsignee
();
}
}
if
(
StringUtils
.
isBlank
(
customerContacts
.
getPhoneNew
()))
{
if
(
StringUtils
.
isBlank
(
customerContacts
.
getPhoneNew
()))
{
throw
exception
(
CONSIGNOR_PHONE_NOT_NULL
);
throw
exception
(
CONSIGNOR_PHONE_NOT_NULL
);
...
@@ -3188,7 +3185,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3188,7 +3185,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
OrderConsigneeDO
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
updateObj
.
getOrderId
()).
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
OrderConsigneeDO
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
updateObj
.
getOrderId
()).
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
if
(!
updateObj
.
getIsCargoControl
()
||
!
no
Consignee
)
{
if
(!
updateObj
.
getIsCargoControl
()
||
has
Consignee
)
{
// 控货订单有收货人则限制修改收货人
// 控货订单有收货人则限制修改收货人
if
(
updateObj
.
getIsCargoControl
())
{
if
(
updateObj
.
getIsCargoControl
())
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
...
@@ -3310,14 +3307,13 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3310,14 +3307,13 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
isNull
(
orderConsignorDO
))
{
if
(
Objects
.
isNull
(
orderConsignorDO
))
{
orderConsignorDO
=
new
OrderConsignorDO
();
orderConsignorDO
=
new
OrderConsignorDO
();
}
}
boolean
noConsignee
=
fals
e
;
boolean
hasConsignee
=
Objects
.
nonNull
(
updateReqVO
.
getHasConsignee
())
?
updateReqVO
.
getHasConsignee
()
:
tru
e
;
if
(
Objects
.
nonNull
(
consignorDO
))
{
if
(
Objects
.
nonNull
(
consignorDO
))
{
orderConsignorDO
.
setCompany
(
consignorDO
.
getCompany
());
orderConsignorDO
.
setCompany
(
consignorDO
.
getCompany
());
orderConsignorDO
.
setCompanyEn
(
consignorDO
.
getCompanyEn
());
orderConsignorDO
.
setCompanyEn
(
consignorDO
.
getCompanyEn
());
orderConsignorDO
.
setCustomerNumber
(
consignorDO
.
getNumber
());
orderConsignorDO
.
setCustomerNumber
(
consignorDO
.
getNumber
());
CountryDO
consignorCountryDO
=
countryService
.
getById
(
consignorDO
.
getCountry
());
CountryDO
consignorCountryDO
=
countryService
.
getById
(
consignorDO
.
getCountry
());
orderConsignorDO
.
setCountryAbbreviation
(
Objects
.
isNull
(
consignorCountryDO
)
?
null
:
consignorCountryDO
.
getNameShort
());
orderConsignorDO
.
setCountryAbbreviation
(
Objects
.
isNull
(
consignorCountryDO
)
?
null
:
consignorCountryDO
.
getNameShort
());
noConsignee
=
consignorDO
.
getNoConsignee
();
}
}
if
(
Objects
.
nonNull
(
consignorContactsDO
))
{
if
(
Objects
.
nonNull
(
consignorContactsDO
))
{
...
@@ -3423,7 +3419,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3423,7 +3419,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
OrderConsigneeDO
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
updateObj
.
getOrderId
()).
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
OrderConsigneeDO
orderConsigneeDO
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
updateObj
.
getOrderId
()).
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
if
(!
updateObj
.
getIsCargoControl
()
||
!
no
Consignee
)
{
if
(!
updateObj
.
getIsCargoControl
()
||
has
Consignee
)
{
// 控货订单有收货人则限制修改收货人
// 控货订单有收货人则限制修改收货人
if
(
updateObj
.
getIsCargoControl
())
{
if
(
updateObj
.
getIsCargoControl
())
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
...
@@ -6419,7 +6415,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -6419,7 +6415,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
consigneeDO
.
setUpdateTime
(
now
);
consigneeDO
.
setUpdateTime
(
now
);
orderConsigneeService
.
save
(
consigneeDO
);
orderConsigneeService
.
save
(
consigneeDO
);
newOrder
.
setHasConsignee
(
true
);
newOrder
.
setHasConsignee
(
true
);
}
else
{
}
else
{
newOrder
.
setHasConsignee
(
false
);
newOrder
.
setHasConsignee
(
false
);
}
}
if
(
newOrder
.
getIsCargoControl
())
{
if
(
newOrder
.
getIsCargoControl
())
{
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/order/OrderBaseVO.java
View file @
0d5f9725
...
@@ -386,6 +386,9 @@ public class OrderBaseVO {
...
@@ -386,6 +386,9 @@ public class OrderBaseVO {
@ApiModelProperty
(
value
=
"放货箱数"
)
@ApiModelProperty
(
value
=
"放货箱数"
)
private
Integer
releaseNum
;
private
Integer
releaseNum
;
@ApiModelProperty
(
value
=
"是否有收货人,1-是,0-否"
)
private
Boolean
hasConsignee
=
true
;
public
void
setExceptionReason
(
String
exceptionReason
)
{
public
void
setExceptionReason
(
String
exceptionReason
)
{
this
.
exceptionReason
=
StringUtils
.
isNotBlank
(
exceptionReason
)
?
I18nMessage
.
getMessage
(
exceptionReason
)
:
exceptionReason
;
this
.
exceptionReason
=
StringUtils
.
isNotBlank
(
exceptionReason
)
?
I18nMessage
.
getMessage
(
exceptionReason
)
:
exceptionReason
;
}
}
...
...
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