bug修复
This commit is contained in:
@@ -34,7 +34,9 @@
|
||||
<if test="jysb.bx != null and jysb.bx != ''">
|
||||
AND 部系 LIKE CONCAT('%', #{jysb.bx}, '%')
|
||||
</if>
|
||||
ORDER BY 序号
|
||||
<if test="jysb.ty != null and jysb.ty != ''">
|
||||
AND 停用 = #{jysb.ty}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.roomroot.jwgl.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.roomroot.jwgl.entity.PXRW;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 培训任务 Mapper。
|
||||
*/
|
||||
@Mapper
|
||||
public interface PXRWMapper extends BaseMapper<PXRW> {
|
||||
|
||||
/**
|
||||
* 按主体培训任务标志查询培训任务。
|
||||
*
|
||||
* @param ztpxrw 主体培训任务:0-否,1-是
|
||||
*/
|
||||
List<PXRW> selectByZtpxrw(@Param("ztpxrw") Integer ztpxrw);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.roomroot.jwgl.mapper.PXRWMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.PXRW">
|
||||
<id column="标识号" property="bsh"/>
|
||||
<result column="序号" property="xh"/>
|
||||
<result column="任务来源" property="rwly"/>
|
||||
<result column="年级" property="nj"/>
|
||||
<result column="在校状态" property="zxzt"/>
|
||||
<result column="任务类别" property="rwlb"/>
|
||||
<result column="入学日期" property="rxrq"/>
|
||||
<result column="毕业日期" property="byrq"/>
|
||||
<result column="备注" property="bz"/>
|
||||
<result column="学科专业信息标识号" property="xkzyxxbsh"/>
|
||||
<result column="名称" property="mc"/>
|
||||
<result column="计划人数" property="jhrs"/>
|
||||
<result column="任务说明" property="rwsm"/>
|
||||
<result column="计划班次数" property="jhbcs"/>
|
||||
<result column="JSONZD" property="jsonzd"/>
|
||||
<result column="所属单位" property="ssdw"/>
|
||||
<result column="主体培训任务" property="ztpxrw"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
"标识号", "序号", "任务来源", "年级", "在校状态", "任务类别",
|
||||
"入学日期", "毕业日期", "备注", "学科专业信息标识号", "名称",
|
||||
"计划人数", "任务说明", "计划班次数", "JSONZD", "所属单位", "主体培训任务"
|
||||
</sql>
|
||||
|
||||
<select id="selectByZtpxrw" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM "培训任务"
|
||||
WHERE "主体培训任务" = #{ztpxrw}
|
||||
ORDER BY "序号", "标识号"
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -16,11 +16,14 @@ public interface XYKCCJMapper extends BaseMapper<XYKCCJ> {
|
||||
|
||||
/**
|
||||
* 分页条件查询课程成绩。
|
||||
* <p>学员编号、年度可选;年度未传时默认取最大年度(最新年度)的数据。</p>
|
||||
* <p>按课程编号(科目编号)、学员队编号、学号、年度筛选。学号经学员编号关联学员信息表匹配。</p>
|
||||
*/
|
||||
Page<XYKCCJ> selectPageByCondition(Page<XYKCCJ> page,
|
||||
@Param("xybh") String xybh,
|
||||
@Param("nd") Integer nd);
|
||||
@Param("kcbh") String kcbh,
|
||||
@Param("xydbh") String xydbh,
|
||||
@Param("xh") String xh,
|
||||
@Param("nd") Integer nd,
|
||||
@Param("xybh") String xybh);
|
||||
|
||||
/** 按学员队查询成绩(含学员姓名学号) */
|
||||
List<StudentGradeVO> selectGradeByXydbh(@Param("xydbh") String xydbh, @Param("kmbh") String kmbh);
|
||||
|
||||
@@ -36,21 +36,31 @@
|
||||
ORDER BY 年度 DESC, 科目编号
|
||||
</select>
|
||||
|
||||
<!-- 分页条件查询课程成绩:学员编号、年度可选;年度未传时默认取最大年度(最新年度) -->
|
||||
<!-- 分页条件查询课程成绩:课程编号、学员队编号、学号、年度可选;学号经学员编号关联学员信息表 -->
|
||||
<select id="selectPageByCondition" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM "学员课程成绩"
|
||||
SELECT
|
||||
c."编号", c."课程成绩编号", c."学员编号", c."考试成绩", c."平时成绩", c."最终成绩", c."备注",
|
||||
c."补考成绩", c."补考次数", c."考试情况", c."原始考试成绩", c."原始平时成绩", c."期望学分",
|
||||
c."年度", c."课类型", c."科目编号", c."学员队编号", c."已通过"
|
||||
FROM "学员课程成绩" c
|
||||
LEFT JOIN "学员信息表" s ON s."编号" = c."学员编号"
|
||||
WHERE 1=1
|
||||
<if test="xybh != null and xybh != ''">
|
||||
AND 学员编号 = #{xybh}
|
||||
<if test="kcbh != null and kcbh != ''">
|
||||
AND c."科目编号" = #{kcbh}
|
||||
</if>
|
||||
<if test="xydbh != null and xydbh != ''">
|
||||
AND c."学员队编号" = #{xydbh}
|
||||
</if>
|
||||
<if test="xh != null and xh != ''">
|
||||
AND s."学号" = #{xh}
|
||||
</if>
|
||||
<if test="nd != null">
|
||||
AND 年度 = #{nd}
|
||||
AND c."年度" = #{nd}
|
||||
</if>
|
||||
<if test="nd == null">
|
||||
AND 年度 = (SELECT MAX(年度) FROM "学员课程成绩")
|
||||
<if test="xybh != null and xybh != ''">
|
||||
AND c."学员编号" = #{xybh}
|
||||
</if>
|
||||
ORDER BY 年度 DESC, 科目编号
|
||||
ORDER BY c."年度" DESC, c."科目编号"
|
||||
</select>
|
||||
|
||||
<resultMap id="GradeResultMap" type="com.roomroot.jwgl.vo.elective.StudentGradeVO">
|
||||
|
||||
@@ -3,9 +3,12 @@ package com.roomroot.jwgl.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.roomroot.jwgl.entity.XYXX;
|
||||
import com.roomroot.jwgl.vo.StudentListEchoVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学员信息表 Mapper
|
||||
*/
|
||||
@@ -16,4 +19,10 @@ public interface XYXXMapper extends BaseMapper<XYXX> {
|
||||
* 分页查询学员信息(支持条件筛选)
|
||||
*/
|
||||
Page<XYXX> selectPageList(Page<XYXX> page, @Param("xyxx") XYXX xyxx);
|
||||
|
||||
/**
|
||||
* 按学员编号批量回显年级、专业、班次、考试情况、不及格门数、管理机构。
|
||||
* 当前班次编号关联学员队表、专业表、学员课程成绩。
|
||||
*/
|
||||
List<StudentListEchoVO> selectEchoByStudentIds(@Param("ids") List<String> ids);
|
||||
}
|
||||
|
||||
@@ -89,4 +89,38 @@
|
||||
ORDER BY 学号
|
||||
</select>
|
||||
|
||||
<!-- 当前班次编号 → 学员队表 / 专业表 / 学员课程成绩 -->
|
||||
<select id="selectEchoByStudentIds" resultType="com.roomroot.jwgl.vo.StudentListEchoVO">
|
||||
SELECT
|
||||
a."编号" AS bh,
|
||||
t."年级" AS nj,
|
||||
p."专业名称" AS zy,
|
||||
t."学员队名称" AS bc,
|
||||
g."考试情况" AS ksqk,
|
||||
COALESCE(g."不及格门数", 0) AS bjgms,
|
||||
COALESCE(j."名称", t."所属单位") AS gljg
|
||||
FROM "学员信息表" a
|
||||
LEFT JOIN "学员队表" t ON t."学员队编号" = a."当前班次编号"
|
||||
LEFT JOIN "专业表" p ON p."专业代号" = t."专业代号"
|
||||
LEFT JOIN "教学管理机构" j ON j."编号" = p."教学管理机构编号"
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
c."学员编号",
|
||||
WM_CONCAT(DISTINCT NULLIF(TRIM(c."考试情况"), '')) AS "考试情况",
|
||||
SUM(CASE WHEN c."已通过" = 0 THEN 1 ELSE 0 END) AS "不及格门数"
|
||||
FROM "学员课程成绩" c
|
||||
INNER JOIN "学员信息表" a2 ON a2."编号" = c."学员编号"
|
||||
WHERE c."学员编号" IN
|
||||
<foreach collection="ids" item="gid" open="(" separator="," close=")">
|
||||
#{gid}
|
||||
</foreach>
|
||||
AND (a2."当前班次编号" IS NULL OR c."学员队编号" = a2."当前班次编号")
|
||||
GROUP BY c."学员编号"
|
||||
) g ON g."学员编号" = a."编号"
|
||||
WHERE a."编号" IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -49,7 +49,10 @@
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM "专业表"
|
||||
WHERE 停用 = 0
|
||||
WHERE 1=1
|
||||
<if test="zyb.ty != null and zyb.ty != ''">
|
||||
AND 停用 = #{zyb.ty},
|
||||
</if>
|
||||
<if test="zyb.zymc != null and zyb.zymc != ''">
|
||||
AND 专业名称 LIKE CONCAT('%', #{zyb.zymc}, '%')
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user