|
|
|
@ -336,11 +336,25 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
} |
|
|
|
|
//修改订单数据
|
|
|
|
|
if (!distrilbutionBillLading.getStockArticleList().isEmpty()) { |
|
|
|
|
boolean order = getOrder(distrilbutionBillLading.getStockArticleList(), distrilbutionBillLading.getId()); |
|
|
|
|
if (!order) { |
|
|
|
|
// boolean order = getOrder(distrilbutionBillLading.getStockArticleList(), distrilbutionBillLading.getId());
|
|
|
|
|
// if (!order) {
|
|
|
|
|
// throw new ServiceException("修改失败!!");
|
|
|
|
|
// }
|
|
|
|
|
List<DistributionStockArticleEntity> stockArticleList = distrilbutionBillLading.getStockArticleList(); |
|
|
|
|
if (Func.isNotEmpty(stockArticleList)){ |
|
|
|
|
String orderCodes = stockArticleList.stream().map(DistributionStockArticleEntity::getOrderCode).collect(Collectors.joining(",")); |
|
|
|
|
List<Long> 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<Distrilb
|
|
|
|
|
} else { |
|
|
|
|
updateStockBill(distrilbutionBillLading); |
|
|
|
|
} |
|
|
|
|
List<DistributionStockArticleEntity> stockArticleList = distrilbutionBillLading.getStockArticleList(); |
|
|
|
|
if (Func.isNotEmpty(stockArticleList)){ |
|
|
|
|
String orderCodes = stockArticleList.stream().map(DistributionStockArticleEntity::getOrderCode).collect(Collectors.joining(",")); |
|
|
|
|
List<Long> 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(); |
|
|
|
|