| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import static java.util.stream.Collectors.toList; |
| | | |
| | | import com.zy.asrs.entity.WrkMastSta; |
| | | import com.zy.core.enums.RouteCollectCountType; |
| | | import springfox.documentation.spring.web.json.Json; |
| | | |
| | |
| | | return getRouteIntersection(getRoute(a, c), getRoute(b, c), RouteCollectCountType.DEDUPLICATIONUNION); |
| | | } |
| | | |
| | | public static Integer[] RgvRunSta(Integer runStaStart,Integer runStaEnd){ |
| | | int ia = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(runStaStart); |
| | | int ib = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(runStaEnd); |
| | | if (ia<=ib){ |
| | | return new Integer[]{runStaStart,runStaEnd}; |
| | | }else { |
| | | return new Integer[]{runStaEnd,runStaStart}; |
| | | } |
| | | |
| | | } |
| | | |
| | | public static boolean RgvRunStaSign(Integer staBow,Integer runStaEnd,Integer rgvNo){ |
| | | int ia = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(staBow); |
| | | int ib = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(runStaEnd); |
| | | if (rgvNo==1){ |
| | | if (ia>ib){ |
| | | return true;//需要避让 |
| | | }else { |
| | | return false;//不需要避让 |
| | | } |
| | | }else { |
| | | if (ia<ib){ |
| | | return true;//需要避让 |
| | | }else { |
| | | return false;//不需要避让 |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public static void main(String[] arge){ |