From ea76e783f4f4963b8ff402c8af39f0cdd0c15320 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期二, 10 十月 2023 10:29:12 +0800 Subject: [PATCH] #300站拣料 --- src/main/java/com/zy/common/service/CommonService.java | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index b84f6d6..714c1c6 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -120,14 +120,22 @@ /** * 妫�绱㈠簱浣嶅彿 - * @param staDescId 璺緞ID + * + * @param staDescId 璺緞ID * @param sourceStaNo 婧愮珯 - * @param matNos 鐗╂枡鍙烽泦鍚� + * @param matNos 鐗╂枡鍙烽泦鍚� * @return locNo 妫�绱㈠埌鐨勫簱浣嶅彿 */ - public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto,int times) { + public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, int times) { // 鐩爣搴撲綅 LocMast locMast = null; + + // 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 + locMast = getLocNoStep4(staDescId, locTypeDto); + if (locMast != null) { + //鎵惧埌搴撲綅锛岃繑鍥瀌to + return getLocNoStep6(staDescId, sourceStaNo, locMast);//杩斿洖dto + } //搴撲綅瑙勫垯 locMast = getLocNoStepRule(matNos, locTypeDto); @@ -138,13 +146,6 @@ // 闈犺繎鎽嗘斁瑙勫垯 --- 鐩稿悓璁㈠崟鍙�, 鍚屽ぉ鍚岃鏍肩墿鏂� locMast = getLocNoStep3(staDescId, matNos, locTypeDto); - if (locMast != null) { - //鎵惧埌搴撲綅锛岃繑鍥瀌to - return getLocNoStep6(staDescId, sourceStaNo, locMast);//杩斿洖dto - } - - // 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 - locMast = getLocNoStep4(staDescId, locTypeDto); if (locMast != null) { //鎵惧埌搴撲綅锛岃繑鍥瀌to return getLocNoStep6(staDescId, sourceStaNo, locMast);//杩斿洖dto @@ -216,7 +217,7 @@ LocMast locMast0 = locMastService.findNearloc(wrkMast.getLocNo()); if (null != locMast0) { // 娴呭簱浣嶇鍚堝昂瀵告娴� - if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { + if (VersionUtils.checkLocType(locMast0, locTypeDto)) { locMast = locMast0; } } @@ -228,7 +229,7 @@ LocMast locMast0 = locMastService.findNearloc(locNo); if (null != locMast0) { // 娴呭簱浣嶇鍚堝昂瀵告娴� - if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { + if (VersionUtils.checkLocType(locMast0, locTypeDto)) { locMast = locMast0; break; } @@ -251,7 +252,7 @@ LocMast locMast0 = locMastService.findNearloc(wrkMast.getLocNo()); if (null != locMast0) { // 娴呭簱浣嶇鍚堝昂瀵告娴� - if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { + if (VersionUtils.checkLocType(locMast0, locTypeDto)) { locMast = locMast0; break; } @@ -259,13 +260,13 @@ } if (Cools.isEmpty(locMast)){ List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() - .eq("loc_sts", "D")); + .eq("loc_sts", "O")); if (locMasts.size() > 0) { for (LocMast loc : locMasts) { LocMast locMast0 = locMastService.findNearloc(loc.getLocNo()); if (null != locMast0) { // 娴呭簱浣嶇鍚堝昂瀵告娴� - if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { + if (VersionUtils.checkLocType(locMast0, locTypeDto)) { locMast = locMast0; break; } @@ -349,7 +350,7 @@ Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() .eq("type_no", staDescId) .eq("stn_no", sourceStaNo) - .eq("crn_no",Utils.getLev(locNo));//鍊熺敤鍫嗗灈鏈哄彿瀛楁鍏呭綋妤煎眰鍙� + .eq("crn_no",Utils.stnNoToLiftNo(sourceStaNo));//鍊熺敤鍫嗗灈鏈哄彿瀛楁鍏呭綋鎻愬崌鏈哄彿 StaDesc staDesc = staDescService.selectOne(wrapper); if (Cools.isEmpty(staDesc)) { log.error("鍏ュ簱璺緞涓嶅瓨鍦�, staDescId={}, sourceStaNo={}", staDescId, sourceStaNo); -- Gitblit v1.9.1