From d3cb0e841e6585aa84a45f18bb30965db8d1a6aa Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 08 一月 2025 15:48:40 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/service/CommonService.java |   40 ++++++++++++++++++++++++++++++----------
 1 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 703e347..d10d337 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -123,20 +123,40 @@
         if (null == locMast) {
             Shelves shelves = new Shelves(rowCount, crn_qty);
             int divides = (int) Arith.divides(1, curRow - 1, 2);
-            curRow = (int) Arith.remainder(curRow, 2);
+            //curRow = (int) Arith.remainder(curRow, 2);
             if (curRow == 0) {
-                curRow = 2;
+                curRow = 6;
+            } else if (curRow == 7) {
+                curRow = 1;
             }
             for (int i = 0; i < shelves.group; i ++) {
-                curRow = shelves.start(curRow);
+                //curRow = shelves.start(curRow);
                 if (curRow < 0) {
                     throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳");
                 }
-                Integer crnNo1 = shelves.get(curRow);
-                crnNo1 = crnNo1 + divides*1;
+                //Integer crnNo1 = shelves.get(curRow);
+                Integer crnNo1 = 0;
+                switch (curRow) {
+                    case 1:
+                    case 2:
+                        crnNo1 = 1;
+                        break;
+                    case 3:
+                    case 4:
+                        crnNo1 = 2;
+                        break;
+                    case 5:
+                    case 6:
+                        crnNo1 = 3;
+                        break;
+                }
+                //crnNo1 = crnNo1 + divides*1;
                 if (basCrnpService.checkSiteError(crnNo1, true)) {
                     crnNo = crnNo1;
-                    curRow = curRow + divides*2;
+                    //curRow = curRow + divides*2;
+                    // 鏇存柊搴撲綅鎺掑彿
+                    rowLastno.setCurrentRow(curRow + 1);
+                    rowLastnoService.updateById(rowLastno);
                     break;
                 }
             }
@@ -161,8 +181,8 @@
         }
 
         // 鏇存柊搴撲綅鎺掑彿
-        rowLastno.setCurrentRow(curRow);
-        rowLastnoService.updateById(rowLastno);
+        //rowLastno.setCurrentRow(curRow);
+        //rowLastnoService.updateById(rowLastno);
 
         // 寮�濮嬫煡鎵惧簱浣� ==============================>>
 
@@ -209,8 +229,8 @@
             }
 
             // 杞昏揣鐗╂壘杞诲簱浣嶄负绌烘椂锛屽彲浠ュ幓鎵鹃噸搴撲綅浠�
-            if (locTypeDto.getLocType1() == 1) {
-                locTypeDto.setLocType1((short) 2);
+            if (locTypeDto.getLocType1() == 2) {
+                locTypeDto.setLocType1((short) 1);
                 return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, times);
             }
             log.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times);

--
Gitblit v1.9.1