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
9f058cbe
Commit
9f058cbe
authored
Sep 11, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出货阶段的订单修改业务补充(未完善)
parent
26678392
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
8 deletions
+32
-8
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+32
-8
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 @
9f058cbe
...
...
@@ -62,6 +62,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderFeeApplication.OrderFee
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderObjective.OrderObjectiveDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderOperateLog.OrderOperateLogDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderPickup.OrderPickupDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderSpecialNeed.OrderSpecialNeedDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderTime.OrderTimeDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseIn.OrderWarehouseInDO
;
...
...
@@ -70,6 +71,7 @@ import cn.iocoder.yudao.module.order.dal.mysql.order.OrderMapper;
import
cn.iocoder.yudao.module.order.dal.mysql.orderCargoControl.OrderCargoControlMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderCargoControlPick.OrderCargoControlPickMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderItem.OrderItemMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderPickup.OrderPickupMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderTime.OrderTimeMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseIn.OrderWarehouseInMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.targetLog.TargetLogMapper
;
...
...
@@ -146,6 +148,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
private
final
OrderBusinessService
orderBusinessService
;
private
final
OrderItemMapper
orderItemMapper
;
private
final
OrderTimeMapper
orderTimeMapper
;
private
final
OrderPickupMapper
orderPickupMapper
;
private
final
OrderWarehouseInMapper
orderWarehouseInMapper
;
private
final
OrderGuanlianService
orderGuanlianService
;
private
final
OrderMutualService
orderMutualService
;
...
...
@@ -1793,7 +1796,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw
exception
(
TRANSPORT_AND_LINE_NOT_AGREEMENT
);
}
// 执行订单审批申请业务
this
.
orderAuditApplyUpdate
(
updateReqVO
,
vo
,
logisticsInfoDto
);
this
.
orderAuditApplyUpdate
(
updateReqVO
,
vo
,
logisticsInfoDto
,
dictDataRespDTO
);
}
@Override
...
...
@@ -1823,13 +1826,24 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
this
.
updateOrderApply
(
updateReqVO
,
memberUserDO
);
return
;
}
// 获取功能开关
List
<
DictDataRespDTO
>
dictList
=
dictDataApi
.
getDictDatas
(
"part_function_switch"
);
// 智慧预装功能开关
DictDataRespDTO
dictDataRespDTO
=
dictList
.
stream
().
filter
(
dto
->
"create_order_phone_limit"
.
equals
(
dto
.
getLabel
())).
findFirst
().
orElse
(
null
);
// 此处只允许修改订单商品项的货值
long
count
=
updateReqVO
.
getOrderItemVOList
().
stream
().
filter
(
it
->
Objects
.
isNull
(
it
.
getOrderItemId
())).
count
();
if
(
count
>
0
)
{
// 订单修改审批,不允许添加新的商品项
throw
exception
(
MODIFY_APPROVAL_NOT_ADD_PROD
);
}
/**
* 海运订单预装未装柜/空运订单分拣未出货
* ----跟现有的不便,锁定订单信息无法修改
* l 海运订单、拆单子单已装柜/空运已出货.
* A. 运输方式,始发城市,目的国字段锁定不允许修改
* B. 海外仓选择不允许修改,需要通过申请记录来变更
* C. 是否控货字段,当是否控货从是修改成否,需校验订单是否有放货记录状态≠已取消,有则弹出提示“订单已放货,无法修改为不控货”;当是否控货从否修改成是,校验订单是否有提货记录,有则弹出提示“订单已有提货记录,无法修改成控货”
* C. 是否控货字段,当是否控货从是修改成否,需校验订单是否有放货记录状态≠已取消,有则弹出提示“订单已放货,无法修改为不控货”;
* 当是否控货从否修改成是,校验订单是否有提货记录,有则弹出提示“订单已有提货记录,无法修改成控货”
* D. 当订单所在自编号已起运,无法修改报关方式
* E. 订单信息修改,需校验订单对应提单是否已审批通过,是需弹出提示“提单已制作,如需修改请联系客服”,仅做提示确认后允许提交,审批通过后需要同步更新自编号中订单信息。
* F. 订单修改通过后,插入的操作日志中需要注明当前的订单状态,如在航运中修改,在日志中备注订单状态:航运中
...
...
@@ -1860,19 +1874,29 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(!
vo
.
getType
().
contains
(
"2"
)
&&
updateReqVO
.
getType
().
contains
(
"2"
)){
// TODO 订单如果转海外仓需要单独申请, 订单如果是海外仓改为非海外仓呢?
}
// 当
控货订单取消控货时,需要校验是否有放货记录
// 当
是否控货从是修改成否,需校验订单是否有放货记录状态≠已取消,有则弹出提示“订单已放货,无法修改为不控货”
if
(
vo
.
getIsCargoControl
()
&&
!
updateReqVO
.
getIsCargoControl
()){
// TODO 校验订单是否有放货记录
long
c
ount
=
orderCargoControlPickMapper
.
selectCount
(
new
LambdaQueryWrapper
<
OrderCargoControlPickDO
>()
long
pickC
ount
=
orderCargoControlPickMapper
.
selectCount
(
new
LambdaQueryWrapper
<
OrderCargoControlPickDO
>()
.
eq
(
OrderCargoControlPickDO:
:
getOrderId
,
updateReqVO
.
getOrderId
())
.
in
(
OrderCargoControlPickDO:
:
getStatus
,
1
,
2
,
3
,
4
,
5
,
6
));
if
(
c
ount
>
0
){
if
(
pickC
ount
>
0
){
// 订单存在放货记录,不能取消控货
// throw exception(ORDER_EXISTS_PICK_NOT_CANCEL_CARGO_CONTROL);
}
}
// 当是否控货从否修改成是,校验订单是否有提货记录,有则弹出提示“订单已有提货记录,无法修改成控货”
if
(!
vo
.
getIsCargoControl
()
&&
updateReqVO
.
getIsCargoControl
()){
// TODO 校验订单是否有提货记录
long
pickupCount
=
orderPickupMapper
.
selectCount
(
new
LambdaQueryWrapper
<
OrderPickupDO
>()
.
eq
(
OrderPickupDO:
:
getOrderId
,
vo
.
getOrderNo
()));
if
(
pickupCount
>
0
){
// 订单存在提货记录,不能进行控货
// throw exception(ORDER_EXISTS_PICKUP_NOT_CARGO_CONTROL);
}
}
// 执行订单审批申请业务
this
.
orderAuditApplyUpdate
(
updateReqVO
,
vo
,
logisticsInfoDto
);
this
.
orderAuditApplyUpdate
(
updateReqVO
,
vo
,
logisticsInfoDto
,
dictDataRespDTO
);
}
...
...
@@ -1883,9 +1907,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
* @param vo
* @param logisticsInfoDto
*/
private
void
orderAuditApplyUpdate
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
LogisticsInfoDto
logisticsInfoDto
)
{
private
void
orderAuditApplyUpdate
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
LogisticsInfoDto
logisticsInfoDto
,
DictDataRespDTO
dictDataRespDTO
)
{
OrderApprovalDO
orderApprovalDO
;
OrderDO
updateObj
=
OrderConvert
.
INSTANCE
.
convert
(
updateReqVO
);
if
(
updateReqVO
.
getIsExternalWarehouse
()
&&
StringUtils
.
isNotBlank
(
updateReqVO
.
getType
())
&&
updateReqVO
.
getType
().
contains
(
"1"
))
{
throw
exception
(
EXTERNAL_WAREHOUSE_AND_CONCENTRATE_TRANSPORT_NOT_PARALLEL
);
...
...
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