dzx 1 سال پیش
والد
کامیت
0df17c6042

+ 6 - 2
src/main/java/com/xjrsoft/module/classtime/service/impl/ClassTimeStatisticsServiceImpl.java

@@ -125,7 +125,8 @@ public class ClassTimeStatisticsServiceImpl extends MPJBaseServiceImpl<ClassTime
      * 1、通过xjr_user和base_teacher查询所有教师,查询聘用类型为:正式聘用和外聘的
      * 2、根据统计的开始日期和结束日期查询课时补充(wf_teacher_course_time)中的教研会、督导听课、临近三年退休政策、出题、阅卷、周末培优
      * 3、根绝统计的开始日期和结束日期查询课程表(course_table)中的所有课程数据
-     *
+     * 4、查询补班日期下的所有课程
+     * 5、属于节假日的课程不查询
      * @param statistics
      * @return
      */
@@ -158,9 +159,12 @@ public class ClassTimeStatisticsServiceImpl extends MPJBaseServiceImpl<ClassTime
         //计算出这个时间段内一共多少周
         List<WeekTimeRangeVo> weekTimeRangeVos = calculateNaturalWeeks(statistics.getStartDate(), statistics.getEndDate());
 
-        //查询课程数据
+        //查询课程数据,排除开节假日的数据
         List<CourseListVo> allCourseList = this.baseMapper.getCourseList(statistics);
 
+        //查询补班日期
+
+
         //查询删除课时的数据,将每个班删除的具体日期统计出来
         List<ClassTimeDelete> deleteList = deleteService.list(
                 new QueryWrapper<ClassTimeDelete>().lambda()

+ 15 - 0
src/main/resources/mapper/classtime/ClassTimeStatisticsMapper.xml

@@ -21,6 +21,21 @@
         LEFT JOIN course_table_bak t3 ON t1.id = t3.id
         LEFT JOIN wf_course_adjust t4 ON t4.id = t3.wf_course_adjust_id
         WHERE t1.schedule_date BETWEEN #{dto.startDate} and #{dto.endDate}
+        AND t1.schedule_date NOT IN (
+            SELECT DATE FROM holiday_date WHERE STATUS = 3
+            AND DATE BETWEEN #{dto.startDate} and #{dto.endDate}
+        )
+    </select>
+
+    <select id="getReplaceCourseList" parameterType="com.xjrsoft.module.classtime.entity.ClassTimeStatistics" resultType="com.xjrsoft.module.classtime.vo.CourseListVo">
+        SELECT t1.class_id, t1.teacher_id, t2.short_name,t1.adjust_type,t4.reason,t1.schedule_date FROM course_table t1
+        LEFT JOIN class_time t2 ON t1.time_period = t2.time_period AND t1.time_number = t2.number
+        LEFT JOIN course_table_bak t3 ON t1.id = t3.id
+        LEFT JOIN wf_course_adjust t4 ON t4.id = t3.wf_course_adjust_id
+        WHERE t1.schedule_date BETWEEN #{dto.startDate} and #{dto.endDate}
+        AND t1.schedule_date IN (
+        SELECT replace_date FROM class_time_calendar WHERE delete_mark = 0 AND replace_date BETWEEN #{dto.startDate} and #{dto.endDate}
+        )
     </select>
 
     <select id="getSubstituteList" parameterType="com.xjrsoft.module.classtime.entity.ClassTimeStatistics" resultType="com.xjrsoft.module.classtime.vo.CourseListVo">