|
@@ -113,7 +113,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
}
|
|
|
typeDateMapEntry.getValue().sort(Comparator.comparing(IndexBaseMonthData::getMonth));
|
|
|
if(IndexDataType.ACTIVATION_RATE.equals(typeDateMapEntry.getKey())||IndexDataType.HOMEWORK_CREATE_RATE.equals(typeDateMapEntry.getKey())
|
|
|
- ||IndexDataType.HOMEWORK_SUBMIT_RATE.equals(typeDateMapEntry.getKey())||IndexDataType.HOMEWORK_SUBMIT_RATE.equals(typeDateMapEntry.getKey())
|
|
|
+ ||IndexDataType.HOMEWORK_SUBMIT_RATE.equals(typeDateMapEntry.getKey())||IndexDataType.HOMEWORK_COMMENT_RATE.equals(typeDateMapEntry.getKey())
|
|
|
||IndexDataType.STUDENT_CONVERSION.equals(typeDateMapEntry.getKey())){
|
|
|
for (IndexBaseMonthData indexBaseMonthData : typeDateMapEntry.getValue()) {
|
|
|
if(indexBaseMonthData.getTotalNum().compareTo(BigDecimal.ZERO)==0){
|
|
@@ -305,20 +305,51 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<IndexErrInfoDto> getIndexErrData(String organIdsStr) {
|
|
|
+ public Map<String, Object> getIndexErrData(String organIdsStr) {
|
|
|
Set<Integer> organIds = null;
|
|
|
if(StringUtils.isNotBlank(organIdsStr)){
|
|
|
organIds = Arrays.stream(organIdsStr.split(",")).map(Integer::new).collect(Collectors.toSet());
|
|
|
}
|
|
|
|
|
|
- List<IndexErrInfoDto> result = new ArrayList<>();
|
|
|
+ List<IndexErrInfoDto> all = new ArrayList<>();
|
|
|
+
|
|
|
+ IndexErrInfoDto<IndexErrInfoDto> one = new IndexErrInfoDto<>();
|
|
|
+ one.setErrorType(IndexErrorType.MUSIC_PATROL);
|
|
|
+ one.setDesc(IndexErrorType.MUSIC_PATROL.getMsg());
|
|
|
+ List<IndexErrInfoDto> oneChild = new ArrayList<>();
|
|
|
+
|
|
|
+ oneChild.add(new IndexErrInfoDto(IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE, IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE.getMsg(), indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds), indexBaseMonthDataDao.getLessThenThreeMusicGroup(organIds)));
|
|
|
+ one.setNum(oneChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
|
|
|
+ one.setResult(oneChild);
|
|
|
+ all.add(one);
|
|
|
+
|
|
|
+
|
|
|
+ IndexErrInfoDto<IndexErrInfoDto> two = new IndexErrInfoDto<>();
|
|
|
+ two.setErrorType(IndexErrorType.STUDENT_INFO);
|
|
|
+ two.setDesc(IndexErrorType.STUDENT_INFO.getMsg());
|
|
|
+ List<IndexErrInfoDto> twoChild = new ArrayList<>();
|
|
|
+
|
|
|
+ twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds), indexBaseMonthDataDao.getNoPaymentMusicGroup(organIds)));
|
|
|
+ twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP, IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP.getMsg(), indexBaseMonthDataDao.countApplyForQuitGroupNum(organIds), null));
|
|
|
+ twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TRUANT_STUDENT_NUM, IndexErrorType.COURSE_TRUANT_STUDENT_NUM.getMsg(), indexBaseMonthDataDao.countStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode()), null));
|
|
|
+ twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_LEAVE_STUDENT_NUM, IndexErrorType.COURSE_LEAVE_STUDENT_NUM.getMsg(), indexBaseMonthDataDao.countStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode()), null));
|
|
|
+ two.setNum(twoChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
|
|
|
+ two.setResult(twoChild);
|
|
|
+ all.add(two);
|
|
|
|
|
|
- result.add(new IndexErrInfoDto(IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE, IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE.getMsg(), indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds), indexBaseMonthDataDao.getLessThenThreeMusicGroup(organIds)));
|
|
|
|
|
|
- result.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds), indexBaseMonthDataDao.getNoPaymentMusicGroup(organIds)));
|
|
|
+ IndexErrInfoDto<IndexErrInfoDto> three = new IndexErrInfoDto<>();
|
|
|
+ three.setErrorType(IndexErrorType.TEACHER_INFO);
|
|
|
+ three.setDesc(IndexErrorType.TEACHER_INFO.getMsg());
|
|
|
+ List<IndexErrInfoDto> threeChild = new ArrayList<>();
|
|
|
|
|
|
- result.add(new IndexErrInfoDto(IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP, IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP.getMsg(), indexBaseMonthDataDao.countApplyForQuitGroupNum(organIds), null));
|
|
|
+ three.setNum(threeChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
|
|
|
+ three.setResult(threeChild);
|
|
|
+ all.add(three);
|
|
|
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("totalNum", all.stream().mapToInt(IndexErrInfoDto::getNum).sum());
|
|
|
+ result.put("data", all);
|
|
|
return result;
|
|
|
}
|
|
|
|