diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java index 76bce1852..7501fa694 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java @@ -501,6 +501,11 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl list1 = baseMapper.selectList(queryWrapper); + boolean flag = list1.stream().anyMatch(p -> OrderPackageReservationStatusConstant.yiyueyue.getValue().equals(p.getOrderPackageReservationStatus())); + if (flag){ + String collect = list1.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(",")); + throw new ServiceException(collect+"包件已预约,无法转为库存品"); + } boolean b = list1.stream().anyMatch(i -> ObjectUtils.isNull(i.getMaterialId())); if (b) { throw new ServiceException("有包件未维护物料信息,请维护后在进行操作!!");