From 9ca799d8e581731c27dc9d9a9c2684a233c74db5 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期五, 26 一月 2024 16:24:42 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
index 4b6483c..8f71ed3 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -234,12 +234,25 @@
       <if test="blockName != null and blockName != ''">
         AND blo.name = #{blockName}
       </if>
+
+      <if test="isBinded == 0">
+        AND ge.id NOT IN(SELECT intakeId FROM pr_controller where deleted = 0)
+      </if>
+      <if test="isBinded == 1">
+        AND ge.id IN(SELECT intakeId FROM pr_controller where deleted = 0)
+      </if>
+      <if test="isBinded == null">
+
+      </if>
+      <if test="address != null and address != ''">
+        AND CONCAT(country.`name`, town.`name`, village.`name`) LIKE CONCAT('%', #{address}, '%')
+      </if>
     </where>
   </select>
 
   <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙h褰�-->
   <select id="getIntakes" resultType="com.dy.pipIrrGlobal.voPr.VoIntake">
-    SELECT (@i:=@i+1)                                          AS id,
+    SELECT ge.id                                         AS id,
     ge.`name`                                           AS intakeName,
     divi.`name`                                         AS divideName,
     blo.`name`                                          AS blockName,
@@ -255,7 +268,6 @@
     INNER JOIN ba_district country ON ge.countyId = country.id
     INNER JOIN ba_district town ON ge.townId = town.id
     INNER JOIN ba_district village ON ge.villageId = village.id
-    , (SELECT @i:=0) AS itable
     <where>
       ge.deleted = 0
       AND divi.deleted = 0
@@ -263,6 +275,7 @@
       <if test="intakeName != null and intakeName != ''">
         AND ge.name LIKE CONCAT('%', #{intakeName}, '%')
       </if>
+
       <if test="divideName != null and divideName != ''">
         AND divi.name LIKE CONCAT('%', #{divideName}, '%')
       </if>
@@ -270,6 +283,19 @@
       <if test="blockName != null and blockName != ''">
         AND blo.name = #{blockName}
       </if>
+
+      <if test="isBinded == 0">
+        AND ge.id NOT IN(SELECT intakeId FROM pr_controller where deleted = 0)
+      </if>
+      <if test="isBinded == 1">
+        AND ge.id IN(SELECT intakeId FROM pr_controller where deleted = 0)
+      </if>
+      <if test="isBinded == null">
+
+      </if>
+      <if test="address != null and address != ''">
+        AND CONCAT(country.`name`, town.`name`, village.`name`) LIKE CONCAT('%', #{address}, '%')
+      </if>
     </where>
     ORDER BY ge.operateDt DESC
     <if test="pageCurr != null and pageSize != null">

--
Gitblit v1.8.0