春风项目四线(合箱线、总装线)
wujian
2024-08-18 8876c234904459d038a2b282b3fdc30e006f9925
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
@@ -217,11 +217,20 @@
            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());
@@ -461,10 +470,11 @@
                OrderScheduling.setProductionStatus("2");
                bsOrderSchedulingService.updateBsOrderScheduling(OrderScheduling);
                return R.ok();
            } else {
                return R.fail(500,"超出计划数量,请检查后重试");
            }
        }
        return R.ok();
    }
}