| | |
| | | switch (taskType) { |
| | | case TO_CHARGE: |
| | | case TO_STANDBY: |
| | | List<FuncSta> funcStaList = funcStaService.list(new LambdaQueryWrapper<FuncSta>() |
| | | .eq(FuncSta::getType, FuncStaType.query(taskType).toString()) |
| | | .eq(FuncSta::getAgvId, agv.getId()) |
| | | .eq(FuncSta::getState, FuncStaStateType.IDLE.toString()) |
| | | .eq(FuncSta::getStatus, StatusType.ENABLE.val) |
| | | ); |
| | | if (!Cools.isEmpty(funcStaList)) { |
| | | FuncSta funcSta = funcStaList.get(0); |
| | | List<FuncSta> idleFunStaList = funcStaService.findInIdleStatus(FuncStaType.query(taskType), agv.getId()); |
| | | if (!Cools.isEmpty(idleFunStaList)) { |
| | | FuncSta funcSta = funcStaService.checkoutClosestFunSta(agvDetail.getRecentCode(), idleFunStaList); |
| | | endCode = codeService.getById(funcSta.getCode()); |
| | | } |
| | | break; |