From c631edf462f4ab19403f5194dec743168e2a0e79 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期一, 07 九月 2026 14:22:10 +0800
Subject: [PATCH] feat:合并开票
---
platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 48 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 e9319cd..2e84309 100644
--- a/platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml
+++ b/platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml
@@ -46,7 +46,7 @@
<select id="getProductListByParentId" resultType="com.by4cloud.platformx.business.vo.ProductSelectVo">
SELECT
t.id,
- t.product_name,
+ CONCAT(t.product_name,IFNULL(t.product_type,'')) product_name,
t.main_code,
t.erp_code,
t.product_type,
@@ -66,7 +66,8 @@
WHERE
del_flag = '0'
<if test="queryDTO.productName !=null and queryDTO.productName !=''">
- and t.product_name LIKE CONCAT('%', #{queryDTO.productName}, '%')
+ and ( t.product_name LIKE CONCAT('%', #{queryDTO.productName}, '%') or
+ t.erp_code LIKE CONCAT('%', #{queryDTO.productName}, '%'))
</if>
<if test="queryDTO.parentId !=null ">
and t.parent_id = #{queryDTO.parentId}
@@ -87,4 +88,49 @@
</choose>
</select>
+ <select id="getProductSMJListByParentId" resultType="com.by4cloud.platformx.business.vo.ProductSelectVo">
+ SELECT
+ t.id,
+ CONCAT(t.product_name,IFNULL(t.product_type,'')) 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}, '%') or
+ t.erp_code LIKE CONCAT('%', #{queryDTO.productName}, '%'))
+ </if>
+ <if test="queryDTO.parentId !=null ">
+ and t.parent_id = #{queryDTO.parentId}
+ </if>
+ <choose>
+ <when 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>
+ </when>
+ <otherwise>
+ and t.erp_code not in
+ <foreach collection="erpCodes" item="erp" open="(" separator="," close=")">
+ #{erp}
+ </foreach>
+ </otherwise>
+ </choose>
+ and ( t.comp_id = 2089995177814495234 or t.comp_id = 2089996921978040321 or t.comp_id = 2089997578009128962)
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1