*
L
2026-01-23 4d9e2ea59aa2e9fbdcacd3d8d8dfd543a2fccba5
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -703,11 +703,12 @@
                        } else {
                            staProtocol = staProtocol.clone();
                        }
                        if (!staProtocol.isAutoing() || staProtocol.isLoading()) {
                        if (!staProtocol.isAutoing() || !staProtocol.isLoading()) {
                            continue;
                        }
                        TaskWrk taskWrk = taskWrkMapper.selectCrnStaWorking(crnProtocol.getLaneNo(), staDesc.getStnNo().toString());
                        if (taskWrk == null) {
                            log.info("堆垛机出库站到出库站:未查询到状态为13的任务信息,站点号:" + staDesc.getStnNo().toString());
                            continue;
                        }
                        if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == 0 || staProtocol.getWorkNo().equals(taskWrk.getWrkNo()))) {
@@ -1764,7 +1765,7 @@
        ConcurrentHashMap<String, TaskProtocol> allTaskProtocol = taskProtocolCache.getAllTaskProtocol();
        if (!allTaskProtocol.isEmpty()) {
            for (TaskProtocol taskProtocol : allTaskProtocol.values()) {
                if (taskProtocol.getTaskNo() != 0) {
                if (taskProtocol.getTaskNo() != 0 && taskProtocol.getTaskNo()!=32222L) {
                    return taskProtocol.getTaskNo().toString();
                }
            }
@@ -2464,10 +2465,90 @@
        ArrayList<Long[]> arrayListAll = new ArrayList<>();
        for (RgvSlave rgvSlave : slaveProperties.getRgv()) {
            try{
                boolean itSmall = new TrackRangeUtils().IsItSmall(rgvSlave);
                String taskNoNow = rgvOtherTaskWrk(rgvSlave);
                if (taskNoNow.equals("无")){
                    continue;
                }
                if (!arrayListOld.contains(taskNoNow)){
                    arrayListOld.add(taskNoNow);
                }
                TaskWrk taskWrk = taskWrkMapper.selectByTaskNo(taskNoNow);
                if (taskWrk != null) {
                    if (!arrayListAllP.contains(taskWrk.getWrkNo())) {
                        RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
                        TaskProtocolCache taskProtocolCache = rgvThread.getTaskProtocolCache();
                        arrayListAllP.add(taskWrk.getWrkNo());
                        long startP = 0;
                        if (!itSmall){
                            startP = System.currentTimeMillis();
                        }
                        long endP = 0;
                        long endP1 = 0;
                        long endP2 = 0;
                        ConcurrentHashMap<String, TaskProtocol> allTaskProtocol = taskProtocolCache.getAllTaskProtocol();
                        for (TaskProtocol taskProtocol : allTaskProtocol.values()){
                            if (taskProtocol.getTaskStatus() == 2){//取
                                endP1 = taskProtocol.getTargetPosition();
                            } else if (taskProtocol.getTaskStatus() == 3){//放
                                endP2 = taskProtocol.getTargetPosition();
                            }
                        }
                        if (endP1 > endP2){
                            if (itSmall){
                                endP = endP1;
                            } else {
                                endP = endP2;
                            }
                        }
                        if (endP == 0){
                            if (itSmall){
                                endP = System.currentTimeMillis();
                            }
                        }
                        Long[] longList = {taskWrk.getWrkNo().longValue(),startP,endP};
                        arrayListAll.add(longList);
                    }
                } else {
                    RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
                    TaskProtocolCache taskProtocolCache = rgvThread.getTaskProtocolCache();
                    try {
                        long startP = 0;
                        long endP = 0;
                        ConcurrentHashMap<String, TaskProtocol> allTaskProtocol = taskProtocolCache.getAllTaskProtocol();
                        for (TaskProtocol taskProtocol : allTaskProtocol.values()){
                            if (taskProtocol.getTaskStatus() == 2){//取
                                startP = taskProtocol.getTargetPosition();
                            } else if (taskProtocol.getTaskStatus() == 3){//放
                                endP = taskProtocol.getTargetPosition();
                            }
                        }
                        if (startP == 0 ){
                            if (!itSmall){
                                startP = System.currentTimeMillis();
                            }
                        }
                        if (endP == 0){
                            if (itSmall){
                                endP = System.currentTimeMillis();
                            }
                        }
//                        taskNoNow
                        long parseLong = Long.parseLong(taskNoNow);
                        Long[] longList = {parseLong,startP,endP};
                        arrayListAll.add(longList);
                    } catch (Exception e) {
                        log.error("任务过滤查询小车执行任务异常:"+e.getMessage());
                        return new ArrayList<>();
                    }
                }
            } catch (Exception e) {
            }
        }
@@ -2491,6 +2572,11 @@
        List<Long> wrkNoList = new ArrayList<>();
        List<Long> signWrk = new ArrayList<>();
        for (Long[] longList : crossingPathsW) {
            if (arrayListOld.contains(longList[0].toString()) || arrayListOld.contains(longList[1].toString())){
                signWrk.add(longList[0]);
                signWrk.add(longList[1]);
                continue;
            }
            if (!wrkNoList.contains(longList[0]) && !signWrk.contains(longList[0])) {
                if (!wrkNoList.contains(longList[1]) && !signWrk.contains(longList[1])) {
                    wrkNoList.add(longList[0]);