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 | 1482 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 1,373 insertions(+), 109 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 f21b81e..1061806 100644
--- a/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
+++ b/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
@@ -57,6 +57,7 @@
 		) - IFNULL( t.billing_amout, 0 )) creditAmount
 		FROM
 		contract t
+		LEFT JOIN business_customer t1 ON ( t1.id = t.bus_guest_id AND t1.del_flag = '0' )
 		WHERE
 		(
 		IFNULL( t.billing_amout, 0 )&lt;(
@@ -72,6 +73,28 @@
 		</if>
 		<if test="queryDTO.partyA !=null and queryDTO.partyA !=''">
 			and t.party_a LIKE CONCAT('%', #{queryDTO.partyA}, '%')
+		</if>
+		<if test="queryDTO.queryProvince !=null and queryDTO.queryProvince !=''">
+			AND t1.province =  #{queryDTO.queryProvince}
+		</if>
+		<if test="queryDTO.queryServiceAttr !=null and queryDTO.queryServiceAttr !=''">
+			AND t1.export_service_attr =  #{queryDTO.queryServiceAttr}
+		</if>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='1'.toString()">
+			AND  t.payment_time &gt;= CURDATE()
+			AND  t.payment_time &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )
+		</if>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='2'.toString()">
+			AND  t.payment_time &gt;= DATE_FORMAT( CURDATE(), '%Y-01-01' )
+			AND  t.payment_time &lt; DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 YEAR ), '%Y-01-01' )
+		</if>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='3'.toString()">
+			AND  t.payment_time &gt;= DATE_FORMAT( CURDATE(), '%Y-01-01' )
+			AND  t.payment_time &lt; DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 YEAR ), '%Y-01-01' )
+		</if>
+		<if test="queryDTO.startTime !=null and queryDTO.endTime !=null">
+			AND  t.payment_time &gt;=  #{queryDTO.startTime}
+			AND  t.payment_time &lt;=  #{queryDTO.endTime}
 		</if>
 		<if test="queryDTO.productNames !=null and queryDTO.productNames !=''">
 			and (SELECT GROUP_CONCAT(DISTINCT t1.material_internal_name) from contract_subject_matter t1 WHERE t1.contract_id = t.id) LIKE CONCAT('%', #{queryDTO.productNames}, '%')
@@ -150,6 +173,33 @@
 		UNION ALL
 
 		SELECT
+		'鐭崇叅鏈哄叕鍙�' AS party_b_name,
+		SUM(CASE WHEN MONTH(sign_date) = 1 THEN amount ELSE 0 END) AS m01,
+		SUM(CASE WHEN MONTH(sign_date) = 2 THEN amount ELSE 0 END) AS m02,
+		SUM(CASE WHEN MONTH(sign_date) = 3 THEN amount ELSE 0 END) AS m03,
+		SUM(CASE WHEN MONTH(sign_date) = 4 THEN amount ELSE 0 END) AS m04,
+		SUM(CASE WHEN MONTH(sign_date) = 5 THEN amount ELSE 0 END) AS m05,
+		SUM(CASE WHEN MONTH(sign_date) = 6 THEN amount ELSE 0 END) AS m06,
+		SUM(CASE WHEN MONTH(sign_date) = 7 THEN amount ELSE 0 END) AS m07,
+		SUM(CASE WHEN MONTH(sign_date) = 8 THEN amount ELSE 0 END) AS m08,
+		SUM(CASE WHEN MONTH(sign_date) = 9 THEN amount ELSE 0 END) AS m09,
+		SUM(CASE WHEN MONTH(sign_date) = 10 THEN amount ELSE 0 END) AS m10,
+		SUM(CASE WHEN MONTH(sign_date) = 11 THEN amount ELSE 0 END) AS m11,
+		SUM(CASE WHEN MONTH(sign_date) = 12 THEN amount ELSE 0 END) AS m12,
+		SUM(amount) AS total_amt
+		FROM contract
+		WHERE
+		del_flag = '0'
+		AND amount IS NOT NULL
+		AND sign_date IS NOT NULL
+		AND YEAR(sign_date) = #{queryDTO.year}
+		AND	party_b_id IN (2089995177814495234,2089996921978040321,2089997578009128962,2101966257365045249)
+
+		GROUP BY party_b_id, party_b
+
+		UNION ALL
+
+		SELECT
 			'鎬昏' AS party_b_name,
 			SUM(CASE WHEN MONTH(sign_date) = 1 THEN amount ELSE 0 END),
 			SUM(CASE WHEN MONTH(sign_date) = 2 THEN amount ELSE 0 END),
@@ -170,10 +220,6 @@
 				AND amount IS NOT NULL
 				AND sign_date IS NOT NULL
 				AND YEAR(sign_date) = #{queryDTO.year}
-		AND	party_b_id IN
-		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
-			#{id}
-		</foreach>
 				) AS pivot_table
 			GROUP BY party_b_name
 			ORDER BY
@@ -315,6 +361,7 @@
 							and c.del_flag = '0'
 							and bc.del_flag = '0'
 							and bc.area_id = b.area_id
+							AND YEAR( c.sign_date ) = #{queryDTO.year}
 							and party_b_id IN
 							<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 								#{id}
@@ -334,6 +381,7 @@
 								and c.del_flag = '0'
 								and bc.del_flag = '0'
 								and bc.area_id = b.area_id
+								AND YEAR( c.sign_date ) = #{queryDTO.year}
 								and party_b_id IN
 								<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 									#{id}
@@ -353,6 +401,7 @@
 								and c.del_flag = '0'
 								and bc.del_flag = '0'
 								and bc.area_id = b.area_id
+								AND YEAR( c.sign_date ) = #{queryDTO.year}
 								and party_b_id IN
 								<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 									#{id}
@@ -372,6 +421,7 @@
 							and c.del_flag = '0'
 							and bc.del_flag = '0'
 							and bc.area_id = b.area_id
+							AND YEAR( c.sign_date ) = #{queryDTO.year}
 							and party_b_id IN
 							<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 								#{id}
@@ -391,6 +441,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.area_id = b.area_id
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -402,7 +453,8 @@
 			contract c
 				JOIN business_customer b ON c.party_a_id = b.id
 		WHERE
-			b.area_id IS NOT NULL
+		c.del_flag='0'
+		AND b.area_id IS NOT NULL
 		AND YEAR ( sign_date ) = #{queryDTO.year}
 		GROUP BY
 			b.area_id
@@ -411,19 +463,18 @@
 	<select id="contractAmountAnalysisByIndustry"
 			resultType="com.by4cloud.platformx.business.vo.ContractIncomeAnalysisAreaVo">
 		SELECT
-		b.industry_id area_id,
+		c.industry_code area_id,
 		SUM( CASE WHEN c.party_b_id = #{sgbCompId} THEN c.amount ELSE 0 END ) AS sgbze,
 		ROUND(
 		SUM( CASE WHEN c.party_b_id = #{sgbCompId} THEN c.amount ELSE 0 END ) / (
 		SELECT
 		SUM( amount )
 		FROM
-		contract c, business_customer bc
-		WHERE
-		bc.id = c.party_a_id
-		and c.del_flag = '0'
-		and bc.del_flag = '0'
-		and bc.industry_id = b.industry_id
+		contract c1
+		where
+		c1.del_flag = '0'
+		and c1.industry_code = c.industry_code
+		AND YEAR( sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -437,12 +488,11 @@
 		SELECT
 		SUM( amount )
 		FROM
-		contract c, business_customer bc
-		WHERE
-		bc.id = c.party_a_id
-		and c.del_flag = '0'
-		and bc.del_flag = '0'
-		and bc.industry_id = b.industry_id
+		contract c1
+		where
+		c1.del_flag = '0'
+		and c1.industry_code = c.industry_code
+		AND YEAR( sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -456,12 +506,11 @@
 		SELECT
 		SUM( amount )
 		FROM
-		contract c, business_customer bc
-		WHERE
-		bc.id = c.party_a_id
-		and c.del_flag = '0'
-		and bc.del_flag = '0'
-		and bc.industry_id = b.industry_id
+		contract c1
+		where
+		c1.del_flag = '0'
+		and c1.industry_code = c.industry_code
+		AND YEAR( sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -475,12 +524,11 @@
 		SELECT
 		SUM( amount )
 		FROM
-		contract c, business_customer bc
-		WHERE
-		bc.id = c.party_a_id
-		and c.del_flag = '0'
-		and bc.del_flag = '0'
-		and bc.industry_id = b.industry_id
+		contract c1
+		where
+		c1.del_flag = '0'
+		and c1.industry_code = c.industry_code
+		AND YEAR( sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -494,12 +542,11 @@
 		SELECT
 		SUM( amount )
 		FROM
-		contract c, business_customer bc
-		WHERE
-		bc.id = c.party_a_id
-		and c.del_flag = '0'
-		and bc.del_flag = '0'
-		and bc.industry_id = b.industry_id
+		contract c1
+		where
+		      c1.del_flag = '0'
+		and c1.industry_code = c.industry_code
+		AND YEAR( sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -509,12 +556,12 @@
 		) AS tfzb
 		FROM
 		contract c
-		JOIN business_customer b ON c.party_a_id = b.id
-		WHERE
-		b.industry_id IS NOT NULL
+		where
+		c.del_flag='0'
+		AND c.industry_code  is not null
 		AND YEAR ( sign_date ) = #{queryDTO.year}
 		GROUP BY
-		b.industry_id
+		c.industry_code
 
 	</select>
 	<select id="contractAmountAnalysisByMarket"
@@ -533,6 +580,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.class_id = b.class_id
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -552,6 +600,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.class_id = b.class_id
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -571,6 +620,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.class_id = b.class_id
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -590,6 +640,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.class_id = b.class_id
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -609,6 +660,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.class_id = b.class_id
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -620,7 +672,8 @@
 		contract c
 		JOIN business_customer b ON c.party_a_id = b.id
 		WHERE
-		b.class_id IS NOT NULL
+		c.del_flag='0'
+		AND b.class_id IS NOT NULL
 		AND YEAR ( sign_date ) = #{queryDTO.year}
 		GROUP BY
 		b.class_id
@@ -643,6 +696,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.export_service_attr = b.export_service_attr
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -662,6 +716,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.export_service_attr = b.export_service_attr
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -681,6 +736,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.export_service_attr = b.export_service_attr
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -700,6 +756,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.export_service_attr = b.export_service_attr
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -719,6 +776,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.export_service_attr = b.export_service_attr
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -730,7 +788,8 @@
 		contract c
 		JOIN business_customer b ON c.party_a_id = b.id
 		WHERE
-		b.export_service_attr IS NOT NULL
+		c.del_flag='0'
+		AND b.export_service_attr IS NOT NULL
 		AND YEAR ( sign_date ) = #{queryDTO.year}
 		GROUP BY
 		b.export_service_attr
@@ -750,6 +809,7 @@
 		WHERE
 		      ct.del_flag = '0'
 		and  ct.supply_attribute = c.supply_attribute
+		AND YEAR ( sign_date ) = #{queryDTO.year}
 		and ct.party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -767,6 +827,7 @@
 		WHERE
 		ct.del_flag = '0'
 		and  ct.supply_attribute = c.supply_attribute
+		AND YEAR ( sign_date ) = #{queryDTO.year}
 		and ct.party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -784,6 +845,7 @@
 		WHERE
 		ct.del_flag = '0'
 		and  ct.supply_attribute = c.supply_attribute
+		AND YEAR ( sign_date ) = #{queryDTO.year}
 		and ct.party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -801,6 +863,7 @@
 		WHERE
 		ct.del_flag = '0'
 		and  ct.supply_attribute = c.supply_attribute
+		AND YEAR ( sign_date ) = #{queryDTO.year}
 		and ct.party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -818,6 +881,7 @@
 		WHERE
 		ct.del_flag = '0'
 		and  ct.supply_attribute = c.supply_attribute
+		AND YEAR ( sign_date ) = #{queryDTO.year}
 		and ct.party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -873,7 +937,9 @@
 				DATE_FORMAT(sign_date, '%Y-%m') AS stat_month,
 				SUM(amount) AS total_amount
 			FROM contract
-			WHERE YEAR(sign_date) = #{queryDTO.year}
+			WHERE
+				del_flag='0'
+				AND YEAR(sign_date) = #{queryDTO.year}
 				 AND party_b_id = #{compId}
 			GROUP BY DATE_FORMAT(sign_date, '%Y-%m')
 		) curr ON m.stat_month = curr.stat_month
@@ -883,7 +949,8 @@
 				MONTH(sign_date) AS month_num,
 				SUM(amount) AS total_amount
 			FROM contract
-			WHERE YEAR(sign_date) = YEAR(CURDATE())
+			WHERE del_flag='0'
+			AND YEAR(sign_date) = YEAR(CURDATE())
 	  		AND party_b_id = #{compId}
 			GROUP BY DATE_FORMAT(sign_date, '%Y-%m'), MONTH(sign_date)
 		) prev ON m.month_num = prev.month_num + 1
@@ -892,7 +959,8 @@
 				MONTH(sign_date) AS month_num,
 				SUM(amount) AS total_amount
 			FROM contract
-			WHERE YEAR(sign_date) = YEAR(CURDATE()) - 1
+			WHERE del_flag='0'
+			AND YEAR(sign_date) = YEAR(CURDATE()) - 1
 			AND party_b_id = #{compId}
 			GROUP BY MONTH(sign_date)
 		) last_year ON m.month_num = last_year.month_num
@@ -915,6 +983,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.sales_model = b.sales_model
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -934,6 +1003,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.sales_model = b.sales_model
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -953,6 +1023,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.sales_model = b.sales_model
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -972,6 +1043,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.sales_model = b.sales_model
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -991,6 +1063,7 @@
 		and c.del_flag = '0'
 		and bc.del_flag = '0'
 		and bc.sales_model = b.sales_model
+		AND YEAR( c.sign_date ) = #{queryDTO.year}
 		and party_b_id IN
 		<foreach collection="compIds" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -1002,7 +1075,8 @@
 		contract c
 		JOIN business_customer b ON c.party_a_id = b.id
 		WHERE
-		b.sales_model IS NOT NULL
+		c.del_flag='0'
+		AND b.sales_model IS NOT NULL
 		AND YEAR ( sign_date ) = #{queryDTO.year}
 		GROUP BY
 		b.sales_model
@@ -1010,73 +1084,56 @@
 	</select>
     <select id="pageScope" resultType="com.by4cloud.platformx.business.vo.ContractPageVo">
 		SELECT
-			id,
-			contract_no,
-			contract_name,
-			party_a_id,
-			party_a,
-			party_b_id,
-			party_b,
-			amount,
-			currency,
-			contract_type,
-			supply_attribute,
-			contract_status,
-			contract_attribute,
-			sign_date,
-			sign_place,
-			effective_date,
-			delivery_cycle,
-			expiration_date,
-			attachment_url,
-			remark,
-			parent_id,
-			approve_time,
-			arrival_schedule_id,
-			accept_schedule_id,
-			erp_push_flag,
-			billing_status,
-			billing_amout,
-			next_schedule_name,
-			template_id,
-			sales_model,
-			paid_amount,
-			contract_category,
-			exec_frequency,
-			exec_times,
-			exec_day,
-			environment,
-			standard,
-			use_month,
-			after_ship_month,
-			ship_method,
-			ship_address,
-			packaging,
-			repair_period,
-			repair_breach_amount,
-			goods_short,
-			goods_short_breach_amount,
-			overdue_breach_amount,
-			terminate_contract,
-			court,
-			contract_attchment,
-			city,
-			region,
-			invoice_notice,
-			contract_tax,
-			create_by,
-			update_by,
-			create_time,
-			update_time,
-			del_flag,
-			comp_id,
+			c.id,
+			c.contract_no,
+			c.contract_name,
+			c.party_a_id,
+			c.party_a,
+			c.party_b_id,
+			c.party_b,
+			c.party_c_id,
+			c.amount,
+			c.contract_type,
+			c.supply_attribute,
+			c.contract_status,
+			c.contract_attribute,
+			c.sign_date,
+			c.sign_place,
+			c.effective_date,
+			c.delivery_cycle,
+			c.expiration_date,
+			c.attachment_url,
+			c.remark,
+			c.parent_id,
+			c.approve_time,
+			c.arrival_schedule_id,
+			c.accept_schedule_id,
+			c.billing_status,
+			c.billing_amout,
+			c.template_id,
+			c.sales_model,
+			c.paid_amount,
+			c.contract_category,
+			c.exec_frequency,
+		   	c.next_schedule_name,
+		    c.warranty_schedule_id,
+			c.comp_id,
+			c.center_push_flag,
+			c.annotate_flag,
+			c.last_attachment_url,
 			(select sum(delivered_quantity*unit_price) from contract_subject_matter csm where csm.contract_id = c.id) outAmount
 			FROM
-		contract c
+		contract c,
+		business_customer bc
 		WHERE
-			del_flag = '0'
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
 		<if test="queryDTO.contractName !=null and queryDTO.contractName !=''">
 			AND contract_name LIKE CONCAT('%', #{queryDTO.contractName}, '%')
+		</if>
+		<if test="queryDTO.contractNo !=null and queryDTO.contractNo !=''">
+			AND contract_no LIKE CONCAT('%', #{queryDTO.contractNo}, '%')
 		</if>
 		<if test="queryDTO.partyA !=null and queryDTO.partyA !=''">
 			AND party_a LIKE CONCAT('%', #{queryDTO.partyA}, '%')
@@ -1084,7 +1141,1214 @@
 		<if test="queryDTO.contractStatus !=null and queryDTO.contractStatus !=''">
 			AND contract_status =  #{queryDTO.contractStatus}
 		</if>
+		<if test="queryDTO.queryCompId !=null and queryDTO.queryCompId !=''">
+			AND c.comp_id =  #{queryDTO.queryCompId}
+		</if>
+		<if test="queryDTO.queryProvince !=null and queryDTO.queryProvince !=''">
+			AND bc.province =  #{queryDTO.queryProvince}
+		</if>
+		<if test="queryDTO.queryServiceAttr !=null and queryDTO.queryServiceAttr !=''">
+			AND bc.export_service_attr =  #{queryDTO.queryServiceAttr}
+		</if>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='1'.toString()">
+			AND c.sign_date &gt;= CURDATE()
+			AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )
+		</if>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='2'.toString()">
+			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>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='3'.toString()">
+			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>
+		<if test="queryDTO.startTime !=null and queryDTO.endTime !=null">
+			AND c.sign_date &gt;=  #{queryDTO.startTime}
+			AND c.sign_date &lt;=  #{queryDTO.endTime}
+		</if>
 		ORDER BY
-			create_time DESC
+			c.create_time DESC
+	</select>
+    <select id="homeZbjt" resultType="com.by4cloud.platformx.business.vo.HomeZbjtVo">
+		SELECT
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556196124250113
+		AND c.sign_date &gt;= CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) sgbbr,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556196124250113
+		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' )) sgbby,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556196124250113
+		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' )) sgbbn,
+		(
+		SELECT
+		sum( c.amount )
+		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;= CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) smjbr,
+		(
+		SELECT
+		sum( c.amount )
+		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;=DATE_FORMAT( CURDATE(), '%Y-%m-01' )
+		AND c.sign_date &lt; DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 MONTH ), '%Y-%m-01' )) smjby,
+		(
+		SELECT
+		sum( c.amount )
+		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;=DATE_FORMAT( CURDATE(), '%Y-01-01' )
+		AND c.sign_date &lt; DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 YEAR ), '%Y-01-01' )) smjbn,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556317461270529
+		AND c.sign_date &gt;=CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) jxcbr,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556317461270529
+		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' )) jxcby,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556317461270529
+		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' )) jxcbn,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556421857497090
+		AND c.sign_date &gt;=CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) tfbr,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556421857497090
+		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' )) tfby,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556421857497090
+		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' )) tfbn,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556535640576002
+		AND c.sign_date &gt;=CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) ymjbr,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556535640576002
+		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' )) ymjby,
+		(
+		SELECT
+		sum( c.amount )
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556535640576002
+		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' )) ymjbn
+	</select>
+    <select id="homeZgs" resultType="com.by4cloud.platformx.business.vo.HomeZgsVo">
+		SELECT
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '2'
+		AND c.comp_id = #{compId}
+		AND c.sign_date &gt;= CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) hbbr,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '2'
+	  	AND c.comp_id = #{compId}
+		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' )) hbby,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '2'
+	  	AND c.comp_id = #{compId}
+		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' )) hbbn,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '6'
+	  	AND c.comp_id = #{compId}
+		AND c.sign_date &gt;= CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) xbbr,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '6'
+	  	AND c.comp_id = #{compId}
+		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' )) xbby,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '6'
+	  	AND c.comp_id = #{compId}
+		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' )) xbbn,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '1'
+	  	AND c.comp_id = #{compId}
+		AND c.sign_date &gt;= CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) dbbr,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '1'
+	  	AND c.comp_id = #{compId}
+		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' )) dbby,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.area_id = '1'
+	  	AND c.comp_id = #{compId}
+		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' )) dbbn,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '5'
+			  AND c.comp_id = #{compId}
+			  AND c.sign_date &gt;= CURDATE()
+			  AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) xnbr,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '5'
+			  AND c.comp_id = #{compId}
+			  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' )) xnby,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '5'
+			  AND c.comp_id = #{compId}
+			  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' )) xnbn,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '4'
+			  AND c.comp_id = #{compId}
+			  AND c.sign_date &gt;= CURDATE()
+			  AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) znbr,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '4'
+			  AND c.comp_id = #{compId}
+			  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' )) znby,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '4'
+			  AND c.comp_id = #{compId}
+			  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' )) znbn,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '3'
+			  AND c.comp_id = #{compId}
+			  AND c.sign_date &gt;= CURDATE()
+			  AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) hdbr,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '3'
+			  AND c.comp_id = #{compId}
+			  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' )) hdby,
+		(
+			SELECT
+				sum(c.amount)
+			FROM
+				contract c,
+				business_customer bc
+			WHERE
+				c.del_flag = '0'
+			  AND bc.del_flag = '0'
+			  AND bc.id = c.party_a_id
+			  AND bc.area_id = '3'
+			  AND c.comp_id = #{compId}
+			  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' )) hdbn,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.export_service_attr = '2'
+	  	AND c.comp_id = #{compId}
+		AND c.sign_date &gt;= CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )) hwbr,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.export_service_attr = '2'
+	  	AND c.comp_id = #{compId}
+		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' )) hwby,
+		(
+		SELECT
+		sum(c.amount)
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		AND bc.export_service_attr = '2'
+	  	AND c.comp_id = #{compId}
+		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' )) hwbn
+	</select>
+	<select id="fourAssociation" resultType="com.by4cloud.platformx.business.vo.FourAssociationPageVo">
+		SELECT
+			c.id,
+			c.contract_no,
+			c.sign_date,
+		    c.amount,
+		    c.paid_amount,
+			c.billing_amout,
+			c.comp_id
+		FROM
+			contract c
+		where
+			c.del_flag = '0'
+		and c.contract_status = 2
+		order by
+			c.create_time
+
+	</select>
+    <select id="zbjtStatisticByContract" resultType="com.by4cloud.platformx.business.vo.ZbjtStatisticVo">
+		SELECT
+		(
+		SELECT
+			IFNULL(sum( c.amount ),0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND c.sign_date &gt;= CURDATE()
+		AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )
+		) AS br,
+		(
+		SELECT
+			IFNULL(sum( c.amount ),0)
+		FROM
+		contract c
+		WHERE
+		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' )
+		) AS bm,
+		(
+		SELECT
+			IFNULL(sum( c.amount ),0)
+		FROM
+		contract c
+		WHERE
+		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' )
+		) AS bn
+	</select>
+	<select id="zbjtStatisticByContractAmount" resultType="com.by4cloud.platformx.business.vo.ZbjtStatisticByContractAmountVo">
+		SELECT
+		(
+		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;= DATE_FORMAT( CURDATE(), '%Y-01-01' )
+		AND c.sign_date &lt; DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 YEAR ), '%Y-01-01' )
+		) AS smj,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556196124250113
+		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' )
+		) AS sgb,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556421857497090
+		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' )
+		) AS tfgs,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556317461270529
+		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' )
+		) AS jxc,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556535640576002
+		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' )
+		) AS ymj
+	</select>
+	<select id="zbjtStatisticByContractAmountPro" resultType="com.by4cloud.platformx.business.vo.ZbjtStatisticByContractAmountProVo">
+		SELECT
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2089995177814495234
+		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' )
+		) AS mj,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND 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' )
+		) AS hwc,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2089997578009128962
+		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' )
+		) AS zt,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2089996921978040321
+		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' )
+		) AS scd,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND comp_id = 2056556196124250113
+		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' )
+		) AS gyb,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND  (comp_id = 2056556421857497090 or comp_id = 2056556317461270529 or comp_id = 2056556535640576002 )
+		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' )
+		) AS qt
+	</select>
+	<select id="zbjtStatisticByContractAmountClass" resultType="com.by4cloud.platformx.business.vo.ZbjtStatisticByContractAmountClassVo">
+		SELECT
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c, business_customer bc
+		WHERE
+		bc.id = c.party_a_id
+		and c.del_flag = '0'
+		and bc.del_flag = '0'
+		and bc.class_id = '1'
+		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' )
+		) AS jz,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c, business_customer bc
+		WHERE
+		bc.id = c.party_a_id
+		and c.del_flag = '0'
+		and bc.del_flag = '0'
+		and bc.class_id = '2'
+		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' )
+		) AS zm,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c, business_customer bc
+		WHERE
+		bc.id = c.party_a_id
+		and c.del_flag = '0'
+		and bc.del_flag = '0'
+		and bc.class_id = '3'
+		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' )
+		) AS wb
+	</select>
+	<select id="zbjtStatisticByContractAmountSupply" resultType="com.by4cloud.platformx.business.vo.ZbjtStatisticByContractAmountSupplyVo">
+		SELECT
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND c.supply_attribute='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' )
+		) AS cp,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND c.supply_attribute='1'
+		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' )
+		) AS bj,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND c.supply_attribute='2'
+		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' )
+		) AS dx,
+		(
+		SELECT
+		IFNULL(sum( c.amount ) ,0)
+		FROM
+		contract c
+		WHERE
+		c.del_flag = '0'
+		AND c.supply_attribute='3'
+		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' )
+		) AS qt
+	</select>
+	<select id="zbjtStatisticByContractAmountYS"
+			resultType="com.by4cloud.platformx.business.vo.ZbjtStatisticByContractAmountClassVo">
+		SELECT
+		(
+		SELECT
+		IFNULL(sum( c.billing_amout - paid_amount ) ,0)
+		FROM
+		contract c, business_customer bc
+		WHERE
+		bc.id = c.party_a_id
+		and c.del_flag = '0'
+		and bc.del_flag = '0'
+		and bc.class_id = '1'
+		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' )
+		) AS jz,
+		(
+		SELECT
+		IFNULL(sum( c.billing_amout - paid_amount ) ,0)
+		FROM
+		contract c, business_customer bc
+		WHERE
+		bc.id = c.party_a_id
+		and c.del_flag = '0'
+		and bc.del_flag = '0'
+		and bc.class_id = '2'
+		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' )
+		) AS zm,
+		(
+		SELECT
+		IFNULL(sum( c.billing_amout - paid_amount ) ,0)
+		FROM
+		contract c, business_customer bc
+		WHERE
+		bc.id = c.party_a_id
+		and c.del_flag = '0'
+		and bc.del_flag = '0'
+		and bc.class_id = '3'
+		and c.billing_amout &gt;= c.paid_amount
+		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' )
+		) AS wb
+	</select>
+	<select id="zbjtIndicatorTrend" resultType="com.by4cloud.platformx.business.vo.ZbjtIndicatorTrendVo">
+		WITH RECURSIVE month_series AS (
+		SELECT
+		DATE( #{startMon} ) AS month_start UNION ALL
+		SELECT
+		DATE_ADD( month_start, INTERVAL 1 MONTH )
+		FROM
+		month_series
+		WHERE
+		month_start &lt; DATE( #{endMon} )
+		) SELECT
+		DATE_FORMAT( ms.month_start, '%Y-%m' ) AS `yearMon`,
+		COALESCE ( SUM( c.amount ), 0 ) AS `je`
+		FROM
+		month_series ms
+		LEFT JOIN contract c ON DATE_FORMAT( c.sign_date, '%Y-%m' ) = DATE_FORMAT( ms.month_start, '%Y-%m' )
+		GROUP BY
+		ms.month_start
+		ORDER BY
+		ms.month_start;
+	</select>
+	<select id="zbjtPlanAchieced" resultType="com.by4cloud.platformx.business.vo.ZbjtIndicatorTrendVo">
+		WITH RECURSIVE month_series AS (
+			SELECT
+				DATE_FORMAT( CURDATE(), '%Y-%m-01' ) AS month_start UNION ALL
+			SELECT
+				DATE_SUB( month_start, INTERVAL 1 MONTH )
+			FROM
+				month_series
+			WHERE
+				month_start &gt; DATE_SUB( DATE_FORMAT( CURDATE(), '%Y-%m-01' ), INTERVAL 11 MONTH )
+		) SELECT
+			  DATE_FORMAT( ms.month_start, '%Y-%m' ) AS `yearMon`,
+			  COALESCE ( SUM( c.amount ), 0 ) AS `je`
+		FROM
+			month_series ms
+				LEFT JOIN contract c ON DATE_FORMAT( c.sign_date, '%Y-%m' ) = DATE_FORMAT( ms.month_start, '%Y-%m' )
+				AND c.del_flag = '0'
+				<if test="compId !=null">
+					AND c.comp_id = #{compId}
+				</if>
+		GROUP BY
+			ms.month_start
+		ORDER BY
+			ms.month_start ASC;
+	</select>
+	<select id="zbjtPlanAchiecedSmj" resultType="com.by4cloud.platformx.business.vo.ZbjtIndicatorTrendVo">
+		WITH RECURSIVE month_series AS (
+		SELECT
+		DATE_FORMAT( CURDATE(), '%Y-%m-01' ) AS month_start UNION ALL
+		SELECT
+		DATE_SUB( month_start, INTERVAL 1 MONTH )
+		FROM
+		month_series
+		WHERE
+		month_start &gt; DATE_SUB( DATE_FORMAT( CURDATE(), '%Y-%m-01' ), INTERVAL 11 MONTH )
+		) SELECT
+		DATE_FORMAT( ms.month_start, '%m' ) AS `yearMon`,
+		COALESCE ( SUM( c.amount ), 0 ) AS `je`
+		FROM
+		month_series ms
+		LEFT JOIN contract c ON DATE_FORMAT( c.sign_date, '%Y-%m' ) = DATE_FORMAT( ms.month_start, '%Y-%m' )
+		AND c.del_flag = '0'
+			AND (comp_id = 2089995177814495234 or comp_id = 2089996921978040321 or comp_id = 2089997578009128962 or comp_id = 2101966257365045249)
+		GROUP BY
+		ms.month_start
+		ORDER BY
+		ms.month_start ASC;
+	</select>
+    <select id="export" resultType="com.by4cloud.platformx.business.vo.ContractExportExceVO">
+		SELECT
+		c.id,
+		c.contract_no,
+		c.contract_name,
+		c.party_a_id,
+		c.party_a,
+		c.party_b_id,
+		c.party_b,
+		c.party_c_id,
+		c.amount,
+		c.contract_type,
+		c.supply_attribute,
+		c.contract_status,
+		c.contract_attribute,
+		c.sign_date,
+		c.sign_place,
+		c.effective_date,
+		c.delivery_cycle,
+		c.expiration_date,
+		c.attachment_url,
+		c.remark,
+		c.parent_id,
+		c.approve_time,
+		c.arrival_schedule_id,
+		c.accept_schedule_id,
+		c.billing_status,
+		c.billing_amout,
+		c.template_id,
+		c.sales_model,
+		c.paid_amount,
+		c.contract_category,
+		c.economic_matters,
+		c.exec_frequency,
+		c.next_schedule_name,
+		c.warranty_schedule_id,
+		c.comp_id,
+		c.center_push_flag,
+		c.last_attachment_url
+		FROM
+		contract c,
+		business_customer bc
+		WHERE
+		c.del_flag = '0'
+		AND bc.del_flag = '0'
+		AND bc.id = c.party_a_id
+		<if test="queryDTO.contractName !=null and queryDTO.contractName !=''">
+			AND contract_name LIKE CONCAT('%', #{queryDTO.contractName}, '%')
+		</if>
+		<if test="queryDTO.contractNo !=null and queryDTO.contractNo !=''">
+			AND contract_no LIKE CONCAT('%', #{queryDTO.contractNo}, '%')
+		</if>
+		<if test="queryDTO.partyA !=null and queryDTO.partyA !=''">
+			AND party_a LIKE CONCAT('%', #{queryDTO.partyA}, '%')
+		</if>
+		<if test="queryDTO.contractStatus !=null and queryDTO.contractStatus !=''">
+			AND contract_status =  #{queryDTO.contractStatus}
+		</if>
+		<if test="queryDTO.queryCompId !=null and queryDTO.queryCompId !=''">
+			AND c.comp_id =  #{queryDTO.queryCompId}
+		</if>
+		<if test="queryDTO.queryProvince !=null and queryDTO.queryProvince !=''">
+			AND bc.province =  #{queryDTO.queryProvince}
+		</if>
+		<if test="queryDTO.queryServiceAttr !=null and queryDTO.queryServiceAttr !=''">
+			AND bc.export_service_attr =  #{queryDTO.queryServiceAttr}
+		</if>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='1'.toString()">
+			AND c.sign_date &gt;= CURDATE()
+			AND c.sign_date &lt; DATE_ADD( CURDATE(), INTERVAL 1 DAY )
+		</if>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='2'.toString()">
+			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>
+		<if test="queryDTO.queryType !=null and queryDTO.queryType !='' and queryDTO.queryType =='3'.toString()">
+			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>
+		<if test="queryDTO.startTime !=null and queryDTO.endTime !=null">
+			AND c.sign_date &gt;=  #{queryDTO.startTime}
+			AND c.sign_date &lt;=  #{queryDTO.endTime}
+		</if>
+		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