| | |
| | | |
| | | // STOCK |
| | | List<Loc> stockLocList = locService.selectRandByLocSts(LocStsType.STOCK.val(), maxCapacity); |
| | | // LambdaQueryWrapper<Loc> stockWrapper = new LambdaQueryWrapper<Loc>().eq(Loc::getLocSts, LocStsType.STOCK.val()); |
| | | // List<Loc> stockList = locService.list(stockWrapper); |
| | | // if (Cools.isEmpty(stockList) || stockList.size() < agvModel.getBackpack()) { |
| | | // return; |
| | | // } |
| | | // Collections.shuffle(stockList); |
| | | if (Cools.isEmpty(stockLocList)) { |
| | | return; |
| | | } |
| | | Collections.shuffle(stockLocList); |
| | | |
| | | // IDLE |
| | | List<Loc> idleLocList = locService.selectRandByLocSts(LocStsType.IDLE.val(), maxCapacity); |
| | | // LambdaQueryWrapper<Loc> idleWrapper = new LambdaQueryWrapper<Loc>().eq(Loc::getLocSts, LocStsType.IDLE.val()); |
| | | // List<Loc> idleList = locService.list(idleWrapper); |
| | | // if (Cools.isEmpty(idleList)) { |
| | | // return; |
| | | // } |
| | | // Collections.shuffle(idleList); |
| | | if (Cools.isEmpty(idleLocList)) { |
| | | return; |
| | | } |
| | | Collections.shuffle(idleLocList); |
| | | |
| | | OpenBusSubmitParam param = new OpenBusSubmitParam(); |
| | | param.setBatch(String.valueOf(snowflakeIdWorker.nextId()).substring(13, 19)); |
| | |
| | | |
| | | param.getTaskList().add(taskDto); |
| | | } |
| | | if (Cools.isEmpty(param.getTaskList())) { return; } |
| | | |
| | | mainService.generateBusAndTask(param, memo); |
| | | } |