增加一个调查问卷

This commit is contained in:
2025-07-18 15:33:44 +08:00
parent 31e2a0c5c4
commit a5fc34f7ea
12 changed files with 265 additions and 60 deletions

View File

@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="xm" column="xm" />
<result property="xb" column="xb" />
<result property="zy" column="zy" />
<result property="xy" column="xy" />
<result property="sydsh" column="sydsh" />
<result property="sydshi" column="sydshi" />
<result property="bynf" column="bynf" />
@ -28,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectCjStudentVo">
select id, xm,sydsh, sydshi, xb, zy, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs, ry,sj, yx, qt, sfqr from cj_student
select id, xm,sydsh, sydshi, xb, zy,xy, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs, ry,sj, yx, qt, sfqr from cj_student
</sql>
<select id="selectCjStudentList" parameterType="CjStudent" resultMap="CjStudentResult">
@ -37,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="xm != null and xm != ''"> and xm = #{xm}</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>
<if test="sydsh != null and sydsh != ''"> and sydsh = #{sydsh}</if>
<if test="sydshi != null and sydshi != ''"> and sydshi = #{sydshi}</if>
<if test="bynf != null "> and bynf = #{bynf}</if>
@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="xm != null">xm,</if>
<if test="xb != null">xb,</if>
<if test="zy != null">zy,</if>
<if test="xy != null">xy,</if>
<if test="sydsh != null">sydsh,</if>
<if test="sydshi != null">sydshi,</if>
<if test="bynf != null">bynf,</if>
@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="xm != null">#{xm},</if>
<if test="xb != null">#{xb},</if>
<if test="zy != null">#{zy},</if>
<if test="xy != null">#{xy},</if>
<if test="sydsh != null">#{sydsh},</if>
<if test="sydshi != null">#{sydshi},</if>
<if test="bynf != null">#{bynf},</if>

View File

@ -10,11 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="questionId" column="question_id" />
<result property="infoId" column="info_id" />
<result property="indexType" column="index_type" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<resultMap type="AnswerCountVo" id="answerCountVo">
<result property="answer" column="answer" />
<result property="answerCount" column="answer_count" />
</resultMap>
<sql id="selectDwIndexConfigVo">
@ -43,22 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="questionId != null">question_id,</if>
<if test="infoId != null">info_id,</if>
<if test="indexType != null">index_type,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="indexName != null">#{indexName},</if>
<if test="questionId != null">#{questionId},</if>
<if test="infoId != null">#{infoId},</if>
<if test="indexType != null">#{indexType},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
@ -69,11 +59,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="questionId != null">question_id = #{questionId},</if>
<if test="infoId != null">info_id = #{infoId},</if>
<if test="indexType != null">index_type = #{indexType},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
@ -89,10 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select id="selectIndex" resultType="com.ruoyi.dw.domain.vo.AnswerCountVo">
<select id="selectIndex" resultMap="answerCountVo">
select answer, count(0) as answer_count
from dw_answer
where indo_id = #{infoId}
where info_id = #{infoId}
and question_id = #{questionId}
group by answer
</select>