#
Junjie
19 小时以前 6e02d92c3b9c240fa78a343b67ddf0db12d840e6
src/main/java/com/zy/core/thread/impl/TrafficControlImplThread.java
@@ -174,10 +174,14 @@
                        Long idleTime = pathIdleShuttleMap.get(shuttleProtocol.getShuttleNo());
                        if((System.currentTimeMillis() - idleTime) > 1000 * 10) {
                            //检测障碍物车
                            boolean checkObstacle = shuttleOperaUtils.checkObstacle(shuttleProtocol.getCurrentLocNo(), new ArrayList<Integer>() {{
                            int checkObstacle = shuttleOperaUtils.checkObstacle(shuttleProtocol.getCurrentLocNo(), new ArrayList<Integer>() {{
                                add(shuttleNo);
                            }});
                            }}, totalNodeList);
                            pathIdleShuttleMap.remove(shuttleProtocol.getShuttleNo());
                            if (checkObstacle == 2) {
                                pathShuttleThread.restartCalcPath();
                            }
                        }
                    }else {
                        pathIdleShuttleMap.put(shuttleProtocol.getShuttleNo(), System.currentTimeMillis());
@@ -198,6 +202,10 @@
                }
                if(totalLocList.contains(locNo)) {
                    String first = totalLocList.get(0);
                    if(first.equals(locNo)) {//filter first node
                       continue;
                    }
                    return false;
                }
            }
@@ -211,7 +219,7 @@
        applyRecordsMap.remove(shuttleNo);
        redisUtil.set(RedisKeyType.TRAFFIC_CONTROL_SUCCESS_APPLY.key + shuttleNo + "_" + taskNo, 1, 60 * 60);
        News.info("receipt traffic {},{}", shuttleNo, taskNo);
        News.info("[RCS Debug] receipt traffic {},{}", shuttleNo, taskNo);
        return true;
    }
@@ -335,7 +343,7 @@
    public synchronized boolean operateTrafficControl(OperateTrafficControlParam param) {
        long startTime = System.currentTimeMillis();
        String operaType = param.getOperaType();
        News.info("Operate Traffic Control is Start " + operaType);
        News.info("[RCS Debug] Operate Traffic Control is Start " + operaType);
        boolean result = false;
        if (operaType.equals("add")) {
@@ -354,7 +362,7 @@
                        new ArrayList<>(model.getTotalNodeList())
                ))
                .collect(Collectors.toList());
        News.info("Operate Traffic Control is end " + (System.currentTimeMillis() - startTime) + "ms");
        News.info("[RCS Debug] Operate Traffic Control is end " + (System.currentTimeMillis() - startTime) + "ms");
        return result;
    }
@@ -393,6 +401,7 @@
        }
        trafficControlDataList.remove(idx);//取消管制
        redisUtil.del(RedisKeyType.TRAFFIC_CONTROL_SUCCESS_APPLY.key + shuttleNo + "_" + taskNo);
        return true;
    }