|
|
|
@ -6,13 +6,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="KhVoteEmp" id="KhVoteEmpResult">
|
|
|
|
<resultMap type="KhVoteEmp" id="KhVoteEmpResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
|
|
|
<result property="khitemTypeid" column="khitem_typeId" />
|
|
|
|
<result property="voteId" column="vote_id" />
|
|
|
|
<result property="voteId" column="vote_id" />
|
|
|
|
<result property="voteTitle" column="vote_title" />
|
|
|
|
<result property="voteTitle" column="vote_title" />
|
|
|
|
<result property="empId" column="emp_id" />
|
|
|
|
<result property="bkhdxId" column="bkhdx_id" />
|
|
|
|
<result property="empName" column="emp_name" />
|
|
|
|
<result property="bkhdxName" column="bkhdx_name" />
|
|
|
|
<result property="content" column="content" />
|
|
|
|
<result property="content" column="content" />
|
|
|
|
<result property="voteNum" column="vote_num" />
|
|
|
|
<result property="voteNum" column="vote_num" />
|
|
|
|
<result property="voteScore" column="vote_score" />
|
|
|
|
<result property="voteScore" column="vote_score" />
|
|
|
|
|
|
|
|
<result property="avgScore" column="avg_score" />
|
|
|
|
<result property="percentage" column="percentage" />
|
|
|
|
<result property="percentage" column="percentage" />
|
|
|
|
<result property="endScore" column="end_score" />
|
|
|
|
<result property="endScore" column="end_score" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
@ -23,19 +25,21 @@
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectKhVoteEmpVo">
|
|
|
|
<sql id="selectKhVoteEmpVo">
|
|
|
|
select id, vote_id, vote_title, emp_id, emp_name, content, vote_num, vote_score, percentage, end_score, create_by, create_time, update_by, update_time, remark from kh_vote_emp
|
|
|
|
select id, khitem_typeId, vote_id, vote_title, bkhdx_id, bkhdx_name, content, vote_num, vote_score, avg_score, percentage, end_score, create_by, create_time, update_by, update_time, remark from kh_vote_emp
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectKhVoteEmpList" parameterType="KhVoteEmp" resultMap="KhVoteEmpResult">
|
|
|
|
<select id="selectKhVoteEmpList" parameterType="KhVoteEmp" resultMap="KhVoteEmpResult">
|
|
|
|
<include refid="selectKhVoteEmpVo"/>
|
|
|
|
<include refid="selectKhVoteEmpVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="khitemTypeid != null "> and khitem_typeId = #{khitemTypeid}</if>
|
|
|
|
<if test="voteId != null "> and vote_id = #{voteId}</if>
|
|
|
|
<if test="voteId != null "> and vote_id = #{voteId}</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''"> and vote_title = #{voteTitle}</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''"> and vote_title = #{voteTitle}</if>
|
|
|
|
<if test="empId != null "> and emp_id = #{empId}</if>
|
|
|
|
<if test="bkhdxId != null "> and bkhdx_id = #{bkhdxId}</if>
|
|
|
|
<if test="empName != null and empName != ''"> and emp_name like concat('%', #{empName}, '%')</if>
|
|
|
|
<if test="bkhdxName != null and bkhdxName != ''"> and bkhdx_name like concat('%', #{bkhdxName}, '%')</if>
|
|
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
|
<if test="voteNum != null "> and vote_num = #{voteNum}</if>
|
|
|
|
<if test="voteNum != null "> and vote_num = #{voteNum}</if>
|
|
|
|
<if test="voteScore != null "> and vote_score = #{voteScore}</if>
|
|
|
|
<if test="voteScore != null "> and vote_score = #{voteScore}</if>
|
|
|
|
|
|
|
|
<if test="avgScore != null "> and avg_score = #{avgScore}</if>
|
|
|
|
<if test="percentage != null "> and percentage = #{percentage}</if>
|
|
|
|
<if test="percentage != null "> and percentage = #{percentage}</if>
|
|
|
|
<if test="endScore != null "> and end_score = #{endScore}</if>
|
|
|
|
<if test="endScore != null "> and end_score = #{endScore}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
@ -49,13 +53,15 @@
|
|
|
|
<insert id="insertKhVoteEmp" parameterType="KhVoteEmp" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
<insert id="insertKhVoteEmp" parameterType="KhVoteEmp" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
insert into kh_vote_emp
|
|
|
|
insert into kh_vote_emp
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="khitemTypeid != null">khitem_typeId,</if>
|
|
|
|
<if test="voteId != null">vote_id,</if>
|
|
|
|
<if test="voteId != null">vote_id,</if>
|
|
|
|
<if test="voteTitle != null">vote_title,</if>
|
|
|
|
<if test="voteTitle != null">vote_title,</if>
|
|
|
|
<if test="empId != null">emp_id,</if>
|
|
|
|
<if test="bkhdxId != null">bkhdx_id,</if>
|
|
|
|
<if test="empName != null">emp_name,</if>
|
|
|
|
<if test="bkhdxName != null">bkhdx_name,</if>
|
|
|
|
<if test="content != null">content,</if>
|
|
|
|
<if test="content != null">content,</if>
|
|
|
|
<if test="voteNum != null">vote_num,</if>
|
|
|
|
<if test="voteNum != null">vote_num,</if>
|
|
|
|
<if test="voteScore != null">vote_score,</if>
|
|
|
|
<if test="voteScore != null">vote_score,</if>
|
|
|
|
|
|
|
|
<if test="avgScore != null">avg_score,</if>
|
|
|
|
<if test="percentage != null">percentage,</if>
|
|
|
|
<if test="percentage != null">percentage,</if>
|
|
|
|
<if test="endScore != null">end_score,</if>
|
|
|
|
<if test="endScore != null">end_score,</if>
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
@ -65,13 +71,15 @@
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="khitemTypeid != null">#{khitemTypeid},</if>
|
|
|
|
<if test="voteId != null">#{voteId},</if>
|
|
|
|
<if test="voteId != null">#{voteId},</if>
|
|
|
|
<if test="voteTitle != null">#{voteTitle},</if>
|
|
|
|
<if test="voteTitle != null">#{voteTitle},</if>
|
|
|
|
<if test="empId != null">#{empId},</if>
|
|
|
|
<if test="bkhdxId != null">#{bkhdxId},</if>
|
|
|
|
<if test="empName != null">#{empName},</if>
|
|
|
|
<if test="bkhdxName != null">#{bkhdxName},</if>
|
|
|
|
<if test="content != null">#{content},</if>
|
|
|
|
<if test="content != null">#{content},</if>
|
|
|
|
<if test="voteNum != null">#{voteNum},</if>
|
|
|
|
<if test="voteNum != null">#{voteNum},</if>
|
|
|
|
<if test="voteScore != null">#{voteScore},</if>
|
|
|
|
<if test="voteScore != null">#{voteScore},</if>
|
|
|
|
|
|
|
|
<if test="avgScore != null">#{avgScore},</if>
|
|
|
|
<if test="percentage != null">#{percentage},</if>
|
|
|
|
<if test="percentage != null">#{percentage},</if>
|
|
|
|
<if test="endScore != null">#{endScore},</if>
|
|
|
|
<if test="endScore != null">#{endScore},</if>
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
@ -85,13 +93,15 @@
|
|
|
|
<update id="updateKhVoteEmp" parameterType="KhVoteEmp">
|
|
|
|
<update id="updateKhVoteEmp" parameterType="KhVoteEmp">
|
|
|
|
update kh_vote_emp
|
|
|
|
update kh_vote_emp
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="khitemTypeid != null">khitem_typeId = #{khitemTypeid},</if>
|
|
|
|
<if test="voteId != null">vote_id = #{voteId},</if>
|
|
|
|
<if test="voteId != null">vote_id = #{voteId},</if>
|
|
|
|
<if test="voteTitle != null">vote_title = #{voteTitle},</if>
|
|
|
|
<if test="voteTitle != null">vote_title = #{voteTitle},</if>
|
|
|
|
<if test="empId != null">emp_id = #{empId},</if>
|
|
|
|
<if test="bkhdxId != null">bkhdx_id = #{bkhdxId},</if>
|
|
|
|
<if test="empName != null">emp_name = #{empName},</if>
|
|
|
|
<if test="bkhdxName != null">bkhdx_name = #{bkhdxName},</if>
|
|
|
|
<if test="content != null">content = #{content},</if>
|
|
|
|
<if test="content != null">content = #{content},</if>
|
|
|
|
<if test="voteNum != null">vote_num = #{voteNum},</if>
|
|
|
|
<if test="voteNum != null">vote_num = #{voteNum},</if>
|
|
|
|
<if test="voteScore != null">vote_score = #{voteScore},</if>
|
|
|
|
<if test="voteScore != null">vote_score = #{voteScore},</if>
|
|
|
|
|
|
|
|
<if test="avgScore != null">avg_score = #{avgScore},</if>
|
|
|
|
<if test="percentage != null">percentage = #{percentage},</if>
|
|
|
|
<if test="percentage != null">percentage = #{percentage},</if>
|
|
|
|
<if test="endScore != null">end_score = #{endScore},</if>
|
|
|
|
<if test="endScore != null">end_score = #{endScore},</if>
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|