From 93768902560c4e20ffe44c82288fe90137e264cb Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期三, 11 三月 2026 13:25:30 +0800
Subject: [PATCH] no message

---
 src/main/java/com/zy/common/service/CommonService.java |  378 ++++++++++++++++-------------------------------------
 1 files changed, 116 insertions(+), 262 deletions(-)

diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 45d8fbf..55cf2e3 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -127,12 +127,13 @@
 //            /**
 //             * 搴撳瀷 1: 鏍囧噯鍫嗗灈鏈哄簱 2: 骞冲簱 3: 绌挎鏉� 4: 鍥涘悜杞� 5: AGV 0: 鏈煡
 //             */
-            if (rowLastnoType.getType() == 3) {
-                return getDoubleLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo,
-                        4, locTypeDto, 0);
-            } else {
-                return getLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, 0, locTypeDto, 0);
-            }
+//            if (rowLastnoType.getType() == 3) {
+//                return getDoubleLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo,
+//                        4, locTypeDto, 0);
+//            } else {
+//
+//            }
+            return getLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, 0, locTypeDto, 0);
         } catch (Exception e) {
             log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�", sourceStaNo);
         }
@@ -152,7 +153,7 @@
      * @return locNo 妫�绱㈠埌鐨勫簱浣嶅彿
      */
     @Transactional
-    public StartupDto getLocNoRun(Integer staDescId, Integer whsType, Integer sourceStaNo,
+    public StartupDto getLocNoRun(Integer whsType, Integer staDescId, Integer sourceStaNo,
                                   FindLocNoAttributeVo findLocNoAttributeVo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) {
         staDescId = 1;
         // 鍒濆鍖栧弬鏁�
@@ -165,28 +166,60 @@
             throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�===>搴撲綅瑙勫垯鏈煡");
         }
 
-        // 鍧囪 鍒嗗竷鍫嗗灈鏈�
         int minCount = Integer.MAX_VALUE;
-        for (int i = rowLastno.getsCrnNo(); i <= rowLastno.geteCrnNo(); i++) {
-            int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", i));
-            if (count < minCount) {
-                minCount = count;
-                crnNo = i;
+        if (whsType == 2) {
+            if (locTypeDto.getLocType1() == 2) {
+                // 鍧囪 鍒嗗竷鍫嗗灈鏈�
+                for (int i = 4; i <= 5; i++) {
+                    int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", i));
+                    if (count < minCount) {
+                        minCount = count;
+                        crnNo = i;
+                    }
+                }
+            } else {
+                for (int i = 4; i <= 6; i++) {
+                    int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", i));
+                    if (count < minCount) {
+                        minCount = count;
+                        crnNo = i;
+                    }
+                }
+
+                if (crnNo == 6) {
+                    return getDoubleLocNoRun(3, 1, sourceStaNo, findLocNoAttributeVo, null, locTypeDto, times);
+                }
+            }
+        } else {
+            // 鍧囪 鍒嗗竷鍫嗗灈鏈�
+            for (int i = rowLastno.getsCrnNo(); i <= rowLastno.geteCrnNo(); i++) {
+                int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", i));
+                if (count < minCount) {
+                    minCount = count;
+                    crnNo = i;
+                }
             }
         }
+
         StartupDto startupDto = new StartupDto();
         locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
                 .ge("row1", rowLastno.getsRow())
                 .le("row1", rowLastno.geteRow())
                 .eq("crn_no", crnNo)
-//                .eq("move_status", 0)
+                .eq("loc_type1", locTypeDto.getLocType1())
                 .eq("loc_sts", "O")
                 .orderAsc(Arrays.asList("lev1", "row1", "bay1")));
         // int crnCountO = wrkMastService.selectCount(new
         // EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100));
-
         // 鐢熸垚宸ヤ綔鍙�
-        int workNo = getWorkNo(0);
+        int workNo;
+        if (whsType == 2) {
+            // 鐢熸垚宸ヤ綔鍙�
+            workNo = getWorkNo(3);
+        } else {
+            // 鐢熸垚宸ヤ綔鍙�
+            workNo = getWorkNo(0);
+        }
         // 杩斿洖dto
         startupDto.setWorkNo(workNo);
         startupDto.setCrnNo(locMast.getCrnNo());
@@ -209,12 +242,19 @@
      * @return locNo 妫�绱㈠埌鐨勫簱浣嶅彿
      */
     public StartupDto getDoubleLocNoRun(Integer whsType, Integer staDescId, Integer sourceStaNo, FindLocNoAttributeVo findLocNoAttributeVo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) {
-        // 鍒濆鍖栧弬鏁�
-        int crnNo = 0;      //鍫嗗灈鏈哄彿
-        int nearRow = 0;    //鏈�娴呭簱浣嶆帓
-        int curRow = 0;     //鏈�娣卞簱浣嶆帓
-        int rowCount = 0;   //杞杞
-        LocMast locMast = null;     // 鐩爣搴撲綅
+        // 1. 鍒濆鍖栧弬鏁�
+        int crnNo = 6;      // 鍫嗗灈鏈哄彿
+        int deepRow, shallowRow;
+        int rowCount = 2;   // 杞涓ょ粍璐ф灦 (11/12 瀵� 鍜� 14/13 瀵�)
+
+        // 鏍规嵁杞娆℃暟鍒囨崲鎺掞紝涓ユ牸淇濊瘉娣变綅浼樺厛
+        if (times % 2 == 0) {
+            deepRow = 11;
+            shallowRow = 12;
+        } else {
+            deepRow = 14;
+            shallowRow = 13;
+        }
 
         StartupDto startupDto = new StartupDto();
         RowLastno rowLastno = rowLastnoService.selectById(whsType);
@@ -225,272 +265,86 @@
         if (Cools.isEmpty(rowLastnoType)) {
             throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�===銆嬪簱浣嶈鍒欑被鍨嬫湭鐭�");
         }
-        int sRow = rowLastno.getsRow();
-        int eRow = rowLastno.geteRow();
-        int crnNumber = rowLastno.getCrnQty();
 
+        LocMast locMast = null;
 
-        // ===============>>>> 寮�濮嬫墽琛�
-        curRow = rowLastno.getCurrentRow();
+        // 2. 寮�濮嬫绱� (浼樺厛绾э細娣变綅鍫嗗彔 > 娣变綅绌轰綅 > 娴呬綅绌轰綅)
 
-        if (!Cools.isEmpty(moveCrnNo) && moveCrnNo != 0) {
-            crnNumber = moveCrnNo;
-            if (times == 0) {
-                curRow = moveCrnNo * 4 - 1;
-            } else {
-                curRow = moveCrnNo * 4 - 2;
-            }
-        }
+        // A. 浼樺厛灏濊瘯锛氭繁浣嶄负绌猴紝涓斿叾瀵瑰簲鐨勬祬浣嶅凡缁忓瓨鏀句簡鐩稿悓鐗╂枡 (瀹炵幇 signRule1 鐨勬牳蹇冮�昏緫)
+        if (Utils.BooleanWhsTypeStaIoType(rowLastno) && !Cools.isEmpty(findLocNoAttributeVo.getMatnr())) {
+            List<LocMast> shallowMasts = locMastService.selectList(new EntityWrapper<LocMast>()
+                    .eq("row1", shallowRow)
+                    .eq("loc_sts", "F")
+                    .eq("crn_no", crnNo));
 
-        //姝ょ▼搴忕敤浜庝紭鍖栧爢鍨涙満寮傚父鏃剁殑杩愯鏃堕棿
-        for (int i = times; i < crnNumber * 2; i++) {
-            int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber);
-            curRow = locNecessaryParameters[1];
-            crnNo = locNecessaryParameters[2];
-            if (basCrnpService.checkSiteError(crnNo, true)) {
-                rowCount = locNecessaryParameters[0];
-                nearRow = locNecessaryParameters[3];
-                List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
-                        .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()));
-                int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100));
-                if (locMasts.size() - crnCountO <= 2) {
-                    log.error(crnNo + "鍙峰爢鍨涙満娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times);
-                    nearRow = 0;
-                    times++;
-                    continue;
-                }
-                break;
-            } else {
-                times++;
-            }
-        }
-        if (nearRow == 0) {
-            throw new CoolException("鏃犲彲鐢ㄥ爢鍨涙満");
-        }
+            for (LocMast sLoc : shallowMasts) {
+                LocDetl detl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", sLoc.getLocNo()));
+                if (detl != null && detl.getMatnr().equals(findLocNoAttributeVo.getMatnr())
+                        && detl.getBatch().equals(findLocNoAttributeVo.getBatch())) {
 
-        boolean signRule1 = false;
-        boolean signRule2 = false;
+                    String dLocNo = Utils.getDeepLoc(slaveProperties, sLoc.getLocNo());
+                    LocMast dLoc = locMastService.selectOne(new EntityWrapper<LocMast>()
+                            .eq("loc_no", dLocNo)
+                            .eq("loc_sts", "O"));
 
-
-        if (Utils.BooleanWhsTypeStaIoType(rowLastno)) {
-            // 闈犺繎鎽嗘斁瑙勫垯 --- 鍚屽ぉ鍚岃鏍肩墿鏂� //鍒嗙鐗�
-            if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && staDescId == 1) {
-                signRule1 = true;
-            }
-            // 闈犺繎鎽嗘斁瑙勫垯 --- 鍚屽ぉ鍚岃鏍肩墿鏂� //浜掗�氱増
-            if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && staDescId == 1) {
-                signRule2 = true;
-            }
-
-            if (!Cools.isEmpty(findLocNoAttributeVo.getMatnr()) && (staDescId == 11 || staDescId == 111)) {
-                signRule1 = true;
-            }
-        }
-
-        if (signRule1) {
-            if (nearRow != curRow) {
-                List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
-                        .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()));
-                for (LocMast locMast1 : locMasts) {
-                    //鑾峰彇宸烽亾
-//                    List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,locMast1.getLocNo(), curRow>nearRow);
-//                    LocMast locMastGro = locMastService.selectById(wrkMast.getLocNo());
-                    //鑾峰彇鐩爣搴撲綅鎵�鍦ㄥ贩閬撴渶娴呴潪绌哄簱浣�
-                    LocMast locMastF = locMastService.selectLocByLocStsPakInF(curRow, nearRow, locMast1, rowLastnoType.getType().longValue());
-                    if (!Cools.isEmpty(locMastF) && locMastF.getLocSts().equals("F")) {
-                        LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMastF.getLocNo()));
-                        if (!Cools.isEmpty(locDetl) && findLocNoAttributeVo.getMatnr().equals(locDetl.getMatnr())
-                                && findLocNoAttributeVo.getBatch().equals(locDetl.getBatch())
-                                && findLocNoAttributeVo.getBrand().equals(locDetl.getBrand())) {
-                            //鑾峰彇鐩爣搴撲綅鎵�鍦ㄥ贩閬撴渶娣辩┖搴撲綅
-                            locMast = locMastService.selectLocByLocStsPakInO(curRow, nearRow, locMast1, rowLastnoType.getType().longValue());
-                            break;
-                        }
-                    }
-                }
-            }
-        } else if (signRule2) {
-            List<String> locNos = locDetlService.getSameDetlToday(findLocNoAttributeVo.getMatnr(), sRow, eRow);
-            for (String locNo : locNos) {
-                if (Utils.isShallowLoc(slaveProperties, locNo)) {
-                    continue;
-                }
-                String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo);
-                // 妫�娴嬬洰鏍囧簱浣嶆槸鍚︿负绌哄簱浣�
-                LocMast shallowLoc = locMastService.selectById(shallowLocNo);
-                if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) {
-                    if (VersionUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) {
-                        if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) {
-                            locMast = shallowLoc;
-                            crnNo = locMast.getCrnNo();
-                            break;
-                        }
+                    if (dLoc != null && VersionUtils.locMoveCheckLocTypeComplete(dLoc, locTypeDto)) {
+                        locMast = dLoc;
+                        break;
                     }
                 }
             }
         }
 
-//        // 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭  //鍒嗙鐗�
-//        if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(whsType)) {
-//            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O"));
-//            for (LocMast locMast1:locMasts){
-//                if (VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
-//                    continue;
-//                }
-//                String shallowLoc = Utils.getDeepLoc(slaveProperties,locMast1.getLocNo());
-//                LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",shallowLoc));
-//                if (!Cools.isEmpty(locMast2) && locMast2.getLocSts().equals("D")){
-//                    locMast = locMast1;
-//                    break;
-//                }
-//            }
-//        }
-
-//        // 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 //浜掗�氱増
-//        if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) {
-//            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
-//                    .eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow).eq("whs_type", rowLastnoType.getType().longValue()));
-//            if (!locMasts.isEmpty()) {
-//                for (LocMast loc : locMasts) {
-//                    if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) {
-//                        continue;
-//                    }
-//                    String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo());
-//                    // 妫�娴嬬洰鏍囧簱浣嶆槸鍚︿负绌哄簱浣�
-//                    LocMast shallowLoc = locMastService.selectById(shallowLocNo);
-//                    if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) {
-//                        if (VersionUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) {
-//                            if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) {
-//                                locMast = shallowLoc;
-//                                crnNo = locMast.getCrnNo();
-//                                break;
-//                            }
-//                        }
-//                    }
-//                }
-//            }
-//        }
-
-        Wrapper<StaDesc> wrapper = null;
-        StaDesc staDesc = null;
-        BasDevp staNo = null;
-
-//        if (Utils.BooleanWhsTypeSta(rowLastno, staDescId)) {
-//            // 鑾峰彇鐩爣绔�
-//            wrapper = new EntityWrapper<StaDesc>()
-//                    .eq("type_no", staDescId)
-//                    .eq("stn_no", sourceStaNo)
-//                    .eq("crn_no", crnNo);
-//            staDesc = staDescService.selectOne(wrapper);
-//            if (Cools.isEmpty(staDesc)) {
-//                log.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo);
-////                throw new CoolException("鍏ュ簱璺緞涓嶅瓨鍦�");
-//                crnNo = 0;
-//            } else {
-//                staNo = basDevpService.selectById(staDesc.getCrnStn());
-//                if (!staNo.getAutoing().equals("Y")) {
-//                    log.error("鐩爣绔�" + staDesc.getCrnStn() + "涓嶅彲鐢�");
-////                throw new CoolException("鐩爣绔�"+staDesc.getCrnStn()+"涓嶅彲鐢�");
-//                    crnNo = 0;
-//                }
-//                startupDto.setStaNo(staNo.getDevNo());
-//            }
-//            // 鏇存柊搴撲綅鎺掑彿
-//            if (Cools.isEmpty(locMast)) {
-//                rowLastno.setCurrentRow(curRow);
-//                rowLastnoService.updateById(rowLastno);
-//            }
-//        }
-
-        // 寮�濮嬫煡鎵惧簱浣� ==============================>>
-        // 1.鎸夎鍒欐煡鎵惧簱浣�
-        if (Cools.isEmpty(locMast) && crnNo != 0) {
-            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
-                    .eq("row1", nearRow)
-                    .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())
+        // B. 娆′紭鍏堬細娣变綅涓虹┖锛屼笖娴呬綅涔熶负绌� (鍏ユ繁浣�)
+        if (locMast == null) {
+            List<LocMast> deepMasts = locMastService.selectList(new EntityWrapper<LocMast>()
+                    .eq("row1", deepRow)
+                    .eq("loc_sts", "O")
+                    .eq("crn_no", crnNo)
                     .orderBy("lev1", true).orderBy("bay1", true));
-            for (LocMast locMast1 : locMasts) {
-                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
-                    continue;
-                }
-                if (Utils.BooleanWhsTypeStaIoType(rowLastno)) {
-                    String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
-                    LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
-                            .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()));
-                    if (!Cools.isEmpty(locMast2)) {
-                        locMast = locMast2;
-                        break;
-                    }
-                } else {
-                    if (!Cools.isEmpty(locMast1)) {
-                        locMast = locMast1;
-                        break;
-                    }
-                }
-            }
 
-            if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)) {
-                for (LocMast locMast1 : locMasts) {
-                    if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
-                        continue;
-                    }
-                    if (Utils.BooleanWhsTypeStaIoType(rowLastno)) {
-                        String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
-                        LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
-                                .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()));
-                        if (!Cools.isEmpty(locMast2)) {
-                            locMast = locMast2;
-                            break;
-                        } else {
-                            locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
-                                    .eq("loc_no", shallowLoc).eq("loc_sts", "F").eq("whs_type", rowLastnoType.getType().longValue()));
-                            if (!Cools.isEmpty(locMast2)) {
-                                locMast = locMast1;
-                                break;
-                            } else {
-                                locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
-                                        .eq("loc_no", shallowLoc).eq("loc_sts", "D").eq("whs_type", rowLastnoType.getType().longValue()));
-                                if (!Cools.isEmpty(locMast2)) {
-                                    locMast = locMast1;
-                                    break;
-                                }
-                            }
-                        }
-                    } else {
-                        if (!Cools.isEmpty(locMast1)) {
-                            locMast = locMast1;
-                            break;
-                        }
-                    }
+            for (LocMast dLoc : deepMasts) {
+                String sLocNo = Utils.getShallowLoc(slaveProperties, dLoc.getLocNo());
+                LocMast sLoc = locMastService.selectOne(new EntityWrapper<LocMast>()
+                        .eq("loc_no", sLocNo)
+                        .eq("loc_sts", "O"));
+
+                if (sLoc != null && VersionUtils.locMoveCheckLocTypeComplete(dLoc, locTypeDto)) {
+                    locMast = dLoc;
+                    break;
                 }
             }
         }
 
-        if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) {
-            locMast = null;
+        // C. 鏈�鍚庯細濡傛灉娣变綅瀹炲湪娌℃硶鏀撅紙娣变綅宸叉弧鎴栨祬浣嶆尅璺笖鐗╂枡涓嶅悓锛夛紝鍐嶈�冭檻娴呬綅涓虹┖
+        if (locMast == null) {
+            List<LocMast> shallowMasts = locMastService.selectList(new EntityWrapper<LocMast>()
+                    .eq("row1", shallowRow)
+                    .eq("loc_sts", "O")
+                    .eq("crn_no", crnNo)
+                    .orderBy("lev1", true).orderBy("bay1", true));
+
+            for (LocMast sLoc : shallowMasts) {
+                if (VersionUtils.locMoveCheckLocTypeComplete(sLoc, locTypeDto)) {
+                    locMast = sLoc;
+                    break;
+                }
+            }
         }
 
-        // 閫掑綊鏌ヨ
-        if (Cools.isEmpty(locMast) || !locMast.getLocSts().equals("O")) {
-            // 褰撳墠宸烽亾鏃犵┖搴撲綅鏃讹紝閫掑綊璋冩暣鑷充笅涓�宸烽亾锛屾绱㈠叏閮ㄥ贩閬撴棤鏋滃悗锛岃烦鍑洪�掑綊
+        // 3. 閫掑綊涓庡紓甯稿鐞�
+        if (Cools.isEmpty(locMast)) {
+            // 褰撳墠杩欑粍璐ф灦鎵惧畬浜嗭紝閫掑綊灏濊瘯涓嬩竴缁�
             if (times < rowCount * 2) {
-                times = times + 1;
-                return getDoubleLocNoRun(whsType, 1, sourceStaNo, findLocNoAttributeVo, moveCrnNo, locTypeDto, times);
+                return getDoubleLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, moveCrnNo, locTypeDto, times + 1);
             }
-//            // 2.搴撲綅褰撳墠鎵�灞炲昂瀵告棤绌哄簱浣嶆椂锛岃皟鏁村昂瀵稿弬鏁帮紝鍚戜笂鍏煎妫�绱㈠簱浣�
-//            if (locTypeDto.getLocType1() < 2) {
-//                int i = locTypeDto.getLocType1() + 1;
-//                locTypeDto.setLocType1((short)i);
-//                return getLocNo(1, staDescId, sourceStaNo, matnr,batch,grade, locTypeDto, 0);
-//            }
             log.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times);
             throw new CoolException("娌℃湁绌哄簱浣�");
         }
-        String locNo = locMast.getLocNo();
 
-        // 鐢熸垚宸ヤ綔鍙�
+        // 4. 杩斿洖缁撴灉
+        String locNo = locMast.getLocNo();
         int workNo = getWorkNo(0);
-        // 杩斿洖dto
         startupDto.setWorkNo(workNo);
         startupDto.setCrnNo(crnNo);
         startupDto.setSourceStaNo(sourceStaNo);

--
Gitblit v1.9.1