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 | 337 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 332 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 9c908d7..5205ff9 100644
--- a/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
+++ b/platformx-business-finance-biz/src/main/resources/mapper/ContractMapper.xml
@@ -1119,7 +1119,9 @@
c.warranty_schedule_id,
c.comp_id,
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,
@@ -1148,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 >= CURDATE()
@@ -1207,8 +1212,8 @@
contract c
WHERE
c.del_flag = '0'
- AND comp_id = 2089995177814495234
- AND c.sign_date >= CURDATE()
+ AND (comp_id = 2089995177814495234 or comp_id = 2089996921978040321 or comp_id = 2089997578009128962 or comp_id = 2101966257365045249)
+ AND c.sign_date >= CURDATE()
AND c.sign_date < DATE_ADD( CURDATE(), INTERVAL 1 DAY )) smjbr,
(
SELECT
@@ -1217,8 +1222,8 @@
contract c
WHERE
c.del_flag = '0'
- AND comp_id = 2089995177814495234
- AND c.sign_date >=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 >=DATE_FORMAT( CURDATE(), '%Y-%m-01' )
AND c.sign_date < DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 MONTH ), '%Y-%m-01' )) smjby,
(
SELECT
@@ -1227,7 +1232,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 >=DATE_FORMAT( CURDATE(), '%Y-01-01' )
AND c.sign_date < DATE_FORMAT( DATE_ADD( CURDATE(), INTERVAL 1 YEAR ), '%Y-01-01' )) smjbn,
(
@@ -1647,6 +1652,15 @@
c.del_flag = '0'
AND c.sign_date >= CURDATE()
AND c.sign_date < 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
@@ -1657,6 +1671,15 @@
c.del_flag = '0'
AND c.sign_date >= DATE_FORMAT( CURDATE(), '%Y-%m-01' )
AND c.sign_date < 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
@@ -1667,6 +1690,15 @@
c.del_flag = '0'
AND c.sign_date >= DATE_FORMAT( CURDATE(), '%Y-01-01' )
AND c.sign_date < 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">
@@ -2084,4 +2116,299 @@
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 >= #{startMon}
+ AND c.sign_date < #{endMon})
+ or c.sign_date is null)
+ ) sgbby,
+ (
+ SELECT
+ IFNULL(sum( c.amount ),0)
+ FROM
+ contract c
+ WHERE
+ c.del_flag = '0'
+ AND comp_id = 2056556196124250113
+ AND (( c.sign_date >= #{startYear}
+ AND c.sign_date < #{endYear})
+ or c.sign_date is null)
+ ) 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 >= #{startMon}
+ AND c.sign_date < #{endMon})
+ or c.sign_date is null)) 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 >= #{startYear}
+ AND c.sign_date < #{endYear})
+ or c.sign_date is null)) smjbn,
+ (
+ SELECT
+ IFNULL(sum( c.amount ),0)
+ FROM
+ contract c
+ WHERE
+ c.del_flag = '0'
+ AND comp_id = 2056556317461270529
+ AND ((c.sign_date >= #{startMon}
+ AND c.sign_date < #{endMon})
+ or c.sign_date is null)) jxcby,
+ (
+ SELECT
+ IFNULL(sum( c.amount ),0)
+ FROM
+ contract c
+ WHERE
+ c.del_flag = '0'
+ AND comp_id = 2056556317461270529
+ AND (( c.sign_date >= #{startYear}
+ AND c.sign_date < #{endYear})
+ or c.sign_date is null)) jxcbn,
+ (
+ SELECT
+ IFNULL(sum( c.amount ),0)
+ FROM
+ contract c
+ WHERE
+ c.del_flag = '0'
+ AND comp_id = 2056556421857497090
+ AND ((c.sign_date >= #{startMon}
+ AND c.sign_date < #{endMon})
+ or c.sign_date is null)) tfby,
+ (
+ SELECT
+ IFNULL(sum( c.amount ),0)
+ FROM
+ contract c
+ WHERE
+ c.del_flag = '0'
+ AND comp_id = 2056556421857497090
+ AND (( c.sign_date >= #{startYear}
+ AND c.sign_date < #{endYear})
+ or c.sign_date is null)) tfbn,
+ (
+ SELECT
+ IFNULL(sum( c.amount ),0)
+ FROM
+ contract c
+ WHERE
+ c.del_flag = '0'
+ AND comp_id = 2056556535640576002
+ AND ((c.sign_date >= #{startMon}
+ AND c.sign_date < #{endMon})
+ or c.sign_date is null)) ymjby,
+ (
+ SELECT
+ IFNULL(sum( c.amount ),0)
+ FROM
+ contract c
+ WHERE
+ c.del_flag = '0'
+ AND comp_id = 2056556535640576002
+ AND (( c.sign_date >= #{startYear}
+ AND c.sign_date < #{endYear})
+ or c.sign_date is null)) 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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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 >= #{monstart}
+ AND c.sign_date <= #{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