|
@@ -340,6 +340,8 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
|
|
|
@Override
|
|
|
public Map<String, Object> getIndexErrData(String organIdsStr, IndexErrorType errorType) {
|
|
|
+ //只筛选指定时间之后的数据
|
|
|
+ String startTime = "2020-12-01";
|
|
|
Set<Integer> organIds = null;
|
|
|
if(StringUtils.isNotBlank(organIdsStr)){
|
|
|
organIds = Arrays.stream(organIdsStr.split(",")).map(Integer::new).collect(Collectors.toSet());
|
|
@@ -354,7 +356,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
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)));
|
|
|
+ oneChild.add(new IndexErrInfoDto(IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE, IndexErrorType.HIGH_CLASS_STUDENT_LESS_THAN_THREE.getMsg(), indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds,startTime), indexBaseMonthDataDao.getLessThenThreeMusicGroup(organIds,startTime)));
|
|
|
List<Long> errInspection = indexBaseMonthDataDao.queryErrInspection(organIds);
|
|
|
oneChild.add(new IndexErrInfoDto(IndexErrorType.MUSIC_PATROL_ITEM, IndexErrorType.MUSIC_PATROL_ITEM.getMsg(),errInspection.size(), errInspection));
|
|
|
|
|
@@ -373,12 +375,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
List<IndexErrInfoDto> twoChild = new ArrayList<>();
|
|
|
|
|
|
|
|
|
- twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds), indexBaseMonthDataDao.getNoPaymentMusicGroup(organIds)));
|
|
|
- List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds);
|
|
|
+ twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds,startTime), indexBaseMonthDataDao.getNoPaymentMusicGroup(organIds,startTime)));
|
|
|
+ List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds,startTime);
|
|
|
twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP, IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP.getMsg(), quitGroupNum.size(), quitGroupNum));
|
|
|
- List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),firstDayOfMonth);
|
|
|
+ List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),firstDayOfMonth,startTime);
|
|
|
twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TRUANT_STUDENT_NUM, IndexErrorType.COURSE_TRUANT_STUDENT_NUM.getMsg(), attendanceInfo.size(), attendanceInfo));
|
|
|
- List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),null);
|
|
|
+ List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),null,startTime);
|
|
|
twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_LEAVE_STUDENT_NUM, IndexErrorType.COURSE_LEAVE_STUDENT_NUM.getMsg(), attendanceInfo1.size(), attendanceInfo1));
|
|
|
two.setNum(twoChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
|
|
|
two.setResult(twoChild);
|
|
@@ -391,13 +393,13 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
three.setDesc(IndexErrorType.TEACHER_INFO.getMsg());
|
|
|
List<IndexErrInfoDto> threeChild = new ArrayList<>();
|
|
|
|
|
|
- List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,firstDayOfMonth);
|
|
|
+ List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,firstDayOfMonth,startTime);
|
|
|
threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError.size(), attendanceError));
|
|
|
|
|
|
- List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,firstDayOfMonth);
|
|
|
+ List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,firstDayOfMonth,startTime);
|
|
|
threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, IndexErrorType.TEACHER_NOT_A_CLASS.getMsg(), noAttendance.size(), noAttendance));
|
|
|
|
|
|
- List<Long> teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr);
|
|
|
+ List<Long> teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr,startTime);
|
|
|
threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_LEAVE, IndexErrorType.TEACHER_LEAVE.getMsg(),teacherLeave.size(), teacherLeave));
|
|
|
|
|
|
String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
@@ -455,6 +457,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
|
|
|
@Override
|
|
|
public Map<String,Boolean> hasIndexErrData(String organIdsStr) {
|
|
|
+ String startTime = "2020-12-01";
|
|
|
Map<String,Boolean> resultMap = new HashMap<>();
|
|
|
Set<Integer> organIds = null;
|
|
|
if(StringUtils.isNotBlank(organIdsStr)){
|
|
@@ -462,7 +465,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
}
|
|
|
Date date = new Date();
|
|
|
boolean flag1 = false;
|
|
|
- int countLessThenThreeClassGroupNum = indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds);
|
|
|
+ int countLessThenThreeClassGroupNum = indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds,startTime);
|
|
|
if(countLessThenThreeClassGroupNum > 0){
|
|
|
flag1 = true;
|
|
|
}
|
|
@@ -476,25 +479,25 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
boolean flag2 = false;
|
|
|
Date firstDayOfMonth = DateUtil.getFirstDayOfMonth(DateUtil.addMonths(date, -1));
|
|
|
if(!flag2){
|
|
|
- int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds);
|
|
|
+ int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds,startTime);
|
|
|
if(countNoPaymentStudentNum > 0){
|
|
|
flag2 = true;
|
|
|
}
|
|
|
}
|
|
|
if(!flag2){
|
|
|
- List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds);
|
|
|
+ List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds,startTime);
|
|
|
if(quitGroupNum.size() > 0){
|
|
|
flag2 = true;
|
|
|
}
|
|
|
}
|
|
|
if(!flag2){
|
|
|
- List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),firstDayOfMonth);
|
|
|
+ List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),firstDayOfMonth,startTime);
|
|
|
if(attendanceInfo.size() > 0){
|
|
|
flag2 = true;
|
|
|
}
|
|
|
}
|
|
|
if(!flag2){
|
|
|
- List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),null);
|
|
|
+ List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),null,startTime);
|
|
|
if(attendanceInfo1.size() > 0){
|
|
|
flag2 = true;
|
|
|
}
|
|
@@ -502,19 +505,19 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
resultMap.put("studentInfo",flag2);
|
|
|
boolean flag3 = false;
|
|
|
if(!flag3){
|
|
|
- List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,firstDayOfMonth);
|
|
|
+ List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,firstDayOfMonth,startTime);
|
|
|
if(attendanceError.size() > 0){
|
|
|
flag3 = true;
|
|
|
}
|
|
|
}
|
|
|
if(!flag3){
|
|
|
- List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,firstDayOfMonth);
|
|
|
+ List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,firstDayOfMonth,startTime);
|
|
|
if(noAttendance.size() > 0){
|
|
|
flag3 = true;
|
|
|
}
|
|
|
}
|
|
|
if(!flag3){
|
|
|
- List<Long> teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr);
|
|
|
+ List<Long> teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr,startTime);
|
|
|
if(teacherLeave.size() > 0){
|
|
|
flag3 = true;
|
|
|
}
|