From 145580fd820bb31334f2e71643413e846b7ce904 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期五, 30 十月 2026 15:53:20 +0800
Subject: [PATCH] feat:统计内容1-8页

---
 platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml |  276 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 271 insertions(+), 5 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 a8d0ad9..1061806 100644
--- a/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
+++ b/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
@@ -1208,8 +1208,8 @@
 		contract c
 		WHERE
 		c.del_flag = '0'
-		AND comp_id = 2089995177814495234
-		AND c.sign_date &gt;= CURDATE()
+		  AND (comp_id = 2089995177814495234 or comp_id = 2089996921978040321 or comp_id = 2089997578009128962 or comp_id = 2101966257365045249)
+		  AND c.sign_date &gt;= CURDATE()
 		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) smjbr,
 		(
 		SELECT
@@ -1218,8 +1218,8 @@
 		contract c
 		WHERE
 		c.del_flag = '0'
-		AND comp_id = 2089995177814495234
-		AND c.sign_date &gt;=DATE_FORMAT( CURDATE(), '%Y-%m-01' )
+		  AND (comp_id = 2089995177814495234 or comp_id = 2089996921978040321 or comp_id = 2089997578009128962 or comp_id = 2101966257365045249)
+		  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' )) smjby,
 		(
 		SELECT
@@ -1228,7 +1228,7 @@
 		contract c
 		WHERE
 		c.del_flag = '0'
-		AND comp_id = 2089995177814495234
+		  AND (comp_id = 2089995177814495234 or comp_id = 2089996921978040321 or comp_id = 2089997578009128962 or comp_id = 2101966257365045249)
 		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' )) smjbn,
 		(
@@ -2085,4 +2085,270 @@
 		ORDER BY
 		c.create_time DESC
 	</select>
+    <select id="homeZbjtYearAndMon" resultType="com.by4cloud.platformx.business.vo.HomeZbjtVo">
+		SELECT
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				WHERE
+					c.del_flag = '0'
+				  AND comp_id = 2056556196124250113
+				  AND c.sign_date &gt;= #{startMon}
+				  AND c.sign_date &lt; #{endMon}) sgbby,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				WHERE
+					c.del_flag = '0'
+				  AND comp_id = 2056556196124250113
+				  AND c.sign_date &gt;= #{startYear}
+				  AND c.sign_date &lt; #{endYear}) sgbbn,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				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,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				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,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				WHERE
+					c.del_flag = '0'
+				  AND comp_id = 2056556317461270529
+				  AND c.sign_date &gt;= #{startMon}
+				  AND c.sign_date &lt; #{endMon}) jxcby,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				WHERE
+					c.del_flag = '0'
+				  AND comp_id = 2056556317461270529
+				  AND c.sign_date &gt;= #{startYear}
+				  AND c.sign_date &lt; #{endYear}) jxcbn,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				WHERE
+					c.del_flag = '0'
+				  AND comp_id = 2056556421857497090
+				  AND c.sign_date &gt;= #{startMon}
+				  AND c.sign_date &lt; #{endMon}) tfby,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				WHERE
+					c.del_flag = '0'
+				  AND comp_id = 2056556421857497090
+				  AND c.sign_date &gt;= #{startYear}
+				  AND c.sign_date &lt; #{endYear}) tfbn,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				WHERE
+					c.del_flag = '0'
+				  AND comp_id = 2056556535640576002
+				  AND c.sign_date &gt;= #{startMon}
+				  AND c.sign_date &lt; #{endMon}) ymjby,
+			(
+				SELECT
+					IFNULL(sum( c.amount ),0)
+				FROM
+					contract c
+				WHERE
+					c.del_flag = '0'
+				  AND comp_id = 2056556535640576002
+				  AND c.sign_date &gt;= #{startYear}
+				  AND c.sign_date &lt; #{endYear}) ymjbn
+	</select>
+    <select id="pjsxywwcqkHT" resultType="com.by4cloud.platformx.business.vo.GcpbkwcqkItemVo">
+		SELECT
+			'閰嶄欢' yw,
+			'鏂板鍚堝悓' lb,
+			'鐭崇叅鏈�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+		WHERE
+			c.del_flag = '0'
+		  AND c.supply_attribute = #{type}
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND ( c.comp_id = 2089995177814495234 OR c.comp_id = 2089996921978040321 OR c.comp_id = 2089997578009128962 OR c.comp_id = 2101966257365045249 ) UNION ALL
+		SELECT
+			'閰嶄欢' yw,
+			'鏂板鍚堝悓' lb,
+			'鐭冲伐娉�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+		WHERE
+			c.del_flag = '0'
+		  AND c.supply_attribute = #{type}
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556196124250113 UNION ALL
+		SELECT
+			'閰嶄欢' yw,
+			'鏂板鍚堝悓' lb,
+			'閭㈠彴鍘�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+		WHERE
+			c.del_flag = '0'
+		  AND c.supply_attribute = #{type}
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556317461270529 UNION ALL
+		SELECT
+			'閰嶄欢' yw,
+			'鏂板鍚堝悓' lb,
+			'閫氭柟鍘�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+		WHERE
+			c.del_flag = '0'
+		  AND c.supply_attribute = #{type}
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556421857497090
+	</select>
+	<select id="cksxywwcqkHT" resultType="com.by4cloud.platformx.business.vo.GcpbkwcqkItemVo">
+		SELECT
+			'鍑哄彛' yw,
+			'鏂板鍚堝悓' lb,
+			'鐭崇叅鏈�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+				left join business_customer bc on bc.id=c.party_a_id and bc.export_service_attr=#{type}
+		WHERE
+			c.del_flag = '0'
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND ( c.comp_id = 2089995177814495234 OR c.comp_id = 2089996921978040321 OR c.comp_id = 2089997578009128962 OR c.comp_id = 2101966257365045249 ) UNION ALL
+		SELECT
+			'鍑哄彛' yw,
+			'鏂板鍚堝悓' lb,
+			'鐭冲伐娉�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+				left join business_customer bc on bc.id=c.party_a_id and bc.export_service_attr=#{type}
+
+		WHERE
+			c.del_flag = '0'
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556196124250113 UNION ALL
+		SELECT
+			'鍑哄彛' yw,
+			'鏂板鍚堝悓' lb,
+			'閭㈠彴鍘�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+				left join business_customer bc on bc.id=c.party_a_id and bc.export_service_attr=#{type}
+		WHERE
+			c.del_flag = '0'
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556317461270529 UNION ALL
+		SELECT
+			'鍑哄彛' yw,
+			'鏂板鍚堝悓' lb,
+			'閫氭柟鍘�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+				left join business_customer bc on bc.id=c.party_a_id and bc.export_service_attr=#{type}
+		WHERE
+			c.del_flag = '0'
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556421857497090
+	</select>
+	<select id="dxsxywwcqkHT" resultType="com.by4cloud.platformx.business.vo.GcpbkwcqkItemVo">
+		SELECT
+			'澶т慨' yw,
+			'鏂板鍚堝悓' lb,
+			'鐭崇叅鏈�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+		WHERE
+			c.del_flag = '0'
+		  AND c.supply_attribute = #{type}
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND ( c.comp_id = 2089995177814495234 OR c.comp_id = 2089996921978040321 OR c.comp_id = 2089997578009128962 OR c.comp_id = 2101966257365045249 ) UNION ALL
+		SELECT
+			'澶т慨' yw,
+			'鏂板鍚堝悓' lb,
+			'鐭冲伐娉�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+		WHERE
+			c.del_flag = '0'
+		  AND c.supply_attribute = #{type}
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556196124250113 UNION ALL
+		SELECT
+			'澶т慨' yw,
+			'鏂板鍚堝悓' lb,
+			'閭㈠彴鍘�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+		WHERE
+			c.del_flag = '0'
+		  AND c.supply_attribute = #{type}
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556317461270529 UNION ALL
+		SELECT
+			'澶т慨' yw,
+			'鏂板鍚堝悓' lb,
+			'閫氭柟鍘�' dw,
+			IFNULL( sum( amount ), 0 ) wc
+		FROM
+			contract c
+		WHERE
+			c.del_flag = '0'
+		  AND c.supply_attribute = #{type}
+		  AND c.sign_date &gt;= #{monstart}
+		  AND c.sign_date &lt;= #{monend}
+		  AND c.comp_id = 2056556421857497090
+	</select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1