From 0cd9d911b8e8634ec04cb82ea07696bb09260b03 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期二, 26 十二月 2023 13:48:06 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server
---
ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml | 167 +++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 141 insertions(+), 26 deletions(-)
diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml
index fc7f13a..0ede22c 100644
--- a/ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml
@@ -4,41 +4,156 @@
<!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
<resultMap id="BaseResultMap" type="com.ycl.entity.caseHandler.DisposeRecord">
- <id column="id" property="id" />
- <result column="base_case_id" property="baseCaseId" />
- <result column="workflow_config_step_id" property="workflowConfigStepId" />
- <result column="step_name" property="stepName" />
- <result column="start_time" property="startTime" />
- <result column="handler_role_id" property="handlerRoleId" />
- <result column="end_time" property="endTime" />
- <result column="state" property="state" />
- <result column="handler_id" property="handlerId" />
- <result column="create_user" property="createUser" />
- <result column="create_time" property="createTime" />
+ <id column="id" property="id"/>
+ <result column="base_case_id" property="baseCaseId"/>
+ <result column="workflow_config_step_id" property="workflowConfigStepId"/>
+ <result column="step_name" property="stepName"/>
+ <result column="start_time" property="startTime"/>
+ <result column="handler_role_id" property="handlerRoleId"/>
+ <result column="end_time" property="endTime"/>
+ <result column="state" property="state"/>
+ <result column="handler_id" property="handlerId"/>
+ <result column="create_user" property="createUser"/>
+ <result column="create_time" property="createTime"/>
</resultMap>
<!-- 閫氱敤鏌ヨ缁撴灉鍒� -->
<sql id="Base_Column_List">
- id, base_case_id, step_name, start_time, handler_role_id, end_time, state, handler_id, create_user, create_time
+ id
+ , base_case_id, step_name, start_time, handler_role_id, end_time, state, handler_id, create_user, create_time
</sql>
- <select id="selectMyBackList" resultType="com.ycl.vo.MyBacklogVO">
+ <resultMap id="blacklogVoMap" type="com.ycl.vo.MyBacklogVO">
+ <result column="event_source" property="eventSource"/>
+ <result column="source" property="source"/>
+ <result column="category" property="category"/>
+ <result column="code" property="code"/>
+ <result column="step_name" property="stepName"/>
+ <result column="caseId" property="caseId"/>
+ <result column="create_time" property="createTime"/>
+ <result column="limit_time" property="limitTime"/>
+ <collection property="pictureList" ofType="com.ycl.entity.resources.ImageResources">
+ <result column="url" property="url"/>
+ </collection>
+ </resultMap>
+
+ <select id="selectMyBackList" resultMap="blacklogVoMap">
+ SELECT nt.*, t4.url
+ from (select distinct * from (
SELECT
- t3.event_source,
- t3.category,
- t2.step_name,
- t3.`code`,
- t2.create_time
+ t3.event_source,
+ t5.region_name source,
+ t3.category,
+ t2.step_name,
+ t3.`id` caseId,
+ t3.`code`,
+ t2.create_time,
+ t2.limit_time
FROM
- ums_admin_role_relation t1
- JOIN ums_dispose_record t2 ON t1.role_id = t2.handler_role_id
- JOIN ums_base_case t3 ON t2.base_case_id=t3.id
+ ums_admin_role_relation t1
+ left JOIN ums_dispose_record t2 ON t1.role_id = t2.handler_role_id
+ left JOIN ums_base_case t3 ON t2.base_case_id=t3.id
+ left join ums_sccg_region t5 on t5.id = t3.community_id
<where>
- t1.admin_id = #{id}
- AND ISNULL( t2.end_time )
- <if test="code!='' and code!=null">
- and t3.`code` LIKE CONCAT('%',#{code},'%')
- </if>
+ t1.admin_id = #{id} and t3.`code` is not null
+ AND t2.state = 0
+ <if test="code!='' and code!=null">
+ and t3.`code` LIKE CONCAT('%',#{code},'%')
+ </if>
+ <if test="alarmTimeStart!=null and alarmTimeEnd!=null">
+ and t3.alarm_time <![CDATA[ <= ]]> #{alarmTimeEnd} and t3.alarm_time >= #{alarmTimeStart}
+ </if>
+ <if test="type !=null">
+ and t3.category = #{type}
+ </if>
+ <if test="source !=null">
+ and t5.parent_id = #{source}
+ </if>
</where>
+ union all
+ SELECT
+ t3.event_source,
+ t5.region_name source,
+ t3.category,
+ t2.step_name,
+ t3.`id` caseId,
+ t3.`code`,
+ t2.create_time,
+ t2.limit_time
+ FROM
+ ums_dispose_record t2
+ LEFT JOIN ums_base_case t3 ON t2.base_case_id = t3.id
+ LEFT join ums_sccg_region t5 on t5.id = t3.community_id
+ <where>
+ t2.handler_id = #{id}
+ AND t2.state = 0
+ <if test="code!='' and code!=null">
+ and t3.`code` LIKE CONCAT('%',#{code},'%')
+ </if>
+ <if test="alarmTimeStart!=null and alarmTimeEnd!=null">
+ and t3.alarm_time <![CDATA[ <= ]]> #{alarmTimeEnd} and t3.alarm_time >= #{alarmTimeStart}
+ </if>
+ <if test="type !=null">
+ and t3.category = #{type}
+ </if>
+ <if test="source !=null">
+ and t5.parent_id = #{source}
+ </if>
+ </where>
+ ) as t
+ order by create_time desc
+ LIMIT #{pageIndex},#{pageSize}) nt
+ left JOIN ums_image_resources t4 ON nt.caseId=t4.belong_to_id
+ order by create_time desc
+ </select>
+ <select id="selectMyBackListTotal" resultType="java.lang.Long">
+ select count( distinct id) from (
+ SELECT
+ t3.id
+ FROM
+ ums_admin_role_relation t1
+ left JOIN ums_dispose_record t2 ON t1.role_id = t2.handler_role_id
+ left JOIN ums_base_case t3 ON t2.base_case_id=t3.id
+ left join ums_sccg_region t5 on t5.id = t3.community_id
+ <where>
+ t1.admin_id = #{id} and t3.`code` is not null
+ AND t2.state = 0
+ <if test="code!='' and code!=null">
+ and t3.`code` LIKE CONCAT('%',#{code},'%')
+ </if>
+ <if test="alarmTimeStart!=null and alarmTimeEnd!=null">
+ and t3.alarm_time <![CDATA[ <= ]]> #{alarmTimeEnd} and t3.alarm_time >= #{alarmTimeStart}
+ </if>
+ <if test="type !=null">
+ and t3.category = #{type}
+ </if>
+ <if test="source !=null">
+ and t5.parent_id = #{source}
+ </if>
+ </where>
+ union all
+ SELECT
+ t3.id
+ FROM
+ ums_dispose_record t2
+ LEFT JOIN ums_base_case t3 ON t2.base_case_id = t3.id
+ left join ums_sccg_region t5 on t5.id = t3.community_id
+ <where>
+ t2.handler_id = #{id}
+ AND t2.state = 0
+ <if test="code!='' and code!=null">
+ and t3.`code` LIKE CONCAT('%',#{code},'%')
+ </if>
+ <if test="alarmTimeStart!=null and alarmTimeEnd!=null">
+ and t3.alarm_time <![CDATA[ <= ]]> #{alarmTimeEnd} and t3.alarm_time >= #{alarmTimeStart}
+ </if>
+ <if test="type !=null">
+ and t3.category = #{type}
+ </if>
+ <if test="source !=null">
+ and t5.parent_id = #{source}
+ </if>
+ </where>
+ ) as t
</select>
</mapper>
--
Gitblit v1.8.0