*
lsh
2025-06-06 b40ae90237b1ce741dae89aed09047d0dfbffcf1
src/main/java/com/zy/asrs/utils/SortTheExecutionOfTheCarUtil.java
@@ -3,6 +3,7 @@
import com.zy.asrs.entity.BasDevpPosition;
import com.zy.asrs.entity.WrkMast;
import com.zy.core.enums.RouteCollectCountType;
import org.apache.xmlbeans.impl.xb.xsdschema.All;
import java.util.*;
@@ -91,14 +92,14 @@
        Integer integer = LatelyAndLessThan(devpPosition, nowPosition,perimeter);
        for (BasDevpPosition basDevpPosition:devpPosition){
            if (basDevpPosition.getDevNo().equals(integer)){
                if (basDevpPosition.getDevNo() == 133){
                if (basDevpPosition.getDevNo() == 134){
                    result = 101;
                }
                break;
            }
            result = basDevpPosition.getDevNo();
        }
        return result;
        return result == -1? 101 : result;
    }
//    //获取最近并在当前位置前边的位置
//    public static Long LatelyAndLessThan(long[] devpPosition,long nowPosition){
@@ -206,6 +207,30 @@
    }
    //逆序排列
    public static List<List<Integer>> siteListAll(List<BasDevpPosition> devpPosition){
        List<List<Integer>> sitePositions = new ArrayList<>();
        Integer[] integers = new Integer[devpPosition.size()];
        List<Integer> devRegions = new ArrayList<>();
        int i = 0;
        for (BasDevpPosition basDevpPosition : devpPosition){
            if (basDevpPosition.getDevRegion()==0){
                continue;
            }
            if (!devRegions.contains(basDevpPosition.getDevRegion())){
                devRegions.add(basDevpPosition.getDevRegion());
                integers[basDevpPosition.getDevRegion()] = i;
                i++;
                List<Integer> sitePosition = new ArrayList<>();
                sitePosition.add(basDevpPosition.getDevNo());
                sitePositions.add(sitePosition);
            } else {
                sitePositions.get(integers[basDevpPosition.getDevRegion()]).add(basDevpPosition.getDevNo());
            }
        }
        return sitePositions;
    }
    //逆序排列
    public static boolean devpNoSortbj(BasDevpPosition[] devpPosition,Integer souDevpNo,Integer endDevpNo){
        int sou = 0;
        int end = 0;