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
fe0ef350
Commit
fe0ef350
authored
Nov 11, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
强制到仓后自编号在卸柜/到仓箱标缺失的情况下提交完成卸柜审批的校验逻辑修改,一但未完全卸柜/到仓的订单强制到仓后,整个订单就算是已经卸柜/到仓完成,允许提交审批
parent
ecb7b3fa
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
2 deletions
+84
-2
BoxOrderForceWarehouseCheckEvent.java
...ollo/core/event/box/BoxOrderForceWarehouseCheckEvent.java
+1
-1
BoxOrderRevokeWarehouseCheckEvent.java
...llo/core/event/box/BoxOrderRevokeWarehouseCheckEvent.java
+23
-0
OrderWarehouseCheckServiceImpl.java
...e/orderWarehouseCheck/OrderWarehouseCheckServiceImpl.java
+1
-0
BoxOrderForceWarehouseCheckListener.java
...hipment/listener/BoxOrderForceWarehouseCheckListener.java
+6
-0
BoxOrderRevokeWarehouseCheckListener.java
...ipment/listener/BoxOrderRevokeWarehouseCheckListener.java
+52
-0
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+1
-1
No files found.
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/box/BoxOrderForceWarehouseCheckEvent.java
View file @
fe0ef350
...
...
@@ -7,7 +7,7 @@ import java.util.Date;
/**
*
审批校验
Event
*
强制到仓
Event
*
* @author zhengYi
*/
...
...
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/box/BoxOrderRevokeWarehouseCheckEvent.java
0 → 100644
View file @
fe0ef350
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
box
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 撤销到仓 Event
*
* @author zhengYi
*/
@Data
@AllArgsConstructor
public
class
BoxOrderRevokeWarehouseCheckEvent
{
/**
* 订单ID
*/
private
Long
orderId
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseCheck/OrderWarehouseCheckServiceImpl.java
View file @
fe0ef350
...
...
@@ -176,6 +176,7 @@ public class OrderWarehouseCheckServiceImpl
// 清空到仓信息
abstractMapper
.
delete
(
wrapper
.
eq
(
OrderWarehouseCheckDO:
:
getOrderId
,
orderId
));
orderBusinessService
.
revokeToWarehouse
(
orderId
);
}
@Override
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/BoxOrderForceWarehouseCheckListener.java
View file @
fe0ef350
...
...
@@ -5,11 +5,13 @@ import cn.iocoder.yudao.framework.apollo.core.event.box.BoxCheckOrderApprovalEve
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxOrderForceWarehouseCheckEvent
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxApprovalDO
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxLoadInfoDO
;
import
cn.iocoder.yudao.module.shipment.enums.BoxApprovalTypeEnum
;
import
cn.iocoder.yudao.module.shipment.service.box.BoxService
;
import
cn.iocoder.yudao.module.shipment.service.boxApproval.BoxApprovalService
;
import
cn.iocoder.yudao.module.shipment.service.boxLoadInfo.BoxLoadInfoService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
...
...
@@ -49,6 +51,10 @@ public class BoxOrderForceWarehouseCheckListener {
if
(
boxDO
==
null
)
{
throw
exception
(
BOX_NOT_EXISTS
);
}
// 跟新到仓时间到卸柜/到仓箱标数据表
boxLoadInfoService
.
update
(
new
LambdaUpdateWrapper
<
BoxLoadInfoDO
>()
.
set
(
BoxLoadInfoDO:
:
getUnloadTime
,
event
.
getUnloadTime
())
.
eq
(
BoxLoadInfoDO:
:
getOrderId
,
event
.
getOrderId
()));
if
(
event
.
getTransportId
()
==
1
){
// 海运
boxLoadInfoService
.
updateOrderStatus
(
Arrays
.
asList
(
event
.
getOrderId
()),
event
.
getUnloadTime
(),
boxDO
);
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/BoxOrderRevokeWarehouseCheckListener.java
0 → 100644
View file @
fe0ef350
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
listener
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxOrderForceWarehouseCheckEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.box.BoxOrderRevokeWarehouseCheckEvent
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxLoadInfoDO
;
import
cn.iocoder.yudao.module.shipment.service.box.BoxService
;
import
cn.iocoder.yudao.module.shipment.service.boxLoadInfo.BoxLoadInfoService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
java.util.Arrays
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
shipment
.
enums
.
ErrorCodeConstants
.
BOX_NOT_EXISTS
;
/**
* 订单撤销到仓业务执行
*
* @author zhengYi
*/
@Component
(
"BoxOrderRevokeWarehouseCheckListener"
)
@AllArgsConstructor
@Slf4j
public
class
BoxOrderRevokeWarehouseCheckListener
{
private
final
BoxLoadInfoService
boxLoadInfoService
;
private
final
BoxService
boxService
;
/**
* 订单强撤销到仓业务执行
*
* @param event 订单信息
*/
@EventListener
(
BoxOrderRevokeWarehouseCheckEvent
.
class
)
public
void
orderForceWarehouseCheck
(
BoxOrderRevokeWarehouseCheckEvent
event
)
{
// 跟新卸柜/到仓箱标数据表未真实卸柜的箱标到仓时间为null
boxLoadInfoService
.
update
(
new
LambdaUpdateWrapper
<
BoxLoadInfoDO
>()
.
set
(
BoxLoadInfoDO:
:
getUnloadTime
,
null
)
.
eq
(
BoxLoadInfoDO:
:
getIsUnload
,
0
)
.
eq
(
BoxLoadInfoDO:
:
getOrderId
,
event
.
getOrderId
()));
}
}
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
fe0ef350
...
...
@@ -2120,7 +2120,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
boxLoadInfoQueryVO
.
setShipmentId
(
shipmentId
);
List
<
BoxLoadInfoDO
>
loadInfoList
=
boxLoadInfoService
.
getBoxLoadInfoList
(
boxLoadInfoQueryVO
);
long
unloadNum
=
loadInfoList
.
stream
()
.
filter
(
t
->
t
.
getIsUnload
()
==
1
)
.
filter
(
t
->
Objects
.
nonNull
(
t
.
getUnloadTime
())
)
.
count
();
if
(
unloadNum
!=
loadInfoList
.
size
())
{
BoxDO
boxDO
=
getBox
(
shipmentId
);
...
...
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