Commit 1e47e0bd authored by zhengyi's avatar zhengyi

待预装订单列表校验审批订单逻辑修正

parent a90fdf19
...@@ -2157,14 +2157,19 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM ...@@ -2157,14 +2157,19 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
if (CollectionUtil.isNotEmpty(unLoadItemList)) { if (CollectionUtil.isNotEmpty(unLoadItemList)) {
//过滤审核中的订单 // 过滤审核中的订单 这里需要修改逻辑, 订单除拆单申请/合单申请/调仓申请/订单修改/入仓申请/退仓申请外,其他审批申请不受限制,允许订单预装
Set<Long> oIdList = unLoadItemList.stream() Set<Long> oIdList = unLoadItemList.stream()
.map(OrderItemDO::getOrderId) .map(OrderItemDO::getOrderId)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
List<OrderApprovalDO> orderApprovalList = boxService.getOrderApprovalIng(oIdList); List<Long> approvalIdList = new ArrayList<>();
List<Long> approvalIdList = orderApprovalList.stream() for (Long orderId : oIdList) {
.map(OrderApprovalDO::getOrderId) OrderDO orderDO = orderService.getById(orderId);
.collect(Collectors.toList()); OrderApprovalTypeCheckEvent approvalTypeCheckEvent = new OrderApprovalTypeCheckEvent(orderDO.getOrderId(), null, null, Arrays.asList(6,11,13,14,22,23) , false);
applicationContext.publishEvent(approvalTypeCheckEvent);
if (approvalTypeCheckEvent.getResult()) {
approvalIdList.add(orderId);
}
}
list = list.stream() list = list.stream()
.filter(t -> !approvalIdList.contains(t.getOrderId())) .filter(t -> !approvalIdList.contains(t.getOrderId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -2713,14 +2718,19 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM ...@@ -2713,14 +2718,19 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
if (CollectionUtil.isNotEmpty(unLoadItemList)) { if (CollectionUtil.isNotEmpty(unLoadItemList)) {
//过滤审核中的订单 // 过滤审核中的订单 2024-11-13 这里有新的逻辑修改 订单除拆单申请/合单申请/调仓申请/订单修改/入仓申请/退仓申请外,其他审批申请不受限制,允许订单预装
Set<Long> oIdList = unLoadItemList.stream() Set<Long> oIdList = unLoadItemList.stream()
.map(OrderItemDO::getOrderId) .map(OrderItemDO::getOrderId)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
List<OrderApprovalDO> orderApprovalList = boxService.getOrderApprovalIng(oIdList); List<Long> approvalIdList = new ArrayList<>();
List<Long> approvalIdList = orderApprovalList.stream() for (Long orderId : oIdList) {
.map(OrderApprovalDO::getOrderId) OrderDO orderDO = orderService.getById(orderId);
.collect(Collectors.toList()); OrderApprovalTypeCheckEvent approvalTypeCheckEvent = new OrderApprovalTypeCheckEvent(orderDO.getOrderId(), null, null, Arrays.asList(6,11,13,14,22,23) , false);
applicationContext.publishEvent(approvalTypeCheckEvent);
if (approvalTypeCheckEvent.getResult()) {
approvalIdList.add(orderId);
}
}
list = list.stream() list = list.stream()
.filter(t -> !approvalIdList.contains(t.getOrderId())) .filter(t -> !approvalIdList.contains(t.getOrderId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment