自动化立体仓库 - WCS系统
#
Junjie
2023-09-20 d399d1b1975b47097526cab07a0120c56b616200
src/main/java/com/zy/asrs/controller/ShuttleController.java
@@ -21,6 +21,7 @@
import com.zy.common.utils.NyHttpUtils;
import com.zy.common.utils.NyShuttleOperaUtils;
import com.zy.common.utils.RedisUtil;
import com.zy.common.utils.ShuttleDispatchUtils;
import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.OutputQueue;
import com.zy.core.cache.SlaveConnection;
@@ -62,6 +63,8 @@
    private CommonService commonService;
    @Autowired
    private RedisUtil redisUtil;
    @Autowired
    private ShuttleDispatchUtils shuttleDispatchUtils;
    @PostMapping("/table/shuttle/state")
    @ManagerAuth(memo = "四向穿梭车信息表")
@@ -75,10 +78,13 @@
                continue;
            }
            NyShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol();
            JSONObject shuttleData = JSON.parseObject(JSON.toJSONString(shuttleProtocol));
            if (shuttleProtocol == null || shuttleProtocol.getShuttleNo()==null) {
                if (shuttleData != null) {
                    list.add(shuttleData);
                }
                continue;
            }
            JSONObject shuttleData = JSON.parseObject(JSON.toJSONString(shuttleProtocol));
            shuttleData.put("moveAdvancePath", null);//穿梭车预计路径
            if (shuttleProtocol.getTaskNo() != 0) {
@@ -336,6 +342,10 @@
                    ArrayList<NyShuttleHttpCommand> commands = new ArrayList<>();
                    commands.add(suspendCommand);
                    assignCommand.setCommands(commands);
                } else if (shuttleTaskModeType == ShuttleTaskModeType.MOVE_LOC_NO_WRK_MAST) {
                    //移动到目标库位(生成移动任务)
                    shuttleDispatchUtils.dispatchShuttle(commonService.getWorkNo(3), param.getDistLocNo(), param.getShuttleNo());
                    return R.ok();
                } else {
                    throw new CoolException("未知命令");
                }