春风项目四线(合箱线、总装线)
wujian
2024-10-23 2c65c31aceb16c1d06c692266e3fb555ecafdfb5
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
@@ -92,6 +92,15 @@
    }
    @Override
    public List<BsOrderScheduling> selectBsOrderSchedulingListForNum() {
        LocalDate today = LocalDate.now();
        LocalDate localDate = today.plusDays(1);
        String queryDate = today.toString();
        String addQueryDate = localDate.toString();
        return bsOrderSchedulingMapper.selectBsOrderSchedulingListForNum(queryDate,addQueryDate);
    }
    @Override
    public List<BsOrderScheduling> selectBsOrderSchedulingPage(BsOrderScheduling bsOrderScheduling)
    {
        if(bsOrderScheduling.getDateConditions()!=null){
@@ -120,16 +129,26 @@
        List<DaPassingStationCollection> collect5 = new ArrayList<>();
        if (CollUtil.isNotEmpty(engineNoList)){
            allChildList = daParamCollectionMapper.getListBySfcCode(engineNoList);
            collect5 = daPassingStationCollectionMapper.getListBySfcCode(engineNoList);
            List<DaPassingStationCollection> tempCollect = daPassingStationCollectionMapper.getListBySfcCode(engineNoList);
            if (engineNoList.size()>1){
                List<DaPassingStationCollection> outCollect = new ArrayList<>();
                engineNoList.forEach(engineNo -> {
                    List<DaPassingStationCollection> collect = tempCollect.stream().filter(x -> engineNo.equals(x.getSfcCode())).collect(Collectors.toList());
                    outCollect.addAll(collect);
                });
                collect5 = outCollect;
            } else {
                collect5 = tempCollect;
            }
        }
        if (CollUtil.isNotEmpty(allChildList)){
            //拿到所有子数据
            List<DaParamCollection> collect1 = allChildList.stream().filter(x -> Constants.DATA1.equals(x.getType())).collect(Collectors.toList());
            List<DaParamCollection> collect2 = allChildList.stream().filter(x -> Constants.DATA2.equals(x.getType())).collect(Collectors.toList());
//            List<DaParamCollection> collect2 = allChildList.stream().filter(x -> Constants.DATA2.equals(x.getType())).collect(Collectors.toList());
            List<DaParamCollection> collect3 = allChildList.stream().filter(x -> Constants.DATA3.equals(x.getType())).collect(Collectors.toList());
            List<DaParamCollection> collect4 = allChildList.stream().filter(x -> Constants.DATA4.equals(x.getType())).collect(Collectors.toList());
            vo.setList1(collect1);
            vo.setList2(collect2);
//            vo.setList2(collect2);
            vo.setList3(collect3);
            vo.setList4(collect4);
        }
@@ -145,8 +164,9 @@
        BsOrderScheduling bsOrderScheduling =  new BsOrderScheduling();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime plusDays = now.plusDays(1);
        LocalDateTime startTime = LocalDateTime.of(now.getYear(),now.getMonthValue(),now.getDayOfMonth(),8,0,0);
        LocalDateTime endTime = LocalDateTime.of(now.getYear(),now.getMonthValue(),now.plusDays(1).getDayOfMonth(),22,0,0);
        LocalDateTime endTime = LocalDateTime.of(now.getYear(),plusDays.getMonthValue(),plusDays.getDayOfMonth(),23,0,0);
        String s1 = startTime.format(formatter);
        String s2 = endTime.format(formatter);
        bsOrderScheduling.setStartTime(s1);
@@ -173,7 +193,7 @@
                        }
                    }
                }
                for (int i = 8; i < 23; i++) {
                for (int i = 8; i < 24; i++) {
                    if (i==8){
                        arr.add(0);
                    }else {