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
230c1b94
Commit
230c1b94
authored
Jan 02, 2025
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单修改审批通过后重置订单提单文件
parent
3240a058
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
1 deletion
+66
-1
BoxCheckOrderRemoveLadingBillEvent.java
...lo/core/event/box/BoxCheckOrderRemoveLadingBillEvent.java
+22
-0
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+4
-1
BoxOrderUpdateRemoveLadingBillListener.java
...ment/listener/BoxOrderUpdateRemoveLadingBillListener.java
+40
-0
No files found.
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/box/BoxCheckOrderRemoveLadingBillEvent.java
0 → 100644
View file @
230c1b94
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
box
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
/**
* 重置订单的提单 Event
*
* @author zhengYi
*/
@Data
@AllArgsConstructor
public
class
BoxCheckOrderRemoveLadingBillEvent
{
/**
* 订单ID
*/
private
Long
orderId
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
230c1b94
...
...
@@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderYeJiType
import
cn.iocoder.yudao.framework.apollo.core.event.Order.OrderApprovalTypeCheckEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.OrderAssociationOfferInfoEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderApprovalEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderRemoveLadingBillEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxOrderDynamicEstTimeEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.warehouseIn.WarehouseInOrderChangeChannelEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.warehouseIn.WarehouseInOrderChangeTransportEvent
;
...
...
@@ -6083,11 +6084,13 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
isDisassociation
)
{
orderGuanlianService
.
deleteRelationByOrderId
(
orderDO
.
getOrderId
());
}
//
TODO
当运输方式出现变更时需要重置入仓业务
// 当运输方式出现变更时需要重置入仓业务
if
(
orderBackVO
.
getIsTransport
())
{
applicationContext
.
publishEvent
(
new
WarehouseInOrderChangeTransportEvent
(
orderDO
.
getOrderId
()));
}
// 订单信息修改后需要重置提单信息
applicationContext
.
publishEvent
(
new
BoxCheckOrderRemoveLadingBillEvent
(
orderDO
.
getOrderId
()));
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/BoxOrderUpdateRemoveLadingBillListener.java
0 → 100644
View file @
230c1b94
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
listener
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderRemoveLadingBillEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderSchedulingEvent
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO
;
import
cn.iocoder.yudao.module.shipment.service.box.BoxService
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
ErrorCodeConstants
.
WAREHOUSE_IN_BOX_EXCEPTION
;
/**
* 当订单修改审批通过后,需要对已制作的提单进行重置
*
* @author zhengYi
*/
@Component
(
"BoxOrderUpdateRemoveLadingBillListener"
)
@AllArgsConstructor
@Slf4j
public
class
BoxOrderUpdateRemoveLadingBillListener
{
private
final
BoxService
boxService
;
/**
* 当订单修改审批通过后,需要对已制作的提单进行重置
*
* @param event 订单id
*/
@EventListener
(
BoxCheckOrderRemoveLadingBillEvent
.
class
)
public
void
removeLadingBill
(
BoxCheckOrderRemoveLadingBillEvent
event
)
{
Long
orderId
=
event
.
getOrderId
();
log
.
info
(
"重置提单订单 orderId={}"
,
orderId
);
boxService
.
removeLadingBill
(
Collections
.
singleton
(
orderId
));
}
}
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