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/ContractSubjectMatterMapper.xml | 192 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 192 insertions(+), 0 deletions(-)
diff --git a/platformx-business-finance-biz/src/main/resources/mapper/ContractSubjectMatterMapper.xml b/platformx-business-finance-biz/src/main/resources/mapper/ContractSubjectMatterMapper.xml
index b0a7b2e..f32d22d 100644
--- a/platformx-business-finance-biz/src/main/resources/mapper/ContractSubjectMatterMapper.xml
+++ b/platformx-business-finance-biz/src/main/resources/mapper/ContractSubjectMatterMapper.xml
@@ -37,4 +37,196 @@
<result property="updateTime" column="update_time"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
+ <select id="gcpbkwcqk" resultType="com.by4cloud.platformx.business.vo.GcpbkwcqkItemVo">
+ SELECT
+ d.dict_name AS bkmc,
+ IFNULL(sum(c.unit_price*c.quantity),0) AS wc
+ FROM
+ bip_dict d
+ LEFT JOIN
+ contract_subject_matter c
+
+ ON
+ d.dict_code = c.product_section and c.del_flag = '0'
+ LEFT JOIN
+ contract c1
+ ON
+ c.contract_id = c1.id and c1.del_flag = '0'
+ and c1.sign_date >= #{monstart}
+ and c1.sign_date <= #{monend}
+ WHERE
+ d.dict_key = 'zb-cpbk'
+ GROUP BY
+ d.dict_name, d.dict_key;
+
+ </select>
+ <select id="gcpbkwcqkBySK" resultType="com.by4cloud.platformx.business.vo.GcpbkwcqkItemVo">
+ SELECT
+ d.dict_name AS bkmc,
+ IFNULL(ROUND(SUM(
+ IFNULL(pay.total_paid, 0) *
+ (agg.sub_total / NULLIF(IFNULL(c1.amount, 0), 0))
+ ), 2), 0) AS wc
+ FROM
+ bip_dict d
+ LEFT JOIN (
+ SELECT
+ c.product_section,
+ c.contract_id,
+ SUM(c.unit_price * c.quantity) AS sub_total
+ FROM
+ contract_subject_matter c
+ WHERE
+ c.del_flag = '0'
+ GROUP BY
+ c.product_section, c.contract_id
+ ) agg ON d.dict_code = agg.product_section
+ LEFT JOIN
+ contract c1
+ ON
+ agg.contract_id = c1.id
+ AND c1.del_flag = '0'
+ LEFT JOIN (
+ SELECT
+ contract_id,
+ SUM(payment_amount) AS total_paid
+ FROM
+ payment_slip
+ WHERE
+ del_flag = '0'
+ and payment_time >= #{monstart}
+ and payment_time <= #{monend}
+ GROUP BY
+ contract_id
+ ) pay ON c1.id = pay.contract_id
+ WHERE
+ d.dict_key = 'zb-cpbk'
+ GROUP BY
+ d.dict_name;
+
+ </select>
+ <select id="sckfzdgzwcqk" resultType="com.by4cloud.platformx.business.vo.GcpbkwcqkItemVo">
+ SELECT
+ '鐭崇叅鏈�' dw,
+ d.dict_code `code`,
+ d.dict_name AS xm,
+ IFNULL(sum(c.unit_price*c.quantity),0) AS wc
+ FROM
+ bip_dict d
+ LEFT JOIN
+ contract_subject_matter c
+
+ ON
+ d.dict_code = c.product_section and c.del_flag = '0'
+ AND (c.comp_id = 2089995177814495234 or c.comp_id = 2089996921978040321 or c.comp_id = 2089997578009128962 or c.comp_id = 2101966257365045249)
+ LEFT JOIN
+ contract c1
+ ON
+ c.contract_id = c1.id and c1.del_flag = '0'
+ and c1.sign_date >= #{monstart}
+ and c1.sign_date <= #{monend}
+ WHERE
+ d.dict_key = 'zb-ywxm'
+ AND (d.comp_id = 2089995177814495234 or d.comp_id = 2089996921978040321 or d.comp_id = 2089997578009128962 or d.comp_id = 2101966257365045249)
+ GROUP BY
+ d.dict_name,d.dict_code, d.dict_key
+ union all
+ SELECT
+ '鐭冲伐娉�' dw,
+ d.dict_code `code`,
+ d.dict_name AS bkmc,
+ IFNULL(sum(c.unit_price*c.quantity),0) AS wc
+ FROM
+ bip_dict d
+ LEFT JOIN
+ contract_subject_matter c
+
+ ON
+ d.dict_code = c.product_section and c.del_flag = '0'
+ AND c.comp_id = 2056556196124250113
+ LEFT JOIN
+ contract c1
+ ON
+ c.contract_id = c1.id and c1.del_flag = '0'
+ and c1.sign_date >= #{monstart}
+ and c1.sign_date <= #{monend}
+ WHERE
+ d.dict_key = 'zb-ywxm'
+ AND d.comp_id = 2056556196124250113
+ GROUP BY
+ d.dict_name,d.dict_code, d.dict_key
+ union all
+ SELECT
+ '閭㈠彴鍘�' dw,
+ d.dict_code `code`,
+ d.dict_name AS bkmc,
+ IFNULL(sum(c.unit_price*c.quantity),0) AS wc
+ FROM
+ bip_dict d
+ LEFT JOIN
+ contract_subject_matter c
+
+ ON
+ d.dict_code = c.product_section and c.del_flag = '0'
+ AND c.comp_id = 2056556317461270529
+ LEFT JOIN
+ contract c1
+ ON
+ c.contract_id = c1.id and c1.del_flag = '0'
+ and c1.sign_date >= #{monstart}
+ and c1.sign_date <= #{monend}
+ WHERE
+ d.dict_key = 'zb-ywxm'
+ AND d.comp_id = 2056556317461270529
+ GROUP BY
+ d.dict_name,d.dict_code, d.dict_key
+ union all
+ SELECT
+ '閫氭柟鍘�' dw,
+ d.dict_code `code`,
+ d.dict_name AS bkmc,
+ IFNULL(sum(c.unit_price*c.quantity),0) AS wc
+ FROM
+ bip_dict d
+ LEFT JOIN
+ contract_subject_matter c
+
+ ON
+ d.dict_code = c.product_section and c.del_flag = '0'
+ AND c.comp_id = 2056556421857497090
+ LEFT JOIN
+ contract c1
+ ON
+ c.contract_id = c1.id and c1.del_flag = '0'
+ and c1.sign_date >= #{monstart}
+ and c1.sign_date <= #{monend}
+ WHERE
+ d.dict_key = 'zb-ywxm'
+ AND d.comp_id = 2056556421857497090
+ GROUP BY
+ d.dict_name,d.dict_code, d.dict_key
+
+ </select>
+ <select id="cpxzhtwcqk" resultType="com.by4cloud.platformx.business.vo.CpxssrwcqkItemVo">
+ SELECT
+ d.dict_name AS xm,
+ IFNULL( sum( c.quantity ), 0 ) AS xsl,
+ IFNULL( sum( c.unit_price * c.quantity ), 0 ) AS xssr
+ FROM
+ bip_dict d
+ LEFT JOIN contract_subject_matter c ON d.dict_code = c.product_category
+ AND c.del_flag = '0'
+ LEFT JOIN contract c1 ON c.contract_id = c1.id
+ AND c1.del_flag = '0'
+ and c1.sign_date >= #{monstart}
+ and c1.sign_date <= #{monend}
+ WHERE
+ d.dict_key = 'zb-cpmc'
+ and d.comp_id = 2054377628489244673
+ GROUP BY
+ d.dict_name,
+ d.dict_key
+ order by d.id;
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1