From 3c8b8029a94666ce55e38d1f11c0d1bb0330afa5 Mon Sep 17 00:00:00 2001
From: huangh <hshgjzd5@163.com>
Date: Tue, 29 Oct 2024 14:59:11 +0800
Subject: [PATCH] fix:统计重复案件,添加本级数据处理,修改请求方式

---
 dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoUnfoldMapper.xml |   79 +++++++++++++++++++++++++--------------
 1 files changed, 50 insertions(+), 29 deletions(-)

diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoUnfoldMapper.xml b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoUnfoldMapper.xml
index 3323de9..154deb1 100644
--- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoUnfoldMapper.xml
+++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoUnfoldMapper.xml
@@ -4,15 +4,17 @@
  * @title: 纠纷信息扩展表
  * @description: 自定义sql,请自行实现业务逻辑
  * @company: hugeinfo
- * @author: wangwh
- * @time:2024-08-27 20:36:04
+ * @author: liyj
+ * @time:2024-09-09 19:58:25
  * @version 1.0.0
 -->
 <mapper namespace="cn.huge.module.cases.dao.mapper.CaseInfoUnfoldMapper">
     <!-- 结果集 -->
     <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseInfoUnfold">
             <result property="id" column="id"/>
-            <result property="caseId" column="case_id"/>
+            <result property="acceptTime" column="accept_time"/>
+            <result property="belongUnitId" column="belong_unit_id"/>
+            <result property="belongUnitName" column="belong_unit_name"/>
             <result property="mediateUnitId" column="mediate_unit_id"/>
             <result property="mediateUnitName" column="mediate_unit_name"/>
             <result property="mediateDeptId" column="mediate_dept_id"/>
@@ -20,6 +22,8 @@
             <result property="mediatorId" column="mediator_id"/>
             <result property="mediator" column="mediator"/>
             <result property="mediatorMobile" column="mediator_mobile"/>
+            <result property="assistUnitId" column="assist_unit_id"/>
+            <result property="assistUnitName" column="assist_unit_name"/>
             <result property="mediStartTime" column="medi_start_time"/>
             <result property="mediEndTime" column="medi_end_time"/>
             <result property="mediResult" column="medi_result"/>
@@ -33,6 +37,7 @@
             <result property="civilStatus" column="civil_status"/>
             <result property="courtId" column="court_id"/>
             <result property="courtName" column="court_name"/>
+            <result property="closeTime" column="close_time"/>
             <result property="judicApply" column="judic_apply"/>
             <result property="judicResult" column="judic_result"/>
             <result property="judicResultName" column="judic_result_name"/>
@@ -55,15 +60,15 @@
             <result property="custId" column="cust_id"/>
             <result property="createTime" column="create_time"/>
             <result property="updateTime" column="update_time"/>
-            <result property="acceptTime" column="accept_time"/>
-            <result property="closeTime" column="close_time"/>
     </resultMap>
     <!-- 表 -->
     <sql id='table-name'>dyh_case_info_unfold</sql>
     <!-- 字段 -->
     <sql id="column-part">
         id,
-        case_id,
+        accept_time,
+        belong_unit_id,
+        belong_unit_name,
         mediate_unit_id,
         mediate_unit_name,
         mediate_dept_id,
@@ -71,6 +76,8 @@
         mediator_id,
         mediator,
         mediator_mobile,
+        assist_unit_id,
+        assist_unit_name,
         medi_start_time,
         medi_end_time,
         medi_result,
@@ -84,6 +91,7 @@
         civil_status,
         court_id,
         court_name,
+        close_time,
         judic_apply,
         judic_result,
         judic_result_name,
@@ -105,13 +113,13 @@
         party_joy,
         cust_id,
         create_time,
-        update_time,
-        accept_time,
-        close_time
+        update_time
     </sql>
     <!-- 更新实体字段 -->
     <sql id="set-part">
-            <if test="entity.caseId != null">case_id = #{entity.caseId},</if>
+            <if test="entity.acceptTime != null">accept_time = #{entity.acceptTime},</if>
+            <if test="entity.belongUnitId != null">belong_unit_id = #{entity.belongUnitId},</if>
+            <if test="entity.belongUnitName != null">belong_unit_name = #{entity.belongUnitName},</if>
             <if test="entity.mediateUnitId != null">mediate_unit_id = #{entity.mediateUnitId},</if>
             <if test="entity.mediateUnitName != null">mediate_unit_name = #{entity.mediateUnitName},</if>
             <if test="entity.mediateDeptId != null">mediate_dept_id = #{entity.mediateDeptId},</if>
@@ -119,6 +127,8 @@
             <if test="entity.mediatorId != null">mediator_id = #{entity.mediatorId},</if>
             <if test="entity.mediator != null">mediator = #{entity.mediator},</if>
             <if test="entity.mediatorMobile != null">mediator_mobile = #{entity.mediatorMobile},</if>
+            <if test="entity.assistUnitId != null">assist_unit_id = #{entity.assistUnitId},</if>
+            <if test="entity.assistUnitName != null">assist_unit_name = #{entity.assistUnitName},</if>
             <if test="entity.mediStartTime != null">medi_start_time = #{entity.mediStartTime},</if>
             <if test="entity.mediEndTime != null">medi_end_time = #{entity.mediEndTime},</if>
             <if test="entity.mediResult != null">medi_result = #{entity.mediResult},</if>
@@ -132,6 +142,7 @@
             <if test="entity.civilStatus != null">civil_status = #{entity.civilStatus},</if>
             <if test="entity.courtId != null">court_id = #{entity.courtId},</if>
             <if test="entity.courtName != null">court_name = #{entity.courtName},</if>
+            <if test="entity.closeTime != null">close_time = #{entity.closeTime},</if>
             <if test="entity.judicApply != null">judic_apply = #{entity.judicApply},</if>
             <if test="entity.judicResult != null">judic_result = #{entity.judicResult},</if>
             <if test="entity.judicResultName != null">judic_result_name = #{entity.judicResultName},</if>
@@ -153,9 +164,7 @@
             <if test="entity.partyJoy != null">party_joy = #{entity.partyJoy},</if>
             <if test="entity.custId != null">cust_id = #{entity.custId},</if>
             <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
-            <if test="entity.updateTime != null">update_time = #{entity.updateTime},</if>
-            <if test="entity.acceptTime != null">accept_time = #{entity.acceptTime},</if>
-            <if test="entity.closeTime != null">close_time = #{entity.closeTime},</if>
+            <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
     </sql>
     <!-- 条件 -->
     <sql id="where-part">
@@ -164,8 +173,14 @@
                 <if test="terms.id != null and terms.id !=''">
                     and id = #{terms.id}
                 </if>
-                <if test="terms.caseId != null and terms.caseId !=''">
-                    and case_id = #{terms.caseId}
+                <if test="terms.acceptTime != null and terms.acceptTime !=''">
+                    and accept_time = #{terms.acceptTime}
+                </if>
+                <if test="terms.belongUnitId != null and terms.belongUnitId !=''">
+                    and belong_unit_id = #{terms.belongUnitId}
+                </if>
+                <if test="terms.belongUnitName != null and terms.belongUnitName !=''">
+                    and belong_unit_name = #{terms.belongUnitName}
                 </if>
                 <if test="terms.mediateUnitId != null and terms.mediateUnitId !=''">
                     and mediate_unit_id = #{terms.mediateUnitId}
@@ -187,6 +202,12 @@
                 </if>
                 <if test="terms.mediatorMobile != null and terms.mediatorMobile !=''">
                     and mediator_mobile = #{terms.mediatorMobile}
+                </if>
+                <if test="terms.assistUnitId != null and terms.assistUnitId !=''">
+                    and assist_unit_id = #{terms.assistUnitId}
+                </if>
+                <if test="terms.assistUnitName != null and terms.assistUnitName !=''">
+                    and assist_unit_name = #{terms.assistUnitName}
                 </if>
                 <if test="terms.mediStartTime != null and terms.mediStartTime !=''">
                     and medi_start_time = #{terms.mediStartTime}
@@ -226,6 +247,9 @@
                 </if>
                 <if test="terms.courtName != null and terms.courtName !=''">
                     and court_name = #{terms.courtName}
+                </if>
+                <if test="terms.closeTime != null and terms.closeTime !=''">
+                    and close_time = #{terms.closeTime}
                 </if>
                 <if test="terms.judicApply != null and terms.judicApply !=''">
                     and judic_apply = #{terms.judicApply}
@@ -301,20 +325,6 @@
                     and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
                         and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
                 </if>
-                <if test="terms.acceptTime != null and terms.acceptTime !=''">
-                    and DATE_FORMAT(accept_time,'%Y-%m-%d') = #{terms.acceptTime}
-                </if>
-                <if test="terms.acceptTimeStart != null and terms.acceptTimeStart !='' and terms.acceptTimeEnd != null and terms.acceptTimeEnd !=''">
-                    and (DATE_FORMAT(accept_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.acceptTimeStart}
-                    and DATE_FORMAT(accept_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.acceptTimeEnd})
-                </if>
-                <if test="terms.closeTime != null and terms.closeTime !=''">
-                    and DATE_FORMAT(close_time,'%Y-%m-%d') = #{terms.closeTime}
-                </if>
-                <if test="terms.closeTimeStart != null and terms.closeTimeStart !='' and terms.closeTimeEnd != null and terms.closeTimeEnd !=''">
-                    and (DATE_FORMAT(close_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.closeTimeStart}
-                    and DATE_FORMAT(close_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.closeTimeEnd})
-                </if>
             </where>
         </if>
     </sql>
@@ -378,4 +388,15 @@
         limit #{page.offset}, #{page.size}
     </select>
 
+    <!-- 更新对象 -->
+    <update id="deletePrincipal">
+        update
+            dyh_case_info_unfold
+        set
+            mediator_id = null,
+            mediator = null,
+            mediator_mobile = null
+        where
+            id = #{id}
+    </update>
 </mapper> 
\ No newline at end of file

--
Gitblit v1.8.0