#
Junjie
8 天以前 0d04bc5d8080b82338302fba0a59fccff2eaedfc
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java
@@ -100,17 +100,15 @@
            BufferedReader reader = new BufferedReader(new InputStreamReader(this.socket.getInputStream()));
            // 读取服务器的响应
            StringBuffer sb = new StringBuffer();
            String response = null;
            char[] chars = new char[2048];//缓冲区
            do {
            while (true) {
                reader.read(chars);
                String trim = new String(chars).trim();
                String trim = new String(chars);
                sb.append(trim);
                if (sb.lastIndexOf("\r\n") != -1) {
                if (trim.lastIndexOf("\r\n") != -1) {
                    break;
                }
            } while (response != null);
//            System.out.println("Received response from server: " + sb);
            }
            JSONObject result = JSON.parseObject(sb.toString());//得到响应结果集
            if (!socketResults.isEmpty() && socketResults.size() >= 5) {
@@ -453,6 +451,11 @@
    }
    @Override
    public boolean updateLocation(ShuttleCommand param) {
        return true;//还没移植过来
    }
    @Override
    public boolean isIdle() {
        return this.isIdle(null);
    }
@@ -553,7 +556,7 @@
                if (shuttleService == null) {
                    return false;
                }
                BasShuttle basShuttle = shuttleService.getById(this.device.getDeviceNo());
                BasShuttle basShuttle = shuttleService.getOne(new LambdaQueryWrapper<BasShuttle>().eq(BasShuttle::getDeviceId, this.device.getId()));
                if (basShuttle == null) {
                    return false;
                }
@@ -792,6 +795,11 @@
        return command;
    }
    @Override
    public ShuttleCommand getUpdateLocationCommand(Integer taskNo, String locNo) {
        return null;//还没移植过来
    }
    //获取小车复位响应命令
    public ShuttleCommand getInitCommand(Integer taskNo, Integer code) {
        LocService locService = SpringUtils.getBean(LocService.class);