zhang
2025-05-20 1313906bb1eb983d3beece810035e7fc28d6a92f
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/MaintainScheduler.java
@@ -53,7 +53,7 @@
        List<Agv> agvList = agvService.list(new LambdaQueryWrapper<Agv>().eq(Agv::getStatus, StatusType.ENABLE.val));
        for (Agv agv : agvList) {
            AgvDetail agvDetail = agvDetailService.selectByAgvId(agv.getId());
            AgvModel agvModel = agvModelService.getById(agv.getAgvModel());
            AgvModel agvModel = agvModelService.getByAgvId(agv.getId());
            if (null == agvDetail || null == agvDetail.getVol() || null == agvDetail.getAgvStatus()) {
                continue;
            }
@@ -81,7 +81,7 @@
                    continue;
                }
                mainLockWrapService.buildMinorTask(agv, agvDetail, TaskTypeType.TO_CHARGE, null);
                mainLockWrapService.buildMinorTask(agv.getId(), TaskTypeType.TO_CHARGE, null, null);
            }
        }
    }
@@ -95,14 +95,14 @@
        List<Agv> agvList = agvService.list(new LambdaQueryWrapper<Agv>().eq(Agv::getStatus, StatusType.ENABLE.val));
        for (Agv agv : agvList) {
            AgvDetail agvDetail = agvDetailService.selectByAgvId(agv.getId());
            AgvModel agvModel = agvModelService.getById(agv.getAgvModel());
            AgvModel agvModel = agvModelService.getByAgvId(agv.getId());
            if (null == agvDetail || null == agvDetail.getVol() || null == agvDetail.getAgvStatus() || null == agvDetail.getRecentCode()) {
                continue;
            }
            // low battery status, that need to go to charge
            if (agvDetailService.isPowerLoss(agv, agvDetail, agvModel)) {
                continue;
            }
//            if (agvDetailService.isPowerLoss(agv, agvDetail, agvModel)) {
//                continue;
//            }
            // is charging ?
            if (agvDetail.getAgvStatus().equals(AgvStatusType.CHARGE)) {
                if (agvDetail.getVol() < agvModel.getQuaBattery()) {
@@ -144,7 +144,7 @@
                }
//            }
            mainLockWrapService.buildMinorTask(agv, agvDetail, TaskTypeType.TO_STANDBY, null);
            mainLockWrapService.buildMinorTask(agv.getId(), TaskTypeType.TO_STANDBY, null, null);
        }
    }