From f7345dc68bad50e47b97f4ab8a2918ff654ccad0 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 4 Apr 2024 03:59:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90=E7=BB=B4=E6=8A=A4=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistrilbutionBillLadingServiceImpl.java | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java index 5f0698bfc..b6fb302fe 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java @@ -1327,11 +1327,12 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl orderList, Long id) { + //收集需要进行订单维护的数据 //查询已有的数据 List list = distrilbutionBillStockService.list(Wrappers.query().lambda() .eq(DistrilbutionBillStockEntity::getBillLadingId, id) - .apply("order_status in ( 1,2)") - .or(wp -> wp.eq(DistrilbutionBillStockEntity::getBillLadingId, id).apply("order_status in ( 1,2)")) + .apply("order_status in ( 1,3)") + .or(wp -> wp.eq(DistrilbutionBillStockEntity::getBillLadingId, id).apply("order_status in ( 1,3)")) ); List deList = new ArrayList<>(); list.forEach(i -> { @@ -1356,7 +1357,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl sStock = new ArrayList<>(); //取消 - + List cancelOrderIds = new ArrayList<>(); //删除提货订单状态 deList.forEach(i -> { //查询数据是否已备货 @@ -1370,6 +1371,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl distributionStockArticleEntities = distributionStockArticleService.listByIds(cancelOrderIds); + if (Func.isEmpty(distributionStockArticleEntities)){ + log.info("#####################查询订单失败,orderIds:{}",cancelOrderIds); + } + String orderCodes = distributionStockArticleEntities.stream().map(DistributionStockArticleEntity::getOrderCode).collect(Collectors.joining(",")); + List collect = distributionStockArticleEntities.stream().map(DistributionStockArticleEntity::getWarehouseId).distinct().collect(Collectors.toList()); + if (collect.isEmpty()){ + log.info("#####################订单列表warehouseId字段缺失,orderIds:{}",cancelOrderIds); + return false; + } + if (collect.size()>1){ + log.info("#####################自提操作多个仓库订单,orderIds:{}",cancelOrderIds); + return false; + } + distributionStockArticleService.maintenanceOrderInfo(orderCodes,collect.get(0)); + } return true; }