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 c91766f8c..aba7cbe7a 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 @@ -336,11 +336,25 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl stockArticleList = distrilbutionBillLading.getStockArticleList(); + if (Func.isNotEmpty(stockArticleList)){ + String orderCodes = stockArticleList.stream().map(DistributionStockArticleEntity::getOrderCode).collect(Collectors.joining(",")); + List collect = stockArticleList.stream().map(DistributionStockArticleEntity::getWarehouseId).distinct().collect(Collectors.toList()); + if (!collect.isEmpty() && collect.size() == 1){ + distributionStockArticleService.maintenanceOrderInfo(orderCodes,collect.get(0)); + }else { + throw new ServiceException("修改失败!!"); + + } } + + } + /* else{ updateOrder(distrilbutionBillLading); } @@ -453,14 +467,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl stockArticleList = distrilbutionBillLading.getStockArticleList(); - if (Func.isNotEmpty(stockArticleList)){ - String orderCodes = stockArticleList.stream().map(DistributionStockArticleEntity::getOrderCode).collect(Collectors.joining(",")); - List collect = stockArticleList.stream().map(DistributionStockArticleEntity::getWarehouseId).distinct().collect(Collectors.toList()); - if (!collect.isEmpty() && collect.size() == 1){ - distributionStockArticleService.maintenanceOrderInfo(orderCodes,collect.get(0)); - } - } + } else { //设置lockey String lockKey = "lock:" + distrilbutionBillLading.getStockArticleId();