From e02812df9217d3e50a368a8234c07c60c64c0ff4 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期三, 05 八月 2026 08:34:26 +0800
Subject: [PATCH] feat:新增石煤机 机械厂模版合同/客户数据主数据同步接口/合同履约进度新增质保结束操作/合同开票状态 修改为待开 可开 已开/出库逻辑完善
---
platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml | 64 +++++++++++++++++++++++++++++++-
1 files changed, 62 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 aa2b472..9fb6ef8 100644
--- a/platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml
+++ b/platformx-business-finance-biz/src/main/resources/mapper/ProductMapper.xml
@@ -5,11 +5,9 @@
<resultMap id="productMap" type="com.by4cloud.platformx.business.entity.Product">
<id property="id" column="id"/>
- <result property="categoryId" column="category_id"/>
<result property="productName" column="product_name"/>
<result property="erpCode" column="erp_code"/>
<result property="mainCode" column="main_code"/>
- <result property="price" column="price"/>
<result property="taxRate" column="tax_rate"/>
<result property="compId" column="comp_id"/>
<result property="createBy" column="create_by"/>
@@ -18,4 +16,66 @@
<result property="updateTime" column="update_time"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
+ <select id="getProductListByScope" 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
+ FROM
+ product t
+ WHERE
+ del_flag = '0'
+ <if test="product.productName !=null and product.productName !=''">
+ and t.product_name LIKE CONCAT('%', #{product.productName}, '%')
+ </if>
+ AND (
+ NOT EXISTS ( SELECT 1 FROM product t1 WHERE t1.parent_id = t.id ))
+ </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