#
Junjie
2024-04-13 13c199274ed4d9b1f81880619867ee4d16b90dce
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SurayShuttleThread.java
@@ -3,6 +3,8 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.zy.asrs.common.utils.HttpHandler;
import com.zy.asrs.framework.common.DateUtils;
import com.zy.asrs.framework.common.SpringUtils;
@@ -412,7 +414,7 @@
        boolean res = (this.shuttleProtocol.getDeviceStatus() == 3 || this.shuttleProtocol.getDeviceStatus() == 11)
                && this.shuttleProtocol.getPakMk()
                && this.shuttleProtocol.getErrorCode().equals("0")
                && this.shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.IDLE.id
                && (this.shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.IDLE.id || this.shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.WAITING.id)
                ;
        return res;
    }
@@ -484,12 +486,18 @@
    @Override
    public List<NavigateNode> getMoveAdvancePath() {
        ObjectMapper objectMapper = SpringUtils.getBean(ObjectMapper.class);
        ArrayList<NavigateNode> path = new ArrayList<>();
        if (shuttleProtocol.getTaskNo() != 0) {
            //存在任务,获取指令
            Object object = redisUtil.get(DeviceRedisConstant.SHUTTLE_WORK_FLAG + shuttleProtocol.getTaskNo());
            if (object != null) {
                ShuttleRedisCommand redisCommand = JSON.parseObject(object.toString(), ShuttleRedisCommand.class);
                ShuttleRedisCommand redisCommand = null;
                try {
                    redisCommand = objectMapper.readValue(String.valueOf(object), ShuttleRedisCommand.class);
                } catch (JsonProcessingException e) {
                    return path;
                }
                List<NavigateNode> nodes = redisCommand.getAssignCommand().getNodes();//穿梭车预计路径
                if (!nodes.isEmpty()) {
                    path.addAll(nodes);