From c3d6d7cece2c90a6e784059280ff783c5239449c Mon Sep 17 00:00:00 2001
From: Joshi <3040996759@qq.com>
Date: Mon, 13 Apr 2026 16:50:18 +0800
Subject: [PATCH] =?UTF-8?q?feat(crm):=20=E6=B7=BB=E5=8A=A0=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=E5=90=88=E5=90=8C=E8=AF=A6=E6=83=85=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E6=98=A0=E5=B0=84=E5=92=8C=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在CrmOrderMapper.xml中新增合同名称、供应商、客户等相关字段映射
- 扩展SQL查询语句以支持合同详细信息的检索
- 在服务层实现中增加对新字段的搜索条件支持
- 添加合同签署时间、地点、内容等过滤条件的查询逻辑
- 实现供应商和客户联系信息的条件查询功能
- 集成技术附件、商务附件和生产进度的搜索过滤器
---
.../crm/service/impl/CrmOrderServiceImpl.java | 47 +++++++++++++-
.../main/resources/mapper/CrmOrderMapper.xml | 63 +++++++++++++++++++
2 files changed, 109 insertions(+), 1 deletion(-)
diff --git a/klp-crm/src/main/java/com/klp/crm/service/impl/CrmOrderServiceImpl.java b/klp-crm/src/main/java/com/klp/crm/service/impl/CrmOrderServiceImpl.java
index f3544b77..8f0d19f8 100644
--- a/klp-crm/src/main/java/com/klp/crm/service/impl/CrmOrderServiceImpl.java
+++ b/klp-crm/src/main/java/com/klp/crm/service/impl/CrmOrderServiceImpl.java
@@ -89,7 +89,10 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
.or().like("co.audit_user", bo.getKeyword())
.or().like("co.contract_code", bo.getKeyword())
.or().like("co.annex_files", bo.getKeyword())
- .or().like("co.remark", bo.getKeyword()));
+ .or().like("co.remark", bo.getKeyword())
+ .or().like("co.contract_name", bo.getKeyword())
+ .or().like("co.supplier", bo.getKeyword())
+ .or().like("co.customer", bo.getKeyword()));
}
qw.eq(StringUtils.isNotBlank(bo.getOrderCode()), "co.order_code", bo.getOrderCode());
qw.eq(bo.getOrderType() != null, "co.order_type", bo.getOrderType());
@@ -104,6 +107,27 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
qw.eq(bo.getFinanceStatus() != null, "co.finance_status", bo.getFinanceStatus());
qw.eq(bo.getUnpaidAmount() != null, "co.unpaid_amount", bo.getUnpaidAmount());
qw.like(StringUtils.isNotBlank(bo.getContractCode()), "co.contract_code", bo.getContractCode());
+ qw.like(StringUtils.isNotBlank(bo.getContractName()), "co.contract_name", bo.getContractName());
+ qw.like(StringUtils.isNotBlank(bo.getSupplier()), "co.supplier", bo.getSupplier());
+ qw.like(StringUtils.isNotBlank(bo.getCustomer()), "co.customer", bo.getCustomer());
+ qw.eq(bo.getSignTime() != null, "co.sign_time", bo.getSignTime());
+ qw.like(StringUtils.isNotBlank(bo.getSignLocation()), "co.sign_location", bo.getSignLocation());
+ qw.eq(StringUtils.isNotBlank(bo.getProductContent()), "co.product_content", bo.getProductContent());
+ qw.eq(StringUtils.isNotBlank(bo.getContractContent()), "co.contract_content", bo.getContractContent());
+ qw.like(StringUtils.isNotBlank(bo.getSupplierAddress()), "co.supplier_address", bo.getSupplierAddress());
+ qw.like(StringUtils.isNotBlank(bo.getSupplierPhone()), "co.supplier_phone", bo.getSupplierPhone());
+ qw.like(StringUtils.isNotBlank(bo.getSupplierBank()), "co.supplier_bank", bo.getSupplierBank());
+ qw.like(StringUtils.isNotBlank(bo.getSupplierAccount()), "co.supplier_account", bo.getSupplierAccount());
+ qw.like(StringUtils.isNotBlank(bo.getSupplierTaxNo()), "co.supplier_tax_no", bo.getSupplierTaxNo());
+ qw.like(StringUtils.isNotBlank(bo.getCustomerAddress()), "co.customer_address", bo.getCustomerAddress());
+ qw.like(StringUtils.isNotBlank(bo.getCustomerPhone()), "co.customer_phone", bo.getCustomerPhone());
+ qw.like(StringUtils.isNotBlank(bo.getCustomerBank()), "co.customer_bank", bo.getCustomerBank());
+ qw.like(StringUtils.isNotBlank(bo.getCustomerAccount()), "co.customer_account", bo.getCustomerAccount());
+ qw.like(StringUtils.isNotBlank(bo.getCustomerTaxNo()), "co.customer_tax_no", bo.getCustomerTaxNo());
+ qw.like(StringUtils.isNotBlank(bo.getTechAnnex()), "co.tech_annex", bo.getTechAnnex());
+ qw.like(StringUtils.isNotBlank(bo.getBusinessAnnex()), "co.business_annex", bo.getBusinessAnnex());
+ qw.like(StringUtils.isNotBlank(bo.getProductionSchedule()), "co.production_schedule", bo.getProductionSchedule());
+ qw.eq(bo.getStatus() != null, "co.status", bo.getStatus());
qw.eq(bo.getContractId() != null, "co.contract_id", bo.getContractId());
qw.like(StringUtils.isNotBlank(bo.getAnnexFiles()), "co.annex_files", bo.getAnnexFiles());
//逻辑删除
@@ -139,6 +163,27 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
lqw.eq(bo.getFinanceStatus() != null, CrmOrder::getFinanceStatus, bo.getFinanceStatus());
lqw.eq(bo.getUnpaidAmount() != null, CrmOrder::getUnpaidAmount, bo.getUnpaidAmount());
lqw.like(StringUtils.isNotBlank(bo.getContractCode()), CrmOrder::getContractCode, bo.getContractCode());
+ lqw.like(StringUtils.isNotBlank(bo.getContractName()), CrmOrder::getContractName, bo.getContractName());
+ lqw.like(StringUtils.isNotBlank(bo.getSupplier()), CrmOrder::getSupplier, bo.getSupplier());
+ lqw.like(StringUtils.isNotBlank(bo.getCustomer()), CrmOrder::getCustomer, bo.getCustomer());
+ lqw.eq(bo.getSignTime() != null, CrmOrder::getSignTime, bo.getSignTime());
+ lqw.like(StringUtils.isNotBlank(bo.getSignLocation()), CrmOrder::getSignLocation, bo.getSignLocation());
+ lqw.eq(StringUtils.isNotBlank(bo.getProductContent()), CrmOrder::getProductContent, bo.getProductContent());
+ lqw.eq(StringUtils.isNotBlank(bo.getContractContent()), CrmOrder::getContractContent, bo.getContractContent());
+ lqw.like(StringUtils.isNotBlank(bo.getSupplierAddress()), CrmOrder::getSupplierAddress, bo.getSupplierAddress());
+ lqw.like(StringUtils.isNotBlank(bo.getSupplierPhone()), CrmOrder::getSupplierPhone, bo.getSupplierPhone());
+ lqw.like(StringUtils.isNotBlank(bo.getSupplierBank()), CrmOrder::getSupplierBank, bo.getSupplierBank());
+ lqw.like(StringUtils.isNotBlank(bo.getSupplierAccount()), CrmOrder::getSupplierAccount, bo.getSupplierAccount());
+ lqw.like(StringUtils.isNotBlank(bo.getSupplierTaxNo()), CrmOrder::getSupplierTaxNo, bo.getSupplierTaxNo());
+ lqw.like(StringUtils.isNotBlank(bo.getCustomerAddress()), CrmOrder::getCustomerAddress, bo.getCustomerAddress());
+ lqw.like(StringUtils.isNotBlank(bo.getCustomerPhone()), CrmOrder::getCustomerPhone, bo.getCustomerPhone());
+ lqw.like(StringUtils.isNotBlank(bo.getCustomerBank()), CrmOrder::getCustomerBank, bo.getCustomerBank());
+ lqw.like(StringUtils.isNotBlank(bo.getCustomerAccount()), CrmOrder::getCustomerAccount, bo.getCustomerAccount());
+ lqw.like(StringUtils.isNotBlank(bo.getCustomerTaxNo()), CrmOrder::getCustomerTaxNo, bo.getCustomerTaxNo());
+ lqw.like(StringUtils.isNotBlank(bo.getTechAnnex()), CrmOrder::getTechAnnex, bo.getTechAnnex());
+ lqw.like(StringUtils.isNotBlank(bo.getBusinessAnnex()), CrmOrder::getBusinessAnnex, bo.getBusinessAnnex());
+ lqw.like(StringUtils.isNotBlank(bo.getProductionSchedule()), CrmOrder::getProductionSchedule, bo.getProductionSchedule());
+ lqw.eq(bo.getStatus() != null, CrmOrder::getStatus, bo.getStatus());
lqw.eq(bo.getContractId() != null, CrmOrder::getContractId, bo.getContractId());
lqw.like(StringUtils.isNotBlank(bo.getAnnexFiles()), CrmOrder::getAnnexFiles, bo.getAnnexFiles());
return lqw;
diff --git a/klp-crm/src/main/resources/mapper/CrmOrderMapper.xml b/klp-crm/src/main/resources/mapper/CrmOrderMapper.xml
index ffc1b182..1ad9fe7d 100644
--- a/klp-crm/src/main/resources/mapper/CrmOrderMapper.xml
+++ b/klp-crm/src/main/resources/mapper/CrmOrderMapper.xml
@@ -20,6 +20,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -45,6 +66,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
co.unpaid_amount AS unpaidAmount,
co.remark,
co.contract_code AS contractCode,
+ co.contract_name AS contractName,
+ co.supplier,
+ co.customer,
+ co.sign_time AS signTime,
+ co.sign_location AS signLocation,
+ co.product_content AS productContent,
+ co.contract_content AS contractContent,
+ co.supplier_address AS supplierAddress,
+ co.supplier_phone AS supplierPhone,
+ co.supplier_bank AS supplierBank,
+ co.supplier_account AS supplierAccount,
+ co.supplier_tax_no AS supplierTaxNo,
+ co.customer_address AS customerAddress,
+ co.customer_phone AS customerPhone,
+ co.customer_bank AS customerBank,
+ co.customer_account AS customerAccount,
+ co.customer_tax_no AS customerTaxNo,
+ co.tech_annex AS techAnnex,
+ co.business_annex AS businessAnnex,
+ co.production_schedule AS productionSchedule,
+ co.status,
co.contract_id AS contractId,
co.annex_files AS annexFiles,
co.create_by AS createBy,
@@ -79,6 +121,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
co.unpaid_amount AS unpaidAmount,
co.remark,
co.contract_code AS contractCode,
+ co.contract_name AS contractName,
+ co.supplier,
+ co.customer,
+ co.sign_time AS signTime,
+ co.sign_location AS signLocation,
+ co.product_content AS productContent,
+ co.contract_content AS contractContent,
+ co.supplier_address AS supplierAddress,
+ co.supplier_phone AS supplierPhone,
+ co.supplier_bank AS supplierBank,
+ co.supplier_account AS supplierAccount,
+ co.supplier_tax_no AS supplierTaxNo,
+ co.customer_address AS customerAddress,
+ co.customer_phone AS customerPhone,
+ co.customer_bank AS customerBank,
+ co.customer_account AS customerAccount,
+ co.customer_tax_no AS customerTaxNo,
+ co.tech_annex AS techAnnex,
+ co.business_annex AS businessAnnex,
+ co.production_schedule AS productionSchedule,
+ co.status,
co.contract_id AS contractId,
co.annex_files AS annexFiles,
co.create_by AS createBy,