| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | * 获取最远站点 |
| | | * a:当前位置 |
| | | * b:开始位置 |
| | | * c:结束位置 |
| | | * d:锁开始位置 |
| | | * */ |
| | | public static Integer RouteIndexFarMasNew(Integer a,Integer b,Integer c,Integer d){ |
| | | int ia = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(a); |
| | | int ib = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(b); |
| | | int ic = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(c); |
| | | int id = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(d); |
| | | if (id==0){ |
| | | if (ia>ib){ |
| | | if (ia>ic){ |
| | | return a; |
| | | }else { |
| | | return c; |
| | | } |
| | | }else { |
| | | if (ib>ic){ |
| | | return b; |
| | | }else { |
| | | return c; |
| | | } |
| | | } |
| | | }else { |
| | | if (ia<ib){ |
| | | if (ia<ic){ |
| | | return a; |
| | | }else { |
| | | return c; |
| | | } |
| | | }else { |
| | | if (ib<ic){ |
| | | return b; |
| | | }else { |
| | | return c; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public static Integer[] RouteIndexFarArr(Integer a,Integer b,Integer c,Integer d){ |
| | | int ia = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(a); |
| | | int ib = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(b); |