自动化立体仓库 - WCS系统
#
Junjie
2025-01-08 1ff4b70e59b8c9ceb80d0a695d26b4419ed349f1
#
2个文件已添加
5个文件已修改
312 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocMastController.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/DeviceDataLogMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/utils/NavigateMapData.java 146 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/MainProcess.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/map_4.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/console.html 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocMastController.java
New file
@@ -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();
    }
}
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();
}
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();
        }
    }
//    /**
//     * 执行四向穿梭车充电任务
//     */
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) {
                //过滤库位状态X
                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) {
                    //过滤库位状态X
                    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;
src/main/java/com/zy/core/MainProcess.java
@@ -70,8 +70,8 @@
//                    mainService.ledExecute();
//                    // 其他  ===>> LED显示器复位,显示默认信息
//                    mainService.ledReset();
//                    // 穿梭车 ===>> 小车电量检测充电
//                    mainService.loopShuttleCharge();
                    // 穿梭车 ===>> 小车电量检测充电
                    mainService.loopShuttleCharge();
//                    mainService.executeShuttleCharge();
//                    //扫描设备PakMk标记是否超时
src/main/resources/map_4.json
New file
@@ -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 } ] ]
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",