自动化立体仓库 - WCS系统
#
Junjie
2023-08-30 cdca466c533197157f3255b77fbdb4aac89be064
#
6个文件已修改
293 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/utils/NyHttpUtils.java 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/command/NyShuttleHttpCommand.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/NyShuttleThread.java 131 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/shuttle.html 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1484,7 +1484,7 @@
                        if (wrkMast == null) {
                            continue;
                        }
                        BasShuttleErr basShuttleErr = basShuttleErrService.queryByCode(shuttleProtocol.getErrCode().get(0));
                        BasShuttleErr basShuttleErr = basShuttleErrService.queryByCode(shuttleProtocol.getErrCode());
                        String errName = basShuttleErr==null? "未知异常":basShuttleErr.getErrName();
                        BasShuttleErrLog basShuttleErrLog = new BasShuttleErrLog(
                                null,    // 编号
@@ -1500,7 +1500,7 @@
                                wrkMast.getSourceStaNo(),    // 源站
                                wrkMast.getSourceLocNo(),    // 源库位
                                wrkMast.getBarcode(),    // 条码
                                shuttleProtocol.getErrCode().get(0),    // 异常码
                                shuttleProtocol.getErrCode(),    // 异常码
                                errName,    // 异常
                                1,    // 异常情况
                                now,    // 添加时间
src/main/java/com/zy/common/utils/NyHttpUtils.java
@@ -6,6 +6,8 @@
import com.zy.core.model.command.NyShuttleHttpCommand;
import com.zy.core.model.protocol.NyShuttleProtocol;
import java.io.*;
import java.net.Socket;
import java.util.*;
/**
@@ -13,13 +15,12 @@
 */
public class NyHttpUtils {
    private static final String requestUrl = "localhost:9090/tzskwcs";
    //获取HTTP请求标准结构体
    public static NyShuttleHttpCommand getHttpStandard(Integer shuttleNo) {
    public static NyShuttleHttpCommand getHttpStandard(Integer shuttleNo, Integer wrkNo) {
        NyShuttleHttpCommand httpStandard = new NyShuttleHttpCommand();
        httpStandard.setMsgType("requestMsg");//请求消息
        httpStandard.setRobotId(shuttleNo);//车辆编号
        httpStandard.setWrkNo(wrkNo);//工作号
        //设置请求消息
        NyShuttleHttpCommand.NyRequest request = new NyShuttleHttpCommand.NyRequest();
@@ -35,7 +36,7 @@
    //获取FAS 手动/自动切换
    public static NyShuttleHttpCommand getFASSwitchCommand(Integer shuttleNo, boolean auto) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -48,12 +49,12 @@
    //获取移动请求
    public static NyShuttleHttpCommand getMoveCommand(Integer shuttleNo, Integer wrkNo, NavigateNode start, NavigateNode target) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, wrkNo);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
        body.put("requestType", "move");//移动命令
        body.put("taskId", wrkNo);//任务号
        body.put("taskId", getTaskId());//TaskID需要随机
        body.put("start", navigateNodeToNyPointNode(start));//起点
        body.put("target", navigateNodeToNyPointNode(target));//终点
        request.setBody(body);
@@ -64,12 +65,12 @@
    //获取进出提升机请求
    public static NyShuttleHttpCommand getInOutLiftCommand(Integer shuttleNo, Integer wrkNo, NavigateNode start, NavigateNode target, boolean in) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, wrkNo);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
        body.put("requestType", in ? "intoLift" : "outLift");//进出提升机
        body.put("taskId", wrkNo);//任务号
        body.put("taskId", getTaskId());//TaskID需要随机
        body.put("start", navigateNodeToNyPointNode(start));//起点
        body.put("target", navigateNodeToNyPointNode(target));//终点
        request.setBody(body);
@@ -80,12 +81,12 @@
    //获取顶升命令
    public static NyShuttleHttpCommand getPalletLiftCommand(Integer shuttleNo, Integer wrkNo, boolean lift) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, wrkNo);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
        body.put("requestType", lift ? "liftUp" : "liftDown");//顶升或下降命令
        body.put("taskId", wrkNo);//任务号
        body.put("taskId", getTaskId());//TaskID需要随机
        request.setBody(body);
        httpStandard.setRequest(request);
@@ -94,12 +95,12 @@
    //获取充电命令
    public static NyShuttleHttpCommand getChargeCommand(Integer shuttleNo, Integer wrkNo, boolean charge) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, wrkNo);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
        body.put("requestType", charge ? "charge" : "stopCharge");//充电或停止充电
        body.put("taskId", wrkNo);//任务号
        body.put("taskId", getTaskId());//TaskID需要随机
        request.setBody(body);
        httpStandard.setRequest(request);
@@ -108,12 +109,12 @@
    //获取管制命令
    public static NyShuttleHttpCommand getSuspendCommand(Integer shuttleNo, Integer wrkNo, boolean suspend) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, wrkNo);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
        body.put("requestType", suspend ? "stop" : "resume");//管制或取消管制
        body.put("taskId", wrkNo);//任务号
        body.put("taskId", getTaskId());//TaskID需要随机
        request.setBody(body);
        httpStandard.setRequest(request);
@@ -122,7 +123,7 @@
    //获取更新层坐标Z(楼层)命令
    public static NyShuttleHttpCommand getUpdateZCommand(Integer shuttleNo, Integer z) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -136,7 +137,7 @@
    //获取读FAS状态信息命令
    public static NyShuttleHttpCommand getReadStatusCommand(Integer shuttleNo) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -149,7 +150,7 @@
    //获取更新FAS基准地图命令
    public static NyShuttleHttpCommand getUpdateFASBaseMapCommand(Integer shuttleNo, Integer xBase, Integer yBase, Integer zBase, Integer xEnd, Integer yEnd, Integer zEnd, Integer xBaseCoord, Integer yBaseCoord, Integer xDefaultSpace, Integer yDefaultSpace) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -175,7 +176,7 @@
    //获取更新FAS特殊X轴地图命令
    public static NyShuttleHttpCommand getUpdateMapSpecialXAxisCommand(Integer shuttleNo, List<Map<String, Object>> list) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -189,7 +190,7 @@
    //获取更新FAS特殊Y轴地图命令
    public static NyShuttleHttpCommand getUpdateMapSpecialYAxisCommand(Integer shuttleNo, List<Map<String, Object>> list) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -203,7 +204,7 @@
    //获取更新FAS特殊库位点地图命令
    public static NyShuttleHttpCommand getUpdateMapSpecialPointCommand(Integer shuttleNo, List<Map<String, Object>> list) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -217,7 +218,7 @@
    //获取更新FAS提升机点位地图命令
    public static NyShuttleHttpCommand getUpdateMapDevicePointCommand(Integer shuttleNo, List<Map<String, Object>> list) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -231,7 +232,7 @@
    //获取单个RFID录写命令
    public static NyShuttleHttpCommand getWriteSingleRFIDCommand(Integer shuttleNo, Integer xPoint, Integer yPoint, Integer zPoint) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -247,7 +248,7 @@
    //获取自动录写RFID命令
    public static NyShuttleHttpCommand getAutoWriteRFIDCommand(Integer shuttleNo, Integer dir, Integer xBase, Integer yBase, Integer zBase, Integer pointEnd, List<Integer> specialPoint) {
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo);
        NyShuttleHttpCommand httpStandard = getHttpStandard(shuttleNo, 9999);
        NyShuttleHttpCommand.NyRequest request = httpStandard.getRequest();
        HashMap<String, Object> body = new HashMap<>();
@@ -270,32 +271,60 @@
        return random.nextInt(9999999);
    }
    //获取TaskId
    public static Integer getTaskId() {
        Random random = new Random();
        return random.nextInt(999999);
    }
    //发出请求
    public static JSONObject requestCommand(NyShuttleHttpCommand httpCommand) {
    public static JSONObject requestCommand(Socket socket, NyShuttleHttpCommand httpCommand) {
        try {
            String response = new HttpHandler.Builder()
                    .setUri(requestUrl)
                    .setPath("/static/readStatus.json")
                    .setJson(JSON.toJSONString(httpCommand))
                    .build()
                    .doGet();
            JSONObject jsonObject = JSON.parseObject(response);
            JSONObject response2 = jsonObject.getJSONObject("response");
            JSONObject body = response2.getJSONObject("body");
            if (body.get("responseType").equals("state")) {//读取状态,不需要判断success
                return body;
            if (socket == null) {
                return null;
            }
            // 获取输入流和输出流
            BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            OutputStreamWriter writer = new OutputStreamWriter(socket.getOutputStream());
            writer.write(JSON.toJSONString(httpCommand) + "\r\n");
            writer.flush();
//            System.out.println("Sent message to server: " + JSON.toJSONString(httpCommand));
            if (body.get("result").equals("success")) {
                return body;
            }
            // 读取服务器的响应
            StringBuffer sb = new StringBuffer();
            String response = null;
            char[] chars = new char[2048];//缓冲区
            do {
                reader.read(chars);
                String trim = new String(chars).trim();
                sb.append(trim);
                if (sb.lastIndexOf("\r\n") != -1) {
                    break;
                }
            } while (response != null);
//            System.out.println("Received response from server: " + sb);
             return JSON.parseObject(sb.toString());
        } catch (Exception e) {
//            e.printStackTrace();
            e.printStackTrace();
        }
        return null;
    }
    public static JSONObject filterData(JSONObject data) {
        Object response = data.get("response");
        if (response == null) {
            return null;
        }
        JSONObject result = JSON.parseObject(response.toString());
        Object body = result.get("body");
        if (body == null) {
            return null;
        }
        JSONObject jsonBody = JSON.parseObject(body.toString());
        return jsonBody;
    }
    //地图节点转换牛眼节点
    public static NyShuttleProtocol.NyShuttlePointClass navigateNodeToNyPointNode(NavigateNode node) {
        int[] NyPosition = NavigatePositionConvert.WCSXyzToNyXyz(node.getX(), node.getY(), node.getZ());//WCS系统坐标转牛眼坐标
src/main/java/com/zy/core/model/command/NyShuttleHttpCommand.java
@@ -18,6 +18,9 @@
    //请求消息
    private NyRequest request;
    //工作号
    private Integer wrkNo;
    @Data
    public static class NyRequest {
src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
@@ -186,7 +186,7 @@
    /**
     * 故障码
     */
    private List<Integer> errCode;
    private Integer errCode;
    /**
     * mileage总里程数(米),liftNumber顶升总数dropNumber下降总数reversingX换X总数reversingY换Y总数
@@ -235,7 +235,14 @@
        if (this.getFree() == null) {
            return "";
        }
        return this.getFree() == 1 ? "空闲" : "运行中";
        return this.getFree() == 0 ? "运行中" : "空闲";
    }
    public String getWorkingMode$() {
        if (this.getWorkingMode() == null) {
            return "";
        }
        return this.getWorkingMode() == 0 ? "手动" : "自动";
    }
    public String getLoadState$() {
@@ -264,7 +271,7 @@
            return "";
        }
        switch (this.getRunDir()) {
        switch (this.getLiftPosition()) {
            case 0:
                return "未知";
            case 1:
@@ -393,6 +400,13 @@
        return NavigatePositionConvert.nyXyzToLocNo(this.getPoint().getX(), this.getPoint().getY(), this.getPoint().getZ());
    }
    public String getPoint$$() {
        if (this.getPoint() == null) {
            return "";
        }
        return JSON.toJSONString(this.getPoint());
    }
    public String getCoord$() {
        if (this.getCoord() == null) {
            return "";
src/main/java/com/zy/core/thread/NyShuttleThread.java
@@ -28,6 +28,8 @@
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.net.Socket;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Date;
@@ -43,6 +45,7 @@
    private ShuttleSlave slave;
    private NyShuttleProtocol shuttleProtocol;
    private RedisUtil redisUtil;
    private Socket socket;
    public NyShuttleThread(ShuttleSlave slave,RedisUtil redisUtil) {
        this.slave = slave;
@@ -108,10 +111,11 @@
            //----------读取四向穿梭车状态-----------
            NyShuttleHttpCommand readStatusCommand = NyHttpUtils.getReadStatusCommand(slave.getId());
            JSONObject jsonObject = NyHttpUtils.requestCommand(readStatusCommand);
            if (jsonObject == null) {
            JSONObject result = NyHttpUtils.requestCommand(socket, readStatusCommand);
            if (result == null) {
                OutputQueue.SHUTTLE.offer(MessageFormat.format("【{0}】四向穿梭车plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));
            }else {
                JSONObject jsonObject = NyHttpUtils.filterData(result);
                //手动状态/自动状态
                shuttleProtocol.setWorkingMode(jsonObject.getInteger("workingMode"));
                //允许状态 0:运行中1:空闲
@@ -159,7 +163,7 @@
                    errCode.add(Integer.parseInt(o.toString()));
                }
                //故障码
                shuttleProtocol.setErrCode(errCode);
                shuttleProtocol.setErrCode(errCode.get(0));
                //总里程数
                shuttleProtocol.setStatusSum(jsonObject.getObject("statusSum", NyShuttleProtocol.StatusSumClass.class));
                //非自动状态时间计时
@@ -242,6 +246,13 @@
    @Override
    public boolean connect() {
        try {
            Socket socket = new Socket(slave.getIp(),slave.getPort());
            socket.setSoTimeout(60000);
            this.socket = socket;
        } catch (IOException e) {
            OutputQueue.SHUTTLE.offer(MessageFormat.format("【{0}】四向穿梭车Socket链接失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));
        }
        return true;
    }
@@ -268,7 +279,7 @@
        }
        //发出请求
        JSONObject result = NyHttpUtils.requestCommand(command);
        JSONObject result = NyHttpUtils.requestCommand(socket, command);
        if (result == null) {
            return false;//请求失败
        }
@@ -318,62 +329,62 @@
        NavigateMapData navigateMapData = new NavigateMapData(Utils.getLev(shuttleProtocol.getCurrentLocNo()));
        //取出命令
        NyShuttleHttpCommand command = commands.get(commandStep);//当前命令
        if (commandStep != 0) {
            //判断上一条指令是否完成
            NyShuttleHttpCommand lastCommand = commands.get(commandStep - 1);
            String requestType = lastCommand.getRequest().getBody().get("requestType").toString();
            if (requestType.equals("move") || requestType.equals("intoLift") || requestType.equals("outLift")) {
                //移动命令、出入提升机命令
                NyShuttleProtocol.NyShuttlePointClass target = JSON.parseObject(lastCommand.getRequest().getBody().get("target").toString(), NyShuttleProtocol.NyShuttlePointClass.class);
                if (shuttleProtocol.getPoint().equals(target)) {
                    //上一条指令的目标位置和当前小车位置相同,则认定上一条任务完成
                    lastCommand.setComplete(true);
                    //解锁锁定路径,上一条路径和当前路径
                    List<NavigateNode> nodes = lastCommand.getNodes();
                    nodes.addAll(command.getNodes());
                    navigateMapData.writeNavigateNodeToRedisMap(nodes, false);//解锁路径
                }
            }else {
                lastCommand.setComplete(true);//其他命令默认认为完成
            }
            //任务数据保存到redis
            redisUtil.set("shuttle_wrk_no_" + redisCommand.getWrkNo(), JSON.toJSONString(redisCommand));
            if (!lastCommand.getComplete()) {
                //上一条任务未完成,禁止下发命令
                return false;
            }
        }
        List<NavigateNode> nextNodes = null;//下一步命令行走路径
        if (commandStep + 1 < commands.size()) {
            NyShuttleHttpCommand nextCommand = commands.get(commandStep + 1);//下一步命令
            nextNodes = nextCommand.getNodes();//下一步命令行走路径
        }
        if (shuttleProtocol.getFree() == ShuttleStatusType.BUSY.id) {
            return false;//小车状态忙,禁止执行命令
        }
        //检测小车是否要进提升机,如需要进提升机则调度提升机
        if (!checkLiftStation(wrkNo)) {
            return false;
        }
        //检测穿梭车是否在提升机内
        if (!checkShuttleInTheLift(wrkNo)) {
            return false;
        }
        //检测路径是否可行走
        if (!checkPath(command.getNodes(), nextNodes, redisCommand)) {
            return false;
        }
        //锁定路径,锁定当前路径和下一步路径
        List<NavigateNode> nodes = command.getNodes();
        nodes.addAll(nextNodes);
        navigateMapData.writeNavigateNodeToRedisMap(nodes, true);//所使用的路径进行锁定禁用
//        if (commandStep != 0) {
//            //判断上一条指令是否完成
//            NyShuttleHttpCommand lastCommand = commands.get(commandStep - 1);
//            String requestType = lastCommand.getRequest().getBody().get("requestType").toString();
//            if (requestType.equals("move") || requestType.equals("intoLift") || requestType.equals("outLift")) {
//                //移动命令、出入提升机命令
//                NyShuttleProtocol.NyShuttlePointClass target = JSON.parseObject(lastCommand.getRequest().getBody().get("target").toString(), NyShuttleProtocol.NyShuttlePointClass.class);
//                if (shuttleProtocol.getPoint().equals(target)) {
//                    //上一条指令的目标位置和当前小车位置相同,则认定上一条任务完成
//                    lastCommand.setComplete(true);
//                    //解锁锁定路径,上一条路径和当前路径
//                    List<NavigateNode> nodes = lastCommand.getNodes();
//                    nodes.addAll(command.getNodes());
//                    navigateMapData.writeNavigateNodeToRedisMap(nodes, false);//解锁路径
//                }
//            }else {
//                lastCommand.setComplete(true);//其他命令默认认为完成
//            }
//            //任务数据保存到redis
//            redisUtil.set("shuttle_wrk_no_" + redisCommand.getWrkNo(), JSON.toJSONString(redisCommand));
//
//            if (!lastCommand.getComplete()) {
//                //上一条任务未完成,禁止下发命令
//                return false;
//            }
//        }
//
//        List<NavigateNode> nextNodes = null;//下一步命令行走路径
//        if (commandStep + 1 < commands.size()) {
//            NyShuttleHttpCommand nextCommand = commands.get(commandStep + 1);//下一步命令
//            nextNodes = nextCommand.getNodes();//下一步命令行走路径
//        }
//
//        if (shuttleProtocol.getFree() == ShuttleStatusType.BUSY.id) {
//            return false;//小车状态忙,禁止执行命令
//        }
//
//        //检测小车是否要进提升机,如需要进提升机则调度提升机
//        if (!checkLiftStation(wrkNo)) {
//            return false;
//        }
//
//        //检测穿梭车是否在提升机内
//        if (!checkShuttleInTheLift(wrkNo)) {
//            return false;
//        }
//
//        //检测路径是否可行走
//        if (!checkPath(command.getNodes(), nextNodes, redisCommand)) {
//            return false;
//        }
//
//        //锁定路径,锁定当前路径和下一步路径
//        List<NavigateNode> nodes = command.getNodes();
//        nodes.addAll(nextNodes);
//        navigateMapData.writeNavigateNodeToRedisMap(nodes, true);//所使用的路径进行锁定禁用
        //可执行命令
        if (!write(command)) {
src/main/webapp/views/shuttle.html
@@ -35,6 +35,7 @@
                                <th>四向穿梭车</th>
                                <th>任务状态</th>
                                <th>小车状态</th>
                                <th>工作模式</th>
                                <th>实际库位</th>
                                <th>实际坐标</th>
                                <th>电量</th>
@@ -46,6 +47,7 @@
                                <th>充电状态</th>
                                <th>故障状态</th>
                                <th>故障码</th>
                                <th>管制状态</th>
                            </tr>
                        </thead>
                        <tbody>
@@ -302,17 +304,19 @@
                        setVal(tr.children("td").eq(0), table[i-1].shuttleNo);
                        setVal(tr.children("td").eq(1), table[i-1].protocolStatus$);
                        setVal(tr.children("td").eq(2), table[i-1].free$);
                        setVal(tr.children("td").eq(3), table[i-1].point$);
                        setVal(tr.children("td").eq(4), table[i-1].coord$);
                        setVal(tr.children("td").eq(5), table[i-1].powerPercent$);
                        setVal(tr.children("td").eq(6), table[i-1].speed);
                        setVal(tr.children("td").eq(7), table[i-1].loadState$);
                        setVal(tr.children("td").eq(8), table[i-1].liftPosition$);
                        setVal(tr.children("td").eq(9), table[i-1].runDir$);
                        setVal(tr.children("td").eq(10), table[i-1].runDir2$);
                        setVal(tr.children("td").eq(11), table[i-1].chargState$);
                        setVal(tr.children("td").eq(12), table[i-1].errState$);
                        setVal(tr.children("td").eq(13), table[i-1].errCode);
                        setVal(tr.children("td").eq(3), table[i-1].workingMode$);
                        setVal(tr.children("td").eq(4), table[i-1].point$);
                        setVal(tr.children("td").eq(5), table[i-1].point$$);
                        setVal(tr.children("td").eq(6), table[i-1].powerPercent$);
                        setVal(tr.children("td").eq(7), table[i-1].speed);
                        setVal(tr.children("td").eq(8), table[i-1].loadState$);
                        setVal(tr.children("td").eq(9), table[i-1].liftPosition$);
                        setVal(tr.children("td").eq(10), table[i-1].runDir$);
                        setVal(tr.children("td").eq(11), table[i-1].runDir2$);
                        setVal(tr.children("td").eq(12), table[i-1].chargState$);
                        setVal(tr.children("td").eq(13), table[i-1].errState$);
                        setVal(tr.children("td").eq(14), table[i-1].errCode);
                        setVal(tr.children("td").eq(15), table[i-1].suspendState$);
                    }
                } else if (res.code === 403){
                    window.location.href = baseUrl+"/login";