diff --git a/ruoyi-admin/src/main/resources/templates/system/contract/add.html b/ruoyi-admin/src/main/resources/templates/system/contract/add.html index 50c95a1e2..a40f75f1c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/contract/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/contract/add.html @@ -22,7 +22,11 @@
- + + +
diff --git a/ruoyi-admin/src/main/resources/templates/system/contract/contract.html b/ruoyi-admin/src/main/resources/templates/system/contract/contract.html index d91fba4ad..337c48db9 100644 --- a/ruoyi-admin/src/main/resources/templates/system/contract/contract.html +++ b/ruoyi-admin/src/main/resources/templates/system/contract/contract.html @@ -86,7 +86,7 @@ title: '合同名称' }, { - field: 'customerId', + field: 'customerName', title: '客户名称' }, { @@ -106,7 +106,7 @@ title: '结束时间' }, { - field: 'contactsId', + field: 'lName', title: '客户签约人' }, { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/WkCrmContract.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/WkCrmContract.java index 740b3ce20..f41c72455 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/WkCrmContract.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/WkCrmContract.java @@ -80,6 +80,26 @@ public class WkCrmContract extends BaseEntity @Excel(name = "最后跟进人") private Integer oldContractId; + private String customerName; + + private String lName; + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getlName() { + return lName; + } + + public void setlName(String lName) { + this.lName = lName; + } + /** 最后跟进时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "最后跟进时间", width = 30, dateFormat = "yyyy-MM-dd") @@ -319,6 +339,8 @@ public class WkCrmContract extends BaseEntity .append("examineRecordId", getExamineRecordId()) .append("totalPrice", getTotalPrice()) .append("paymentType", getPaymentType()) + .append("customerName",getCustomerName()) + .append("lName",getlName()) .toString(); } } diff --git a/ruoyi-system/src/main/resources/mapper/system/WkCrmContractMapper.xml b/ruoyi-system/src/main/resources/mapper/system/WkCrmContractMapper.xml index 07d81b3ab..7b3e025c7 100644 --- a/ruoyi-system/src/main/resources/mapper/system/WkCrmContractMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/WkCrmContractMapper.xml @@ -9,12 +9,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - + + @@ -29,10 +31,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select contract_id, num, name, customer_id, money, order_date, start_time, end_time, contacts_id, company_user_id, remark, types, check_status, received_money, unreceived_money, old_contract_id, last_time, owner_user_id, update_time, create_time, create_user_id, examine_record_id, total_price, payment_type from wk_crm_contract +-- select contract_id, num, name, customer_id, money, order_date, start_time, end_time, contacts_id +-- , company_user_id, remark, types, check_status, received_money, unreceived_money, old_contract_id, +-- last_time, owner_user_id, update_time, create_time, create_user_id, examine_record_id, total_price, +-- payment_type from wk_crm_contract + SELECT + ht.contract_id, + ht.num, + ht.`name`, + kh.customer_name, + ht.money, + ht.order_date, + ht.start_time, + ht.end_time, + lxr.`name` lname, + txl.`name` tname, + ht.remark, + ht.types, + ht.check_status, + ht.received_money, + ht.unreceived_money, + ht.old_contract_id, + ht.last_time, + ht.owner_user_id, + ht.update_time, + ht.create_time, + ht.create_user_id, + ht.examine_record_id, + ht.total_price, + ht.payment_type + FROM + wk_crm_contract ht + LEFT JOIN wk_crm_customer kh ON ht.customer_id = kh.customer_id + LEFT JOIN wk_crm_address txl ON txl.id = ht.company_user_id + LEFT JOIN wk_crm_contacts lxr ON lxr.contacts_id = ht.contacts_id