| | |
| | | taskDto.setDestLoc(idleLoc.getLocNo()); |
| | | taskDto.setPriority(100); |
| | | taskDto.setSeqNum(String.valueOf(snowflakeIdWorker.nextId()).substring(11, 19)); |
| | | |
| | | taskDto.setMemo(memo); |
| | | param.getTaskList().add(taskDto); |
| | | } |
| | | |
| | |
| | | taskDto.setDestLoc(idleLoc.getLocNo()); |
| | | taskDto.setPriority(99); |
| | | taskDto.setSeqNum(String.valueOf(snowflakeIdWorker.nextId()).substring(11, 19)); |
| | | |
| | | taskDto.setMemo(memo); |
| | | param.getTaskList().add(taskDto); |
| | | num--; |
| | | } |
| | |
| | | taskDto.setDestSta(idleSta.getStaNo()); |
| | | taskDto.setPriority(100); |
| | | taskDto.setSeqNum(String.valueOf(snowflakeIdWorker.nextId()).substring(11, 19)); |
| | | |
| | | taskDto.setMemo(memo); |
| | | param.getTaskList().add(taskDto); |
| | | } |
| | | |
| | |
| | | taskDto.setOriLoc(stockLoc.getLocNo()); |
| | | taskDto.setDestSta(idleSta.getStaNo()); |
| | | taskDto.setPriority(100); |
| | | taskDto.setMemo(memo); |
| | | taskDto.setSeqNum(String.valueOf(snowflakeIdWorker.nextId()).substring(11, 19)); |
| | | |
| | | param.getTaskList().add(taskDto); |
| | |
| | | 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))) { |
| | | return; |
| | | } |
| | | // if (availableAgvCount <= busService.count(new LambdaQueryWrapper<Bus>().in(Bus::getBusSts, BusStsType.RECEIVE.val(), BusStsType.PROGRESS.val()).in(Bus::getMemo, memo, staTaskMemo))) { |
| | | // return; |
| | | // } |
| | | |
| | | AgvModel agvModel = agvModelService.getOne(new LambdaQueryWrapper<AgvModel>().eq(AgvModel::getType, AgvModelType.CTU_BOX_TRANSPORT_AGV.toString())); |
| | | if (null == agvModel) { |
| | | return; |
| | | } |
| | | int maxCapacity = agvModel.getBackpack(); |
| | | |
| | | Integer maxTask = configService.getVal("maxTask", Integer.class, 30); |
| | | // 最多 ? 个任务运行 |
| | | if (maxTask <= taskService.count(new LambdaQueryWrapper<Task>().in(Task::getTaskSts, TaskStsType.INIT.val(), TaskStsType.WAITING.val(), TaskStsType.ASSIGN.val(), TaskStsType.PROGRESS.val()).in(Task::getMemo, memo, staTaskMemo))) { |
| | | return; |
| | | } |
| | | |
| | | // STOCK |
| | | LambdaQueryWrapper<Loc> stockWrapper = new LambdaQueryWrapper<Loc>().eq(Loc::getLocSts, LocStsType.STOCK.val()); |
| | |
| | | taskDto.setOriLoc(stockLoc.getLocNo()); |
| | | taskDto.setDestLoc(idleLoc.getLocNo()); |
| | | taskDto.setSeqNum(String.valueOf(snowflakeIdWorker.nextId()).substring(11, 19)); |
| | | |
| | | taskDto.setMemo(memo); |
| | | param.getTaskList().add(taskDto); |
| | | } |
| | | |
| | |
| | | taskDto.setOriLoc(stockLoc.getLocNo()); |
| | | taskDto.setDestLoc(idleLoc.getLocNo()); |
| | | taskDto.setSeqNum(String.valueOf(snowflakeIdWorker.nextId()).substring(11, 19)); |
| | | |
| | | taskDto.setMemo(memo); |
| | | param.getTaskList().add(taskDto); |
| | | } |
| | | |