diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index b5581a9e0..3c3808946 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -1005,6 +1005,19 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl idsList = distributionReservationEntities.stream().map(DistributionReservationEntity::getId).collect(Collectors.toList()); + List entityList = distributionStockupInfoService.list(Wrappers.query().lambda() + .in(DistributionStockupInfoEntity::getReservationId, idsList) + .ne(DistributionStockupInfoEntity::getStockStatus, "4") + ); + if (!entityList.isEmpty()){ + List stockIds = entityList.stream().map(DistributionStockupInfoEntity::getStockupId).collect(Collectors.toList()); + log.info("批量转备货任务勾选预约存在备货任务>>>>>>>>>>>>>>>>>>>>>>>>>>>>reservationIds:{},stockIds:{}",idsList,stockIds); + List distributionStockupEntities = distributionStockupService.listByIds(stockIds); + String code = distributionStockupEntities.stream().map(DistributionStockupEntity::getStockupCode).collect(Collectors.joining(",")); + return R.fail("勾选预约存在备货任务:"+code); + } + } try { //获取前端携带批量转备货的id