| | |
| | | if (0 == availableAgvCount) { |
| | | return; |
| | | } |
| | | |
| | | List<String> staPreNos = getStaPrefixes(staGroupList); |
| | | String staTaskMemo = "DEMO_STA_" + String.join("-", staPreNos); |
| | | List<Task> list = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getDestSta, 33).in(Task::getTaskSts, TaskStsType.INIT.val(), TaskStsType.WAITING.val(), TaskStsType.ASSIGN.val(), TaskStsType.PROGRESS.val())); |
| | |
| | | } |
| | | |
| | | // STOCK |
| | | LambdaQueryWrapper<Sta> stockWrapper = new LambdaQueryWrapper<Sta>() |
| | | .eq(Sta::getStaSts, StaStsType.STOCK.val()) |
| | | .eq(Sta::getStatus, StatusType.ENABLE.val) |
| | | .eq(Sta::getInEnable, "Y") |
| | | .in(Sta::getStaNo, staGroupList); |
| | | LambdaQueryWrapper<Sta> stockWrapper = new LambdaQueryWrapper<Sta>().eq(Sta::getStaSts, StaStsType.STOCK.val()).eq(Sta::getStatus, StatusType.ENABLE.val).eq(Sta::getInEnable, "Y").in(Sta::getStaNo, staGroupList); |
| | | List<Sta> stockList = staService.list(stockWrapper); |
| | | if (Cools.isEmpty(stockList)) { |
| | | return; |
| | |
| | | // STOCK |
| | | LambdaQueryWrapper<Sta> stockWrapper = new LambdaQueryWrapper<Sta>() |
| | | //.eq(Sta::getStaSts, StaStsType.STOCK.val()) |
| | | .eq(Sta::getStatus, StatusType.ENABLE.val) |
| | | .eq(Sta::getInEnable, "Y") |
| | | .in(Sta::getStaNo, staGroupList); |
| | | .eq(Sta::getStatus, StatusType.ENABLE.val).eq(Sta::getInEnable, "Y").in(Sta::getStaNo, staGroupList); |
| | | List<Sta> stockList = staService.list(stockWrapper); |
| | | if (Cools.isEmpty(stockList)) { |
| | | return; |
| | |
| | | int maxCapacity = agvModel.getBackpack(); |
| | | |
| | | // STA IDLE |
| | | LambdaQueryWrapper<Sta> idleWrapper = new LambdaQueryWrapper<Sta>() |
| | | .eq(Sta::getStaSts, StaStsType.IDLE.val()) |
| | | .eq(Sta::getStatus, StatusType.ENABLE.val) |
| | | .eq(Sta::getOutEnable, "Y") |
| | | .in(Sta::getStaNo, staGroupList); |
| | | LambdaQueryWrapper<Sta> idleWrapper = new LambdaQueryWrapper<Sta>().eq(Sta::getStaSts, StaStsType.IDLE.val()).eq(Sta::getStatus, StatusType.ENABLE.val).eq(Sta::getOutEnable, "Y").in(Sta::getStaNo, staGroupList); |
| | | List<Sta> idleList = staService.list(idleWrapper); |
| | | if (Cools.isEmpty(idleList)) { |
| | | return; |
| | |
| | | // STA IDLE |
| | | LambdaQueryWrapper<Sta> idleWrapper = new LambdaQueryWrapper<Sta>() |
| | | //.eq(Sta::getStaSts, StaStsType.IDLE.val()) |
| | | .eq(Sta::getStatus, StatusType.ENABLE.val) |
| | | .eq(Sta::getOutEnable, "Y") |
| | | .in(Sta::getStaNo, staGroupList); |
| | | .eq(Sta::getStatus, StatusType.ENABLE.val).eq(Sta::getOutEnable, "Y").in(Sta::getStaNo, staGroupList); |
| | | List<Sta> idleList = staService.list(idleWrapper); |
| | | if (Cools.isEmpty(idleList)) { |
| | | return; |
| | |
| | | int availableAgvCount = this.getAvailableAgvCount(agvGroupList); |
| | | |
| | | // 最多 ? 组bus运行 |
| | | if (availableAgvCount <= busService.count(new LambdaQueryWrapper<Bus>() |
| | | .in(Bus::getBusSts, BusStsType.RECEIVE.val(), BusStsType.PROGRESS.val()) |
| | | .in(Bus::getMemo, memo, staTaskMemo) |
| | | )) { |
| | | if (availableAgvCount <= busService.count(new LambdaQueryWrapper<Bus>().in(Bus::getBusSts, BusStsType.RECEIVE.val(), BusStsType.PROGRESS.val()).in(Bus::getMemo, memo, staTaskMemo))) { |
| | | return; |
| | | } |
| | | |