feat(crm): 添加订单合同详情字段映射和查询功能

- 在CrmOrderMapper.xml中新增合同名称、供应商、客户等相关字段映射
- 扩展SQL查询语句以支持合同详细信息的检索
- 在服务层实现中增加对新字段的搜索条件支持
- 添加合同签署时间、地点、内容等过滤条件的查询逻辑
- 实现供应商和客户联系信息的条件查询功能
- 集成技术附件、商务附件和生产进度的搜索过滤器
This commit is contained in:
2026-04-13 16:50:18 +08:00
parent 37dc213605
commit c3d6d7cece
2 changed files with 109 additions and 1 deletions

View File

@@ -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;

View File

@@ -20,6 +20,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unpaidAmount" column="unpaid_amount"/>
<result property="remark" column="remark"/>
<result property="contractCode" column="contract_code"/>
<result property="contractName" column="contract_name"/>
<result property="supplier" column="supplier"/>
<result property="customer" column="customer"/>
<result property="signTime" column="sign_time"/>
<result property="signLocation" column="sign_location"/>
<result property="productContent" column="product_content"/>
<result property="contractContent" column="contract_content"/>
<result property="supplierAddress" column="supplier_address"/>
<result property="supplierPhone" column="supplier_phone"/>
<result property="supplierBank" column="supplier_bank"/>
<result property="supplierAccount" column="supplier_account"/>
<result property="supplierTaxNo" column="supplier_tax_no"/>
<result property="customerAddress" column="customer_address"/>
<result property="customerPhone" column="customer_phone"/>
<result property="customerBank" column="customer_bank"/>
<result property="customerAccount" column="customer_account"/>
<result property="customerTaxNo" column="customer_tax_no"/>
<result property="techAnnex" column="tech_annex"/>
<result property="businessAnnex" column="business_annex"/>
<result property="productionSchedule" column="production_schedule"/>
<result property="status" column="status"/>
<result property="contractId" column="contract_id"/>
<result property="annexFiles" column="annex_files"/>
<result property="createBy" column="create_by"/>
@@ -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,