From abb0d631ffed8b67b0a78205ba127b46a4cb546b Mon Sep 17 00:00:00 2001 From: liyj <1003249715@qq.com> Date: Tue, 10 Sep 2024 16:29:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseSuperviseMapper.xml | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 114 insertions(+), 0 deletions(-) diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseSuperviseMapper.xml b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseSuperviseMapper.xml index 6aeb3bc..59f64e4 100644 --- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseSuperviseMapper.xml +++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseSuperviseMapper.xml @@ -14,9 +14,13 @@ <result property="id" column="id"/> <result property="caseId" column="case_id"/> <result property="supContent" column="sup_content"/> + <result property="supUnitId" column="sup_unit_id"/> + <result property="supUnitName" column="sup_unit_name"/> <result property="supUserId" column="sup_user_id"/> <result property="supUserName" column="sup_user_name"/> <result property="supTime" column="sup_time"/> + <result property="quiltUnitId" column="quilt_unit_id"/> + <result property="quiltUnitName" column="quilt_unit_name"/> <result property="supStatus" column="sup_status"/> <result property="replyTerm" column="reply_term"/> <result property="replyContent" column="reply_content"/> @@ -35,9 +39,13 @@ id, case_id, sup_content, + sup_unit_id, + sup_unit_name, sup_user_id, sup_user_name, sup_time, + quilt_unit_id, + quilt_unit_name, sup_status, reply_term, reply_content, @@ -53,9 +61,13 @@ <sql id="set-part"> <if test="entity.caseId != null">case_id = #{entity.caseId},</if> <if test="entity.supContent != null">sup_content = #{entity.supContent},</if> + <if test="entity.supUnitId != null">sup_unit_id = #{entity.supUnitId},</if> + <if test="entity.supUnitName != null">sup_unit_name = #{entity.supUnitName},</if> <if test="entity.supUserId != null">sup_user_id = #{entity.supUserId},</if> <if test="entity.supUserName != null">sup_user_name = #{entity.supUserName},</if> <if test="entity.supTime != null">sup_time = #{entity.supTime},</if> + <if test="entity.quiltUnitId != null">quilt_unit_id = #{entity.quiltUnitId},</if> + <if test="entity.quiltUnitName != null">quilt_unit_name = #{entity.quiltUnitName},</if> <if test="entity.supStatus != null">sup_status = #{entity.supStatus},</if> <if test="entity.replyTerm != null">reply_term = #{entity.replyTerm},</if> <if test="entity.replyContent != null">reply_content = #{entity.replyContent},</if> @@ -80,6 +92,12 @@ <if test="terms.supContent != null and terms.supContent !=''"> and sup_content = #{terms.supContent} </if> + <if test="terms.supUnitId != null and terms.supUnitId !=''"> + and sup_unit_id = #{terms.supUnitId} + </if> + <if test="terms.supUnitName != null and terms.supUnitName !=''"> + and sup_unit_name = #{terms.supUnitName} + </if> <if test="terms.supUserId != null and terms.supUserId !=''"> and sup_user_id = #{terms.supUserId} </if> @@ -88,6 +106,12 @@ </if> <if test="terms.supTime != null and terms.supTime !=''"> and sup_time = #{terms.supTime} + </if> + <if test="terms.quiltUnitId != null and terms.quiltUnitId !=''"> + and quilt_unit_id = #{terms.quiltUnitId} + </if> + <if test="terms.quiltUnitName != null and terms.quiltUnitName !=''"> + and quilt_unit_name = #{terms.quiltUnitName} </if> <if test="terms.supStatus != null and terms.supStatus !=''"> and sup_status = #{terms.supStatus} @@ -112,6 +136,9 @@ </if> <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> and delete_status = #{terms.deleteStatus} + </if> + <if test="terms.deleteStatus == null or terms.deleteStatus ==''"> + and delete_status = '0' </if> <if test="terms.custId != null and terms.custId !=''"> and cust_id = #{terms.custId} @@ -193,4 +220,91 @@ limit #{page.offset}, #{page.size} </select> + <!-- 根据条件统计 --> + <select id="countCaseSupervise" resultType="java.lang.Long"> + select + COUNT(1) + from + <include refid="table-name" /> + where case_id = #{caseId} + and delete_status = 0 + and sup_status = #{supStatus} + and quilt_unit_id = #{quiltUnitId} + </select> + + <!-- 根据条件分页查询 --> + <select id="pageCaseSupervise" resultMap="dataResult"> + SELECT + <include refid="column-part"/> + FROM + <include refid="table-name" /> + where case_id = #{caseId} + and delete_status = 0 + and sup_status = #{supStatus} + and quilt_unit_id = #{quiltUnitId} + <if test="page.sort != null"> + <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> + isnull(${s.property}), ${s.property} ${s.direction} + </foreach> + </if> + <if test="page.sort == null"> + order by isnull(sup_time), sup_time desc + </if> + limit #{page.offset}, #{page.size} + </select> + + <!-- 首页督办条件统计 --> + <select id="countMyTaskDb" resultType="java.lang.Long"> + select + COUNT(1) + from + dyh_case_supervise t1 left join dyh_case_info t2 on t1.case_id = t2.id + where + delete_status = 0 + and sup_status = #{terms.supStatus} + and quilt_unit_id = #{terms.quiltUnitId} + </select> + + <!-- 首页督办分页查询 --> + <select id="pageMyTaskDb" resultMap="dataResult"> + SELECT + t1.sup_time as turnaroundTime, t1.DATEADD(hour, t1.replyTerm, t1.sup_time) as timeLimit, t1.sup_unit_name as organizingUnit, + t1.sup_content as opinion, t2.case_level as caseGrade, t2.canal_name as caseSource, + t2.case_type_name as caseType, concat(t2.plaintiffs, t2.pagents) as plaintiffs, + concat(t2.defendants, t2.dagents) as defendants + FROM + dyh_case_supervise t1 left join dyh_case_info t2 on t1.case_id = t2.id + where + t1.delete_status = 0 + and t1.sup_status = #{terms.supStatus} + and t1.quilt_unit_id = #{terms.quiltUnitId} + <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> + and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} + and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) + </if> + <if test="terms.partyName != null and terms.partyName !=''"> + and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') + </if> + <if test="page.sort != null"> + <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> + isnull(${s.property}), ${s.property} ${s.direction} + </foreach> + </if> + <if test="page.sort == null"> + order by isnull(sup_time), sup_time desc + </if> + limit #{page.offset}, #{page.size} + </select> + + <!-- 根据条件统计 --> + <select id="countCaseSuperviseList" resultType="java.lang.Long"> + select + COUNT(1) + from + <include refid="table-name" /> + where + delete_status = 0 + and sup_status = #{supStatus} + and quilt_unit_id = #{quiltUnitId} + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0