소스 검색

绩效改为星级

master
PoffyZhang 1 년 전
부모
커밋
d5faf0c850
2개의 변경된 파일57개의 추가작업 그리고 30개의 파일을 삭제
  1. +5
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java
  2. +52
    -25
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java

+ 5
- 5
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java 파일 보기

@@ -65,11 +65,11 @@ public class CockpitStatsHandler {

private List<CockpitStatsVO.PerformanceTop> convertTops(CockpitStats cockpitStats) {
List<CockpitStatsVO.PerformanceTop> tops = Lists.newArrayList();
tops.add(new CockpitStatsVO.PerformanceTop("top1",cockpitStats.getPerformanceTop1Score(),cockpitStats.getPerformanceTop1Name()));
tops.add(new CockpitStatsVO.PerformanceTop("top2",cockpitStats.getPerformanceTop2Score(),cockpitStats.getPerformanceTop2Name()));
tops.add(new CockpitStatsVO.PerformanceTop("top3",cockpitStats.getPerformanceTop3Score(),cockpitStats.getPerformanceTop3Name()));
tops.add(new CockpitStatsVO.PerformanceTop("top4",cockpitStats.getPerformanceTop4Score(),cockpitStats.getPerformanceTop4Name()));
tops.add(new CockpitStatsVO.PerformanceTop("top5",cockpitStats.getPerformanceTop5Score(),cockpitStats.getPerformanceTop5Name()));
tops.add(new CockpitStatsVO.PerformanceTop("一星",cockpitStats.getPerformanceTop1Score(),cockpitStats.getPerformanceTop1Name()));
tops.add(new CockpitStatsVO.PerformanceTop("二星",cockpitStats.getPerformanceTop2Score(),cockpitStats.getPerformanceTop2Name()));
tops.add(new CockpitStatsVO.PerformanceTop("三星",cockpitStats.getPerformanceTop3Score(),cockpitStats.getPerformanceTop3Name()));
tops.add(new CockpitStatsVO.PerformanceTop("四星",cockpitStats.getPerformanceTop4Score(),cockpitStats.getPerformanceTop4Name()));
tops.add(new CockpitStatsVO.PerformanceTop("五星",cockpitStats.getPerformanceTop5Score(),cockpitStats.getPerformanceTop5Name()));
return tops;
}



+ 52
- 25
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java 파일 보기

@@ -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;


불러오는 중...
취소
저장