From 15369bf819ca82896bbcada782e6babf2a7d64c9 Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Tue, 14 Nov 2023 13:49:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cjl' into qa

---
 screen-api/src/main/resources/mapper/AllocationMapper.xml |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/screen-api/src/main/resources/mapper/AllocationMapper.xml b/screen-api/src/main/resources/mapper/AllocationMapper.xml
index 6753aa6..098ebda 100644
--- a/screen-api/src/main/resources/mapper/AllocationMapper.xml
+++ b/screen-api/src/main/resources/mapper/AllocationMapper.xml
@@ -67,14 +67,23 @@
         left join allocation_extension t1 on t1.allocation_id = allocation.allocation_id and t1.is_del =0 and t1.is_invalid = 0 and t1.state = 30
         <where>
             1 = 1 and allocation.is_del = 0
-            <if test="allocation.unitId != null">
-                and allocation.unit_id = #{allocation.unitId}
+            <if test="allocation.unitId != null and allocation.unitId.size != 0">
+                and allocation.unit_id in
+                <foreach collection="allocation.unitId" item="id" index="index" open="(" close=")" separator=",">
+                    #{id}
+                </foreach>
             </if>
-            <if test="allocation.polluteType != null and allocation.polluteType != 0">
-                and allocation.pollute_type = #{allocation.polluteType}
+            <if test="allocation.polluteType != null and allocation.polluteType.size != 0">
+                and allocation.pollute_type in
+                <foreach collection="allocation.polluteType" item="id" index="index" open="(" close=")" separator=",">
+                    #{id}
+                </foreach>
             </if>
-            <if test="allocation.state != null and allocation.state != 0">
-                and allocation.state = #{allocation.state}
+            <if test="allocation.state != null and allocation.state.size != 0">
+                and allocation.state in
+                <foreach collection="allocation.state" item="id" index="index" open="(" close=")" separator=",">
+                    #{id}
+                </foreach>
             </if>
             <if test="allocation.investigationType != null and allocation.investigationType != 0">
                 and allocation.investigation_type = #{allocation.investigationType}

--
Gitblit v1.8.0