ソースを参照

Merge branch 'online1' of http://git.dayaedu.com/yonge/mec into 2021-04-28

zouxuan 4 年 前
コミット
3601cc1cfd

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherAttendancesDto.java

@@ -35,6 +35,9 @@ public class TeacherAttendancesDto {
     @ApiModelProperty(value = "课程名",required = false)
     private String courseScheduleName;
 
+    @ApiModelProperty(value = "处理意见",required = false)
+    private String disposeContent;
+
     @ApiModelProperty(value = "课程状态",required = false)
     private CourseStatusEnum courseScheduleStatus;
 
@@ -76,6 +79,14 @@ public class TeacherAttendancesDto {
     @ApiModelProperty(value = "申述处理状态",required = false)
     private ComplaintsStatusEnum complaintsStatus;
 
+    public String getDisposeContent() {
+        return disposeContent;
+    }
+
+    public void setDisposeContent(String disposeContent) {
+        this.disposeContent = disposeContent;
+    }
+
     public Long getTeacherAttendanceId() {
         return teacherAttendanceId;
     }

+ 29 - 31
mec-biz/src/main/java/com/ym/mec/biz/service/impl/IndexBaseMonthDataServiceImpl.java

@@ -455,26 +455,11 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			three.setDesc(IndexErrorType.TEACHER_INFO.getMsg());
 			List<IndexErrInfoDto> threeChild = new ArrayList<>();
 
-//			int teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr,startTime);
-//			threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_LEAVE, IndexErrorType.TEACHER_LEAVE.getMsg(),teacherLeave, null));
-
-			String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
-
-			//全职未离职老师
-			//预计课酬较低
-			int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIdsStr,monthStr);
-			threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW, IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW.getMsg(),lowTeacherSalary, null));
-
 			//课程时间安排异常
 			Integer userId = null;
 			if (!userRole.contains(SysUserRole.SECTION_MANAGER) && !sysUser.getIsSuperAdmin()) {
 				userId = sysUser.getId();
 			}
-			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);
@@ -502,10 +487,21 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			//课程考勤异常
 			int attendanceError = 0;
 			int noAttendance = 0;
+			//课程时间安排异常
+			int courseTimeError = 0;
 			if(classGroupIds == null || classGroupIds.size() > 0){
 				attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime,classGroupIds);
 				noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds);
+				courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
 			}
+			String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
+			//全职未离职老师
+			//预计课酬较低
+			int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIdsStr,monthStr);
+			fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW, IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW.getMsg(),lowTeacherSalary, null));
+
+			fourChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TIME_ERROR, IndexErrorType.COURSE_TIME_ERROR.getMsg(), courseTimeError, null));
+
 			fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError, null));
 
 			//课程异常
@@ -858,26 +854,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 				flag3 = true;
 			}
 		}
-		if(!flag3){
-			String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
-			int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIdsStr,monthStr);
-			if(lowTeacherSalary > 0){
-				flag3 = true;
-			}
-		}
+
 		Integer userId = null;
 		if (!userRole.contains(SysUserRole.SECTION_MANAGER) && !sysUser.getIsSuperAdmin()) {
 			userId = sysUser.getId();
 		}
-		if(!flag3){
-			int courseTimeError = 0;
-			if(classGroupIds == null || classGroupIds.size() > 0){
-				courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
-			}
-			if(courseTimeError > 0){
-				flag3 = true;
-			}
-		}
+
 		if(!flag3){
 			int inspectionItem = indexBaseMonthDataDao.queryInspectionItem(organIdsStr,startTime,userId);
 			if(inspectionItem > 0){
@@ -900,6 +882,22 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 
 		boolean flag4 = false;
 		if(!flag4){
+			String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
+			int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIdsStr,monthStr);
+			if(lowTeacherSalary > 0){
+				flag4 = true;
+			}
+		}
+		if(!flag4){
+			int courseTimeError = 0;
+			if(classGroupIds == null || classGroupIds.size() > 0){
+				courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
+			}
+			if(courseTimeError > 0){
+				flag4 = true;
+			}
+		}
+		if(!flag4){
 			int attendanceError = 0;
 			if(classGroupIds == null || classGroupIds.size() > 0){
 				attendanceError = indexBaseMonthDataDao.getAttendanceError(organIds,startTime,classGroupIds);

+ 6 - 2
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -1188,12 +1188,14 @@
 			COUNT( sr.user_id_ ) num2
 		FROM
 			student_registration sr
-				LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
-				LEFT JOIN class_group_student_mapper cgsm ON cgsm.group_type_='MUSIC' AND cgsm.music_group_id_=sr.music_group_id_ AND cgsm.user_id_=sr.user_id_ AND cgsm.status_='NORMAL'
+			LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
+			LEFT JOIN `subject` sub ON sr.actual_subject_id_=sub.id_
+			LEFT JOIN class_group_student_mapper cgsm ON cgsm.group_type_='MUSIC' AND cgsm.music_group_id_=sr.music_group_id_ AND cgsm.user_id_=sr.user_id_ AND cgsm.status_='NORMAL'
 		WHERE
 			sr.music_group_status_ = 'NORMAL'
 			AND mg.status_ = 'PROGRESS'
 			AND cgsm.id_ IS NULL
+			AND sub.parent_subject_id_!=24
 			<if test="educationUserId != null">
 				AND mg.educational_teacher_id_ = #{educationUserId}
 			</if>
@@ -1212,11 +1214,13 @@
 		FROM
 		student_registration sr
 		LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
+		LEFT JOIN `subject` sub ON sr.actual_subject_id_=sub.id_
 		LEFT JOIN class_group_student_mapper cgsm ON cgsm.group_type_='MUSIC' AND cgsm.music_group_id_=sr.music_group_id_ AND cgsm.user_id_=sr.user_id_ AND cgsm.status_='NORMAL'
 		WHERE
 		sr.music_group_status_ = 'NORMAL'
 		AND mg.status_ = 'PROGRESS'
 		AND cgsm.id_ IS NULL
+		AND sub.parent_subject_id_!=24
 		<if test="educationUserId != null">
 			AND mg.educational_teacher_id_ = #{educationUserId}
 		</if>

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/StudentVisitMapper.xml

@@ -105,6 +105,9 @@
     </select>
     <sql id="queryPageSql">
         <where>
+            <if test="search != null and search != ''">
+                AND (sv.object_id_ = #{search} OR t.id_ = #{search} OR s.id_ = #{search} OR t.real_name_ LIKE CONCAT('%',#{search},'%') OR s.username_ LIKE CONCAT('%',#{search},'%'))
+            </if>
             <if test="teacher != null and teacher != ''">
                 AND (t.id_ = #{teacher} OR t.real_name_ LIKE CONCAT('%',#{teacher},'%'))
             </if>

+ 3 - 1
mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml

@@ -238,6 +238,7 @@
         <result column="course_schedule_type_" property="courseScheduleType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="course_schedule_status_" property="courseScheduleStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="course_schedule_name_" property="courseScheduleName"/>
+        <result column="dispose_content_" property="disposeContent"/>
         <result column="teacher_name_" property="teacherName"/>
         <result column="job_nature_" property="jobNature" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="organ_name_" property="organName"/>
@@ -349,7 +350,8 @@
         cs.class_date_,cs.start_class_time_,cs.end_class_time_,cs.type_ course_schedule_type_,
         IF(ta.sign_in_status_ IS NULL,3,ta.sign_in_status_) sign_in_status_,
         IF(ta.sign_out_status_ IS NULL,3,ta.sign_out_status_) sign_out_status_,
-        ta.sign_in_time_,ta.sign_out_time_,ta.remark_,o.name_ organ_name_,t.job_nature_,ta.complaints_status_,ta.id_ teacher_attendance_id_
+        ta.sign_in_time_,ta.sign_out_time_,ta.remark_,o.name_ organ_name_,t.job_nature_,
+        ta.complaints_status_,ta.id_ teacher_attendance_id_,ta.dispose_content_
         FROM course_schedule_teacher_salary csts
         LEFT JOIN course_schedule cs ON cs.id_ = csts.course_schedule_id_
         LEFT JOIN teacher_attendance ta ON ta.course_schedule_id_ = csts.course_schedule_id_ AND ta.teacher_id_ = csts.user_id_