2 changed files with 67 additions and 49 deletions
@ -0,0 +1,67 @@ |
|||
<?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.kms.yxgh.df.mapper.DfYhV2Mapper"> |
|||
|
|||
<resultMap id="approvalMap" type="com.kms.yxgh.common.dto.ApprovalDetailDto"> |
|||
<id property="id" column="id"/> |
|||
<result property="formId" column="formId"/> |
|||
<result property="submitTime" column="submit_time"/> |
|||
<result property="approvalTime" column="approval_time"/> |
|||
<result property="status" column="status"/> |
|||
<result property="comment" column="comment"/> |
|||
<result property="operator" column="operator" typeHandler="com.kms.yxgh.common.mapper.handler.OperatorHandler"/> |
|||
<result property="doc" column="ts_doc" typeHandler="com.kms.yxgh.common.mapper.handler.DocHandler"/> |
|||
<association property="detail" javaType="com.kms.yxgh.df.dto.v2.DfYhApproveDto"> |
|||
<id property="id" column="jl_id"/> |
|||
<result property="name" column="name"/> |
|||
<result property="dikeCode" column="dike_code"/> |
|||
<result property="dikeName" column="dike_name"/> |
|||
<result property="type" column="type"/> |
|||
<result property="category" column="category"/> |
|||
<result property="problemLevel" column="problem_level"/> |
|||
<result property="dutyHolderId" column="duty_holder_id"/> |
|||
<result property="dutyHolderName" column="duty_holder_name"/> |
|||
</association> |
|||
</resultMap> |
|||
|
|||
<select id="approvalSearchPage" resultMap="approvalMap"> |
|||
SELECT ts.id id, ts.form_id formId, ts.create_time submit_time, ts.approval_time approval_time, ts.status status, |
|||
ts.operator operator, ts.comment comment, ts.doc ts_doc, |
|||
jl.id , jl.name ,jl.dike_code , jl.dike_name , jl.type type, jl.category , |
|||
jl.problem_level , jl.duty_holder_id , jl.duty_holder_name |
|||
FROM bs_sgc_sp_task ts |
|||
LEFT JOIN bs_sgc_df_xcyj jl ON jl.id = ts.form_id |
|||
WHERE |
|||
ts.business_type = #{dto.businessType} |
|||
<if test="dto.status != null and dto.status != ''"> |
|||
AND ts.status = #{dto.status} |
|||
</if> |
|||
<if test="dto.condition!= null and dto.condition.name != null"> |
|||
AND jl.name LIKE CONCAT('%',#{dto.condition.name},'%') |
|||
</if> |
|||
<if test="dto.condition!= null and dto.condition.type != null and dto.condition.type != ''"> |
|||
AND jl.type = #{dto.condition.type} |
|||
</if> |
|||
<if test="dto.condition!= null and dto.condition.category != null and dto.condition.category != ''"> |
|||
AND jl.category = #{dto.condition.category} |
|||
</if> |
|||
<if test="dto.condition!= null and dto.condition.problemLevel != null and dto.condition.problemLevel != ''"> |
|||
AND jl.issue_level = #{dto.condition.problemLevel} |
|||
</if> |
|||
<if test="dto.condition!= null and dto.condition.status != null and dto.condition.status != ''"> |
|||
AND jl.status = #{dto.condition.status} |
|||
</if> |
|||
<if test="dto.condition!= null and dto.condition.startDate != null and dto.condition.startDate != ''"> |
|||
AND jl.start_date >= #{dto.condition.startDate} |
|||
</if> |
|||
<if test="dto.condition!= null and dto.condition.endDate != null and dto.condition.endDate != ''"> |
|||
AND jl.end_date <= #{dto.condition.endDate} |
|||
</if> |
|||
<if test="dto.condition!= null and dto.condition.dutyHolder != null and dto.condition.dutyHolder != ''"> |
|||
AND jl.duty_holder_id = #{dto.condition.dutyHolder} |
|||
</if> |
|||
ORDER BY jl.update_time DESC |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue