bug修复

This commit is contained in:
liumengyu
2026-08-26 09:56:12 +08:00
parent a30b963dea
commit a43561af8d
11 changed files with 432 additions and 78 deletions
@@ -43,4 +43,24 @@ public interface SSDKSQMapper extends BaseMapper<SSDKSQ> {
* 查询可供调课的课次(学员队任务表 + 课表 + 课程表)。
*/
List<AdjustableLessonVO> selectAdjustableLessons(@Param("jybh") String jybh, @Param("nd") Integer nd);
/**
* 按课次编号批量查询教室,用于回填调课提交默认值。
*/
List<AdjustableLessonVO.ChildRow> selectLessonRooms(@Param("ids") List<String> ids);
/**
* 按课次编号批量查询辅助教员,用于回填调课提交默认值。
*/
List<AdjustableLessonVO.ChildRow> selectLessonTeachers(@Param("ids") List<String> ids);
/**
* 按课次编号批量查询学员队,用于回填调课提交默认值。
*/
List<AdjustableLessonVO.ChildRow> selectLessonTeams(@Param("ids") List<String> ids);
/**
* 按课次编号批量查询保障明细,用于回填调课提交默认值。
*/
List<AdjustableLessonVO.ChildRow> selectLessonSupports(@Param("ids") List<String> ids);
}
@@ -63,17 +63,36 @@
<result column="实施_课程表编号" property="sskcbbh"/>
<result column="上课日期" property="rq"/>
<result column="节次" property="jc"/>
<result column="年度" property="nd"/>
<result column="申请教员编号" property="sqjybh"/>
<result column="学员队任务编号" property="xydrwbh"/>
<result column="课编号" property="kbh"/>
<result column="课程表编号" property="kcbbh"/>
<result column="新教室编号" property="xjsbh"/>
<result column="教学内容" property="jxnr"/>
<result column="教学要点" property="jxyd"/>
<result column="教学方法" property="jxff"/>
<result column="教学保障备注" property="jxbzbz"/>
<result column="用车信息" property="ycxx"/>
<result column="原教室编号" property="yjsbh"/>
<result column="课程名称" property="kcmc"/>
<result column="学员队编号" property="xydbh"/>
<result column="学员队名称" property="xydmc"/>
<result column="教员编号" property="jybh"/>
<result column="课次序号" property="kcxh"/>
<result column="教室编号" property="jsbh"/>
<result column="年度" property="nd"/>
<result column="教研室代号" property="jysdh"/>
<result column="课程表编号" property="kcbbh"/>
</resultMap>
<resultMap id="AdjustableLessonChildMap" type="com.roomroot.jwgl.vo.courserunning.AdjustableLessonVO$ChildRow">
<result column="实施_课程表编号" property="sskcbbh"/>
<result column="教室编号" property="jsbh"/>
<result column="备注" property="bz"/>
<result column="辅助教员编号" property="fzjybh"/>
<result column="主教员" property="zjy"/>
<result column="学员队编号" property="xydbh"/>
<result column="保障提供明细编号" property="bztgmxbh"/>
<result column="数量" property="sl"/>
</resultMap>
<!-- 以实施_调课申请为主表,经实施_课程表关联课表、课程表、学员队任务表 -->
@@ -193,12 +212,14 @@
WHERE a.编号 = #{ssdksqbh}
</select>
<!-- 教员可选课次:实施_课程表 + 课表 + 课程表 + 学员队任务表 -->
<!-- 教员可选课次:实施_课程表 + 课表 + 课程表 + 学员队任务表,字段对齐调课提交默认值 -->
<select id="selectAdjustableLessons" resultMap="AdjustableLessonMap">
SELECT
b.编号 AS 实施_课程表编号,
b.日期 AS 上课日期,
b.节次,
b.年度,
e.教员编号 AS 申请教员编号,
(
SELECT MAX(rw.编号)
FROM "学员队任务表" rw
@@ -208,6 +229,28 @@
AND COALESCE(rw.DEL_FLAG, 0) = 0
) AS 学员队任务编号,
e.科目编号 AS 课编号,
(
SELECT MAX(kcb.编号)
FROM "课程表" kcb
WHERE kcb.教员编号 = e.教员编号
AND kcb.课次序号 = e.教员课次序号
AND kcb.年度 = e.年度
) AS 课程表编号,
COALESCE(e.教室编号, (
SELECT MAX(js.教室编号)
FROM "实施_课程表_教室" js
WHERE js.实施_课程表编号 = b.编号
)) AS 新教室编号,
b.教学内容,
b.教学要点,
b.教学方法,
b.教学保障备注,
b.用车信息,
COALESCE(e.教室编号, (
SELECT MAX(js.教室编号)
FROM "实施_课程表_教室" js
WHERE js.实施_课程表编号 = b.编号
)) AS 原教室编号,
COALESCE(kb.课名称, (
SELECT MAX(k2.课名称) FROM "课表" k2 WHERE k2.科目代码 = e.科目编号
)) AS 课程名称,
@@ -229,15 +272,7 @@
FROM "实施_课程表_教室" js
WHERE js.实施_课程表编号 = b.编号
)) AS 教室编号,
b.年度,
jy.教研室代号,
(
SELECT MAX(kcb.编号)
FROM "课程表" kcb
WHERE kcb.教员编号 = e.教员编号
AND kcb.课次序号 = e.教员课次序号
AND kcb.年度 = e.年度
) AS 课程表编号
jy.教研室代号
FROM "实施_课程表" b
JOIN "实施_课程" e ON LOWER(RAWTOHEX(e."编号")) = LOWER(REPLACE(TRIM(b.实施_课程编号), '-', ''))
LEFT JOIN "课表" kb ON kb.课编号 = e.科目编号
@@ -252,4 +287,40 @@
ORDER BY b.年度 DESC, b.日期 DESC, b.节次 ASC
</select>
<select id="selectLessonRooms" resultMap="AdjustableLessonChildMap">
SELECT "实施_课程表编号", "教室编号", "备注"
FROM "实施_课程表_教室"
WHERE "实施_课程表编号" IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectLessonTeachers" resultMap="AdjustableLessonChildMap">
SELECT "实施_课程表编号", "辅助教员编号", "主教员", "备注"
FROM "实施_课程表_辅助教员"
WHERE "实施_课程表编号" IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectLessonTeams" resultMap="AdjustableLessonChildMap">
SELECT "实施_课程表编号", "学员队编号"
FROM "实施_课程表_学员队"
WHERE "实施_课程表编号" IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectLessonSupports" resultMap="AdjustableLessonChildMap">
SELECT a."课程表编号" AS "实施_课程表编号", a."保障提供明细编号", a."数量", a."备注"
FROM "课程表_保障明细" a
WHERE a."课程表编号" IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>