From 3f9bda7361b9a9a9c908c54afaeb4a41d3727a25 Mon Sep 17 00:00:00 2001
From: lsh <1>
Date: 星期四, 03 八月 2023 00:43:56 +0800
Subject: [PATCH] #平库库位转移BUG修复

---
 src/main/java/com/zy/asrs/controller/MapController.java |  149 +++++++++++++++++++++++++++++++------------------
 1 files changed, 94 insertions(+), 55 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/MapController.java b/src/main/java/com/zy/asrs/controller/MapController.java
index 33b65bc..95a542e 100644
--- a/src/main/java/com/zy/asrs/controller/MapController.java
+++ b/src/main/java/com/zy/asrs/controller/MapController.java
@@ -112,53 +112,80 @@
                             break;
                         case 2:
                         case 3:
-                            if (row<=3 || row>=5){
-                                if (row%1==0){
-                                    row=row+(row/1)-1;
-                                }else {
-                                    row=row+((row+1)/1)-1;
-                                }
-                            }else {
-                                if (row%2==0){
-                                    row=row+(row/2);
-                                }else {
-                                    row=row+((row-1)/2);
-                                }
-                            }
+//                            if (row<=3 || row>=5){
+//                                if (row%1==0){
+//                                    row=row+(row/1)-1;
+//                                }else {
+//                                    row=row+((row+1)/1)-1;
+//                                }
+//                            }else {
+//                                if (row%2==0){
+//                                    row=row+(row/2);
+//                                }else {
+//                                    row=row+((row-1)/2);
+//                                }
+//                            }
+//                            if (row == 9){
+//                                row= row -1;
+//                            }
 
-                            if (bay % 6 == 0) {
-                                bay=bay+1;
+                            if (row ==7) {
+                                row=row+2;
                             }else{
-                                if (bay>6){
-                                    bay=bay+locMast.getCrnNo();
+                                if (row>7){
+                                    row=row+locMast.getCrnNo()+1;
                                 }else {
-                                    bay=bay+locMast.getCrnNo()-1;
+                                    row=row+locMast.getCrnNo()-1;
                                 }
                             }
                             break;
                         case 4:
-                        case 5:
-                            if (row<=11){
-                                if (row%2==0){
-                                    row=row+(row/2)-1;
+//                            if (row<=11){
+////                                if (row%2==0){
+////                                    row=row+(row/2)-1;
+////                                }else {
+////                                    row=row+((row+1)/2)-1;
+////                                }
+////                            }else {
+////                                if (row%2==0){
+////                                    row=row+(row/2);
+////                                }else {
+////                                    row=row+((row-1)/2);
+////                                }
+////                            }
+
+                            if (row % 10 == 0) {
+                                row=row+2;
+                            }else{
+                                if (row>10){
+                                    row=row+locMast.getCrnNo()+1;
                                 }else {
-                                    row=row+((row+1)/2)-1;
-                                }
-                            }else {
-                                if (row%2==0){
-                                    row=row+(row/2);
-                                }else {
-                                    row=row+((row-1)/2);
+                                    row=row+locMast.getCrnNo()-1;
                                 }
                             }
+                            break;
+                        case 5:
+//                            if (row<=11){
+//                                if (row%2==0){
+//                                    row=row+(row/2)-1;
+//                                }else {
+//                                    row=row+((row+1)/2)-1;
+//                                }
+//                            }else {
+//                                if (row%2==0){
+//                                    row=row+(row/2);
+//                                }else {
+//                                    row=row+((row-1)/2);
+//                                }
+//                            }
 
-                            if (bay % 7 == 0) {
-                                bay=bay+1;
+                            if (row % 7 == 0) {
+                                row=row+2;
                             }else{
-                                if (bay>7){
-                                    bay=bay+locMast.getCrnNo();
+                                if (row>7){
+                                    row=row+locMast.getCrnNo()+1;
                                 }else {
-                                    bay=bay+locMast.getCrnNo()-1;
+                                    row=row+locMast.getCrnNo()-1;
                                 }
                             }
                             break;
@@ -167,27 +194,39 @@
 
                     }
 
-                    if (area == 1 || area == 6){
-                        ArrayList rowData = arrayLists.get(row);
-                        Object o = rowData.get(bay);
-                        JSONObject jsonObject = JSON.parseObject(o.toString());
-                        jsonObject.put("locNo", locMast.getLocNo());//璁剧疆搴撲綅鍙�
-                        jsonObject.put("locSts", locMast.getLocSts());//搴撲綅鐘舵��
-                        //jsonObject.put("locSts$", locMast.getLocSts$());//搴撲綅鐘舵��
-                        //鏇存柊list
-                        rowData.set(bay, jsonObject);
-                        arrayLists.set(row, rowData);
-                    }else {
-                        ArrayList rowData = arrayLists.get(bay);
-                        Object o = rowData.get(row);
-                        JSONObject jsonObject = JSON.parseObject(o.toString());
-                        jsonObject.put("locNo", locMast.getLocNo());//璁剧疆搴撲綅鍙�
-                        jsonObject.put("locSts", locMast.getLocSts());//搴撲綅鐘舵��
-                        //jsonObject.put("locSts$", locMast.getLocSts$());//搴撲綅鐘舵��
-                        //鏇存柊list
-                        rowData.set(row, jsonObject);
-                        arrayLists.set(bay, rowData);
-                    }
+                    ArrayList rowData = arrayLists.get(row);
+                    Object o = rowData.get(bay);
+                    JSONObject jsonObject = JSON.parseObject(o.toString());
+                    jsonObject.put("locNo", locMast.getLocNo());//璁剧疆搴撲綅鍙�
+                    jsonObject.put("locSts", locMast.getLocSts());//搴撲綅鐘舵��
+                    //jsonObject.put("locSts$", locMast.getLocSts$());//搴撲綅鐘舵��
+                    //鏇存柊list
+                    rowData.set(bay, jsonObject);
+                    arrayLists.set(row, rowData);
+
+
+
+//                    if (area == 1 || area == 6){
+//                        ArrayList rowData = arrayLists.get(row);
+//                        Object o = rowData.get(bay);
+//                        JSONObject jsonObject = JSON.parseObject(o.toString());
+//                        jsonObject.put("locNo", locMast.getLocNo());//璁剧疆搴撲綅鍙�
+//                        jsonObject.put("locSts", locMast.getLocSts());//搴撲綅鐘舵��
+//                        //jsonObject.put("locSts$", locMast.getLocSts$());//搴撲綅鐘舵��
+//                        //鏇存柊list
+//                        rowData.set(bay, jsonObject);
+//                        arrayLists.set(row, rowData);
+//                    }else {
+//                        ArrayList rowData = arrayLists.get(bay);
+//                        Object o = rowData.get(row);
+//                        JSONObject jsonObject = JSON.parseObject(o.toString());
+//                        jsonObject.put("locNo", locMast.getLocNo());//璁剧疆搴撲綅鍙�
+//                        jsonObject.put("locSts", locMast.getLocSts());//搴撲綅鐘舵��
+//                        //jsonObject.put("locSts$", locMast.getLocSts$());//搴撲綅鐘舵��
+//                        //鏇存柊list
+//                        rowData.set(row, jsonObject);
+//                        arrayLists.set(bay, rowData);
+//                    }
 
 
 

--
Gitblit v1.9.1