| | |
| | | list = bsOrderSchedulingService.selectBsOrderSchedulingPage(bsOrderScheduling); |
| | | if (CollUtil.isNotEmpty(list)){ |
| | | total = new PageInfo(list).getTotal(); |
| | | List<String> allEngineNoList = list.stream().map(BsOrderScheduling::getEngineNo).collect(Collectors.toList()); |
| | | List<ProductNewPassStation> productPassStationListByEngineList = productNewPassStationService.getProductPassStationListByEngineList(allEngineNoList); |
| | | list.forEach(x -> { |
| | | if (StrUtil.isNotBlank(x.getWorkingHours())){ |
| | | x.setWorkingHoursInt(Integer.parseInt(x.getWorkingHours())); |
| | | } else { |
| | | x.setWorkingHoursInt(0); |
| | | } |
| | | if (CollUtil.isNotEmpty(productPassStationListByEngineList)){ |
| | | List<ProductNewPassStation> collect = productPassStationListByEngineList.stream().filter(y -> x.getEngineNo().equals(y.getSfcCode())).collect(Collectors.toList()); |
| | | if (CollUtil.isNotEmpty(collect)){ |
| | | ProductNewPassStation productNewPassStation = collect.get(0); |
| | | x.setBoxCode(productNewPassStation.getBoxCode()); |
| | | } |
| | | } |
| | | }); |
| | | list = list.stream().sorted(Comparator.comparing(BsOrderScheduling::getWorkingHoursInt)).collect(Collectors.toList()); |
| | |
| | | OrderScheduling.setProductionStatus("2"); |
| | | bsOrderSchedulingService.updateBsOrderScheduling(OrderScheduling); |
| | | return R.ok(); |
| | | } else { |
| | | return R.fail(500,"超出计划数量,请检查后重试"); |
| | | } |
| | | |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | } |