From 66d031eb7381ad8dd04d71a2730e4c22464a015a Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期五, 28 八月 2020 15:56:01 +0800
Subject: [PATCH] #v2.1.1

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

diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 9ffa669..d344066 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -101,7 +101,7 @@
         if (Cools.isEmpty(rowLastno)) {
             throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�");
         }
-        if (rowLastno.getWhsType() == 1){
+        if (whsType == 1 || whsType == 2){
             int curRow = rowLastno.getCurrentRow();
             int sRow = rowLastno.getsRow();
             int eRow = rowLastno.geteRow();
@@ -143,18 +143,24 @@
 
             // 濡傛灉娌℃湁鐩歌繎鐗╂枡锛屽垯鎸夎鍒欒疆璇㈣揣鏋�
             if (null == locMast) {
-                // 鑾峰彇鐩爣绔欐墍鍦ㄨ揣鏋舵帓鍙�
-                Shelves shelves = new Shelves(rowCount, crn_qty);
-                curRow = shelves.start(curRow);
-                if (curRow < 0) {
-                    throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳");
+                // 鑾峰彇鐩爣绔欐墍鍦ㄨ揣鏋舵帓鍙� todo:luxiaotao
+                if (curRow == sRow) {
+                    curRow = eRow;
+                } else {
+                    curRow = sRow;
                 }
-                for (List<Integer> node : shelves.nodes){
-                    if (node.contains(curRow)) {
-                        crnNo = shelves.nodes.indexOf(node) + 1;
-                        break;
-                    }
-                }
+                crnNo = whsType;
+//                Shelves shelves = new Shelves(rowCount, crn_qty);
+//                curRow = shelves.start(curRow);
+//                if (curRow < 0) {
+//                    throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳");
+//                }
+//                for (List<Integer> node : shelves.nodes){
+//                    if (node.contains(curRow)) {
+//                        crnNo = shelves.nodes.indexOf(node) + 1;
+//                        break;
+//                    }
+//                }
             }
 
             basCrnpService.checkSiteStatus(crnNo);

--
Gitblit v1.9.1