From ac3e48e8341320933ea4a7a8df4499750ea0f4a3 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Sun, 28 Apr 2024 10:09:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E5=BA=93=E5=AD=98=E5=93=81=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistributionParcelListServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) 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("有包件未维护物料信息,请维护后在进行操作!!");