From c1bbff15e4f64767d471de763613a54c9cb8d4b4 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期五, 24 四月 2026 14:28:15 +0800
Subject: [PATCH] feat(sales): 添加销售台账批量导入功能
---
src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml b/src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml
index 2e69ab0..99bfd98 100644
--- a/src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml
+++ b/src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml
@@ -99,7 +99,7 @@
coalesce(c.tenant_id, cp.tenant_id) as tenant_id,
coalesce(c.basic_bank_account, cp.basic_bank_account) as basic_bank_account,
coalesce(c.bank_account, cp.bank_account) as bank_account,
- coalesce(c.bank_code, cp.bank_code) as bank_code
+ coalesce(c.bank_code, cp.bank_code) as bank_code,
coalesce(c.corporation, cp.corporation) as corporation,
coalesce(c.fax, cp.fax) as fax,
coalesce(c.agent, cp.agent) as agent,
@@ -108,5 +108,38 @@
left join customer c on c.id = cpp.customer_id and cpp.type = 1
left join customer_private cp on cp.id = cpp.customer_id and cpp.type = 0
</select>
+ <select id="selectByCusterNames" resultType="com.ruoyi.basic.dto.CustomerPrivatePoolDto">
+ select cpp.id,
+ cpp.bound_id,
+ cpp.type,
+ coalesce(c.id, cp.id) as customer_id,
+ coalesce(c.customer_name, cp.customer_name) as customer_name,
+ coalesce(c.customer_type, cp.customer_type) as customer_type,
+ coalesce(c.taxpayer_identification_number, cp.taxpayer_identification_number) as taxpayer_identification_number,
+ coalesce(c.company_address, cp.company_address) as company_address,
+ coalesce(c.company_phone, cp.company_phone) as company_phone,
+ coalesce(c.contact_person, cp.contact_person) as contact_person,
+ coalesce(c.contact_phone, cp.contact_phone) as contact_phone,
+ coalesce(c.maintainer, cp.maintainer) as maintainer,
+ coalesce(c.maintenance_time, cp.maintenance_time) as maintenance_time,
+ coalesce(c.tenant_id, cp.tenant_id) as tenant_id,
+ coalesce(c.basic_bank_account, cp.basic_bank_account) as basic_bank_account,
+ coalesce(c.bank_account, cp.bank_account) as bank_account,
+ coalesce(c.bank_code, cp.bank_code) as bank_code,
+ coalesce(c.corporation, cp.corporation) as corporation,
+ coalesce(c.fax, cp.fax) as fax,
+ coalesce(c.agent, cp.agent) as agent,
+ coalesce(c.bank_name, cp.bank_name) as bank_name
+ from customer_private_pool cpp
+ left join customer c on c.id = cpp.customer_id and cpp.type = 1
+ left join customer_private cp on cp.id = cpp.customer_id and cpp.type = 0
+ where c.customer_name in
+ <foreach item="item" collection="collect" separator="," open="(" close=")">
+ #{item}
+ </foreach> or cp.customer_name in
+ <foreach item="item" collection="collect" separator="," open="(" close=")">
+ #{item}
+ </foreach>
+ </select>
</mapper>
--
Gitblit v1.9.3