From 0178712209fa92d55f1af021f6cfb1cd201ee474 Mon Sep 17 00:00:00 2001 From: bfwms <1> Date: 星期一, 07 十月 2024 14:22:34 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/service/CommonService.java | 52 +++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 43 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index 1a4c926..d301e2e 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -35,6 +35,18 @@ add(21);add(22);add(23);add(24);add(25);add(26);add(27);add(28);add(29);add(30); }}; + public static final List<String> HARD_LOC_NO = new ArrayList<String>() {{ + add("0200104");add("0200704");add("0201404");add("0202004"); + add("0600201");add("0600202");add("0600203");add("0600204"); + add("0600301");add("0600302");add("0600303");add("0600304"); + add("0600701");add("0600702"); + add("0601401");add("0601402"); + add("0602001");add("0602002"); + add("2000704");add("2001404");add("2002004"); + add("1600701");add("1601401");add("1602001"); + add("1600702");add("1601402");add("1602002"); + }}; + @Autowired private WrkMastService wrkMastService; @Autowired @@ -117,7 +129,7 @@ ArrayList<Integer> rows = new ArrayList<>(); switch (sourceStaNo) { case 103://103鍏ュ簱绔� - case 114://103鍏ュ簱绔� + case 113://103鍏ュ簱绔� whsType = 1; start = 1; end = 14; @@ -134,7 +146,7 @@ crnNo = 1; break; case 203://203鍏ュ簱绔� - case 214://203鍏ュ簱绔� + case 213://203鍏ュ簱绔� whsType = 2; start = 8; end = 21; @@ -274,7 +286,7 @@ // 娴呭簱浣嶅搴斿爢鍨涙満蹇呴』鍙敤涓旀棤寮傚父 if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� - if (locMastService.checkEmptyCount(locMast0, 10)) { + if (locMastService.checkEmptyCount(locMast0, 5)) { locMast = locMast0; break; } @@ -313,7 +325,7 @@ // 娴呭簱浣嶅搴斿爢鍨涙満蹇呴』鍙敤涓旀棤寮傚父 if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� - if (locMastService.checkEmptyCount(locMast0, 10)) { + if (locMastService.checkEmptyCount(locMast0, 5)) { locMast = locMast0; break; } @@ -342,7 +354,7 @@ // 娴呭簱浣嶅搴斿爢鍨涙満蹇呴』鍙敤涓旀棤寮傚父 if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� - if (locMastService.checkEmptyCount(locMast0, 10)) { + if (locMastService.checkEmptyCount(locMast0, 5)) { locMast = locMast0; break; } @@ -372,10 +384,28 @@ // 娴呭簱浣嶅搴斿爢鍨涙満蹇呴』鍙敤涓旀棤寮傚父 if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� - if (locMastService.checkEmptyCount(locMast0, 10)) { + if (locMastService.checkEmptyCount(locMast0, 5)) { locMast = locMast0; flag = true; break; + } + } + } + } + if (!flag) { + List<LocMast> locMastsNew = locMastService.findInEmptyLocMastNew(locTypeDto.getLocType1(), HARD_LOC_NO, crnNo);//鎵句竴鏉℃柊鐨勭┖宸烽亾 + for (LocMast locMast0 : locMastsNew) { + //妫�娴嬪綋鍓嶅簱浣嶅唴渚у叾浠栧簱浣嶆槸鍚︿负D銆丗銆乆 + // 娴呭簱浣嶇鍚堝昂瀵告娴� + if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { + // 娴呭簱浣嶅搴斿爢鍨涙満蹇呴』鍙敤涓旀棤寮傚父 + if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { + // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� + if (locMastService.checkEmptyCount(locMast0, 5)) { + locMast = locMast0; + flag = true; + break; + } } } } @@ -415,7 +445,7 @@ // 娴呭簱浣嶅搴斿爢鍨涙満蹇呴』鍙敤涓旀棤寮傚父 if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� - if (locMastService.checkEmptyCount(locMast0, 10)) { + if (locMastService.checkEmptyCount(locMast0, 5)) { locMast = locMast0; } } @@ -518,9 +548,13 @@ if (Cools.isEmpty(staDesc)) { log.error("鍏ュ簱璺緞涓嶅瓨鍦�, staDescId={}, sourceStaNo={}, crnNo={}", staDescId, sourceStaNo, locMast.getCrnNo()); if (sourceStaNo==103 && locMast.getCrnNo()==3){ - throw new CoolException("璇锋斁鍒�203鍏ュ簱鍙�"); + throw new CoolException("璇锋斁鍒�203鍏ュ簱鍙�--1000"); }else if (sourceStaNo==203 && locMast.getCrnNo()==1){ - throw new CoolException("璇锋斁鍒�103鍏ュ簱鍙�"); + throw new CoolException("璇锋斁鍒�103鍏ュ簱鍙�--1000"); + }else if (sourceStaNo==113 && locMast.getCrnNo()==3){ + throw new CoolException("璇锋斁鍒�213鍏ュ簱鍙�--1000"); + }else if (sourceStaNo==213 && locMast.getCrnNo()==1){ + throw new CoolException("璇锋斁鍒�113鍏ュ簱鍙�--1000"); }else { throw new CoolException("鍏ュ簱璺緞涓嶅瓨鍦�"); } -- Gitblit v1.9.1