| | |
| | | |
| | | <resultMap type="com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfoPageDO" id="emergencyWorkApproveInfoPageDOResult"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="gmt_create" property="gmtCreate"/> |
| | | <result column="work_name" property="workName"/> |
| | | <result column="title" property="title"/> |
| | | <result column="submit_person_id" property="submitPersonId"/> |
| | | <result column="submit_person_name" property="submitPersonName"/> |
| | | <result column="approve_person_id" property="approvePersonId"/> |
| | | <result column="approve_person_name" property="approvePersonName"/> |
| | | <result column="approve_status" property="approveStatus"/> |
| | | <result column="approve_result" property="approveResult"/> |
| | | <result column="approve_memo" property="approveMemo"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectWorkApproveList" resultMap="emergencyWorkApproveInfoPageDOResult"> |
| | | select id,`work_name`,`title`,`submit_person_id`,`approve_status`,gmt_create from emergency_work_approve where del_flag = 0 |
| | | select id,`work_name`,`title`,`submit_person_id`,submit_person_name,approve_person_id,approve_person_name, |
| | | `approve_status`,approve_result ,approve_memo ,gmt_create from emergency_work_approve |
| | | where del_flag = 0 and relate_type = #{query.relateType} and relate_id = #{query.relateId} |
| | | <if test="query.startTime != null "> and gmt_create <![CDATA[ >= ]]> #{query.startTime}</if> |
| | | <if test="query.endTime != null "> and gmt_create <![CDATA[ <= ]]> #{query.endTime}</if> |
| | | order by gmt_create desc |
| | | </select> |
| | | |
| | | <insert id="addWorkApprove" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfo" |
| | |
| | | <if test="workName != null and workName != ''">work_name,</if> |
| | | <if test="title != null and title != ''">title,</if> |
| | | <if test="submitPersonId != null ">submit_person_id,</if> |
| | | <if test="submitPersonName != null and submitPersonName != ''">submit_person_name,</if> |
| | | <if test="approvePersonId != null ">approve_person_id,</if> |
| | | <if test="approvePersonName != null and approvePersonName != ''">approve_person_name,</if> |
| | | <if test="approveStatus != null ">approve_status,</if> |
| | | <if test="approveResult != null ">approve_result,</if> |
| | | <if test="approveMemo != null and approveMemo != ''">approve_memo,</if> |
| | |
| | | |
| | | <if test="workName != null and workName != ''">#{workName},</if> |
| | | <if test="title != null and title != ''">#{title},</if> |
| | | <if test="submitPersonId != null ">#{submitPersonId},</if> |
| | | <if test="approvePersonId != null ">#{approvePersonId},</if> |
| | | <if test="submitPersonId != null "> #{submitPersonId},</if> |
| | | <if test="submitPersonName != null and submitPersonName != ''"> #{submitPersonName},</if> |
| | | <if test="approvePersonId != null "> #{approvePersonId},</if> |
| | | <if test="approvePersonName != null and approvePersonName != ''"> #{approvePersonName},</if> |
| | | <if test="approveStatus != null ">#{approveStatus},</if> |
| | | <if test="approveResult != null ">#{approveResult},</if> |
| | | <if test="approveMemo != null and approveMemo != ''">#{approveMemo},</if> |
| | |
| | | from emergency_work_approve where del_flag = 0 and id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectWorkApproveByRelateTypeAndRelateId" resultMap="WorkApproveInfoDetailDOResult"> |
| | | select id,`work_name`,`title`,`submit_person_id`,submit_person_name,approve_person_id,approve_person_name, |
| | | `approve_status`,approve_result ,approve_memo ,gmt_create from emergency_work_approve |
| | | where del_flag = 0 and relate_type = #{type} and relate_id = #{id} |
| | | order by gmt_create desc |
| | | </select> |
| | | |
| | | <update id="updateWorkApprove" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfo"> |
| | | update emergency_work_approve |
| | | <trim prefix="SET" suffixOverrides=","> |
| | |
| | | <if test="workName != null and workName != ''">work_name = #{workName},</if> |
| | | <if test="title != null and title != ''">title = #{title},</if> |
| | | <if test="submitPersonId != null ">submit_person_id = #{submitPersonId},</if> |
| | | <if test="submitPersonName != null and submitPersonName != ''">submit_person_name = #{submitPersonName},</if> |
| | | <if test="approvePersonId != null ">approve_person_id = #{approvePersonId},</if> |
| | | <if test="approvePersonName != null and approvePersonName != ''">approve_person_name = #{approvePersonName},</if> |
| | | <if test="approveStatus != null ">approve_status = #{approveStatus},</if> |
| | | <if test="approveResult != null ">approve_result = #{approveResult},</if> |
| | | <if test="approveMemo != null and approveMemo != ''">approve_memo = #{approveMemo},</if> |