|
@@ -142,21 +142,21 @@ public class MakrerApi {
|
|
@Override
|
|
@Override
|
|
public Map<String, Long> call() throws Exception {
|
|
public Map<String, Long> call() throws Exception {
|
|
Map<String, Long> map = new HashMap<>();
|
|
Map<String, Long> map = new HashMap<>();
|
|
- //当前老师当前试卷的评档次数(不分档位)
|
|
|
|
|
|
+ //当前老师当前批次试卷总数
|
|
long kdtotal;
|
|
long kdtotal;
|
|
if (ParamCache.paramMap.get(marker.getWorkId()).getLevelShowAllPaper() == 1) {
|
|
if (ParamCache.paramMap.get(marker.getWorkId()).getLevelShowAllPaper() == 1) {
|
|
kdtotal = markTaskRepo.countByQuestionIdAll(questionId, marker.getId());
|
|
kdtotal = markTaskRepo.countByQuestionIdAll(questionId, marker.getId());
|
|
} else {
|
|
} else {
|
|
kdtotal = markTaskRepo.countByQuestionId(questionId, batchNo, marker.getId());
|
|
kdtotal = markTaskRepo.countByQuestionId(questionId, batchNo, marker.getId());
|
|
}
|
|
}
|
|
- //当前老师所有的评档次数(不分档位)
|
|
|
|
|
|
+ //当前考区内试卷总数
|
|
long total = paperRepo.countByWorkIdAndQuestionId(markSubject.getWorkId(), questionId);
|
|
long total = paperRepo.countByWorkIdAndQuestionId(markSubject.getWorkId(), questionId);
|
|
map.put("kdtotal", kdtotal);
|
|
map.put("kdtotal", kdtotal);
|
|
map.put("total", total);
|
|
map.put("total", total);
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- //统计workId下各考点的数量
|
|
|
|
|
|
+ //当前考区各档位定档数量
|
|
paperRepo.countGroupByLevel(questionId, batchNo)
|
|
paperRepo.countGroupByLevel(questionId, batchNo)
|
|
.forEach(o -> {
|
|
.forEach(o -> {
|
|
LevelStatDTO levelStatDTO = levelStatAssembler.toDTO(o);
|
|
LevelStatDTO levelStatDTO = levelStatAssembler.toDTO(o);
|
|
@@ -173,14 +173,6 @@ public class MakrerApi {
|
|
int rejectCount = markTaskRepo.countByQuestionIdAndMarkerIdAndStageAndIsRejectedTrueAndIsMissing(questionId, marker.getId(), MarkStage.LEVEL.ordinal(), false);
|
|
int rejectCount = markTaskRepo.countByQuestionIdAndMarkerIdAndStageAndIsRejectedTrueAndIsMissing(questionId, marker.getId(), MarkStage.LEVEL.ordinal(), false);
|
|
levelStatDTO.setCount(count);
|
|
levelStatDTO.setCount(count);
|
|
levelStatDTO.setRejected(rejectCount);
|
|
levelStatDTO.setRejected(rejectCount);
|
|
- } else {
|
|
|
|
- int count;
|
|
|
|
- if (ParamCache.paramMap.get(marker.getWorkId()).getLevelShowAllPaper() == 1) {
|
|
|
|
- count = markTaskRepo.countByQuestionIdAndStageAndResultAndIsMissingAll(questionId, MarkStage.LEVEL.ordinal(), levelStatDTO.getId().toString(), false, marker.getId());
|
|
|
|
- } else {
|
|
|
|
- count = markTaskRepo.countByQuestionIdAndStageAndResultAndIsMissing(questionId, MarkStage.LEVEL.ordinal(), levelStatDTO.getId().toString(), false, batchNo, marker.getId());
|
|
|
|
- }
|
|
|
|
- levelStatDTO.setCount(count);
|
|
|
|
}
|
|
}
|
|
levelStatDTOs.add(levelStatDTO);
|
|
levelStatDTOs.add(levelStatDTO);
|
|
});
|
|
});
|
|
@@ -194,14 +186,13 @@ public class MakrerApi {
|
|
dto.setPercent(0.0);
|
|
dto.setPercent(0.0);
|
|
|
|
|
|
//当前老师当前档位评档次数(所有考试)
|
|
//当前老师当前档位评档次数(所有考试)
|
|
- int countNew;
|
|
|
|
- if (ParamCache.paramMap.get(marker.getWorkId()).getLevelShowAllPaper() == 1) {
|
|
|
|
- countNew = markTaskRepo.countByQuestionIdAndStageAndResultAndIsMissingAll(questionId, MarkStage.LEVEL.ordinal(), level.getCode(), false, marker.getId());
|
|
|
|
- } else {
|
|
|
|
- countNew = markTaskRepo.countByQuestionIdAndStageAndResultAndIsMissing(questionId, MarkStage.LEVEL.ordinal(), level.getCode(), false, batchNo, marker.getId());
|
|
|
|
- }
|
|
|
|
-// dto.setPercent(countNew == 0 ? 0D : dto.getPercent());
|
|
|
|
- dto.setCount(countNew);
|
|
|
|
|
|
+// int countNew;
|
|
|
|
+// if (ParamCache.paramMap.get(marker.getWorkId()).getLevelShowAllPaper() == 1) {
|
|
|
|
+//// countNew = markTaskRepo.countByQuestionIdAndStageAndResultAndIsMissingAll(questionId, MarkStage.LEVEL.ordinal(), level.getCode(), false, marker.getId());
|
|
|
|
+// } else {
|
|
|
|
+// countNew = markTaskRepo.countByQuestionIdAndStageAndResultAndIsMissing(questionId, MarkStage.LEVEL.ordinal(), level.getCode(), false, batchNo, marker.getId());
|
|
|
|
+// }
|
|
|
|
+// dto.setCount(countNew);
|
|
levelStatDTOs.add(dto);
|
|
levelStatDTOs.add(dto);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -220,25 +211,39 @@ public class MakrerApi {
|
|
long finalTotal = total;
|
|
long finalTotal = total;
|
|
levelStatDTOs.forEach(o -> {
|
|
levelStatDTOs.forEach(o -> {
|
|
if (o.getId() != null) {
|
|
if (o.getId() != null) {
|
|
|
|
+ //当前老师各档位数量
|
|
|
|
+ int countNew;
|
|
|
|
+ if (ParamCache.paramMap.get(marker.getWorkId()).getLevelShowAllPaper() == 1) {
|
|
|
|
+// count = markTaskRepo.countByQuestionIdAndStageAndResultAndIsMissingAll(questionId, MarkStage.LEVEL.ordinal(), levelStatDTO.getId().toString(), false, marker.getId());
|
|
|
|
+ countNew = markTaskRepo.countByQuestionIdAndMarkerIdAndStageAndResultAll(questionId, marker.getId(), MarkStage.LEVEL.ordinal(), String.valueOf(o.getId()));
|
|
|
|
+ } else {
|
|
|
|
+// count = markTaskRepo.countByQuestionIdAndStageAndResultAndIsMissing(questionId, MarkStage.LEVEL.ordinal(), levelStatDTO.getId().toString(), false, batchNo, marker.getId());
|
|
|
|
+ countNew = markTaskRepo.countByQuestionIdAndMarkerIdAndStageAndResult(questionId, marker.getId(), MarkStage.LEVEL.ordinal(), String.valueOf(o.getId()), batchNo);
|
|
|
|
+ }
|
|
|
|
+ o.setCount(countNew);
|
|
|
|
+ //该档位考区内已定档数量
|
|
|
|
+ long gcountNew = paperRepo.countByWorkIdAndSubjectAndQuestionIdAndLevel(marker.getWorkId(), markSubject.getSubject(), questionId, String.valueOf(o.getId()));
|
|
|
|
+ o.setGcount((int) gcountNew);
|
|
|
|
+
|
|
o.setPt(levelMap.get(o.getId()).getPt());
|
|
o.setPt(levelMap.get(o.getId()).getPt());
|
|
o.setKdpt(levelMap.get(o.getId()).getKdpt());
|
|
o.setKdpt(levelMap.get(o.getId()).getKdpt());
|
|
o.setCount(Objects.isNull(o.getCount()) ? 0 : o.getCount());
|
|
o.setCount(Objects.isNull(o.getCount()) ? 0 : o.getCount());
|
|
- double p = finalKdtotal == 0 ? 0 : (double) o.getCount() / finalKdtotal;
|
|
|
|
|
|
+ double p = finalKdtotal == 0 ? 0 : (double) o.getCount() / finalKdtotal * 100;
|
|
BigDecimal bd = new BigDecimal(p).setScale(3, RoundingMode.HALF_EVEN);
|
|
BigDecimal bd = new BigDecimal(p).setScale(3, RoundingMode.HALF_EVEN);
|
|
o.setPercent(bd.doubleValue());
|
|
o.setPercent(bd.doubleValue());
|
|
|
|
|
|
o.setGcount(Objects.isNull(o.getGcount()) ? 0 : o.getGcount());
|
|
o.setGcount(Objects.isNull(o.getGcount()) ? 0 : o.getGcount());
|
|
- double gp = finalTotal == 0 ? 0 : (double) o.getGcount() / finalTotal;
|
|
|
|
|
|
+ double gp = finalTotal == 0 ? 0 : (double) o.getGcount() / finalTotal * 100;
|
|
BigDecimal gbd = new BigDecimal(gp).setScale(3, RoundingMode.HALF_EVEN);
|
|
BigDecimal gbd = new BigDecimal(gp).setScale(3, RoundingMode.HALF_EVEN);
|
|
o.setGpercent(gbd.doubleValue());
|
|
o.setGpercent(gbd.doubleValue());
|
|
- int count;
|
|
|
|
- if (ParamCache.paramMap.get(marker.getWorkId()).getLevelShowAllPaper() == 1) {
|
|
|
|
- count = markTaskRepo.countByQuestionIdAndMarkerIdAndStageAndResultAll(questionId, marker.getId(), MarkStage.LEVEL.ordinal(), o.getId().toString());
|
|
|
|
- } else {
|
|
|
|
- count = markTaskRepo.countByQuestionIdAndMarkerIdAndStageAndResult(questionId, marker.getId(), MarkStage.LEVEL.ordinal(), o.getId().toString(), batchNo);
|
|
|
|
- }
|
|
|
|
- o.setPercent(count == 0 ? 0 : o.getPercent());
|
|
|
|
- o.setCount(count);
|
|
|
|
|
|
+// int count;
|
|
|
|
+// if (ParamCache.paramMap.get(marker.getWorkId()).getLevelShowAllPaper() == 1) {
|
|
|
|
+// count = markTaskRepo.countByQuestionIdAndMarkerIdAndStageAndResultAll(questionId, marker.getId(), MarkStage.LEVEL.ordinal(), o.getId().toString());
|
|
|
|
+// } else {
|
|
|
|
+// count = markTaskRepo.countByQuestionIdAndMarkerIdAndStageAndResult(questionId, marker.getId(), MarkStage.LEVEL.ordinal(), o.getId().toString(), batchNo);
|
|
|
|
+// }
|
|
|
|
+// o.setPercent(count == 0 ? 0 : o.getPercent());
|
|
|
|
+// o.setCount(count);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
Collections.sort(levelStatDTOs, (o1, o2) -> {
|
|
Collections.sort(levelStatDTOs, (o1, o2) -> {
|