| | |
| | | import com.zy.common.model.NavigateNode; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.NavigateMapUtils; |
| | | import com.zy.common.utils.NavigatePositionConvert; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.News; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.dispatcher.ShuttleDispatchUtils; |
| | | import com.zy.core.enums.*; |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.TrafficControlDataModel; |
| | | import com.zy.core.model.command.ShuttleAssignCommand; |
| | | import com.zy.core.model.command.ShuttleCommand; |
| | | import com.zy.core.model.command.ShuttleRedisCommand; |
| | |
| | | if (trafficControlThread == null) { |
| | | return false; |
| | | } |
| | | |
| | | TrafficControlDataModel trafficControlDataModel = trafficControlThread.queryTrafficControl(shuttleNo); |
| | | if (trafficControlDataModel != null) { |
| | | //有管制信息,进行检测 |
| | | if (!trafficControlDataModel.getTaskNo().equals(shuttleProtocol.getTaskNo())) { |
| | | return false;//任务不一致 |
| | | } |
| | | |
| | | //检测是否到终点 |
| | | List<NavigateNode> totalNodeList = trafficControlDataModel.getTotalNodeList(); |
| | | NavigateNode trafficTargetNode = totalNodeList.get(totalNodeList.size() - 1); |
| | | String trafficTargetLoc = Utils.getLocNo(trafficTargetNode.getX(), trafficTargetNode.getY(), trafficTargetNode.getZ()); |
| | | |
| | | //判断小车是否到终点 |
| | | if(shuttleProtocol.getCurrentLocNo().equals(trafficTargetLoc)) { |
| | | //上报交管 |
| | | trafficControlThread.trafficReport(command.getNodesDeepCopy(), shuttleNo, shuttleProtocol.getTaskNo()); |
| | | } |
| | | } |
| | | //上报交管 |
| | | trafficControlThread.trafficReport(command.getNodesDeepCopy(), shuttleNo, shuttleProtocol.getTaskNo()); |
| | | |
| | | String currentLocNo = shuttleProtocol.getCurrentLocNo(); |
| | | if (targetPoints.contains(Utils.getRow(currentLocNo) + "-" + Utils.getBay(currentLocNo))) { |
| | |
| | | return false; |
| | | } |
| | | |
| | | NavigateNode startNode = nodeList.get(0); |
| | | Long linePartFlag = startNode.getLinePartFlag(); |
| | | |
| | | List<NavigateNode> totalNodeList = new ArrayList<>(); |
| | | for (ShuttleCommand command : commands) { |
| | | if (command.getMode() == ShuttleCommandModeType.MOVE.id) { |
| | | NavigateNode node = command.getNodes().get(0); |
| | | Long nodeLinePartFlag = node.getLinePartFlag(); |
| | | if (nodeLinePartFlag.equals(linePartFlag)) { |
| | | List<NavigateNode> deepCopy = command.getNodesDeepCopy(); |
| | | if (deepCopy != null) { |
| | | totalNodeList.addAll(deepCopy); |
| | | } |
| | | List<NavigateNode> deepCopy = command.getNodesDeepCopy(); |
| | | if (deepCopy != null) { |
| | | totalNodeList.addAll(deepCopy); |
| | | } |
| | | } |
| | | } |