From 96118de3ac74f5468cf5d4ac73d6ea3bec1da010 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期五, 20 十一月 2026 14:36:25 +0800
Subject: [PATCH] feat:新增销售指标 产品板块 重点工作 专项业务 产品收入和合同统计修改功能 feat:承兑新增承兑编号字段 feat:客商主数据更新名称 专项业务去年同月字段 机动车销售发票地址字段及判断 feat:银行流水更新客户id feat:机动车销售发票新增税务及代码字段 feat:流水更新按钮参数 feat:检索新增标的物运维按钮

---
 platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml |  100 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 80 insertions(+), 20 deletions(-)

diff --git a/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml b/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
index 1061806..5205ff9 100644
--- a/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
+++ b/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
@@ -1121,6 +1121,7 @@
 			c.center_push_flag,
 			c.annotate_flag,
 			c.last_attachment_url,
+			c.erp_push_flag,
 			(select sum(delivered_quantity*unit_price) from contract_subject_matter csm where csm.contract_id = c.id) outAmount
 			FROM
 		contract c,
@@ -1149,6 +1150,9 @@
 		</if>
 		<if test="queryDTO.queryServiceAttr !=null and queryDTO.queryServiceAttr !=''">
 			AND bc.export_service_attr =  #{queryDTO.queryServiceAttr}
+		</if>
+		<if test="queryDTO.amount !=null ">
+			AND c.amount =  #{queryDTO.amount}
 		</if>
 		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='1'.toString()">
 			AND c.sign_date &gt;= CURDATE()
@@ -1648,6 +1652,15 @@
 		c.del_flag = '0'
 		AND c.sign_date &gt;= CURDATE()
 		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )
+		<if test="compIds != null and compIds.size() > 0">
+			AND c.comp_id IN
+			<foreach collection="compIds" item="id" open="(" separator="," close=")">
+				#{id}
+			</foreach>
+		</if>
+		<if test="compId!=null">
+			AND c.comp_id = #{compId}
+		</if>
 		) AS br,
 		(
 		SELECT
@@ -1658,6 +1671,15 @@
 		c.del_flag = '0'
 		AND c.sign_date &gt;= DATE_FORMAT( CURDATE(), '%Y-%m-01' )
 		AND c.sign_date &lt; DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 MONTH ), '%Y-%m-01' )
+		<if test="compIds != null and compIds.size() > 0">
+			AND c.comp_id IN
+			<foreach collection="compIds" item="id" open="(" separator="," close=")">
+				#{id}
+			</foreach>
+		</if>
+		<if test="compId!=null">
+			AND c.comp_id = #{compId}
+		</if>
 		) AS bm,
 		(
 		SELECT
@@ -1668,6 +1690,15 @@
 		c.del_flag = '0'
 		AND c.sign_date &gt;= DATE_FORMAT( CURDATE(), '%Y-01-01' )
 		AND c.sign_date &lt; DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 YEAR ), '%Y-01-01' )
+		<if test="compIds != null and compIds.size() > 0">
+			AND c.comp_id IN
+			<foreach collection="compIds" item="id" open="(" separator="," close=")">
+				#{id}
+			</foreach>
+		</if>
+		<if test="compId!=null">
+			AND c.comp_id = #{compId}
+		</if>
 		) AS bn
 	</select>
 	<select id="zbjtStatisticByContractAmount" resultType="com.by4cloud.platformx.business.vo.ZbjtStatisticByContractAmountVo">
@@ -2095,8 +2126,10 @@
 				WHERE
 					c.del_flag = '0'
 				  AND comp_id = 2056556196124250113
-				  AND c.sign_date &gt;= #{startMon}
-				  AND c.sign_date &lt; #{endMon}) sgbby,
+				  AND ((c.sign_date &gt;= #{startMon}
+				  AND c.sign_date &lt; #{endMon})
+					or c.sign_date is null)
+			    ) sgbby,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2105,8 +2138,10 @@
 				WHERE
 					c.del_flag = '0'
 				  AND comp_id = 2056556196124250113
-				  AND c.sign_date &gt;= #{startYear}
-				  AND c.sign_date &lt; #{endYear}) sgbbn,
+				  AND (( c.sign_date &gt;= #{startYear}
+				  AND c.sign_date &lt; #{endYear})
+				   or c.sign_date is null)
+			    ) sgbbn,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2115,8 +2150,9 @@
 				WHERE
 					c.del_flag = '0'
 				  AND (comp_id = 2089995177814495234 or comp_id = 2089996921978040321 or comp_id = 2089997578009128962 or comp_id = 2101966257365045249)
-				  AND c.sign_date &gt;= #{startMon}
-				  AND c.sign_date &lt; #{endMon}) smjby,
+				  AND ((c.sign_date &gt;= #{startMon}
+					AND c.sign_date &lt; #{endMon})
+					or c.sign_date is null)) smjby,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2125,8 +2161,9 @@
 				WHERE
 					c.del_flag = '0'
 				  AND (comp_id = 2089995177814495234 or comp_id = 2089996921978040321 or comp_id = 2089997578009128962 or comp_id = 2101966257365045249)
-				  AND c.sign_date &gt;= #{startYear}
-				  AND c.sign_date &lt; #{endYear}) smjbn,
+				  AND (( c.sign_date &gt;= #{startYear}
+					AND c.sign_date &lt; #{endYear})
+					or c.sign_date is null)) smjbn,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2135,8 +2172,9 @@
 				WHERE
 					c.del_flag = '0'
 				  AND comp_id = 2056556317461270529
-				  AND c.sign_date &gt;= #{startMon}
-				  AND c.sign_date &lt; #{endMon}) jxcby,
+				  AND ((c.sign_date &gt;= #{startMon}
+					AND c.sign_date &lt; #{endMon})
+					or c.sign_date is null)) jxcby,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2145,8 +2183,9 @@
 				WHERE
 					c.del_flag = '0'
 				  AND comp_id = 2056556317461270529
-				  AND c.sign_date &gt;= #{startYear}
-				  AND c.sign_date &lt; #{endYear}) jxcbn,
+				  AND (( c.sign_date &gt;= #{startYear}
+					AND c.sign_date &lt; #{endYear})
+					or c.sign_date is null)) jxcbn,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2155,8 +2194,9 @@
 				WHERE
 					c.del_flag = '0'
 				  AND comp_id = 2056556421857497090
-				  AND c.sign_date &gt;= #{startMon}
-				  AND c.sign_date &lt; #{endMon}) tfby,
+				  AND ((c.sign_date &gt;= #{startMon}
+					AND c.sign_date &lt; #{endMon})
+					or c.sign_date is null)) tfby,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2165,8 +2205,9 @@
 				WHERE
 					c.del_flag = '0'
 				  AND comp_id = 2056556421857497090
-				  AND c.sign_date &gt;= #{startYear}
-				  AND c.sign_date &lt; #{endYear}) tfbn,
+				  AND (( c.sign_date &gt;= #{startYear}
+					AND c.sign_date &lt; #{endYear})
+					or c.sign_date is null)) tfbn,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2175,8 +2216,9 @@
 				WHERE
 					c.del_flag = '0'
 				  AND comp_id = 2056556535640576002
-				  AND c.sign_date &gt;= #{startMon}
-				  AND c.sign_date &lt; #{endMon}) ymjby,
+				  AND ((c.sign_date &gt;= #{startMon}
+					AND c.sign_date &lt; #{endMon})
+					or c.sign_date is null)) ymjby,
 			(
 				SELECT
 					IFNULL(sum( c.amount ),0)
@@ -2185,8 +2227,9 @@
 				WHERE
 					c.del_flag = '0'
 				  AND comp_id = 2056556535640576002
-				  AND c.sign_date &gt;= #{startYear}
-				  AND c.sign_date &lt; #{endYear}) ymjbn
+				  AND (( c.sign_date &gt;= #{startYear}
+					AND c.sign_date &lt; #{endYear})
+					or c.sign_date is null)) ymjbn
 	</select>
     <select id="pjsxywwcqkHT" resultType="com.by4cloud.platformx.business.vo.GcpbkwcqkItemVo">
 		SELECT
@@ -2351,4 +2394,21 @@
 		  AND c.sign_date &lt;= #{monend}
 		  AND c.comp_id = 2056556421857497090
 	</select>
+	<select id="homeZgsColum" resultType="java.lang.String">
+		SELECT bc.province
+		FROM contract c
+				 LEFT JOIN business_customer bc ON bc.id = c.party_a_id
+		WHERE bc.province IS NOT NULL
+		<if test="compIds != null and compIds.size() > 0">
+			AND c.comp_id IN
+			<foreach collection="compIds" item="id" open="(" separator="," close=")">
+				#{id}
+			</foreach>
+		</if>
+		<if test="compId!=null">
+			AND c.comp_id = #{compId}
+		</if>
+		GROUP BY bc.province;
+
+	</select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1