| | |
| | | } |
| | | |
| | | @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){ |
| | | String[] conditions = bsOrderScheduling.getDateConditions(); |
| | | bsOrderScheduling.setStartTime(conditions[0]); |
| | | bsOrderScheduling.setEndTime(conditions[1]); |
| | | } |
| | | return bsOrderSchedulingMapper.selectBsOrderSchedulingPage(bsOrderScheduling); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling) |
| | | { |
| | | FollowReportVO vo = new FollowReportVO(); |
| | |
| | | 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); |
| | | } |
| | |
| | | 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); |
| | | bsOrderScheduling.setEndTime(s2); |
| | | List<BsOrderScheduling> todayList = bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling); |
| | | todayList = todayList.stream().filter(x -> ObjectUtil.isNotEmpty(x.getCvtOfflineTime())).collect(Collectors.toList()); |
| | | todayList = todayList.stream().filter(x -> ObjectUtil.isNotEmpty(x.getFinalAssemblyOfflineTime())).collect(Collectors.toList()); |
| | | if (CollUtil.isNotEmpty(todayList)){ |
| | | List<String> allModel = todayList.stream().map(BsOrderScheduling::getModel).distinct().collect(Collectors.toList()); |
| | | Map<String, List<BsOrderScheduling>> collect = new HashMap<>(); |
| | |
| | | List<Integer> arr = new ArrayList<>(); |
| | | vo.setName(s); |
| | | collect = todayList.stream().filter(x -> s.equals(x.getModel())).collect(Collectors.groupingBy(item -> new SimpleDateFormat("yyyy-MM-dd HH").format(item |
| | | .getCvtOfflineTime()))); |
| | | .getFinalAssemblyOfflineTime()))); |
| | | Map<Integer,Integer> temp = new HashMap<>(); |
| | | if (CollUtil.isNotEmpty(collect)){ |
| | | for (String string : collect.keySet()) { |
| | |
| | | } |
| | | } |
| | | } |
| | | for (int i = 8; i < 23; i++) { |
| | | for (int i = 8; i < 24; i++) { |
| | | if (i==8){ |
| | | arr.add(0); |
| | | }else { |