完善系统

This commit is contained in:
2025-07-23 16:44:27 +08:00
parent 2d3cb0845c
commit f2b3858310
23 changed files with 364 additions and 38 deletions

View File

@ -19,6 +19,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="optionInfo != null and optionInfo != ''"> and option_info = #{optionInfo}</if>
</where>
</select>
<select id="selectCjOptionByIds" parameterType="map" resultMap="CjOptionResult">
<include refid="selectCjOptionVo"/>
<if test="ids != null and ids.length > 0">
WHERE id IN
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="selectCjOptionById" parameterType="Long" resultMap="CjOptionResult">
<include refid="selectCjOptionVo"/>

View File

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="CjStudent" id="CjStudentResult">
<result property="id" column="id" />
<result property="xm" column="xm" />
<result property="xh" column="xh" />
<result property="xb" column="xb" />
<result property="zy" column="zy" />
<result property="xy" column="xy" />
@ -28,13 +29,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectCjStudentVo">
select id, xm, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr from cj_student
select id, xm,xh, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr from cj_student
</sql>
<select id="selectCjStudentList" parameterType="CjStudent" resultMap="CjStudentResult">
<include refid="selectCjStudentVo"/>
<where>
<where>
<if test="xm != null and xm != ''"> and xm = #{xm}</if>
<if test="xh != null and xh != ''"> and xh = #{xh}</if>
<if test="xb != null and xb != ''"> and xb = #{xb}</if>
<if test="zy != null and zy != ''"> and zy = #{zy}</if>
<if test="xy != null and xy != ''"> and xy = #{xy}</if>
@ -53,6 +55,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="yx != null and yx != ''"> and yx = #{yx}</if>
<if test="qt != null and qt != ''"> and qt = #{qt}</if>
<if test="sfqr != null "> and sfqr = #{sfqr}</if>
<if test="gtYear != null "> and bynf <![CDATA[ >= ]]> #{gtYear}</if>
<if test="ltYear != null "> and bynf <![CDATA[ <= ]]> #{ltYear}</if>
</where>
</select>
<select id="selectCjStudentByIds" parameterType="map" resultMap="CjStudentResult">
<include refid="selectCjStudentVo"/>
<if test="ids != null and ids.length > 0">
WHERE id IN
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="selectRyStudentList" resultMap="CjStudentResult">
select id, CASE
WHEN rysfzs = 0 THEN '***'
WHEN rysfzs = 1 THEN xm
ELSE xm -- 可选:处理 rysfzs 不是 0 或 1 的情况
END AS xm,xh, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr from cj_student
<where>
dbry is not null and dbry != '' and dbry != '无'
</where>
</select>
@ -65,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into cj_student
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="xm != null">xm,</if>
<if test="xh != null">xh,</if>
<if test="xb != null">xb,</if>
<if test="zy != null">zy,</if>
<if test="xy != null">xy,</if>
@ -86,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="xm != null">#{xm},</if>
<if test="xh != null">#{xh},</if>
<if test="xb != null">#{xb},</if>
<if test="zy != null">#{zy},</if>
<if test="xy != null">#{xy},</if>
@ -109,11 +136,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertCjStudentBatch" parameterType="list">
insert into cj_student
(xm, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr)
(xm,xh, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr)
VALUES
<foreach item="item" collection="list" separator=",">
<trim prefix="(" suffix=")" suffixOverrides=",">
#{item.xm},
#{item.xh},
#{item.xb},
#{item.zy},
#{item.xy},

View File

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="DwIndexConfig" id="DwIndexConfigResult">
<result property="id" column="id" />
<result property="indexName" column="index_name" />
<result property="indexTitle" column="index_title" />
<result property="questionId" column="question_id" />
<result property="infoId" column="info_id" />
<result property="indexType" column="index_type" />
@ -33,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDwIndexConfigVo">
select id, index_name, question_id, info_id, index_type, create_by, create_time, update_by, update_time, remark from dw_index_config
select id, index_name,index_title, question_id, info_id, index_type from dw_index_config
</sql>
<select id="selectDwIndexConfigList" parameterType="DwIndexConfig" resultMap="DwIndexConfigResult">
@ -55,12 +56,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into dw_index_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="indexName != null">index_name,</if>
<if test="indexTitle != null">index_title,</if>
<if test="questionId != null">question_id,</if>
<if test="infoId != null">info_id,</if>
<if test="indexType != null">index_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="indexName != null">#{indexName},</if>
<if test="indexTitle != null">#{indexTitle},</if>
<if test="questionId != null">#{questionId},</if>
<if test="infoId != null">#{infoId},</if>
<if test="indexType != null">#{indexType},</if>
@ -71,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update dw_index_config
<trim prefix="SET" suffixOverrides=",">
<if test="indexName != null">index_name = #{indexName},</if>
<if test="indexTitle != null">index_title = #{indexTitle},</if>
<if test="questionId != null">question_id = #{questionId},</if>
<if test="infoId != null">info_id = #{infoId},</if>
<if test="indexType != null">index_type = #{indexType},</if>
@ -125,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDwxz" resultMap="dwxzVo">
select dwxz,count(0) as dwxz_count from cj_student where sfqr = 1 group by dwxz
select dwxz,count(0) as dwxz_count from cj_student where sfqr = 1 and dwxz is not null group by dwxz
</select>
</mapper>

View File

@ -23,6 +23,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="questionSort != null "> and question_sort = #{questionSort}</if>
</where>
</select>
<select id="selectDwQuestionByIds" parameterType="map" resultMap="DwQuestionResult">
<include refid="selectDwQuestionVo"/>
<if test="ids != null and ids.length > 0">
WHERE id IN
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="selectDwQuestionById" parameterType="Long" resultMap="DwQuestionResult">
<include refid="selectDwQuestionVo"/>