From 6e492d4d16efff769c2928109fb6a085fcad948d Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期一, 15 六月 2026 08:55:01 +0800
Subject: [PATCH] feat:付款合同编号不存在时错误提示

---
 platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml b/platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml
index b3cfb0d..9fb6ef8 100644
--- a/platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml
+++ b/platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml
@@ -16,7 +16,7 @@
         <result property="updateTime" column="update_time"/>
         <result property="delFlag" column="del_flag"/>
   </resultMap>
-    <select id="getProductListByScope" resultType="com.by4cloud.platformx.business.entity.Product">
+    <select id="getProductListByScope" resultType="com.by4cloud.platformx.business.vo.ProductSelectVo">
 		SELECT
 			t.id,
 			t.product_name,
@@ -42,6 +42,40 @@
 		</if>
 		  AND (
 			NOT EXISTS ( SELECT 1 FROM product t1 WHERE t1.parent_id = t.id ))
-			limit 30
+	</select>
+	<select id="getProductListByParentId" resultType="com.by4cloud.platformx.business.vo.ProductSelectVo">
+		SELECT
+			t.id,
+			t.product_name,
+			t.main_code,
+			t.erp_code,
+			t.product_type,
+			t.tax_rate,
+			t.tax_class,
+			t.tax_code,
+			t.parent_id,
+			t.create_by,
+			t.update_by,
+			t.create_time,
+			t.update_time,
+			t.del_flag,
+			t.comp_id ,
+			( SELECT count( 1 ) FROM product t1 WHERE t1.parent_id = t.id ) AS childNum
+		FROM
+			product t
+		WHERE
+			del_flag = '0'
+		<if test="queryDTO.productName !=null and queryDTO.productName !=''">
+			and t.product_name LIKE CONCAT('%', #{queryDTO.productName}, '%')
+		</if>
+		<if test="queryDTO.parentId !=null ">
+			and t.parent_id = #{queryDTO.parentId}
+		</if>
+		<if test="queryDTO.contractCategory !=null and queryDTO.contractCategory !='' and queryDTO.contractCategory=='water_house'">
+			and t.erp_code in
+			<foreach collection="erpCodes" item="erp" open="(" separator="," close=")">
+				#{erp}
+			</foreach>
+		</if>
 	</select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1