|
|
@@ -317,7 +317,8 @@ public class CockpitStatsStatisticsTask { |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
List<String> inAccpetCodes = inAccpetProjects.stream().map(Project::getProjectCode).collect(Collectors.toList()); |
|
|
|
List<PerformanceAppraisalProject> performances = performanceAppraisalProjectService.list(Wrappers.lambdaQuery(PerformanceAppraisalProject.class) |
|
|
|
.in(PerformanceAppraisalProject::getProjectCode, inAccpetCodes) |
|
|
|
.in(CollUtil.isNotEmpty(inAccpetCodes),PerformanceAppraisalProject::getProjectCode, inAccpetCodes) |
|
|
|
.in(CollUtil.isEmpty(inAccpetCodes),PerformanceAppraisalProject::getProjectCode, Lists.newArrayList("NONE")) |
|
|
|
.isNotNull(PerformanceAppraisalProject::getVerifyTotalScore)); |
|
|
|
cockpitStats.setProjectsTotalAccept(inAccpetProjects.size() - performances.size()); |
|
|
|
cockpitStats.setProjectsTotalPerformance(performances.size()); |
|
|
@@ -388,34 +389,60 @@ public class CockpitStatsStatisticsTask { |
|
|
|
return Boolean.FALSE; |
|
|
|
}).sorted(Comparator.comparing(PerformanceAppraisalProject::getVerifyTotalScore).reversed()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<PerformanceAppraisalProject> start5 = performanceAll.stream().filter(p -> { |
|
|
|
if (Objects.nonNull(p.getVerifyTotalScore()) |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.valueOf(80)) > 0) { |
|
|
|
return Boolean.TRUE; |
|
|
|
} |
|
|
|
return Boolean.FALSE; |
|
|
|
}).sorted(Comparator.comparing(PerformanceAppraisalProject::getVerifyTotalScore).reversed()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
List<PerformanceAppraisalProject> start4 = performanceAll.stream().filter(p -> { |
|
|
|
if (Objects.nonNull(p.getVerifyTotalScore()) |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.valueOf(60)) >= 0 |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.valueOf(80)) < 0) { |
|
|
|
return Boolean.TRUE; |
|
|
|
} |
|
|
|
return Boolean.FALSE; |
|
|
|
}).sorted(Comparator.comparing(PerformanceAppraisalProject::getVerifyTotalScore).reversed()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
List<PerformanceAppraisalProject> start3 = performanceAll.stream().filter(p -> { |
|
|
|
if (Objects.nonNull(p.getVerifyTotalScore()) |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.valueOf(40)) >= 0 |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.valueOf(60)) < 0) { |
|
|
|
return Boolean.TRUE; |
|
|
|
} |
|
|
|
return Boolean.FALSE; |
|
|
|
}).sorted(Comparator.comparing(PerformanceAppraisalProject::getVerifyTotalScore).reversed()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
List<PerformanceAppraisalProject> start2 = performanceAll.stream().filter(p -> { |
|
|
|
if (Objects.nonNull(p.getVerifyTotalScore()) |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.valueOf(20)) >= 0 |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.valueOf(40)) < 0) { |
|
|
|
return Boolean.TRUE; |
|
|
|
} |
|
|
|
return Boolean.FALSE; |
|
|
|
}).sorted(Comparator.comparing(PerformanceAppraisalProject::getVerifyTotalScore).reversed()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
List<PerformanceAppraisalProject> start1 = performanceAll.stream().filter(p -> { |
|
|
|
if (Objects.nonNull(p.getVerifyTotalScore()) |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.ZERO) >= 0 |
|
|
|
&& p.getVerifyTotalScore().compareTo(BigDecimal.valueOf(20)) < 0) { |
|
|
|
return Boolean.TRUE; |
|
|
|
} |
|
|
|
return Boolean.FALSE; |
|
|
|
}).sorted(Comparator.comparing(PerformanceAppraisalProject::getVerifyTotalScore).reversed()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
cockpitStats.setPerformanceTotal(performanceAll.size()); |
|
|
|
cockpitStats.setPerformanceReviewedTotal(verified.size()); |
|
|
|
cockpitStats.setPerformanceTobeReviewTotal(performanceAll.size() - verified.size()); |
|
|
|
|
|
|
|
if(verified.size() > 0){ |
|
|
|
cockpitStats.setPerformanceTop1Name(projectMap.get(verified.get(0).getProjectCode())); |
|
|
|
cockpitStats.setPerformanceTop1Score(verified.get(0).getVerifyTotalScore()); |
|
|
|
} |
|
|
|
|
|
|
|
if(verified.size() > 1){ |
|
|
|
cockpitStats.setPerformanceTop2Name(verified.get(1).getProjectCode()); |
|
|
|
cockpitStats.setPerformanceTop2Score(verified.get(1).getVerifyTotalScore()); |
|
|
|
} |
|
|
|
|
|
|
|
if(verified.size() > 2){ |
|
|
|
cockpitStats.setPerformanceTop3Name(verified.get(2).getProjectCode()); |
|
|
|
cockpitStats.setPerformanceTop3Score(verified.get(2).getVerifyTotalScore()); |
|
|
|
} |
|
|
|
|
|
|
|
if(verified.size() > 3){ |
|
|
|
cockpitStats.setPerformanceTop4Name(verified.get(3).getProjectCode()); |
|
|
|
cockpitStats.setPerformanceTop4Score(verified.get(3).getVerifyTotalScore()); |
|
|
|
} |
|
|
|
|
|
|
|
if(verified.size() > 4){ |
|
|
|
cockpitStats.setPerformanceTop5Name(verified.get(4).getProjectCode()); |
|
|
|
cockpitStats.setPerformanceTop5Score(verified.get(4).getVerifyTotalScore()); |
|
|
|
} |
|
|
|
cockpitStats.setPerformanceTop1Score(BigDecimal.valueOf(start1.size())); |
|
|
|
cockpitStats.setPerformanceTop2Score(BigDecimal.valueOf(start2.size())); |
|
|
|
cockpitStats.setPerformanceTop3Score(BigDecimal.valueOf(start3.size())); |
|
|
|
cockpitStats.setPerformanceTop4Score(BigDecimal.valueOf(start4.size())); |
|
|
|
cockpitStats.setPerformanceTop5Score(BigDecimal.valueOf(start5.size())); |
|
|
|
} |
|
|
|
|
|
|
|
return cockpitStats; |
|
|
|