From dcdcecdcd0ff68b3699838bd11c98014112e5574 Mon Sep 17 00:00:00 2001 From: ZY <zc857179121@qq.com> Date: 星期三, 02 四月 2025 13:26:09 +0800 Subject: [PATCH] 1 --- src/main/java/com/zy/common/service/CommonService.java | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index db0e4f2..cfbcda4 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -127,13 +127,18 @@ switch (rowLastnoType.getType()) { case 1: - StartupDto locNoRun = getLocNoRun(whsType, staDescId, sourceStaNo, matnr, batch, grade, 0, locTypeDto, 0); - List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() - .eq("loc_sts", "O").eq("loc_type1", locTypeDto.getLocType1()).eq("whs_type", rowLastnoType.getType().longValue())); - if (locMasts != null && locMasts.size() < 8) { - throw new CoolException("娌℃湁绌哄簱浣�"); + List<LocMast> locMasts; + Short locType1 = locTypeDto.getLocType1(); + for (int i = locTypeDto.getLocType1(); i < 4; i++) { + locMasts = locMastService.selectList(new EntityWrapper<LocMast>() + .eq("loc_sts", "O").eq("loc_type1", i).eq("whs_type", rowLastnoType.getType().longValue())); + if (i == 3 && locMasts != null && locMasts.size() < 8) { + throw new CoolException("娌℃湁绌哄簱浣�"); + } + locType1= (short) i; } - return locNoRun; + locTypeDto.setLocType1(locType1); + return getLocNoRun(whsType, staDescId, sourceStaNo, matnr, batch, grade, 0, locTypeDto, 0); case 2: log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�", sourceStaNo); break; -- Gitblit v1.9.1