| | |
| | | List<String> collect = basStations.stream().map(BasStation::getDevNo).collect(Collectors.toList()); |
| | | locDto.setAgvStaNos(collect); |
| | | locDto.setBrand(orderDetl.getBrand()); |
| | | locDto.setSuppCode(orderDetl.getSuppCode()); |
| | | |
| | | locDto.setStandby1(orderDetl.getStandby1()); |
| | | locDto.setStandby2(orderDetl.getStandby2()); |
| | |
| | | for (LocDto locDto : locDtos) { |
| | | if (locDto.isLack()) { continue; } |
| | | TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getAgvStaNo(), locDto); |
| | | if (TaskDto.has(taskDtos, taskDto)) { |
| | | TaskDto dto = TaskDto.find(taskDtos, taskDto); |
| | | if (TaskDto.hasAgv(taskDtos, taskDto)) { |
| | | TaskDto dto = TaskDto.findAgv(taskDtos, taskDto); |
| | | assert dto != null; |
| | | dto.getLocDtos().addAll(taskDto.getLocDtos()); |
| | | } else { |
| | |
| | | } |
| | | } |
| | | // ----------------------------------------------------------------------------------------------- |
| | | for (TaskDto taskDto : taskDtos) { |
| | | // BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | Map<String, List<TaskDto>> listMap = taskDtos.stream().collect(Collectors.groupingBy(TaskDto::getLocNo)); |
| | | listMap.keySet().forEach(locNo -> { |
| | | listMap.get(locNo).forEach(taskDto -> { |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>() |
| | | .in("loc_sts", Arrays.asList(LocStsType.LOC_STS_TYPE_O.type, LocStsType.LOC_STS_TYPE_O.type)) |
| | | .eq("dev_no", taskDto.getAgvStaNo())); |
| | | if (Objects.isNull(station)) { throw new CoolException("数据错误,站点不存在或已使用!!"); } |
| | | workService.agvStockOut(station, taskDto, getUserId()); |
| | | } |
| | | }); |
| | | }); |
| | | // for (TaskDto taskDto : taskDtos) { |
| | | //// BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | // BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>() |
| | | // .in("loc_sts", Arrays.asList(LocStsType.LOC_STS_TYPE_O.type, LocStsType.LOC_STS_TYPE_O.type)) |
| | | // .eq("dev_no", taskDto.getAgvStaNo())); |
| | | // if (Objects.isNull(station)) { throw new CoolException("数据错误,站点不存在或已使用!!"); } |
| | | // workService.agvStockOut(station, taskDto, getUserId()); |
| | | // } |
| | | return R.ok(); |
| | | } |
| | | |