| | |
| | | private AgvDetailService agvDetailService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | // @Autowired |
| | | // private MainService mainService; |
| | | @Autowired |
| | | private MainService mainService; |
| | | private MainLockWrapService mainLockWrapService; |
| | | @Autowired |
| | | private CodeService codeService; |
| | | @Autowired |
| | |
| | | if (null == randomCode) { |
| | | return; |
| | | } |
| | | if (mainService.buildMinorTask(agv, agvDetail, TaskTypeType.MOVE, randomCode.getData())) { |
| | | if (mainLockWrapService.buildMinorTask(agv, agvDetail, TaskTypeType.MOVE, randomCode.getData())) { |
| | | log.info(agv.getUuid() + "开始走行演示..."); |
| | | } |
| | | } |
| | |
| | | public Code getRandomCode(AgvDetail agvDetail) { |
| | | Code startCode = codeService.getById(agvDetail.getRecentCode()); |
| | | List<String> notInCodeList = new ArrayList<>(); |
| | | notInCodeList.add("00000061"); |
| | | notInCodeList.add("00000151"); |
| | | List<Code> list = codeService.list(new LambdaQueryWrapper<Code>().notIn(Code::getData, notInCodeList)); |
| | | Collections.shuffle(list); |
| | | for (Code endCode : list) { |