#
Junjie
2024-04-12 684484fb93775edcfa19cfc7a43d0a748c8362be
#
2个文件已修改
21 ■■■■■ 已修改文件
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/ShuttleThread.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SurayShuttleThread.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/ShuttleThread.java
@@ -34,6 +34,8 @@
    boolean isChargingCompleted();//是否充电完成
    List<NavigateNode> getMoveAdvancePath();//获取穿梭车任务路径
    //***************获取命令*****************
    ShuttleCommand getMoveCommand(Integer taskNo, String startCodeNum, String distCodeNum, Integer allDistance, Integer runDirection, Integer runSpeed);//获取移动命令
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SurayShuttleThread.java
@@ -12,6 +12,7 @@
import com.zy.asrs.wcs.core.entity.Loc;
import com.zy.asrs.wcs.core.model.NavigateNode;
import com.zy.asrs.wcs.core.model.command.ShuttleCommand;
import com.zy.asrs.wcs.core.model.command.ShuttleRedisCommand;
import com.zy.asrs.wcs.core.model.enums.ShuttleCommandModeType;
import com.zy.asrs.wcs.core.model.enums.ShuttleRunDirection;
import com.zy.asrs.wcs.core.service.BasShuttleService;
@@ -19,6 +20,7 @@
import com.zy.asrs.wcs.core.utils.NavigateUtils;
import com.zy.asrs.wcs.rcs.News;
import com.zy.asrs.wcs.rcs.cache.OutputQueue;
import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant;
import com.zy.asrs.wcs.rcs.entity.DeviceDataLog;
import com.zy.asrs.wcs.rcs.model.enums.ShuttleProtocolStatusType;
import com.zy.asrs.wcs.rcs.model.enums.SlaveType;
@@ -464,6 +466,23 @@
    }
    @Override
    public List<NavigateNode> getMoveAdvancePath() {
        ArrayList<NavigateNode> path = new ArrayList<>();
        if (shuttleProtocol.getTaskNo() != 0) {
            //存在任务,获取指令
            Object object = redisUtil.get(DeviceRedisConstant.SHUTTLE_FLAG + shuttleProtocol.getTaskNo());
            if (object != null) {
                ShuttleRedisCommand redisCommand = JSON.parseObject(object.toString(), ShuttleRedisCommand.class);
                List<NavigateNode> nodes = redisCommand.getAssignCommand().getNodes();//穿梭车预计路径
                if (!nodes.isEmpty()) {
                    path.addAll(nodes);
                }
            }
        }
        return path;
    }
    @Override
    public ShuttleCommand getMoveCommand(Integer taskNo, String startCodeNum, String distCodeNum, Integer allDistance, Integer runDirection, Integer runSpeed) {
        HashMap<String, Object> body = new HashMap<>();
        body.put("messageName", "runOrder");