فهرست منبع

首页关联乐团主管

zouxuan 4 سال پیش
والد
کامیت
8024d20172

+ 5 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -4423,7 +4423,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 		//如果当前用户只有教务老师角色,那么只能看到他所管理的课程组的信息
 		if (userRole.size() == 1 && userRole.contains(SysUserRole.EDUCATIONAL_TEACHER)) {
-			params.put("classGroupIds",classGroupDao.queryGroupClassGroupIds(sysUser.getId()));
+			List<Long> classGroupIds = classGroupDao.queryGroupClassGroupIds(sysUser.getId());
+			if(classGroupIds.size() == 0){
+				return pageInfo;
+			}
+			params.put("classGroupIds",classGroupIds);
 		}
         int count = courseScheduleDao.endCountCourseSchedules(params);
         if(queryInfo.getIsExport() && count > 50000){

+ 22 - 7
mec-biz/src/main/java/com/ym/mec/biz/service/impl/IndexBaseMonthDataServiceImpl.java

@@ -361,8 +361,10 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			if (!userRole.contains(SysUserRole.SECTION_MANAGER) && !sysUser.getIsSuperAdmin()) {
 				userId = sysUser.getId();
 			}
-
-			int courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
+			int courseTimeError = 0;
+			if(classGroupIds == null || classGroupIds.size() > 0){
+				courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
+			}
 			threeChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TIME_ERROR, IndexErrorType.COURSE_TIME_ERROR.getMsg(), courseTimeError, null));
 
 			int inspectionItem = indexBaseMonthDataDao.queryInspectionItem(organIdsStr,startTime,userId);
@@ -385,10 +387,14 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			four.setDesc(IndexErrorType.ATTENDANCE_SERVE.getMsg());
 			List<IndexErrInfoDto> fourChild = new ArrayList<>();
 
-			int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime,classGroupIds);
+			int attendanceError = 0;
+			int noAttendance = 0;
+			if(classGroupIds == null || classGroupIds.size() > 0){
+				attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime,classGroupIds);
+				noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds);
+			}
 			fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError, null));
 
-			int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds);
 			fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, IndexErrorType.TEACHER_NOT_A_CLASS.getMsg(), noAttendance, null));
 
 			Map<String, Object> params = new HashMap<>();
@@ -513,7 +519,10 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			userId = sysUser.getId();
 		}
 		if(!flag3){
-			int courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
+			int courseTimeError = 0;
+			if(classGroupIds == null || classGroupIds.size() > 0){
+				courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
+			}
 			if(courseTimeError > 0){
 				flag3 = true;
 			}
@@ -540,13 +549,19 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 
 		boolean flag4 = false;
 		if(!flag4){
-			int attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime,classGroupIds);
+			int attendanceError = 0;
+			if(classGroupIds == null || classGroupIds.size() > 0){
+				attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime,classGroupIds);
+			}
 			if(attendanceError > 0){
 				flag4 = true;
 			}
 		}
 		if(!flag4){
-			int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds);
+			int noAttendance = 0;
+			if(classGroupIds == null || classGroupIds.size() > 0){
+				noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds);
+			}
 			if(noAttendance > 0){
 				flag4 = true;
 			}