#
Junjie
2025-08-01 cef0811fa1ee3b7791900d87f5f7fe3a053a708b
src/main/java/com/zy/core/action/ShuttleAction.java
@@ -360,7 +360,8 @@
            }
            //申请取消管制
            trafficControlThread.cancelTrafficControl(shuttleNo, shuttleProtocol.getTaskNo());
            cancelTrafficControl(shuttleNo, shuttleProtocol.getTaskNo());
            //删除redis
            redisUtil.del(RedisKeyType.SHUTTLE_WORK_FLAG.key + redisCommand.getWrkNo());
            return 0;//禁止再下发命令
@@ -511,16 +512,18 @@
    //查询是否申请管制成功
    public boolean queryTrafficControl(Integer shuttleNo, Integer taskNo) {
        TrafficControlThread trafficControlThread = (TrafficControlThread) SlaveConnection.get(SlaveType.TrafficControl, 1);
        if (trafficControlThread == null) {
        Object object = redisUtil.get(RedisKeyType.TRAFFIC_CONTROL_SUCCESS_APPLY.key + shuttleNo + "_" + taskNo);
        if (object == null) {
            return false;
        }
        return true;
    }
        TrafficControlDataModel trafficControlDataModel = trafficControlThread.queryTrafficControl(shuttleNo, taskNo);
        if (trafficControlDataModel == null) {
            return false;
        }
    public boolean cancelTrafficControl(Integer shuttleNo, Integer taskNo) {
        TrafficControlDataModel model = new TrafficControlDataModel();
        model.setShuttleNo(shuttleNo);
        model.setTaskNo(taskNo);
        redisUtil.set(RedisKeyType.TRAFFIC_CONTROL_CANCEL_LIST.key + shuttleNo + "_" + taskNo, model);
        return true;
    }