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
d8e0cb16
Commit
d8e0cb16
authored
Mar 03, 2025
by
knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 预装中订单修改货值权限
parent
fc56e48c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+16
-3
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 @
d8e0cb16
...
...
@@ -103,6 +103,8 @@ import cn.iocoder.yudao.module.order.vo.orderConsignor.OrderConsignorBackVO;
import
cn.iocoder.yudao.module.order.vo.orderDeparture.OrderDepartureBackVO
;
import
cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionCreateReqVO
;
import
cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionDescVO
;
import
cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO
;
import
cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBaseVO
;
import
cn.iocoder.yudao.module.order.vo.orderItem.OrderItemCreateReqVO
;
import
cn.iocoder.yudao.module.order.vo.orderItem.OrderItemInWarehouseVO
;
import
cn.iocoder.yudao.module.order.vo.orderObjective.OrderObjectiveBackVO
;
...
...
@@ -1831,13 +1833,24 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
}
// 获取修改前的货值
BigDecimal
oldTotalWorth
=
updateReqVO
.
getCostVO
().
getTotalWorth
();
// 获取修改后的货值
BigDecimal
newTotalWorth
=
updateReqVO
.
getOrderItemVOList
().
stream
().
map
(
OrderItemBaseVO:
:
getWorth
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
// 2025年1月15日 增加订单修改货值功能,预装后可单独修改货值
if
(
vo
.
getShipmentState
()
>
0
&&
!(
vo
.
getShipmentState
()
==
304
||
vo
.
getShipmentState
()
==
305
)
)
{
throw
exception
(
ORDER_SHIPMENT_NOT_UPDATE
);
}
// 正在预装中的订单不允许修改
BoxCheckOrderUpdateSchedulingEvent
schedulingEvent
=
new
BoxCheckOrderUpdateSchedulingEvent
(
vo
.
getOrderId
());
applicationContext
.
publishEvent
(
schedulingEvent
);
// 2025年3月3日 knight 如果编辑订单不是修改货值操作则不允许修改
if
(
newTotalWorth
.
equals
(
oldTotalWorth
)){
// 正在预装中的订单不允许修改
BoxCheckOrderUpdateSchedulingEvent
schedulingEvent
=
new
BoxCheckOrderUpdateSchedulingEvent
(
vo
.
getOrderId
());
applicationContext
.
publishEvent
(
schedulingEvent
);
}
// 获取功能开关
List
<
DictDataRespDTO
>
dictList
=
dictDataApi
.
getDictDatas
(
"part_function_switch"
);
// 智慧预装功能开关
...
...
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