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/CaseWindupApplyMapper.xml | 132 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 132 insertions(+), 0 deletions(-) diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseWindupApplyMapper.xml b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseWindupApplyMapper.xml index f524f5c..4ebcae5 100644 --- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseWindupApplyMapper.xml +++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseWindupApplyMapper.xml @@ -265,4 +265,136 @@ limit #{page.offset}, #{page.size} </select> + <!-- 首页统计 --> + <select id="countApplyReview" resultType="java.lang.Long"> + select + COUNT(1) + from + <include refid="table-name" /> + where + delete_status = 0 + and apply_status = 0 + and audit_unit_id = #{auditUnitId} + </select> + + <!-- 首页-待审核结果集 --> + <resultMap id="MyTaskApplyReviewResult" type="cn.huge.module.cases.domain.dto.FrontPageListDTO"> + <result property="ownerId" column="ownerId"/> + <result property="caseId" column="caseId"/> + <result property="turnaroundTime" column="turnaroundTime"/> + <result property="timeLimit" column="timeLimit"/> + <result property="caseGrade" column="caseGrade"/> + <result property="caseSource" column="caseSource"/> + <result property="caseType" column="caseType"/> + <result property="plaintiffs" column="plaintiffs"/> + <result property="defendants" column="defendants"/> + <result property="processingDays" column="processingDays"/> + <result property="mediResult" column="mediResult"/> + <result property="organizingUnit" column="organizingUnit"/> + <result property="cooperatingUnit" column="cooperatingUnit"/> + <result property="manager" column="manager"/> + <result property="mediResult" column="mediResult"/> + <result property="backUnit" column="backUnit"/> + <result property="reason" column="reason"/> + <result property="opinion" column="opinion"/> + <result property="process" column="process"/> + </resultMap> + + <!-- 首页-待审核条件统计 --> + <select id="countMyTaskApplyReview" resultType="java.lang.Long"> + select + COUNT(t1.id) + from + dyh_case_windup_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id + where + t1.delete_status = 0 + and t1.apply_status = #{terms.applyStatus} + and t1.audit_unit_id = #{terms.auditUnitId} + <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> + and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} + and DATE_FORMAT(t1.apply_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> + </select> + <!-- 首页-待审核分页查询 --> + <select id="pageMyTaskApplyReview" resultMap="MyTaskApplyReviewResult"> + SELECT t1.case_task_id as ownerId, t1.case_id as caseId, + t1.apply_time as turnaroundTime, t1.apply_unit_name as organizingUnit, t1.medi_result_name as mediResult, + t1.fail_reason as reason, 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_windup_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id + where + t1.delete_status = 0 + and t1.apply_status = #{terms.applyStatus} + and t1.audit_unit_id = #{terms.auditUnitId} + <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> + and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} + and DATE_FORMAT(t1.apply_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(t1.create_time), t1.create_time desc + </if> + limit #{page.offset}, #{page.size} + </select> + + <!-- 首页-结案申请条件统计 --> + <select id="countMySubmitApplyReview" resultType="java.lang.Long"> + select + COUNT(t1.id) + from + dyh_case_windup_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id + where + t1.delete_status = 0 + and t1.apply_status = #{terms.applyStatus} + and t1.apply_unit_id = #{terms.applyUnitId} + <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> + and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} + and DATE_FORMAT(t1.apply_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> + </select> + <!-- 首页-结案申请分页查询 --> + <select id="pageMySubmitApplyReview" resultMap="MyTaskApplyReviewResult"> + SELECT t1.case_task_id as ownerId, t1.case_id as caseId, t2.process_name as process, + t1.apply_time as turnaroundTime, t2.case_level as caseGrade, t2.canal_name as caseSource, t2.case_type_name as caseType, + t1.apply_unit_name as organizingUnit, t1.medi_result_name as mediResult,t1.fail_reason as reason, + concat(t2.plaintiffs, t2.pagents) as plaintiffs, + concat(t2.defendants, t2.dagents) as defendants + FROM + dyh_case_windup_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id + where + t1.delete_status = 0 + and t1.apply_status = #{terms.applyStatus} + and t1.apply_unit_id = #{terms.applyUnitId} + <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> + and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} + and DATE_FORMAT(t1.apply_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(t1.create_time), t1.create_time desc + </if> + limit #{page.offset}, #{page.size} + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0