|
@@ -51,6 +51,8 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
@Autowired
|
|
|
private SysMessageDao sysMessageDao;
|
|
|
+ @Autowired
|
|
|
+ private StudentExtracurricularExercisesSituationDao studentExtracurricularExercisesSituationDao;
|
|
|
|
|
|
private static ThreadLocal<Set<Integer>> organIds = new ThreadLocal<Set<Integer>>(){
|
|
|
@Override
|
|
@@ -323,12 +325,6 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
three.setDesc(IndexErrorType.TEACHER_INFO.getMsg());
|
|
|
List<IndexErrInfoDto> threeChild = new ArrayList<>();
|
|
|
|
|
|
- int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime);
|
|
|
- threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError, null));
|
|
|
-
|
|
|
- int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime);
|
|
|
- threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, IndexErrorType.TEACHER_NOT_A_CLASS.getMsg(), noAttendance, null));
|
|
|
-
|
|
|
// int teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr,startTime);
|
|
|
// threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_LEAVE, IndexErrorType.TEACHER_LEAVE.getMsg(),teacherLeave, null));
|
|
|
|
|
@@ -351,6 +347,34 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
all.add(three);
|
|
|
}
|
|
|
|
|
|
+ if(IndexErrorType.ATTENDANCE_SERVE.equals(errorType)){
|
|
|
+ IndexErrInfoDto<IndexErrInfoDto> four = new IndexErrInfoDto<>();
|
|
|
+ four.setErrorType(IndexErrorType.ATTENDANCE_SERVE);
|
|
|
+ four.setDesc(IndexErrorType.ATTENDANCE_SERVE.getMsg());
|
|
|
+ List<IndexErrInfoDto> fourChild = new ArrayList<>();
|
|
|
+
|
|
|
+ int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime);
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError, null));
|
|
|
+
|
|
|
+ int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime);
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, IndexErrorType.TEACHER_NOT_A_CLASS.getMsg(), noAttendance, null));
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
|
|
|
+ LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
|
+ LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
|
|
|
+ params.put("organIds", organIds);
|
|
|
+ params.put("monday",monDayDate.toString());
|
|
|
+ params.put("sunday",sunDayDate.toString());
|
|
|
+ params.put("unDone",1);
|
|
|
+ int serveErrTeacherNum = studentExtracurricularExercisesSituationDao.countTeacherServeInfo(params);
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_SERVE_ERROR, IndexErrorType.TEACHER_SERVE_ERROR.getMsg(), serveErrTeacherNum, null));
|
|
|
+
|
|
|
+ four.setNum(fourChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
|
|
|
+ four.setResult(fourChild);
|
|
|
+ all.add(four);
|
|
|
+ }
|
|
|
+
|
|
|
Map<String, Object> result = new HashMap<>(2);
|
|
|
result.put("totalNum", all.stream().mapToInt(IndexErrInfoDto::getNum).sum());
|
|
|
result.put("data", all);
|
|
@@ -424,18 +448,6 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
resultMap.put("studentInfo",flag2);
|
|
|
boolean flag3 = false;
|
|
|
if(!flag3){
|
|
|
- int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime);
|
|
|
- if(attendanceError > 0){
|
|
|
- flag3 = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if(!flag3){
|
|
|
- int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime);
|
|
|
- if(noAttendance > 0){
|
|
|
- flag3 = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if(!flag3){
|
|
|
int teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr,startTime);
|
|
|
if(teacherLeave > 0){
|
|
|
flag3 = true;
|
|
@@ -467,6 +479,36 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
}
|
|
|
}
|
|
|
resultMap.put("teacherInfo",flag3);
|
|
|
+
|
|
|
+ boolean flag4 = false;
|
|
|
+ if(!flag4){
|
|
|
+ int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime);
|
|
|
+ if(attendanceError > 0){
|
|
|
+ flag4 = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!flag4){
|
|
|
+ int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime);
|
|
|
+ if(noAttendance > 0){
|
|
|
+ flag4 = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!flag4){
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
|
|
|
+ LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
|
+ LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
|
|
|
+ params.put("organIds", organIds);
|
|
|
+ params.put("monday",monDayDate.toString());
|
|
|
+ params.put("sunday",sunDayDate.toString());
|
|
|
+ params.put("unDone",1);
|
|
|
+ int serveErrTeacherNum = studentExtracurricularExercisesSituationDao.countTeacherServeInfo(params);
|
|
|
+ if(serveErrTeacherNum > 0){
|
|
|
+ flag4 = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ resultMap.put("attendanceServe",flag4);
|
|
|
+
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|