| | |
| | | return false; |
| | | } |
| | | |
| | | News.info("execute check command {},{}", shuttleNo, taskNo); |
| | | //检测命令 |
| | | int checked = checkCommand(redisCommand, shuttleNo); |
| | | News.info("execute check command complete {},{}", shuttleNo, taskNo); |
| | | if (checked == 0) { |
| | | return false; |
| | | } |
| | |
| | | } |
| | | |
| | | List<NavigateNode> nodes = JSON.parseArray(JSON.toJSONString(command.getNodes()), NavigateNode.class); |
| | | |
| | | Object object = redisUtil.get(RedisKeyType.TRAFFIC_CONTROL_LOCK_APPLY.key + shuttleNo); |
| | | if (object == null) { |
| | | //申请管制 |
| | | News.info("execute apply control {},{}", shuttleNo, taskNo); |
| | | redisUtil.set(RedisKeyType.TRAFFIC_CONTROL_LOCK_APPLY.key + shuttleNo, "lock", 10); |
| | | applyTrafficControl(commands, nodes, shuttleNo, taskNo); |
| | | News.info("execute apply control complete {},{}", shuttleNo, taskNo); |
| | | } |
| | | |
| | | News.info("execute query control {},{}", shuttleNo, taskNo); |
| | | //查询管制 |
| | | boolean apply = queryTrafficControl(shuttleNo, taskNo); |
| | | News.info("execute query control complete {},{}", shuttleNo, taskNo); |
| | | if(!apply){ |
| | | return false;//申请失败 |
| | | } |
| | |
| | | return false; |
| | | } |
| | | //上报交管 |
| | | News.info("execute check command report traffic {},{}", shuttleNo, shuttleProtocol.getTaskNo()); |
| | | trafficControlThread.trafficReport(command.getNodesDeepCopy(), shuttleNo, shuttleProtocol.getTaskNo()); |
| | | News.info("execute check command report traffic complete {},{}", shuttleNo, shuttleProtocol.getTaskNo()); |
| | | |
| | | String currentLocNo = shuttleProtocol.getCurrentLocNo(); |
| | | if (currentLocNo == null) { |
| | |
| | | } |
| | | } |
| | | |
| | | public synchronized boolean clearPath(Integer shuttleNo) { |
| | | return navigateMapUtils.clearPath(shuttleNo); |
| | | } |
| | | |
| | | // //跑库程序 |
| | | // public synchronized void moveLoc(Integer shuttleNo) { |
| | | // ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttleNo); |