| | |
| | | if (!agvService.judgeEnable(agv.getId())) { |
| | | return false; |
| | | } |
| | | if (!Cools.isEmpty(taskService.selectInSts(agv.getId(), TaskStsType.ASSIGN, TaskStsType.PROGRESS))) { |
| | | throw new CoolException("AGV[" + agv.getUuid() + "] failed to assign,because already has the task in running..."); |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | Code endCode = null; |
| | |
| | | List<Agv> agvList = agvService.list(new LambdaQueryWrapper<Agv>().eq(Agv::getStatus, StatusType.ENABLE.val)); |
| | | // init executorService |
| | | if (null == this.executorService) { |
| | | int count = agvList.size() > 30 ? agvList.size() : 20; |
| | | int count = agvList.size() > 30 ? 20 : agvList.size(); |
| | | this.executorService = Executors.newFixedThreadPool(count); |
| | | } |
| | | |
| | |
| | | } |
| | | if (!Cools.isEmpty(oriDesc) && null != this.oriCode) { |
| | | oriDesc = oriDesc + " (" + this.getOriCode$() + ")"; |
| | | } else { |
| | | oriDesc = "CODE" + " - " + this.getOriCode$(); |
| | | } |
| | | return oriDesc; |
| | | } |
| | |
| | | } |
| | | if (!Cools.isEmpty(destDesc) && null != this.destCode) { |
| | | destDesc = destDesc + " (" + this.getDestCode$() + ")"; |
| | | } else { |
| | | destDesc = "CODE" + " - " + this.getDestCode$(); |
| | | } |
| | | return destDesc; |
| | | } |