From b311ca2f01e9602c1bf8caab04b4d641b314e341 Mon Sep 17 00:00:00 2001
From: liyj <15602261488@163.com>
Date: Sun, 29 Sep 2024 12:48:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/gzdyh_test' into gzdyh_test

---
 dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml |   36 +++++++++++++++++++++++++++---------
 1 files changed, 27 insertions(+), 9 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 d89fc3a..8e27d9f 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
@@ -110,6 +110,7 @@
         <result property="queRoadName" column="que_road_name"/>
         <result property="caseTypeFirst" column="case_type_first"/>
         <result property="caseTypeFirstName" column="case_type_first_name"/>
+        <result property="caseTaskId" column="caseTaskId"/>
     </resultMap>
     <!-- 表 -->
     <sql id='table-name'>dyh_case_info</sql>
@@ -141,7 +142,8 @@
         b.close_time,
         b.agree_type,
         b.agree_type_name,
-        b.agree_content
+        b.agree_content,
+        c.id as caseTaskId
     </sql>
     <!-- 字段 -->
     <sql id="column-part">
@@ -317,7 +319,7 @@
                     and a.input_unit_id = #{terms.inputUnitId}
                 </if>
                 <if test="terms.inputUnitName != null and terms.inputUnitName !=''">
-                    and a.input_unit_name = #{terms.inputUnitName}
+                    and a.input_unit_name like CONCAT('%', #{terms.inputUnitName}, '%')
                 </if>
                 <if test="terms.visitTimeStart != null and terms.visitTimeStart !='' and terms.visitTimeEnd != null and terms.visitTimeEnd !=''">
                     and (DATE_FORMAT(a.visit_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{terms.visitTimeStart}
@@ -354,10 +356,10 @@
                     and a.case_ref = #{terms.caseRef}
                 </if>
                 <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
-                    and a.plaintiffs = #{terms.plaintiffs}
+                    and a.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%')
                 </if>
                 <if test="terms.defendants != null and terms.defendants !=''">
-                    and a.defendants = #{terms.defendants}
+                    and a.defendants like CONCAT('%', #{terms.defendants}, '%')
                 </if>
                 <if test="terms.peopleNumStart != null and terms.peopleNumStart !=''">
                     and a.people_num  <![CDATA[ >= ]]> #{terms.peopleNumStart}
@@ -380,6 +382,15 @@
                 <if test="terms.assistUnitId != null and terms.assistUnitId !=''">
                     and b.assist_unit_id = #{terms.assistUnitId}
                 </if>
+                <if test="terms.mediateUnitName != null and terms.mediateUnitName !=''">
+                    and b.mediate_unit_name like CONCAT('%', #{terms.mediateUnitName}, '%')
+                </if>
+                <if test="terms.assistUnitName != null and terms.assistUnitName !=''">
+                    and b.assist_unit_name like CONCAT('%', #{terms.assistUnitName}, '%')
+                </if>
+                <if test="terms.mediResult != null and terms.mediResult !=''">
+                    and b.medi_result = #{terms.mediResult}
+                </if>
             </where>
         </if>
     </sql>
@@ -395,6 +406,9 @@
                 </if>
                 <if test="terms.id != null and terms.id !=''">
                     and id = #{terms.id}
+                </if>
+                <if test="terms.partyShow != null and terms.partyShow !=''">
+                    and party_show = #{terms.partyShow}
                 </if>
                 <if test="terms.caseTitle != null and terms.caseTitle !=''">
                     and case_title = #{terms.caseTitle}
@@ -701,8 +715,8 @@
     <sql id="where-register-part">
         <if test="terms != null">
             <where>
-                <if test="terms.inputUnitName != null and terms.inputUnitName !=''">
-                    and t1.input_unit_mame = #{inputUnitName}
+                <if test="terms.inputUnitId != null and terms.inputUnitId !=''">
+                    and t1.input_unit_id = #{terms.inputUnitId}
                 </if>
                 <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
                     and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
@@ -724,16 +738,19 @@
                     and t1.canal_name = #{terms.canalName}
                 </if>
                 <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
-                    and t1.plaintiffs = #{terms.plaintiffs}
+                    and t1.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%')
                 </if>
                 <if test="terms.defendants != null and terms.defendants !=''">
-                    and t1.defendants = #{terms.defendants}
+                    and t1.defendants like CONCAT('%', #{terms.defendants}, '%')
                 </if>
                 <if test="terms.statusName != null and terms.statusName !=''">
                     and t1.status_name = #{terms.statusName}
                 </if>
                 <if test="terms.mediResultName != null and terms.mediResultName !=''">
                     and t2.medi_result_name = #{terms.mediResultName}
+                </if>
+                <if test="terms.mediResult != null and terms.mediResult !=''">
+                    and t2.medi_result = #{terms.mediResult}
                 </if>
             </where>
         </if>
@@ -751,7 +768,7 @@
         dyh_case_info t1
         left join dyh_case_info_unfold t2 on t1.id = t2.id
         left join (select count(*) as number ,case_id from dyh_case_supervise group by case_id) t3 on t3.case_id=t1.id
-        left join (select id ,case_id from dyh_case_task limit 1) t4 on t1.id = t4.case_id
+        left join (select id ,case_id from dyh_case_task group by case_id) t4 on t1.id = t4.case_id
         <include refid="where-register-part"/>
         <if test="page.sort != null">
             <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
@@ -787,6 +804,7 @@
         <include refid="column-part-all"/>
         FROM
         dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.id
+        left join (select id ,case_id from dyh_case_task group by case_id) c on a.id = c.case_id
         <include refid="where-part-all"/>
         <if test="page.sort != null">
             <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">

--
Gitblit v1.8.0