Joburgess 4 rokov pred
rodič
commit
919888c658

+ 28 - 18
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -590,28 +590,29 @@
 
     <select id="getStudentCourseSchedulesWithDate" resultMap="courseScheduleDto">
         SELECT
-        cs.id_ seal_class_id_,
-        cs.name_,
-        cs.type_,
-        cs.id_,
-        cs.class_date_,
-        CONCAT(cs.class_date_,' ',cs.start_class_time_) start_class_time_,
-        CONCAT(cs.class_date_,' ',cs.end_class_time_) end_class_time_,
-        cs.status_,
-        su.real_name_ teacher_name_,
-        IF(sa.status_ IS NULL,'NORMAL',sa.status_) attendance_status_,
-        csc.id_ IS NOT NULL complaint_status_,
-        cs.teach_mode_
+            cs.id_ seal_class_id_,
+            cs.name_,
+            cs.type_,
+            cs.id_,
+            cs.class_date_,
+            CONCAT(cs.class_date_,' ',cs.start_class_time_) start_class_time_,
+            CONCAT(cs.class_date_,' ',cs.end_class_time_) end_class_time_,
+            cs.status_,
+            su.real_name_ teacher_name_,
+            IF(sa.status_ IS NULL,'NORMAL',sa.status_) attendance_status_,
+            csc.id_ IS NOT NULL complaint_status_,
+            cs.teach_mode_
         FROM
-        course_schedule_student_payment cssp
-        LEFT JOIN course_schedule cs ON cssp.course_schedule_id_=cs.id_
-        LEFT JOIN sys_user su ON cs.actual_teacher_id_=su.id_
-        LEFT JOIN course_schedule_complaints csc ON csc.course_schedule_id_=cssp.course_schedule_id_ AND
-        csc.user_id_=#{studentId}
+            course_schedule_student_payment cssp
+            LEFT JOIN course_schedule cs ON cssp.course_schedule_id_=cs.id_
+            LEFT JOIN sys_user su ON cs.actual_teacher_id_=su.id_
+            LEFT JOIN course_schedule_complaints csc ON csc.course_schedule_id_=cssp.course_schedule_id_ AND
+            csc.user_id_=#{studentId}
         LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_ AND sa.user_id_=#{studentId}
         WHERE
         (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
         AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
+        AND cs.new_course_id_ IS NULL
         AND cs.class_date_ = DATE_FORMAT(#{classDate},'%Y%m%d')
         AND cssp.user_id_ = #{studentId}
         <if test="quitClassGroupIds != null and quitClassGroupIds.size()>0">
@@ -655,6 +656,7 @@
         WHERE
         (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
         AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
+        AND cs.new_course_id_ IS NULL
         AND cs.class_date_ = DATE_FORMAT(#{classDate},'%Y%m%d')
         <if test="type!=null and type!=''">
             AND cs.type_=#{type}
@@ -740,6 +742,8 @@
                  LEFT JOIN school s ON cs.schoole_id_ = s.id_
                  LEFT JOIN teacher_attendance ta ON cs.id_ = ta.course_schedule_id_ AND ta.teacher_id_ = #{teacherId}
         WHERE (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
+            AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
+            AND cs.new_course_id_ IS NULL
           AND cs.class_date_ = DATE_FORMAT(#{classDate}, '%Y%m%d')
           AND csts.user_id_ = #{teacherId}
           AND CONCAT(cs.class_date_, ' ', cs.end_class_time_) &lt; NOW()
@@ -870,6 +874,7 @@
         WHERE
         (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
         AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
+        AND cs.new_course_id_ IS NULL
         AND cssp.user_id_ = #{studentId}
         <if test="month==null">
             AND DATE_FORMAT( NOW(), '%Y%m' ) = DATE_FORMAT( cs.class_date_, '%Y%m' )
@@ -894,6 +899,7 @@
         WHERE
         (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
         AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
+        AND cs.new_course_id_ IS NULL
         AND csts.user_id_ = #{teacherId}
         <if test="month==null">
             AND DATE_FORMAT( NOW(), '%Y%m' ) = DATE_FORMAT( cs.class_date_, '%Y%m' )
@@ -944,6 +950,8 @@
         LEFT JOIN class_group cg ON cs.class_group_id_ = cg.id_
         WHERE
         (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
+        AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
+        AND cs.new_course_id_ IS NULL
         AND CONCAT(cs.class_date_,' ',cs.start_class_time_) &lt; NOW()
         AND csts.user_id_ = #{teacherId}
         AND cg.del_flag_ = 0
@@ -1330,6 +1338,8 @@
     <sql id="teacherClassCourseScheduleQueryCondition">
         <where>
             (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
+            AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
+            AND cs.new_course_id_ IS NULL
             AND cs.class_group_id_ = #{classGroupId}
             <if test="userId != null">
                 AND csts.user_id_ = #{userId}
@@ -2191,7 +2201,7 @@
         <if test="teacherId != null">
             AND cs.actual_teacher_id_ = #{teacherId}
         </if>
-        AND cs.status_ = 'NOT_START' AND cs.del_flag_ = 0
+        AND cs.status_ = 'NOT_START' AND cs.del_flag_ = 0 AND cs.new_course_id_ IS NULL
         GROUP BY cs.class_group_id_
     </select>
 

+ 2 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -913,6 +913,8 @@
 			LEFT JOIN course_schedule cs ON csts.course_schedule_id_ = cs.id_
 		WHERE
 			( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
+			AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
+			AND cs.new_course_id_ IS NULL
 			AND csts.settlement_time_ IS NOT NULL
 			AND csts.user_id_ = #{teacherId}
 			AND DATE_FORMAT( cs.class_date_, '%Y' ) = #{year}