From d382ffad92c48f6a96bb7d5e1fd733b90c9ca137 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期六, 03 六月 2023 09:50:38 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/service/CommonService.java | 62 +++++++++++++++++++++++-------- 1 files changed, 46 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 32bdf6d..b725378 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -156,22 +156,23 @@ // 鐩爣搴撲綅 LocMast locMast = null; - if (!Cools.isEmpty(matNos)) { - for (String matNo : matNos) { - Mat mat = matService.selectByMatnr(matNo); - if (matType == null) { - matType = mat.getMatType(); - } - if (matType != mat.getMatType()) { - throw new CoolException("娣锋斁鐗╂枡绫诲瀷涓嶄竴鑷�"); - } - } - - if (matNos.size() > 1 && matType == 1) { - //鐗╂枡涓哄崟鍝佺被鍨嬶紝涓旂墿鏂欑绫昏秴杩�1(瀹為檯涓洪珮棰戞贩鏀�)锛屽垯绂佹鍏ュ簱 - throw new CoolException("鐗╂枡绫诲瀷鍜屽疄闄呯绫讳笉涓�鑷�"); - } - } + //3鍙峰彲浠ュ叆搴撳墠蹇呴』鎵撳紑鎺у埗 +// if (!Cools.isEmpty(matNos)) { +// for (String matNo : matNos) { +// Mat mat = matService.selectByMatnr(matNo); +// if (matType == null) { +// matType = mat.getMatType(); +// } +// if (matType != mat.getMatType()) { +// throw new CoolException("娣锋斁鐗╂枡绫诲瀷涓嶄竴鑷�"); +// } +// } +// +// if (matNos.size() > 1 && matType == 1) { +// //鐗╂枡涓哄崟鍝佺被鍨嬶紝涓旂墿鏂欑绫昏秴杩�1(瀹為檯涓洪珮棰戞贩鏀�)锛屽垯绂佹鍏ュ簱 +// throw new CoolException("鐗╂枡绫诲瀷鍜屽疄闄呯绫讳笉涓�鑷�"); +// } +// } // 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 locMast = getLocNoStep1(staDescId, locTypeDto, start, end); @@ -205,6 +206,32 @@ } } } + + //----------------2023.06.02鍏煎浠g爜锛屽悗鏈熷簱浣嶈鍒欑鍚堣姹傚悗鍙垹闄�------------------------ + //濡傛灉浠ヤ笂閮芥壘涓嶅埌搴撲綅锛屽垯寮哄埗鎼滅储1銆�2鍫嗗灈鏈虹┖搴撲綅杩涜鍏ュ簱锛屼繚闅�3鍙峰爢鍨涙満搴撲綅閮芥槸绗﹀悎瑕佹眰鐨� + EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); + wrapper.eq("loc_type1", locTypeDto.getLocType1()); + wrapper.in("crn_no", "1,2"); + wrapper.eq("loc_sts", "O"); + List<LocMast> locMasts = locMastService.selectList(wrapper); + for (LocMast mast : locMasts) { + //妫�娴嬪綋鍓嶅簱浣嶅唴渚у叾浠栧簱浣嶆槸鍚︿负D銆丗銆乆 + if (Utils.checkInsideLocIsDFX(mast.getLocNo())) { + //鍐呬晶鍏朵粬搴撲綅涓嶆槸D銆丗銆乆銆備笉鑳介�夊彇璇ュ簱浣� + continue; + } + if(sourceStaNo==103 && mast.getRow1()>7) + { + continue; + } + if(sourceStaNo==203 && mast.getRow1()<8) + { + continue; + } + //鎵惧埌搴撲綅锛岃繑鍥瀌to + return getLocNoFinalStep(staDescId, sourceStaNo, mast);//杩斿洖dto + } + //----------------2023.06.02鍏煎浠g爜end--------------------- throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); } @@ -333,6 +360,9 @@ //闅忔満鍙敤鍫嗗灈鏈哄彿 Integer randomCrnNo = Utils.getRandomCrnNo(crnNos, locTypeDto.getLocType1()); + if (randomCrnNo == null) { + return locMast; + } ArrayList<Integer> randomCrnNos = new ArrayList<>(); randomCrnNos.add(randomCrnNo); -- Gitblit v1.9.1