From 93430938a25ab3d4e218a2198ae1b24a516f6382 Mon Sep 17 00:00:00 2001 From: zhouxiantao <1026371446@qq.com> Date: Tue, 17 Jun 2025 17:31:15 +0800 Subject: [PATCH] freat:粤政易相关代码 --- dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml | 65 ++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml index 0f94532..c746303 100644 --- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml +++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml @@ -87,6 +87,7 @@ <result property="oldCaseTypeName" column="old_case_type_name"/> <result property="canalSecond" column="canal_second"/> <result property="canalSecondName" column="canal_second_name"/> + <result property="caseRemark" column="case_remark"/> </resultMap> <resultMap id="dataResult-all" type="cn.huge.module.cases.domain.dto.CasePageDTO"> <result property="id" column="id"/> @@ -1105,6 +1106,29 @@ LEFT JOIN dyh_ct_unit c ON b.belong_unit_id = c.id <include refid="where-part-all"/> </select> + + <!-- 统计分析(基础)-统计调解过程 --> + <select id="statisticsBaseProcess" resultType="cn.huge.module.cases.domain.dto.CaseStatisticsBaseDTO"> + SELECT + count(1) as totalNum, + sum(case when b.medi_result = '22_00025-1' and a.info_process = 3 then 1 else 0 end) as resolveNum, + sum(case when a.info_process <![CDATA[ < ]]> 3 then 1 else 0 end) as resolveingNum, + sum(case when b.medi_result = '22_00025-2' and a.info_process = 3 then 1 else 0 end) as unResolveNum, + sum(case when a.case_level = 1 then 1 else 0 end) as oneLevelNum, + sum(case when a.case_level = 2 then 1 else 0 end) as twoLevelNum, + sum(case when a.case_level = 3 then 1 else 0 end) as threeLevelNum, + sum(case when a.info_process = 2 then 1 + when a.info_process = 1 then 1 else 0 end) as processNum, + sum(case when a.info_process = 3 and b.medi_result = '22_00025-1' then 1 else 0 end) as finishNum, + sum(case when a.info_process = 4 then 1 else 0 end) as rejectNum, + sum(case when a.info_process = 3 and b.medi_result = '22_00025-2' then 1 else 0 end) as failNum + FROM + dyh_case_info a + inner JOIN dyh_case_info_unfold b on a.id = b.id + LEFT JOIN dyh_ct_unit c ON b.belong_unit_id = c.id + <include refid="where-part-all"/> + </select> + <!-- 统计分析(类型) --> <select id="statisticsTypeFirst" resultType="cn.huge.module.cases.domain.dto.CaseStatisticsTypeDTO"> SELECT @@ -1439,4 +1463,45 @@ a.canal_second </select> + <!-- 统计分析(基础) --> + <select id="workStatisticsTime" resultType="cn.huge.module.cases.domain.dto.CaseWorkStatisticsTimeDTO"> + SELECT + count(1) as totalNum, + sum(case when b.medi_result = '22_00025-1' and a.info_process = 3 then 1 else 0 end) as resolveNum, + sum(case when a.info_process <![CDATA[ < ]]> 3 then 1 else 0 end) as resolveingNum, + sum(case when b.medi_result = '22_00025-2' and a.info_process = 3 then 1 else 0 end) as unResolveNum, + sum(case when a.case_level = 1 then 1 else 0 end) as oneLevelNum, + sum(case when a.case_level = 2 then 1 else 0 end) as twoLevelNum, + sum(case when a.case_level = 3 then 1 else 0 end) as threeLevelNum, + sum(case when a.info_process <![CDATA[ < ]]> 3 then 1 else 0 end) as processNum, + sum(case when a.info_process = 3 then 1 else 0 end) as finishNum, + <if test='terms.selectTimeType != null and terms.selectTimeType =="1"'> + DATE_FORMAT(a.create_time, '%Y-%m-%d') AS dayStr, + DATE_FORMAT(a.create_time, '%Y-%m') AS monthStr, + DATE_FORMAT(a.create_time, '%Y') AS year_str, + </if> + <if test='terms.selectTimeType != null and terms.selectTimeType =="2"'> + DATE_FORMAT(b.close_time, '%Y-%m-%d') AS dayStr, + DATE_FORMAT(b.close_time, '%Y-%m') AS monthStr, + DATE_FORMAT(b.close_time, '%Y') AS year_str, + </if> + sum(case when a.info_process = 4 then 1 else 0 end) as rejectNum + + + FROM + dyh_case_info a + inner JOIN dyh_case_info_unfold b on a.id = b.id + LEFT JOIN dyh_ct_unit c ON b.belong_unit_id = c.id + <include refid="where-part-all"/> + <if test='terms.timeType != null and terms.timeType =="3"'> + GROUP BY year_str + </if> + <if test='terms.timeType != null and terms.timeType =="2"'> + GROUP BY monthStr + </if> + <if test='terms.timeType != null and terms.timeType =="1"'> + GROUP BY dayStr + </if> + </select> + </mapper> \ No newline at end of file -- Gitblit v1.8.0