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
06684a34
Commit
06684a34
authored
Oct 31, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预装、分拣只排除特价与费用申请审批进行中的订单
parent
ee61b999
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
34 deletions
+62
-34
ecw_customer_contacts.sql
sql/ecw_customer_contacts.sql
+7
-7
OrderApprovalTypeCheckEvent.java
.../apollo/core/event/Order/OrderApprovalTypeCheckEvent.java
+5
-0
OrderMapper.java
...coder/yudao/module/order/dal/mysql/order/OrderMapper.java
+1
-1
OrderApprovalTypeCheckListener.java
...module/order/listener/OrderApprovalTypeCheckListener.java
+21
-16
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+4
-4
OrderSplitServiceImpl.java
...odule/order/service/orderSplit/OrderSplitServiceImpl.java
+1
-1
OrderWarehouseAdjustServiceImpl.java
...orderWarehouseAdjust/OrderWarehouseAdjustServiceImpl.java
+1
-1
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+1
-1
BoxPreloadGoodsServiceImpl.java
...t/service/boxPreloadGoods/BoxPreloadGoodsServiceImpl.java
+21
-3
No files found.
sql/ecw_customer_contacts.sql
View file @
06684a34
This diff is collapsed.
Click to expand it.
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/Order/OrderApprovalTypeCheckEvent.java
View file @
06684a34
...
...
@@ -24,6 +24,11 @@ public class OrderApprovalTypeCheckEvent {
*/
private
Integer
approvalType
;
/**
* 订单审批类型列表 {@link cn.iocoder.yudao.module.order.enums.OrderApprovalTypeEnum}
*/
private
List
<
Integer
>
approvalTypeList
;
/**
* 是否包含互斥审批类型: true 包含互斥审批或相同的审批不能进行重复审批 false 是没有包含互斥审批类型和当前审批类型
*/
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/order/OrderMapper.java
View file @
06684a34
...
...
@@ -2753,7 +2753,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
"and eo.status in (5,8,9) "
,
"and eo.transport_id in (1,2,4)"
,
"and eo.abnormal_state=0 "
,
"and eo.audit_type
=0
"
,
"and eo.audit_type
not in(1,2,3,4,5,12,31,32)
"
,
"<when test = 'query.rucangTimeStart != null'>"
,
"AND eo.`rucang_time` >= #{query.rucangTimeStart}"
,
"</when>"
,
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/listener/OrderApprovalTypeCheckListener.java
View file @
06684a34
...
...
@@ -29,25 +29,30 @@ public class OrderApprovalTypeCheckListener {
@EventListener
(
OrderApprovalTypeCheckEvent
.
class
)
public
void
orderApprovalTypeCheckEvent
(
OrderApprovalTypeCheckEvent
event
)
{
// 枚举配置中的互斥类型集合不能添加新值,这里需要重新定义新集合补充当前审批类型进行查询
List
<
Integer
>
typeList
=
null
;
if
(
Objects
.
nonNull
(
event
.
getApprovalType
()))
{
OrderApprovalTypeEnum
approvalTypeEnum
=
OrderApprovalTypeEnum
.
valueOf
(
event
.
getApprovalType
());
if
(
Objects
.
isNull
(
approvalTypeEnum
))
{
if
(
Objects
.
isNull
(
approvalTypeEnum
))
{
// 没有配置相关审批类型则不做校验
event
.
setResult
(
Boolean
.
FALSE
);
return
;
}
List
<
Integer
>
types
=
approvalTypeEnum
.
getMutualExclusionValues
();
if
(
Objects
.
isNull
(
types
))
{
if
(
Objects
.
isNull
(
types
))
{
// 没有配置相关审批类型则不做校验
event
.
setResult
(
Boolean
.
FALSE
);
return
;
}
// 枚举配置中的互斥类型集合不能添加新值,这里需要重新定义新集合补充当前审批类型进行查询
List
<
Integer
>
typeList
=
null
;
// 包含-1则表示订单不能有任何审批状态存在,所以不用区分类型,查询所有的进行中审批
if
(!
types
.
contains
(-
1
))
{
if
(!
types
.
contains
(-
1
))
{
typeList
=
new
ArrayList
<>(
types
);
typeList
.
add
(
event
.
getApprovalType
());
}
}
else
{
typeList
=
new
ArrayList
<>(
event
.
getApprovalTypeList
());
}
// 查询当前订单正在进行的审批
boolean
result
=
orderApprovalService
.
countProcessingApproval
(
event
.
getOrderId
(),
event
.
getOrderItemIdList
(),
typeList
);
// 入仓相关正在进行的审批业务查询
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
06684a34
...
...
@@ -1808,7 +1808,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
return
;
}
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
vo
.
getOrderId
(),
null
,
ORDER_UPDATE
.
getValue
(),
false
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
vo
.
getOrderId
(),
null
,
ORDER_UPDATE
.
getValue
(),
null
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
...
...
@@ -1868,7 +1868,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
this
.
updateOrderApply
(
updateReqVO
,
memberUserDO
);
return
;
}
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
vo
.
getOrderId
(),
null
,
ORDER_UPDATE
.
getValue
(),
false
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
vo
.
getOrderId
(),
null
,
ORDER_UPDATE
.
getValue
(),
null
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
...
...
@@ -5127,7 +5127,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw
exception
(
ORDER_APPROVAL_IS_NOT_EXISTS
);
}
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
specialApplyVO
.
getOrderId
(),
Objects
.
nonNull
(
specialApplyVO
.
getOrderItemId
())
?
Collections
.
singletonList
(
specialApplyVO
.
getOrderItemId
())
:
null
,
typeEnum
.
getValue
(),
false
);
Collections
.
singletonList
(
specialApplyVO
.
getOrderItemId
())
:
null
,
typeEnum
.
getValue
(),
null
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
...
...
@@ -5330,7 +5330,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw
exception
(
ORDER_APPROVAL_IS_NOT_EXISTS
);
}
List
<
Long
>
orderItemIdList
=
specialBatchApplyVO
.
getBatchApplyOrderItemDetailVOList
().
stream
().
map
(
OrderSpecialBatchApplyOrderItemDetailVO:
:
getOrderItemId
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
specialBatchApplyVO
.
getOrderId
(),
orderItemIdList
,
typeEnum
.
getValue
(),
false
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
specialBatchApplyVO
.
getOrderId
(),
orderItemIdList
,
typeEnum
.
getValue
(),
null
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderSplit/OrderSplitServiceImpl.java
View file @
06684a34
...
...
@@ -195,7 +195,7 @@ public class OrderSplitServiceImpl extends AbstractService<OrderSplitMapper, Ord
if
(
orderDO
.
getTransportId
()
==
4
&&
OrderStatusEnum
.
IN_WAREHOUSE
.
getValue
().
equals
(
orderDO
.
getStatus
())
&&
orderDO
.
getAirShipment
()
>
2
)
{
throw
exception
(
AIR_ORDER_IS_READY_STOCK_NOT_SPLIT
);
}
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
ORDER_SPLIT
.
getValue
(),
false
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
ORDER_SPLIT
.
getValue
(),
null
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseAdjust/OrderWarehouseAdjustServiceImpl.java
View file @
06684a34
...
...
@@ -142,7 +142,7 @@ public class OrderWarehouseAdjustServiceImpl extends AbstractService<OrderWareho
}
orderQueryService
.
throwPendingExceptionOrProcessingApproval
(
orderId
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
WAREHOUSE_ADJUST
.
getValue
(),
false
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
WAREHOUSE_ADJUST
.
getValue
(),
null
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
06684a34
...
...
@@ -4669,7 +4669,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
.
filter
(
t
->
t
.
getAuditType
()
!=
0
)
.
collect
(
Collectors
.
toList
());
for
(
OrderDO
orderDO
:
orderDOList
)
{
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
orderApprovalTypeEnum
.
getValue
(),
false
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
orderApprovalTypeEnum
.
getValue
(),
null
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
orderNoList
.
add
(
orderDO
.
getOrderNo
());
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxPreloadGoods/BoxPreloadGoodsServiceImpl.java
View file @
06684a34
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
service
.
boxPreloadGoods
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.OrderApprovalTypeCheckEvent
;
import
cn.iocoder.yudao.framework.common.exception.ServiceException
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.util.collectors.CollectorsUtil
;
...
...
@@ -72,6 +73,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.google.common.base.Joiner
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -87,6 +89,8 @@ import java.util.stream.Stream;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
ErrorCodeConstants
.
ORDER_HAS_PROCESSING_APPROVAL
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
ErrorCodeConstants
.
ORDER_IS_APPROVAL_IN_PROCESS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
OrderApprovalTypeEnum
.
ORDER_UPDATE
;
import
static
cn
.
iocoder
.
yudao
.
module
.
shipment
.
enums
.
ErrorCodeConstants
.*;
/**
...
...
@@ -122,7 +126,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
BoxLoadInfoService
boxLoadInfoService
;
@Resource
OrderService
orderService
;
@Resource
private
ApplicationContext
applicationContext
;
@Resource
OrderQueryService
orderQueryService
;
@Resource
...
...
@@ -190,7 +195,11 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
.
eq
(
BoxPreloadGoodsDO:
:
getIsRemove
,
0
)
);
OrderDO
orderDO
=
orderService
.
getById
(
orderId
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
null
,
Arrays
.
asList
(
1
,
2
,
3
,
4
,
5
,
12
,
31
,
32
)
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
}
//如果都符合,下面展示互斥和关联订单的弹窗
Integer
relationStatus
=
createReqVO
.
getRelationStatus
();
//校验是否是互斥订单
...
...
@@ -424,7 +433,11 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
.
eq
(
BoxPreloadGoodsDO:
:
getIsRemove
,
0
)
);
OrderDO
orderDO
=
orderService
.
getById
(
orderId
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
null
,
Arrays
.
asList
(
1
,
2
,
3
,
4
,
5
,
12
,
31
,
32
)
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
}
//校验是否符合预装。
checkInstallAvailable
(
boxDO
,
secId
,
loadList
,
orderDO
,
orderItemIdList
);
...
...
@@ -2254,6 +2267,11 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
OrderConsigneeDO
filterConsigneeDO
=
getFilterOrderConsigneeDO
(
boxDO
,
loadList
);
OrderDO
orderDO
=
orderService
.
getById
(
orderId
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
orderDO
.
getOrderId
(),
null
,
null
,
Arrays
.
asList
(
1
,
2
,
3
,
4
,
5
,
12
,
31
,
32
)
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
if
(
approvalTypeCheckEvent
.
getResult
())
{
throw
exception
(
ORDER_IS_APPROVAL_IN_PROCESS
);
}
if
(
filterConsigneeDO
!=
null
)
{
//校验收货人是否是同一个人
OrderConsigneeDO
consigneeDO
=
boxService
.
getOrderConsignee
(
orderDO
);
...
...
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