From 584ce9e811602b984a91c6f895347cf9a0ca5974 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期六, 03 六月 2023 15:46:12 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/utils/Utils.java |   40 +++----------------
 src/main/webapp/static/js/console.map.js   |   72 ++++++++++++++++++++++++++++++------
 2 files changed, 67 insertions(+), 45 deletions(-)

diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index fa440ef..36a0324 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -89,13 +89,6 @@
         int row = getRow(deepLoc);
         int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
         int shallowRow = remainder == 1 ? (row + 1) : (row - 1);
-        if(row==9 ||  row==15 ){
-            shallowRow = row + 1;
-        }else if(row==12 ||  row==18 ){
-            shallowRow = row - 1;
-        }else {
-            return null;
-        }
         return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2);
     }
 
@@ -112,31 +105,15 @@
      */
     public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) {
         int row = getRow(shallowLoc);
-//        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
+        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
         int targetRow;
-        switch (row){
-            case 10:
-                targetRow = 9;
-                break;
-            case 11:
-                targetRow = 12;
-                break;
-            case 16:
-                targetRow = 15;
-                break;
-            case 17:
-                targetRow = 18;
-                break;
-            default:
-                throw new RuntimeException(shallowLoc + "涓嶆槸娴呭簱浣嶏紝绯荤粺绻佸繖");
+        if (remainder == 2) {
+            targetRow = row - 1;
+        } else if (remainder == 3) {
+            targetRow = row + 1;
+        } else {
+            throw new RuntimeException(shallowLoc + "涓嶆槸娴呭簱浣嶏紝绯荤粺绻佸繖");
         }
-//        if (remainder == 2) {
-//            targetRow = row - 1;
-//        } else if (remainder == 3) {
-//            targetRow = row + 1;
-//        } else {
-//            throw new RuntimeException(shallowLoc + "涓嶆槸娴呭簱浣嶏紝绯荤粺绻佸繖");
-//        }
         return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2);
     }
 
@@ -187,9 +164,6 @@
     public static void main(String[] args) {
         SlaveProperties slaveProperties = new SlaveProperties();
         slaveProperties.setDoubleDeep(true);
-
-        String aa = getDeepLoc(slaveProperties,"1604402");
-
         List<Integer> list = new ArrayList<>();
         list.add(1);list.add(4);list.add(5);list.add(8);list.add(9);list.add(12);
         slaveProperties.setDoubleLocs(list);
diff --git a/src/main/webapp/static/js/console.map.js b/src/main/webapp/static/js/console.map.js
index a9577c9..2dd85a0 100644
--- a/src/main/webapp/static/js/console.map.js
+++ b/src/main/webapp/static/js/console.map.js
@@ -117,6 +117,30 @@
     }],
     "rackDescs": [{
         "type": "rackDescs",
+        "id": "lb_desc1",
+        "text": "#1",
+        "top": 125,
+        "left": 348,
+        "width": 30,
+        "height": 23
+    }, {
+        "type": "rackDescs",
+        "id": "lb_desc2",
+        "text": "#2",
+        "top": 146,
+        "left": 348,
+        "width": 30,
+        "height": 23
+    }, {
+        "type": "rackDescs",
+        "id": "lb_desc3",
+        "text": "#3",
+        "top": 194,
+        "left": 348,
+        "width": 30,
+        "height": 23
+    }, {
+        "type": "rackDescs",
         "id": "lb_desc4",
         "text": "#4",
         "top": 215,
@@ -124,14 +148,6 @@
         "width": 33,
         "height": 23
     }, {
-        "type": "rackDescs",
-        "id": "lb_desc1",
-        "text": "#1",
-        "top": 125,
-        "left": 348,
-        "width": 30,
-        "height": 23
-    },{
         "type": "rackDescs",
         "id": "lb_desc14",
         "text": "#14",
@@ -141,19 +157,51 @@
         "height": 23
     }, {
         "type": "rackDescs",
+        "id": "lb_desc12",
+        "text": "#12",
+        "top": 296,
+        "left": 348,
+        "width": 30,
+        "height": 23
+    }, {
+        "type": "rackDescs",
+        "id": "lb_desc13",
+        "text": "#13",
+        "top": 344,
+        "left": 348,
+        "width": 30,
+        "height": 23
+    }, {
+        "type": "rackDescs",
         "id": "lb_desc11",
         "text": "#11",
         "top": 275,
         "left": 348,
         "width": 30,
         "height": 23
-    },{
+    }, {
         "type": "rackDescs",
         "id": "lb_desc24",
         "text": "#24",
         "top": 515,
         "left": 348,
         "width": 33,
+        "height": 23
+    },  {
+        "type": "rackDescs",
+        "id": "lb_desc22",
+        "text": "#22",
+        "top": 446,
+        "left": 348,
+        "width": 30,
+        "height": 23
+    }, {
+        "type": "rackDescs",
+        "id": "lb_desc23",
+        "text": "#23",
+        "top": 494,
+        "left": 348,
+        "width": 30,
         "height": 23
     }, {
         "type": "rackDescs",
@@ -170,7 +218,7 @@
         "text": "",
         "top": 184,
         "left": 340,
-        "width": 1200,
+        "width": 1300,
         "height": 2
     }, {
         "type": "crane",
@@ -186,7 +234,7 @@
         "text": "",
         "top": 334,
         "left": 340,
-        "width": 1200,
+        "width": 1300,
         "height": 2
     }, {
         "type": "crane",
@@ -202,7 +250,7 @@
         "text": "",
         "top": 484,
         "left": 340,
-        "width": 1200,
+        "width": 1300,
         "height": 2
     }, {
         "type": "crane",

--
Gitblit v1.9.1