| | |
| | | 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; |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | mainLockWrapService.buildMinorTask(agv, agvDetail, TaskTypeType.TO_CHARGE, null); |
| | | mainLockWrapService.buildMinorTask(agv.getId(), TaskTypeType.TO_CHARGE, null, null); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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()) { |
| | |
| | | } |
| | | // } |
| | | |
| | | mainLockWrapService.buildMinorTask(agv, agvDetail, TaskTypeType.TO_STANDBY, null); |
| | | mainLockWrapService.buildMinorTask(agv.getId(), TaskTypeType.TO_STANDBY, null, null); |
| | | } |
| | | } |
| | | |