From 1ff4b70e59b8c9ceb80d0a695d26b4419ed349f1 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 08 一月 2025 09:48:53 +0800
Subject: [PATCH] #

---
 src/main/resources/map_4.json                               |    1 
 src/main/java/com/zy/asrs/mapper/DeviceDataLogMapper.java   |    2 
 src/main/java/com/zy/asrs/controller/LocMastController.java |   72 ++++++++++++
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   68 +++++-----
 src/main/webapp/views/console.html                          |   19 +++
 src/main/java/com/zy/core/MainProcess.java                  |    4 
 src/main/java/com/zy/common/utils/NavigateMapData.java      |  146 ++++++++++++-----------
 7 files changed, 206 insertions(+), 106 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/LocMastController.java b/src/main/java/com/zy/asrs/controller/LocMastController.java
new file mode 100644
index 0000000..787d39d
--- /dev/null
+++ b/src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -0,0 +1,72 @@
+package com.zy.asrs.controller;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.core.annotations.ManagerAuth;
+import com.core.common.R;
+import com.zy.asrs.entity.LocMast;
+import com.zy.asrs.service.LocMastService;
+import com.zy.asrs.utils.Utils;
+import com.zy.common.model.MapNode;
+import com.zy.common.utils.NavigateMapData;
+import com.zy.core.enums.LocStsType;
+import com.zy.core.enums.MapNodeType;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/locMast")
+public class LocMastController {
+
+    @Autowired
+    private NavigateMapData navigateMapData;
+    @Autowired
+    private LocMastService locMastService;
+
+    @PostMapping("/init")
+    @ManagerAuth(memo = "鍒濆鍖栧簱浣�")
+    @Transactional
+    public R shuttleStateTable(){
+        locMastService.delete(new EntityWrapper<>(new LocMast()));
+
+        for (int i = 1; i <= 4; i++) {//鎬诲叡鍥涘眰妤�
+            List<List<MapNode>> lists = navigateMapData.getJsonData(i, -1, null, null);//鑾峰彇瀹屾暣鍦板浘(鍖呮嫭鍏ュ簱鍑哄簱)
+
+            for (int row = 0; row < lists.size(); row++) {
+                List<MapNode> nodeList = lists.get(row);
+                for (int bay = 0; bay < nodeList.size(); bay++) {
+                    MapNode mapNode = nodeList.get(bay);
+
+                    if (mapNode.getValue() == MapNodeType.DISABLE.id) {
+                        continue;
+                    }
+
+                    String locNo = Utils.getLocNo(row, bay, i);
+                    LocMast locMast = new LocMast();
+                    locMast.setLocNo(locNo);
+                    locMast.setRow1(row);
+                    locMast.setBay1(bay);
+                    locMast.setLev1(i);
+
+                    if (mapNode.getValue() == MapNodeType.NORMAL_PATH.id) {
+                        locMast.setLocSts(LocStsType.O.toString());
+                    }else if (mapNode.getValue() == MapNodeType.MAIN_PATH.id){
+                        locMast.setLocSts(LocStsType.W.toString());
+                    }
+
+                    locMastService.insert(locMast);
+                }
+            }
+        }
+
+        return R.ok();
+    }
+
+}
diff --git a/src/main/java/com/zy/asrs/mapper/DeviceDataLogMapper.java b/src/main/java/com/zy/asrs/mapper/DeviceDataLogMapper.java
index d4ce894..4b6000a 100644
--- a/src/main/java/com/zy/asrs/mapper/DeviceDataLogMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/DeviceDataLogMapper.java
@@ -10,7 +10,7 @@
 @Repository
 public interface DeviceDataLogMapper extends BaseMapper<DeviceDataLog> {
 
-    @Delete("delete from wcs_device_data_log where create_time < DATEADD(HOUR, -24, GETDATE())")
+    @Delete("delete from wcs_device_data_log where create_time < FROM_UNIXTIME(UNIX_TIMESTAMP() - (24 * 60 * 60))")
     int clearLog();
 
 }
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 8cf45a5..360ff12 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -521,7 +521,7 @@
      */
     public synchronized void initRealtimeBasMap() {
         try {
-            for (int i = 1; i <= 10; i++) {//鎬诲叡鍥涘眰妤�
+            for (int i = 1; i <= 4; i++) {//鎬诲叡鍥涘眰妤�
                 Object data = redisUtil.get(RedisKeyType.MAP.key + i);
                 if (data == null) {//redis鍦板浘鏁版嵁涓虹┖锛屼粠鏁版嵁搴撲腑鑾峰彇
                     BasMap basMap = basMapService.selectLatestMap(i);
@@ -1810,31 +1810,31 @@
 //        }
     }
 
-//    /**
-//     * 鍥涘悜绌挎杞︾數閲忔娴� ===>> 鍙戣捣鍏呯數
-//     */
-//    public synchronized void loopShuttleCharge() {
-//        try {
-//            for (ShuttleSlave shuttle : slaveProperties.getShuttle()) {
-//                //鑾峰彇鍥涘悜绌挎杞︾嚎绋�
-//                NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttle.getId());
-//                NyShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol();
-//                if (shuttleProtocol == null) {
-//                    continue;
-//                }
-//
-//                //鍒ゆ柇褰撳墠灏忚溅鏄惁婊¤冻闇�瑕佸厖鐢佃姹�
-//                if (!shuttleProtocol.isRequireCharge()) {
-//                    continue;
-//                }
-//
-//                WrkCharge wrkCharge = wrkChargeService.selectWorking(shuttleProtocol.getShuttleNo().intValue());
-//                if (wrkCharge != null) {//宸叉湁鍏呯數浠诲姟
-//                    continue;
-//                }
-//
-//                //灏忚溅鎵�鍦ㄦゼ灞�
-//                int lev = Utils.getLev(shuttleProtocol.getCurrentLocNo());
+    /**
+     * 鍥涘悜绌挎杞︾數閲忔娴� ===>> 鍙戣捣鍏呯數
+     */
+    public synchronized void loopShuttleCharge() {
+        try {
+            for (ShuttleSlave shuttle : slaveProperties.getShuttle()) {
+                //鑾峰彇鍥涘悜绌挎杞︾嚎绋�
+                ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttle.getId());
+                ShuttleProtocol shuttleProtocol = shuttleThread.getStatus();
+                if (shuttleProtocol == null) {
+                    continue;
+                }
+
+                //鍒ゆ柇褰撳墠灏忚溅鏄惁婊¤冻闇�瑕佸厖鐢佃姹�
+                if (!shuttleThread.isRequireCharge()) {
+                    continue;
+                }
+
+                WrkMast wrkMast = wrkMastService.selectChargeWorking(shuttleProtocol.getShuttleNo());
+                if (wrkMast != null) {//宸叉湁鍏呯數浠诲姟
+                    continue;
+                }
+
+                //灏忚溅鎵�鍦ㄦゼ灞�
+                int lev = Utils.getLev(shuttleProtocol.getCurrentLocNo());
 //                ShuttleChargeType shuttleCharge = null;
 //
 //                //鎼滅储灏忚溅鎵�鍦ㄦゼ灞傛湁娌℃湁鍏呯數妗�
@@ -1887,14 +1887,14 @@
 //                    News.error("淇濆瓨{}鍙峰洓鍚戠┛姊溅鍏呯數浠诲姟澶辫触!!!", shuttle.getId());
 //                    continue;
 //                }
-//
-//                News.info("淇濆瓨{}鍙峰洓鍚戠┛姊溅鍏呯數浠诲姟鎴愬姛!!!", shuttle.getId());
-//            }
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//        }
-//    }
-//
+
+                News.info("淇濆瓨{}鍙峰洓鍚戠┛姊溅鍏呯數浠诲姟鎴愬姛!!!", shuttle.getId());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
 //    /**
 //     * 鎵ц鍥涘悜绌挎杞﹀厖鐢典换鍔�
 //     */
diff --git a/src/main/java/com/zy/common/utils/NavigateMapData.java b/src/main/java/com/zy/common/utils/NavigateMapData.java
index 6e9a3a8..84d4373 100644
--- a/src/main/java/com/zy/common/utils/NavigateMapData.java
+++ b/src/main/java/com/zy/common/utils/NavigateMapData.java
@@ -272,53 +272,57 @@
 
         //杩囨护鏁版嵁
         LocMastService locMastService = SpringUtils.getBean(LocMastService.class);
-        //鑾峰彇褰撳墠妤煎眰搴撲綅鏁版嵁
-        List<LocMast> locMasts = locMastService.selectLocByLev(lev);
-        for (LocMast locMast : locMasts) {
-            Integer row = locMast.getRow1();
-            Integer bay = locMast.getBay1();
+        try {
+            //鑾峰彇褰撳墠妤煎眰搴撲綅鏁版嵁
+            List<LocMast> locMasts = locMastService.selectLocByLev(lev);
+            for (LocMast locMast : locMasts) {
+                Integer row = locMast.getRow1();
+                Integer bay = locMast.getBay1();
 
-            boolean whiteFlag = false;//榛樿涓嶅瓨鍦ㄧ櫧鍚嶅崟
-            if (whitePoints != null) {
-                for (int[] whitePoint : whitePoints) {
-                    if (whitePoint[0] == row && whitePoint[1] == bay) {
-                        //瀛樺湪鐧藉悕鍗�
-                        whiteFlag = true;
-                        break;
+                boolean whiteFlag = false;//榛樿涓嶅瓨鍦ㄧ櫧鍚嶅崟
+                if (whitePoints != null) {
+                    for (int[] whitePoint : whitePoints) {
+                        if (whitePoint[0] == row && whitePoint[1] == bay) {
+                            //瀛樺湪鐧藉悕鍗�
+                            whiteFlag = true;
+                            break;
+                        }
                     }
                 }
-            }
-            if (whiteFlag) {
-                continue;//瀛樺湪鐧藉悕鍗曪紝涓嶆墽琛屼笅鍒楄繃婊ゆ柟妗�
-            }
-
-
-            List<MapNode> list = lists.get(row);
-            MapNode mapNode = list.get(bay);
-
-            if (mapType == NavigationMapType.NONE.id) {
-                //涓嶈繃婊や换浣曟暟鎹�
-            } else if (mapType == NavigationMapType.DFX.id) {
-                //杞﹁締鏈夎揣
-                //璇诲彇瀵瑰簲搴撲綅鏁版嵁锛屽皢DFX搴撲綅鐘舵�佺殑鑺傜偣缃负-1(闅滅鐗�)
-                if (locMast.getLocSts().equals("F")
-                        || locMast.getLocSts().equals("D")
-                        || locMast.getLocSts().equals("X")
-                        || locMast.getLocSts().equals("R")
-                        || locMast.getLocSts().equals("P")
-                ) {
-                    mapNode.setValue(MapNodeType.DISABLE.id);//绂佺敤鑺傜偣
+                if (whiteFlag) {
+                    continue;//瀛樺湪鐧藉悕鍗曪紝涓嶆墽琛屼笅鍒楄繃婊ゆ柟妗�
                 }
-            } else if (mapType == NavigationMapType.NORMAL.id) {
-                //杩囨护搴撲綅鐘舵�乆
-                if (locMast.getLocSts().equals("X")) {
-                    mapNode.setValue(MapNodeType.DISABLE.id);//绂佺敤鑺傜偣
-                }
-            }
 
-            //鏇存柊list
-            list.set(bay, mapNode);
-            lists.set(row, list);
+
+                List<MapNode> list = lists.get(row);
+                MapNode mapNode = list.get(bay);
+
+                if (mapType == NavigationMapType.NONE.id) {
+                    //涓嶈繃婊や换浣曟暟鎹�
+                } else if (mapType == NavigationMapType.DFX.id) {
+                    //杞﹁締鏈夎揣
+                    //璇诲彇瀵瑰簲搴撲綅鏁版嵁锛屽皢DFX搴撲綅鐘舵�佺殑鑺傜偣缃负-1(闅滅鐗�)
+                    if (locMast.getLocSts().equals("F")
+                            || locMast.getLocSts().equals("D")
+                            || locMast.getLocSts().equals("X")
+                            || locMast.getLocSts().equals("R")
+                            || locMast.getLocSts().equals("P")
+                    ) {
+                        mapNode.setValue(MapNodeType.DISABLE.id);//绂佺敤鑺傜偣
+                    }
+                } else if (mapType == NavigationMapType.NORMAL.id) {
+                    //杩囨护搴撲綅鐘舵�乆
+                    if (locMast.getLocSts().equals("X")) {
+                        mapNode.setValue(MapNodeType.DISABLE.id);//绂佺敤鑺傜偣
+                    }
+                }
+
+                //鏇存柊list
+                list.set(bay, mapNode);
+                lists.set(row, list);
+            }
+        }catch (Exception e) {
+            e.printStackTrace();
         }
 
         //鍔犺浇杞﹁締鍧愭爣鍒板湴鍥句腑
@@ -355,36 +359,40 @@
             }
         }
 
-        //鍔犺浇璐у弶鎻愬崌鏈烘斁璐х偣浣嶆暟鎹�
-        for (ForkLiftSlave forkLiftSlave : slaveProperties.getForkLift()) {
-            ForkLiftThread forkLiftThread = (ForkLiftThread) SlaveConnection.get(SlaveType.ForkLift, forkLiftSlave.getId());
-            if (forkLiftThread == null) {
-                continue;
-            }
-
-            for (ForkLiftStaProtocol staProtocol : forkLiftThread.getForkLiftStaProtocols()) {
-                int row = Utils.getRow(staProtocol.getLocNo());
-                int bay = Utils.getBay(staProtocol.getLocNo());
-
-                List<MapNode> list = lists.get(row);
-                MapNode mapNode = list.get(bay);
-
-                if (mapType == NavigationMapType.DFX.id) {
-                    //杞﹁締鏈夎揣
-                    if (staProtocol.getHasTray() != null && staProtocol.getHasTray()) {
-                        mapNode.setValue(MapNodeType.DISABLE.id);
-                    }
-                }else {
-                    if (staProtocol.getHasCar() != null && staProtocol.getHasCar()) {
-                        mapNode.setValue(MapNodeType.CAR.id);
-                    }
+        try {
+            //鍔犺浇璐у弶鎻愬崌鏈烘斁璐х偣浣嶆暟鎹�
+            for (ForkLiftSlave forkLiftSlave : slaveProperties.getForkLift()) {
+                ForkLiftThread forkLiftThread = (ForkLiftThread) SlaveConnection.get(SlaveType.ForkLift, forkLiftSlave.getId());
+                if (forkLiftThread == null) {
+                    continue;
                 }
 
-                //鏇存柊list
-                list.set(bay, mapNode);
-                lists.set(row, list);
-            }
+                for (ForkLiftStaProtocol staProtocol : forkLiftThread.getForkLiftStaProtocols()) {
+                    int row = Utils.getRow(staProtocol.getLocNo());
+                    int bay = Utils.getBay(staProtocol.getLocNo());
 
+                    List<MapNode> list = lists.get(row);
+                    MapNode mapNode = list.get(bay);
+
+                    if (mapType == NavigationMapType.DFX.id) {
+                        //杞﹁締鏈夎揣
+                        if (staProtocol.getHasTray() != null && staProtocol.getHasTray()) {
+                            mapNode.setValue(MapNodeType.DISABLE.id);
+                        }
+                    }else {
+                        if (staProtocol.getHasCar() != null && staProtocol.getHasCar()) {
+                            mapNode.setValue(MapNodeType.CAR.id);
+                        }
+                    }
+
+                    //鏇存柊list
+                    list.set(bay, mapNode);
+                    lists.set(row, list);
+                }
+
+            }
+        }catch (Exception e) {
+            e.printStackTrace();
         }
 
         return lists;
diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index f764f85..8cc9755 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -70,8 +70,8 @@
 //                    mainService.ledExecute();
 //                    // 鍏朵粬  ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅
 //                    mainService.ledReset();
-//                    // 绌挎杞� ===>> 灏忚溅鐢甸噺妫�娴嬪厖鐢�
-//                    mainService.loopShuttleCharge();
+                    // 绌挎杞� ===>> 灏忚溅鐢甸噺妫�娴嬪厖鐢�
+                    mainService.loopShuttleCharge();
 //                    mainService.executeShuttleCharge();
 
 //                    //鎵弿璁惧PakMk鏍囪鏄惁瓒呮椂
diff --git a/src/main/resources/map_4.json b/src/main/resources/map_4.json
new file mode 100644
index 0000000..c5fae77
--- /dev/null
+++ b/src/main/resources/map_4.json
@@ -0,0 +1 @@
+[ [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 3, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": 0, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ], [ { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 }, { "value": -1, "data": "", "top": 1000, "bottom": 1000, "left": 1000, "right": 1000 } ] ]
\ No newline at end of file
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index f925e16..2bd4961 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -78,6 +78,7 @@
 					<div>
 <!--						<el-button @click="testMove()">娴嬭瘯绉诲姩杞�</el-button>-->
 						<el-button @click="resetMap()">閲嶇疆鍦板浘</el-button>
+						<el-button @click="initLoc()">鍒濆鍖栧簱浣�</el-button>
 					</div>
 				</div>
 			</div>
@@ -662,6 +663,24 @@
 							}
 						})
 					},
+					initLoc() {
+						//鍒濆鍖栧簱浣�
+						let that = this
+						$.ajax({
+							url:baseUrl+"/locMast/init",
+							headers:{
+								'token': localStorage.getItem('token')
+							},
+							data:{},
+							method:'post',
+							success:function (res) {
+								that.$message({
+									message: '鍒濆鍖栧畬鎴�',
+									type: 'success'
+								});
+							}
+						})
+					},
 					getCodeData(){
 						this.sendWs(JSON.stringify({
 							"url": "/console/barcode/output/site",

--
Gitblit v1.9.1