From 2b0b64182263d922b946ec898070e59b602382dc Mon Sep 17 00:00:00 2001
From: Bang Hu <hu_bang@hotmail.com>
Date: 星期四, 11 九月 2025 18:38:09 +0800
Subject: [PATCH] 交易审批多节点问题处理完善

---
 src/main/resources/mapper/ReportResultSubmissionMapper.xml |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/main/resources/mapper/ReportResultSubmissionMapper.xml b/src/main/resources/mapper/ReportResultSubmissionMapper.xml
index 447d8ef..9e1f1a9 100644
--- a/src/main/resources/mapper/ReportResultSubmissionMapper.xml
+++ b/src/main/resources/mapper/ReportResultSubmissionMapper.xml
@@ -5,16 +5,25 @@
     <!-- 鏍规嵁鏉′欢鏌ヨ浜у搧ID鍒楄〃 -->
     <select id="selectProductIdsByConditions" resultType="java.lang.String">
         SELECT id
-        FROM tb_report_result_submission
+        FROM tb_report_product_submission
         WHERE deleted = '0'
         <if test="industryId != null and industryId != ''">
-            AND industrial_chain_id = #{industryId}
+            AND #{industryId} = ANY ( STRING_TO_ARRAY( industrial_chain_id, ',' ) )
         </if>
-        <if test="unitProjectId != null and unitProjectId != ''">
-            AND important_area_id = #{unitProjectId}
+        <if test="unitProjectId != null and unitProjectId.size() > 0">
+            AND
+            <foreach collection="unitProjectId" item="importantAreaId" open="(" separator="OR" close=")">
+                #{importantAreaId} = ANY ( STRING_TO_ARRAY( important_area_id, ',' ) )
+            </foreach>
+        </if>
+        <if test="importantDistrictId != null and importantDistrictId.size() > 0">
+            AND
+            <foreach collection="importantDistrictId" item="importantDistrictId" open="(" separator="OR" close=")">
+                #{importantDistrictId} = ANY ( STRING_TO_ARRAY( important_district_id, ',' ) )
+            </foreach>
         </if>
         <if test="productTypeId != null and productTypeId != ''">
-            AND type_id = #{productTypeId}
+            AND technology_type_id = #{productTypeId}
         </if>
         <if test="productSubTypeId != null and productSubTypeId != ''">
             AND type_child_id = #{productSubTypeId}

--
Gitblit v1.8.0