|
|
@ -181,9 +181,10 @@ public class QualityReportServiceImpl implements IQualityReportService {
|
|
|
|
//周
|
|
|
|
//周
|
|
|
|
else if (hashMap.get("month").equals("2")){
|
|
|
|
else if (hashMap.get("month").equals("2")){
|
|
|
|
|
|
|
|
|
|
|
|
//将时间扩充到开始时间的周一和结束时间的周末
|
|
|
|
|
|
|
|
String beginTime = getFirstDayOfWeek(String.valueOf(hashMap.get("beginBeginTime")));
|
|
|
|
Object year = String.valueOf(hashMap.get("year"));
|
|
|
|
String endTime = getLastDayOfWeek(String.valueOf(hashMap.get("endBeginTime")));
|
|
|
|
String beginTime = year + "-01-01";
|
|
|
|
|
|
|
|
String endTime = year + "-12-31";
|
|
|
|
hashMap.put("year",endTime.substring(0,4));
|
|
|
|
hashMap.put("year",endTime.substring(0,4));
|
|
|
|
hashMap.put("beginBeginTime",beginTime);
|
|
|
|
hashMap.put("beginBeginTime",beginTime);
|
|
|
|
hashMap.put("endBeginTime",endTime);
|
|
|
|
hashMap.put("endBeginTime",endTime);
|
|
|
@ -204,33 +205,19 @@ public class QualityReportServiceImpl implements IQualityReportService {
|
|
|
|
collect.get(i).setREPAIR_RATE(repairRateReports.get(i).getREPAIR_RATE()+ repairRateReports.get(i).getREPAIR_RATE());
|
|
|
|
collect.get(i).setREPAIR_RATE(repairRateReports.get(i).getREPAIR_RATE()+ repairRateReports.get(i).getREPAIR_RATE());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
collect.get(i).setINSPECTOR_TIME("第"+collect.get(i).getCOLUMN_A()+"周");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return collect;
|
|
|
|
return collect;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//月
|
|
|
|
//月
|
|
|
|
//todo 逻辑 数据库会根据每天、不合格数量、所有数量、合格率分组 拿回来根据周/月进行循环累加,然后返回给前端
|
|
|
|
|
|
|
|
else if (hashMap.get("month").equals("3")){
|
|
|
|
else if (hashMap.get("month").equals("3")){
|
|
|
|
List<RepairRateReport> repairRateReports = new ArrayList<>();
|
|
|
|
Object year = String.valueOf(hashMap.get("year"));
|
|
|
|
//将时间扩充到开始时间的月初和结束时间的月末
|
|
|
|
String beginTime = year + "-01-01";
|
|
|
|
String beginTime = String.valueOf(hashMap.get("beginBeginTime")).substring(0, 7) + "01";
|
|
|
|
String endTime = year + "-12-31";
|
|
|
|
String endTime = String.valueOf(hashMap.get("endBeginTime")).substring(0, 7) + "31";
|
|
|
|
|
|
|
|
hashMap.put("beginBeginTime",beginTime);
|
|
|
|
hashMap.put("beginBeginTime",beginTime);
|
|
|
|
hashMap.put("endBeginTime",endTime);
|
|
|
|
hashMap.put("endBeginTime",endTime);
|
|
|
|
if (beginTime.substring(0,4).equals(endTime.substring(0,4))){
|
|
|
|
List<RepairRateReport> repairRateReports = reportMapper.repairRateReportListMONTH(hashMap);
|
|
|
|
hashMap.put("year",endTime.substring(0,4));
|
|
|
|
|
|
|
|
repairRateReports = reportMapper.repairRateReportListMONTH(hashMap);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
hashMap.put("year",beginTime.substring(0,4));
|
|
|
|
|
|
|
|
List<RepairRateReport> repairRateReports1 = reportMapper.repairRateReportListMONTH(hashMap);
|
|
|
|
|
|
|
|
hashMap.put("year",endTime.substring(0,4));
|
|
|
|
|
|
|
|
List<RepairRateReport> repairRateReports2 = reportMapper.repairRateReportListMONTH(hashMap);
|
|
|
|
|
|
|
|
repairRateReports.addAll(repairRateReports1);
|
|
|
|
|
|
|
|
repairRateReports.addAll(repairRateReports2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RepairRateReport> collect = repairRateReports.stream().collect(Collectors.collectingAndThen(
|
|
|
|
List<RepairRateReport> collect = repairRateReports.stream().collect(Collectors.collectingAndThen(
|
|
|
|
Collectors.toCollection(()->new TreeSet<>(Comparator.comparing(RepairRateReport::getCOLUMN_A))),ArrayList::new
|
|
|
|
Collectors.toCollection(()->new TreeSet<>(Comparator.comparing(RepairRateReport::getCOLUMN_A))),ArrayList::new
|
|
|
|
));
|
|
|
|
));
|
|
|
@ -247,7 +234,7 @@ public class QualityReportServiceImpl implements IQualityReportService {
|
|
|
|
collect.get(i).setREPAIR_RATE(repairRateReports.get(i).getREPAIR_RATE()+ repairRateReports.get(i).getREPAIR_RATE());
|
|
|
|
collect.get(i).setREPAIR_RATE(repairRateReports.get(i).getREPAIR_RATE()+ repairRateReports.get(i).getREPAIR_RATE());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
collect.get(i).setINSPECTOR_TIME(collect.get(i).getINSPECTOR_TIME().substring(0,7));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return collect;
|
|
|
|
return collect;
|
|
|
|
}
|
|
|
|
}
|
|
|
|