LAPTOP-FO2T5SIU\35838 hace 9 meses
padre
commit
7c34c375cb

+ 10 - 0
pro-base/src/main/java/com/idea/buildManage/service/ParkRoomService.java

@@ -199,4 +199,14 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
         return deleteByPrimaryKey(id);
     }
 
+    /**
+     * 查询房屋全称
+     * @param houseId
+     * @return
+     */
+    public ParkRoomResponse getFullName(String houseId){
+        ParkRoomResponse response = extendMapper.getFullName(houseId);
+        return response;
+    }
+
 }

+ 13 - 1
pro-base/src/main/java/com/idea/customerManagement/controller/ContractManageController.java

@@ -3,8 +3,10 @@ package com.idea.customerManagement.controller;
 import com.github.pagehelper.PageInfo;
 import com.idea.customerManagement.dto.ContractManageDto;
 import com.idea.customerManagement.dto.CustomerManagementDto;
+import com.idea.customerManagement.model.ContractManage;
 import com.idea.customerManagement.service.ContractManageService;
 import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
 import com.rockstar.frame.model.extend.DateTrans;
 import com.rockstar.frame.model.extend.TableSplitResult;
 import com.rockstar.frame.model.extend.Tablepar;
@@ -43,7 +45,17 @@ public class ContractManageController extends BaseController {
         return  result;
     }
 
-
+    /**
+     * 编辑合同
+     * @param record
+     * @return
+     */
+    @PostMapping(value = "edit",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult edit(ContractManage record){
+        int result = modelService.edit(record);
+        return result(result);
+    }
 
 
 

+ 10 - 3
pro-base/src/main/java/com/idea/customerManagement/model/Buyer.java

@@ -1,11 +1,8 @@
 package com.idea.customerManagement.model;
 
-import io.swagger.annotations.ApiModel;
-
 import java.io.Serializable;
 import java.util.Date;
 
-@ApiModel("买受人")
 public class Buyer implements Serializable {
     private String id;
 
@@ -19,6 +16,8 @@ public class Buyer implements Serializable {
 
     private String relationship;
 
+    private Integer orderNum;
+
     private String createdId;
 
     private Date createdAt;
@@ -77,6 +76,14 @@ public class Buyer implements Serializable {
         this.relationship = relationship == null ? null : relationship.trim();
     }
 
+    public Integer getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Integer orderNum) {
+        this.orderNum = orderNum;
+    }
+
     public String getCreatedId() {
         return createdId;
     }

+ 60 - 0
pro-base/src/main/java/com/idea/customerManagement/model/BuyerExample.java

@@ -525,6 +525,66 @@ public class BuyerExample {
             return (Criteria) this;
         }
 
+        public Criteria andOrderNumIsNull() {
+            addCriterion("order_num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumIsNotNull() {
+            addCriterion("order_num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumEqualTo(Integer value) {
+            addCriterion("order_num =", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumNotEqualTo(Integer value) {
+            addCriterion("order_num <>", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumGreaterThan(Integer value) {
+            addCriterion("order_num >", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumGreaterThanOrEqualTo(Integer value) {
+            addCriterion("order_num >=", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumLessThan(Integer value) {
+            addCriterion("order_num <", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumLessThanOrEqualTo(Integer value) {
+            addCriterion("order_num <=", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumIn(List<Integer> values) {
+            addCriterion("order_num in", values, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumNotIn(List<Integer> values) {
+            addCriterion("order_num not in", values, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumBetween(Integer value1, Integer value2) {
+            addCriterion("order_num between", value1, value2, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumNotBetween(Integer value1, Integer value2) {
+            addCriterion("order_num not between", value1, value2, "orderNum");
+            return (Criteria) this;
+        }
+
         public Criteria andCreatedIdIsNull() {
             addCriterion("created_id is null");
             return (Criteria) this;

+ 80 - 5
pro-base/src/main/java/com/idea/customerManagement/model/ContractManage.java

@@ -1,17 +1,12 @@
 package com.idea.customerManagement.model;
 
-import io.swagger.annotations.ApiModel;
-
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
-@ApiModel("合同")
 public class ContractManage implements Serializable {
     private String id;
 
-    private String customerManagementId;
-
     private String recordNumber;
 
     private String contractNumber;
@@ -40,6 +35,8 @@ public class ContractManage implements Serializable {
 
     private BigDecimal buyerMoney;
 
+    private String buyerName;
+
     private Integer paymentMethod;
 
     private Date deadline;
@@ -48,6 +45,20 @@ public class ContractManage implements Serializable {
 
     private BigDecimal maintenanceTotalPrice;
 
+    private Integer contractStatus;
+
+    private String customerManagementId;
+
+    private BigDecimal subscriptionFunds;
+
+    private String createdId;
+
+    private Date createdAt;
+
+    private Date updatedAt;
+
+    private String updatedId;
+
     private String remark;
 
     private String contractOriginal;
@@ -176,6 +187,14 @@ public class ContractManage implements Serializable {
         this.buyerMoney = buyerMoney;
     }
 
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName == null ? null : buyerName.trim();
+    }
+
     public Integer getPaymentMethod() {
         return paymentMethod;
     }
@@ -208,6 +227,62 @@ public class ContractManage implements Serializable {
         this.maintenanceTotalPrice = maintenanceTotalPrice;
     }
 
+    public Integer getContractStatus() {
+        return contractStatus;
+    }
+
+    public void setContractStatus(Integer contractStatus) {
+        this.contractStatus = contractStatus;
+    }
+
+    public String getCustomerManagementId() {
+        return customerManagementId;
+    }
+
+    public void setCustomerManagementId(String customerManagementId) {
+        this.customerManagementId = customerManagementId == null ? null : customerManagementId.trim();
+    }
+
+    public BigDecimal getSubscriptionFunds() {
+        return subscriptionFunds;
+    }
+
+    public void setSubscriptionFunds(BigDecimal subscriptionFunds) {
+        this.subscriptionFunds = subscriptionFunds;
+    }
+
+    public String getCreatedId() {
+        return createdId;
+    }
+
+    public void setCreatedId(String createdId) {
+        this.createdId = createdId == null ? null : createdId.trim();
+    }
+
+    public Date getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(Date createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public Date getUpdatedAt() {
+        return updatedAt;
+    }
+
+    public void setUpdatedAt(Date updatedAt) {
+        this.updatedAt = updatedAt;
+    }
+
+    public String getUpdatedId() {
+        return updatedId;
+    }
+
+    public void setUpdatedId(String updatedId) {
+        this.updatedId = updatedId == null ? null : updatedId.trim();
+    }
+
     public String getRemark() {
         return remark;
     }

+ 390 - 0
pro-base/src/main/java/com/idea/customerManagement/model/ContractManageExample.java

@@ -1076,6 +1076,76 @@ public class ContractManageExample {
             return (Criteria) this;
         }
 
+        public Criteria andBuyerNameIsNull() {
+            addCriterion("buyer_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameIsNotNull() {
+            addCriterion("buyer_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameEqualTo(String value) {
+            addCriterion("buyer_name =", value, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameNotEqualTo(String value) {
+            addCriterion("buyer_name <>", value, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameGreaterThan(String value) {
+            addCriterion("buyer_name >", value, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameGreaterThanOrEqualTo(String value) {
+            addCriterion("buyer_name >=", value, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameLessThan(String value) {
+            addCriterion("buyer_name <", value, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameLessThanOrEqualTo(String value) {
+            addCriterion("buyer_name <=", value, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameLike(String value) {
+            addCriterion("buyer_name like", value, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameNotLike(String value) {
+            addCriterion("buyer_name not like", value, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameIn(List<String> values) {
+            addCriterion("buyer_name in", values, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameNotIn(List<String> values) {
+            addCriterion("buyer_name not in", values, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameBetween(String value1, String value2) {
+            addCriterion("buyer_name between", value1, value2, "buyerName");
+            return (Criteria) this;
+        }
+
+        public Criteria andBuyerNameNotBetween(String value1, String value2) {
+            addCriterion("buyer_name not between", value1, value2, "buyerName");
+            return (Criteria) this;
+        }
+
         public Criteria andPaymentMethodIsNull() {
             addCriterion("payment_method is null");
             return (Criteria) this;
@@ -1445,6 +1515,326 @@ public class ContractManageExample {
             addCriterion("customer_management_id not between", value1, value2, "customerManagementId");
             return (Criteria) this;
         }
+
+        public Criteria andSubscriptionFundsIsNull() {
+            addCriterion("subscription_funds is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsIsNotNull() {
+            addCriterion("subscription_funds is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsEqualTo(BigDecimal value) {
+            addCriterion("subscription_funds =", value, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsNotEqualTo(BigDecimal value) {
+            addCriterion("subscription_funds <>", value, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsGreaterThan(BigDecimal value) {
+            addCriterion("subscription_funds >", value, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsGreaterThanOrEqualTo(BigDecimal value) {
+            addCriterion("subscription_funds >=", value, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsLessThan(BigDecimal value) {
+            addCriterion("subscription_funds <", value, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsLessThanOrEqualTo(BigDecimal value) {
+            addCriterion("subscription_funds <=", value, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsIn(List<BigDecimal> values) {
+            addCriterion("subscription_funds in", values, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsNotIn(List<BigDecimal> values) {
+            addCriterion("subscription_funds not in", values, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("subscription_funds between", value1, value2, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubscriptionFundsNotBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("subscription_funds not between", value1, value2, "subscriptionFunds");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdIsNull() {
+            addCriterion("created_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdIsNotNull() {
+            addCriterion("created_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdEqualTo(String value) {
+            addCriterion("created_id =", value, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdNotEqualTo(String value) {
+            addCriterion("created_id <>", value, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdGreaterThan(String value) {
+            addCriterion("created_id >", value, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdGreaterThanOrEqualTo(String value) {
+            addCriterion("created_id >=", value, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdLessThan(String value) {
+            addCriterion("created_id <", value, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdLessThanOrEqualTo(String value) {
+            addCriterion("created_id <=", value, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdLike(String value) {
+            addCriterion("created_id like", value, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdNotLike(String value) {
+            addCriterion("created_id not like", value, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdIn(List<String> values) {
+            addCriterion("created_id in", values, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdNotIn(List<String> values) {
+            addCriterion("created_id not in", values, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdBetween(String value1, String value2) {
+            addCriterion("created_id between", value1, value2, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedIdNotBetween(String value1, String value2) {
+            addCriterion("created_id not between", value1, value2, "createdId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIsNull() {
+            addCriterion("created_at is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIsNotNull() {
+            addCriterion("created_at is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtEqualTo(Date value) {
+            addCriterion("created_at =", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotEqualTo(Date value) {
+            addCriterion("created_at <>", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtGreaterThan(Date value) {
+            addCriterion("created_at >", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
+            addCriterion("created_at >=", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtLessThan(Date value) {
+            addCriterion("created_at <", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
+            addCriterion("created_at <=", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIn(List<Date> values) {
+            addCriterion("created_at in", values, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotIn(List<Date> values) {
+            addCriterion("created_at not in", values, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtBetween(Date value1, Date value2) {
+            addCriterion("created_at between", value1, value2, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
+            addCriterion("created_at not between", value1, value2, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtIsNull() {
+            addCriterion("updated_at is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtIsNotNull() {
+            addCriterion("updated_at is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtEqualTo(Date value) {
+            addCriterion("updated_at =", value, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtNotEqualTo(Date value) {
+            addCriterion("updated_at <>", value, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtGreaterThan(Date value) {
+            addCriterion("updated_at >", value, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
+            addCriterion("updated_at >=", value, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtLessThan(Date value) {
+            addCriterion("updated_at <", value, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
+            addCriterion("updated_at <=", value, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtIn(List<Date> values) {
+            addCriterion("updated_at in", values, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtNotIn(List<Date> values) {
+            addCriterion("updated_at not in", values, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtBetween(Date value1, Date value2) {
+            addCriterion("updated_at between", value1, value2, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
+            addCriterion("updated_at not between", value1, value2, "updatedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdIsNull() {
+            addCriterion("updated_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdIsNotNull() {
+            addCriterion("updated_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdEqualTo(String value) {
+            addCriterion("updated_id =", value, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdNotEqualTo(String value) {
+            addCriterion("updated_id <>", value, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdGreaterThan(String value) {
+            addCriterion("updated_id >", value, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdGreaterThanOrEqualTo(String value) {
+            addCriterion("updated_id >=", value, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdLessThan(String value) {
+            addCriterion("updated_id <", value, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdLessThanOrEqualTo(String value) {
+            addCriterion("updated_id <=", value, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdLike(String value) {
+            addCriterion("updated_id like", value, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdNotLike(String value) {
+            addCriterion("updated_id not like", value, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdIn(List<String> values) {
+            addCriterion("updated_id in", values, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdNotIn(List<String> values) {
+            addCriterion("updated_id not in", values, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdBetween(String value1, String value2) {
+            addCriterion("updated_id between", value1, value2, "updatedId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatedIdNotBetween(String value1, String value2) {
+            addCriterion("updated_id not between", value1, value2, "updatedId");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 75 - 7
pro-base/src/main/java/com/idea/customerManagement/service/ContractManageService.java

@@ -3,18 +3,25 @@ package com.idea.customerManagement.service;
 import cn.hutool.core.util.IdUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.model.ParkFloorDisc;
+import com.idea.buildManage.model.ParkRoom;
+import com.idea.buildManage.response.ParkRoomResponse;
+import com.idea.buildManage.service.ParkFloorDiscService;
+import com.idea.buildManage.service.ParkRoomService;
 import com.idea.customerManagement.dto.ContractManageDto;
 import com.idea.customerManagement.dto.CustomerManagementDto;
 import com.idea.customerManagement.mapper.ContractManageExtendMapper;
 import com.idea.customerManagement.mapper.ContractManageMapper;
-import com.idea.customerManagement.model.ContractManage;
-import com.idea.customerManagement.model.ContractManageExample;
+import com.idea.customerManagement.model.*;
 import com.rockstar.common.base.BaseService;
 import com.rockstar.frame.model.extend.DateTrans;
 import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.shiro.util.ShiroUtils;
+import com.rockstar.system.service.SysDictService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -24,7 +31,14 @@ public class ContractManageService implements BaseService<ContractManage, Contra
     private ContractManageMapper modelMapper;
     @Autowired
     private ContractManageExtendMapper extendMapper;
-
+    @Autowired
+    private ParkRoomService parkRoomService;
+    @Autowired
+    private ParkFloorDiscService parkFloorDiscService;
+    @Autowired
+    private BuyerService buyerService;
+    @Autowired
+    private SysDictService sysDictService;
 
     @Override
     public int deleteByPrimaryKey(String s) {
@@ -84,13 +98,67 @@ public class ContractManageService implements BaseService<ContractManage, Contra
         return pageInfo;
     }
 
+    /**
+     * 认购收取后 新增合同
+     * @param roomSelectionInfo
+     * @return
+     */
+    public int addContract(RoomSelectionInfo roomSelectionInfo){
 
-    public int addContract(){
+        ParkRoom parkRoom = parkRoomService.selectByPrimaryKey(roomSelectionInfo.getHouseId());
+        ParkFloorDisc parkFloorDisc = parkFloorDiscService.selectByPrimaryKey(parkRoom.getDiscId());
 
-        // TODO: 2024/9/18  
-        return 1;
+        ContractManage contractManage = new ContractManage();
+        contractManage.setId(IdUtil.simpleUUID());
+        contractManage.setCustomerManagementId(roomSelectionInfo.getCustomerManagementId());
+        contractManage.setHouseId(roomSelectionInfo.getHouseId());
+        contractManage.setSubscriptionFunds(roomSelectionInfo.getReceivableMoney());
+        contractManage.setActualBuildArea(parkRoom.getActualBuildArea());
+        contractManage.setActualInternalArea(parkRoom.getActualInternalArea());
+        contractManage.setActualShareArea(parkRoom.getActualShareArea());
+        contractManage.setMaintenanceFunds(parkFloorDisc.getMaintenanceFunds());
+        contractManage.setContractStatus(1);
+        
+        // 拼接买受人名称
+        BuyerExample buyerExample = new BuyerExample();
+        buyerExample.createCriteria().andCustomerManagementIdEqualTo(roomSelectionInfo.getCustomerManagementId());
+        List<Buyer> buyers = buyerService.selectByExample(buyerExample);
+        StringBuilder builder = new StringBuilder();
+        for(Buyer buyer : buyers){
+            if(buyer.getOrderNum() == 1){
+                builder.append(buyer.getName()).append(",");
+            }else {
+                String dictLabel = sysDictService.getDictLabel("RELATIONSHIP", buyer.getRelationship());
+                builder.append(buyer.getName())
+                        .append("(")
+                        .append(dictLabel)
+                        .append(")")
+                        .append(",");
+            }
+        }
+        if(builder.length() > 0){
+            builder.deleteCharAt(builder.length()-1);
+        }
+        contractManage.setBuyerName(builder.toString());
+
+        ParkRoomResponse response = parkRoomService.getFullName(roomSelectionInfo.getHouseId());
+        String fullName = response.getGroupName() + response.getDiscName() + response.getBuildName() + response.getRoomNo();
+        contractManage.setHouseName(fullName);
+        int result = insertSelective(contractManage);
+        return result;
     }
 
-
+    /**
+     * 编辑合同
+     * @param model
+     * @return
+     */
+    public int edit(ContractManage model){
+
+        model.setUpdatedAt(new Date());
+        model.setUpdatedId(ShiroUtils.getUserId());
+        int result = updateByPrimaryKeySelective(model);
+        return result;
+    }
 
 }

+ 43 - 28
pro-base/src/main/resources/mybatis/customerManagement/BuyerMapper.xml

@@ -8,6 +8,7 @@
     <result column="identity_card" jdbcType="VARCHAR" property="identityCard" />
     <result column="phone" jdbcType="VARCHAR" property="phone" />
     <result column="relationship" jdbcType="VARCHAR" property="relationship" />
+    <result column="order_num" jdbcType="INTEGER" property="orderNum" />
     <result column="created_id" jdbcType="VARCHAR" property="createdId" />
     <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
     <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
@@ -72,8 +73,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, customer_management_id, name, identity_card, phone, relationship, created_id, 
-    created_at, updated_at, updated_id
+    id, customer_management_id, name, identity_card, phone, relationship, order_num,
+    created_id, created_at, updated_at, updated_id
   </sql>
   <select id="selectByExample" parameterType="com.idea.customerManagement.model.BuyerExample" resultMap="BaseResultMap">
     select
@@ -90,7 +91,7 @@
     </if>
   </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     from buyer
     where id = #{id,jdbcType=VARCHAR}
@@ -106,14 +107,14 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.idea.customerManagement.model.Buyer">
-    insert into buyer (id, customer_management_id, name, 
-      identity_card, phone, relationship, 
-      created_id, created_at, updated_at, 
-      updated_id)
-    values (#{id,jdbcType=VARCHAR}, #{customerManagementId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
-      #{identityCard,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{relationship,jdbcType=VARCHAR}, 
-      #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, 
-      #{updatedId,jdbcType=VARCHAR})
+    insert into buyer (id, customer_management_id, name,
+                       identity_card, phone, relationship,
+                       order_num, created_id, created_at,
+                       updated_at, updated_id)
+    values (#{id,jdbcType=VARCHAR}, #{customerManagementId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
+            #{identityCard,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{relationship,jdbcType=VARCHAR},
+            #{orderNum,jdbcType=INTEGER}, #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
+            #{updatedAt,jdbcType=TIMESTAMP}, #{updatedId,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.idea.customerManagement.model.Buyer">
     insert into buyer
@@ -136,6 +137,9 @@
       <if test="relationship != null">
         relationship,
       </if>
+      <if test="orderNum != null">
+        order_num,
+      </if>
       <if test="createdId != null">
         created_id,
       </if>
@@ -168,6 +172,9 @@
       <if test="relationship != null">
         #{relationship,jdbcType=VARCHAR},
       </if>
+      <if test="orderNum != null">
+        #{orderNum,jdbcType=INTEGER},
+      </if>
       <if test="createdId != null">
         #{createdId,jdbcType=VARCHAR},
       </if>
@@ -209,6 +216,9 @@
       <if test="record.relationship != null">
         relationship = #{record.relationship,jdbcType=VARCHAR},
       </if>
+      <if test="record.orderNum != null">
+        order_num = #{record.orderNum,jdbcType=INTEGER},
+      </if>
       <if test="record.createdId != null">
         created_id = #{record.createdId,jdbcType=VARCHAR},
       </if>
@@ -229,15 +239,16 @@
   <update id="updateByExample" parameterType="map">
     update buyer
     set id = #{record.id,jdbcType=VARCHAR},
-      customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
-      name = #{record.name,jdbcType=VARCHAR},
-      identity_card = #{record.identityCard,jdbcType=VARCHAR},
-      phone = #{record.phone,jdbcType=VARCHAR},
-      relationship = #{record.relationship,jdbcType=VARCHAR},
-      created_id = #{record.createdId,jdbcType=VARCHAR},
-      created_at = #{record.createdAt,jdbcType=TIMESTAMP},
-      updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
-      updated_id = #{record.updatedId,jdbcType=VARCHAR}
+    customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+    name = #{record.name,jdbcType=VARCHAR},
+    identity_card = #{record.identityCard,jdbcType=VARCHAR},
+    phone = #{record.phone,jdbcType=VARCHAR},
+    relationship = #{record.relationship,jdbcType=VARCHAR},
+    order_num = #{record.orderNum,jdbcType=INTEGER},
+    created_id = #{record.createdId,jdbcType=VARCHAR},
+    created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+    updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
+    updated_id = #{record.updatedId,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -260,6 +271,9 @@
       <if test="relationship != null">
         relationship = #{relationship,jdbcType=VARCHAR},
       </if>
+      <if test="orderNum != null">
+        order_num = #{orderNum,jdbcType=INTEGER},
+      </if>
       <if test="createdId != null">
         created_id = #{createdId,jdbcType=VARCHAR},
       </if>
@@ -278,14 +292,15 @@
   <update id="updateByPrimaryKey" parameterType="com.idea.customerManagement.model.Buyer">
     update buyer
     set customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
-      name = #{name,jdbcType=VARCHAR},
-      identity_card = #{identityCard,jdbcType=VARCHAR},
-      phone = #{phone,jdbcType=VARCHAR},
-      relationship = #{relationship,jdbcType=VARCHAR},
-      created_id = #{createdId,jdbcType=VARCHAR},
-      created_at = #{createdAt,jdbcType=TIMESTAMP},
-      updated_at = #{updatedAt,jdbcType=TIMESTAMP},
-      updated_id = #{updatedId,jdbcType=VARCHAR}
+        name = #{name,jdbcType=VARCHAR},
+        identity_card = #{identityCard,jdbcType=VARCHAR},
+        phone = #{phone,jdbcType=VARCHAR},
+        relationship = #{relationship,jdbcType=VARCHAR},
+        order_num = #{orderNum,jdbcType=INTEGER},
+        created_id = #{createdId,jdbcType=VARCHAR},
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
+        updated_id = #{updatedId,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 214 - 107
pro-base/src/main/resources/mybatis/customerManagement/ContractManageMapper.xml

@@ -17,12 +17,18 @@
     <result column="total_price" jdbcType="DECIMAL" property="totalPrice" />
     <result column="buyer_proportion" jdbcType="DOUBLE" property="buyerProportion" />
     <result column="buyer_money" jdbcType="DECIMAL" property="buyerMoney" />
+    <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
     <result column="payment_method" jdbcType="INTEGER" property="paymentMethod" />
     <result column="deadline" jdbcType="TIMESTAMP" property="deadline" />
     <result column="maintenance_funds" jdbcType="DECIMAL" property="maintenanceFunds" />
     <result column="maintenance_total_price" jdbcType="DECIMAL" property="maintenanceTotalPrice" />
     <result column="contract_status" jdbcType="INTEGER" property="contractStatus" />
     <result column="customer_management_id" jdbcType="VARCHAR" property="customerManagementId" />
+    <result column="subscription_funds" jdbcType="DECIMAL" property="subscriptionFunds" />
+    <result column="created_id" jdbcType="VARCHAR" property="createdId" />
+    <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
+    <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
+    <result column="updated_id" jdbcType="VARCHAR" property="updatedId" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.customerManagement.model.ContractManage">
     <result column="remark" jdbcType="LONGVARCHAR" property="remark" />
@@ -88,10 +94,11 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, record_number, contract_number, seller, house_id, house_name, actual_build_area, 
-    actual_internal_area, actual_share_area, institution, signing_date, house_price, 
-    total_price, buyer_proportion, buyer_money, payment_method, deadline, maintenance_funds, 
-    maintenance_total_price, contract_status, customer_management_id
+    id, record_number, contract_number, seller, house_id, house_name, actual_build_area,
+    actual_internal_area, actual_share_area, institution, signing_date, house_price,
+    total_price, buyer_proportion, buyer_money, buyer_name, payment_method, deadline,
+    maintenance_funds, maintenance_total_price, contract_status, customer_management_id,
+    subscription_funds, created_id, created_at, updated_at, updated_id
   </sql>
   <sql id="Blob_Column_List">
     remark, contract_original, contract_other
@@ -127,7 +134,7 @@
     </if>
   </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
-    select 
+    select
     <include refid="Base_Column_List" />
     ,
     <include refid="Blob_Column_List" />
@@ -145,24 +152,28 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.idea.customerManagement.model.ContractManage">
-    insert into contract_manage (id, record_number, contract_number, 
-      seller, house_id, house_name, 
-      actual_build_area, actual_internal_area, actual_share_area, 
-      institution, signing_date, house_price, 
-      total_price, buyer_proportion, buyer_money, 
-      payment_method, deadline, maintenance_funds, 
-      maintenance_total_price, contract_status, 
-      customer_management_id, remark, contract_original, 
-      contract_other)
-    values (#{id,jdbcType=VARCHAR}, #{recordNumber,jdbcType=VARCHAR}, #{contractNumber,jdbcType=VARCHAR}, 
-      #{seller,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR}, #{houseName,jdbcType=VARCHAR}, 
-      #{actualBuildArea,jdbcType=DOUBLE}, #{actualInternalArea,jdbcType=DOUBLE}, #{actualShareArea,jdbcType=DOUBLE}, 
-      #{institution,jdbcType=VARCHAR}, #{signingDate,jdbcType=TIMESTAMP}, #{housePrice,jdbcType=DECIMAL}, 
-      #{totalPrice,jdbcType=DECIMAL}, #{buyerProportion,jdbcType=DOUBLE}, #{buyerMoney,jdbcType=DECIMAL}, 
-      #{paymentMethod,jdbcType=INTEGER}, #{deadline,jdbcType=TIMESTAMP}, #{maintenanceFunds,jdbcType=DECIMAL}, 
-      #{maintenanceTotalPrice,jdbcType=DECIMAL}, #{contractStatus,jdbcType=INTEGER}, 
-      #{customerManagementId,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR}, #{contractOriginal,jdbcType=LONGVARCHAR}, 
-      #{contractOther,jdbcType=LONGVARCHAR})
+    insert into contract_manage (id, record_number, contract_number,
+                                 seller, house_id, house_name,
+                                 actual_build_area, actual_internal_area, actual_share_area,
+                                 institution, signing_date, house_price,
+                                 total_price, buyer_proportion, buyer_money,
+                                 buyer_name, payment_method, deadline,
+                                 maintenance_funds, maintenance_total_price,
+                                 contract_status, customer_management_id, subscription_funds,
+                                 created_id, created_at, updated_at,
+                                 updated_id, remark, contract_original,
+                                 contract_other)
+    values (#{id,jdbcType=VARCHAR}, #{recordNumber,jdbcType=VARCHAR}, #{contractNumber,jdbcType=VARCHAR},
+            #{seller,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR}, #{houseName,jdbcType=VARCHAR},
+            #{actualBuildArea,jdbcType=DOUBLE}, #{actualInternalArea,jdbcType=DOUBLE}, #{actualShareArea,jdbcType=DOUBLE},
+            #{institution,jdbcType=VARCHAR}, #{signingDate,jdbcType=TIMESTAMP}, #{housePrice,jdbcType=DECIMAL},
+            #{totalPrice,jdbcType=DECIMAL}, #{buyerProportion,jdbcType=DOUBLE}, #{buyerMoney,jdbcType=DECIMAL},
+            #{buyerName,jdbcType=VARCHAR}, #{paymentMethod,jdbcType=INTEGER}, #{deadline,jdbcType=TIMESTAMP},
+            #{maintenanceFunds,jdbcType=DECIMAL}, #{maintenanceTotalPrice,jdbcType=DECIMAL},
+            #{contractStatus,jdbcType=INTEGER}, #{customerManagementId,jdbcType=VARCHAR}, #{subscriptionFunds,jdbcType=DECIMAL},
+            #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
+            #{updatedId,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR}, #{contractOriginal,jdbcType=LONGVARCHAR},
+            #{contractOther,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.idea.customerManagement.model.ContractManage">
     insert into contract_manage
@@ -212,6 +223,9 @@
       <if test="buyerMoney != null">
         buyer_money,
       </if>
+      <if test="buyerName != null">
+        buyer_name,
+      </if>
       <if test="paymentMethod != null">
         payment_method,
       </if>
@@ -230,6 +244,21 @@
       <if test="customerManagementId != null">
         customer_management_id,
       </if>
+      <if test="subscriptionFunds != null">
+        subscription_funds,
+      </if>
+      <if test="createdId != null">
+        created_id,
+      </if>
+      <if test="createdAt != null">
+        created_at,
+      </if>
+      <if test="updatedAt != null">
+        updated_at,
+      </if>
+      <if test="updatedId != null">
+        updated_id,
+      </if>
       <if test="remark != null">
         remark,
       </if>
@@ -286,6 +315,9 @@
       <if test="buyerMoney != null">
         #{buyerMoney,jdbcType=DECIMAL},
       </if>
+      <if test="buyerName != null">
+        #{buyerName,jdbcType=VARCHAR},
+      </if>
       <if test="paymentMethod != null">
         #{paymentMethod,jdbcType=INTEGER},
       </if>
@@ -304,6 +336,21 @@
       <if test="customerManagementId != null">
         #{customerManagementId,jdbcType=VARCHAR},
       </if>
+      <if test="subscriptionFunds != null">
+        #{subscriptionFunds,jdbcType=DECIMAL},
+      </if>
+      <if test="createdId != null">
+        #{createdId,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updatedAt != null">
+        #{updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updatedId != null">
+        #{updatedId,jdbcType=VARCHAR},
+      </if>
       <if test="remark != null">
         #{remark,jdbcType=LONGVARCHAR},
       </if>
@@ -369,6 +416,9 @@
       <if test="record.buyerMoney != null">
         buyer_money = #{record.buyerMoney,jdbcType=DECIMAL},
       </if>
+      <if test="record.buyerName != null">
+        buyer_name = #{record.buyerName,jdbcType=VARCHAR},
+      </if>
       <if test="record.paymentMethod != null">
         payment_method = #{record.paymentMethod,jdbcType=INTEGER},
       </if>
@@ -387,6 +437,21 @@
       <if test="record.customerManagementId != null">
         customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
       </if>
+      <if test="record.subscriptionFunds != null">
+        subscription_funds = #{record.subscriptionFunds,jdbcType=DECIMAL},
+      </if>
+      <if test="record.createdId != null">
+        created_id = #{record.createdId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdAt != null">
+        created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updatedAt != null">
+        updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updatedId != null">
+        updated_id = #{record.updatedId,jdbcType=VARCHAR},
+      </if>
       <if test="record.remark != null">
         remark = #{record.remark,jdbcType=LONGVARCHAR},
       </if>
@@ -404,29 +469,35 @@
   <update id="updateByExampleWithBLOBs" parameterType="map">
     update contract_manage
     set id = #{record.id,jdbcType=VARCHAR},
-      record_number = #{record.recordNumber,jdbcType=VARCHAR},
-      contract_number = #{record.contractNumber,jdbcType=VARCHAR},
-      seller = #{record.seller,jdbcType=VARCHAR},
-      house_id = #{record.houseId,jdbcType=VARCHAR},
-      house_name = #{record.houseName,jdbcType=VARCHAR},
-      actual_build_area = #{record.actualBuildArea,jdbcType=DOUBLE},
-      actual_internal_area = #{record.actualInternalArea,jdbcType=DOUBLE},
-      actual_share_area = #{record.actualShareArea,jdbcType=DOUBLE},
-      institution = #{record.institution,jdbcType=VARCHAR},
-      signing_date = #{record.signingDate,jdbcType=TIMESTAMP},
-      house_price = #{record.housePrice,jdbcType=DECIMAL},
-      total_price = #{record.totalPrice,jdbcType=DECIMAL},
-      buyer_proportion = #{record.buyerProportion,jdbcType=DOUBLE},
-      buyer_money = #{record.buyerMoney,jdbcType=DECIMAL},
-      payment_method = #{record.paymentMethod,jdbcType=INTEGER},
-      deadline = #{record.deadline,jdbcType=TIMESTAMP},
-      maintenance_funds = #{record.maintenanceFunds,jdbcType=DECIMAL},
-      maintenance_total_price = #{record.maintenanceTotalPrice,jdbcType=DECIMAL},
-      contract_status = #{record.contractStatus,jdbcType=INTEGER},
-      customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
-      remark = #{record.remark,jdbcType=LONGVARCHAR},
-      contract_original = #{record.contractOriginal,jdbcType=LONGVARCHAR},
-      contract_other = #{record.contractOther,jdbcType=LONGVARCHAR}
+    record_number = #{record.recordNumber,jdbcType=VARCHAR},
+    contract_number = #{record.contractNumber,jdbcType=VARCHAR},
+    seller = #{record.seller,jdbcType=VARCHAR},
+    house_id = #{record.houseId,jdbcType=VARCHAR},
+    house_name = #{record.houseName,jdbcType=VARCHAR},
+    actual_build_area = #{record.actualBuildArea,jdbcType=DOUBLE},
+    actual_internal_area = #{record.actualInternalArea,jdbcType=DOUBLE},
+    actual_share_area = #{record.actualShareArea,jdbcType=DOUBLE},
+    institution = #{record.institution,jdbcType=VARCHAR},
+    signing_date = #{record.signingDate,jdbcType=TIMESTAMP},
+    house_price = #{record.housePrice,jdbcType=DECIMAL},
+    total_price = #{record.totalPrice,jdbcType=DECIMAL},
+    buyer_proportion = #{record.buyerProportion,jdbcType=DOUBLE},
+    buyer_money = #{record.buyerMoney,jdbcType=DECIMAL},
+    buyer_name = #{record.buyerName,jdbcType=VARCHAR},
+    payment_method = #{record.paymentMethod,jdbcType=INTEGER},
+    deadline = #{record.deadline,jdbcType=TIMESTAMP},
+    maintenance_funds = #{record.maintenanceFunds,jdbcType=DECIMAL},
+    maintenance_total_price = #{record.maintenanceTotalPrice,jdbcType=DECIMAL},
+    contract_status = #{record.contractStatus,jdbcType=INTEGER},
+    customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+    subscription_funds = #{record.subscriptionFunds,jdbcType=DECIMAL},
+    created_id = #{record.createdId,jdbcType=VARCHAR},
+    created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+    updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
+    updated_id = #{record.updatedId,jdbcType=VARCHAR},
+    remark = #{record.remark,jdbcType=LONGVARCHAR},
+    contract_original = #{record.contractOriginal,jdbcType=LONGVARCHAR},
+    contract_other = #{record.contractOther,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -434,26 +505,32 @@
   <update id="updateByExample" parameterType="map">
     update contract_manage
     set id = #{record.id,jdbcType=VARCHAR},
-      record_number = #{record.recordNumber,jdbcType=VARCHAR},
-      contract_number = #{record.contractNumber,jdbcType=VARCHAR},
-      seller = #{record.seller,jdbcType=VARCHAR},
-      house_id = #{record.houseId,jdbcType=VARCHAR},
-      house_name = #{record.houseName,jdbcType=VARCHAR},
-      actual_build_area = #{record.actualBuildArea,jdbcType=DOUBLE},
-      actual_internal_area = #{record.actualInternalArea,jdbcType=DOUBLE},
-      actual_share_area = #{record.actualShareArea,jdbcType=DOUBLE},
-      institution = #{record.institution,jdbcType=VARCHAR},
-      signing_date = #{record.signingDate,jdbcType=TIMESTAMP},
-      house_price = #{record.housePrice,jdbcType=DECIMAL},
-      total_price = #{record.totalPrice,jdbcType=DECIMAL},
-      buyer_proportion = #{record.buyerProportion,jdbcType=DOUBLE},
-      buyer_money = #{record.buyerMoney,jdbcType=DECIMAL},
-      payment_method = #{record.paymentMethod,jdbcType=INTEGER},
-      deadline = #{record.deadline,jdbcType=TIMESTAMP},
-      maintenance_funds = #{record.maintenanceFunds,jdbcType=DECIMAL},
-      maintenance_total_price = #{record.maintenanceTotalPrice,jdbcType=DECIMAL},
-      contract_status = #{record.contractStatus,jdbcType=INTEGER},
-      customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR}
+    record_number = #{record.recordNumber,jdbcType=VARCHAR},
+    contract_number = #{record.contractNumber,jdbcType=VARCHAR},
+    seller = #{record.seller,jdbcType=VARCHAR},
+    house_id = #{record.houseId,jdbcType=VARCHAR},
+    house_name = #{record.houseName,jdbcType=VARCHAR},
+    actual_build_area = #{record.actualBuildArea,jdbcType=DOUBLE},
+    actual_internal_area = #{record.actualInternalArea,jdbcType=DOUBLE},
+    actual_share_area = #{record.actualShareArea,jdbcType=DOUBLE},
+    institution = #{record.institution,jdbcType=VARCHAR},
+    signing_date = #{record.signingDate,jdbcType=TIMESTAMP},
+    house_price = #{record.housePrice,jdbcType=DECIMAL},
+    total_price = #{record.totalPrice,jdbcType=DECIMAL},
+    buyer_proportion = #{record.buyerProportion,jdbcType=DOUBLE},
+    buyer_money = #{record.buyerMoney,jdbcType=DECIMAL},
+    buyer_name = #{record.buyerName,jdbcType=VARCHAR},
+    payment_method = #{record.paymentMethod,jdbcType=INTEGER},
+    deadline = #{record.deadline,jdbcType=TIMESTAMP},
+    maintenance_funds = #{record.maintenanceFunds,jdbcType=DECIMAL},
+    maintenance_total_price = #{record.maintenanceTotalPrice,jdbcType=DECIMAL},
+    contract_status = #{record.contractStatus,jdbcType=INTEGER},
+    customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+    subscription_funds = #{record.subscriptionFunds,jdbcType=DECIMAL},
+    created_id = #{record.createdId,jdbcType=VARCHAR},
+    created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+    updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
+    updated_id = #{record.updatedId,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -503,6 +580,9 @@
       <if test="buyerMoney != null">
         buyer_money = #{buyerMoney,jdbcType=DECIMAL},
       </if>
+      <if test="buyerName != null">
+        buyer_name = #{buyerName,jdbcType=VARCHAR},
+      </if>
       <if test="paymentMethod != null">
         payment_method = #{paymentMethod,jdbcType=INTEGER},
       </if>
@@ -521,6 +601,21 @@
       <if test="customerManagementId != null">
         customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
       </if>
+      <if test="subscriptionFunds != null">
+        subscription_funds = #{subscriptionFunds,jdbcType=DECIMAL},
+      </if>
+      <if test="createdId != null">
+        created_id = #{createdId,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updatedAt != null">
+        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updatedId != null">
+        updated_id = #{updatedId,jdbcType=VARCHAR},
+      </if>
       <if test="remark != null">
         remark = #{remark,jdbcType=LONGVARCHAR},
       </if>
@@ -536,52 +631,64 @@
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.idea.customerManagement.model.ContractManage">
     update contract_manage
     set record_number = #{recordNumber,jdbcType=VARCHAR},
-      contract_number = #{contractNumber,jdbcType=VARCHAR},
-      seller = #{seller,jdbcType=VARCHAR},
-      house_id = #{houseId,jdbcType=VARCHAR},
-      house_name = #{houseName,jdbcType=VARCHAR},
-      actual_build_area = #{actualBuildArea,jdbcType=DOUBLE},
-      actual_internal_area = #{actualInternalArea,jdbcType=DOUBLE},
-      actual_share_area = #{actualShareArea,jdbcType=DOUBLE},
-      institution = #{institution,jdbcType=VARCHAR},
-      signing_date = #{signingDate,jdbcType=TIMESTAMP},
-      house_price = #{housePrice,jdbcType=DECIMAL},
-      total_price = #{totalPrice,jdbcType=DECIMAL},
-      buyer_proportion = #{buyerProportion,jdbcType=DOUBLE},
-      buyer_money = #{buyerMoney,jdbcType=DECIMAL},
-      payment_method = #{paymentMethod,jdbcType=INTEGER},
-      deadline = #{deadline,jdbcType=TIMESTAMP},
-      maintenance_funds = #{maintenanceFunds,jdbcType=DECIMAL},
-      maintenance_total_price = #{maintenanceTotalPrice,jdbcType=DECIMAL},
-      contract_status = #{contractStatus,jdbcType=INTEGER},
-      customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
-      remark = #{remark,jdbcType=LONGVARCHAR},
-      contract_original = #{contractOriginal,jdbcType=LONGVARCHAR},
-      contract_other = #{contractOther,jdbcType=LONGVARCHAR}
+        contract_number = #{contractNumber,jdbcType=VARCHAR},
+        seller = #{seller,jdbcType=VARCHAR},
+        house_id = #{houseId,jdbcType=VARCHAR},
+        house_name = #{houseName,jdbcType=VARCHAR},
+        actual_build_area = #{actualBuildArea,jdbcType=DOUBLE},
+        actual_internal_area = #{actualInternalArea,jdbcType=DOUBLE},
+        actual_share_area = #{actualShareArea,jdbcType=DOUBLE},
+        institution = #{institution,jdbcType=VARCHAR},
+        signing_date = #{signingDate,jdbcType=TIMESTAMP},
+        house_price = #{housePrice,jdbcType=DECIMAL},
+        total_price = #{totalPrice,jdbcType=DECIMAL},
+        buyer_proportion = #{buyerProportion,jdbcType=DOUBLE},
+        buyer_money = #{buyerMoney,jdbcType=DECIMAL},
+        buyer_name = #{buyerName,jdbcType=VARCHAR},
+        payment_method = #{paymentMethod,jdbcType=INTEGER},
+        deadline = #{deadline,jdbcType=TIMESTAMP},
+        maintenance_funds = #{maintenanceFunds,jdbcType=DECIMAL},
+        maintenance_total_price = #{maintenanceTotalPrice,jdbcType=DECIMAL},
+        contract_status = #{contractStatus,jdbcType=INTEGER},
+        customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
+        subscription_funds = #{subscriptionFunds,jdbcType=DECIMAL},
+        created_id = #{createdId,jdbcType=VARCHAR},
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
+        updated_id = #{updatedId,jdbcType=VARCHAR},
+        remark = #{remark,jdbcType=LONGVARCHAR},
+        contract_original = #{contractOriginal,jdbcType=LONGVARCHAR},
+        contract_other = #{contractOther,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.idea.customerManagement.model.ContractManage">
     update contract_manage
     set record_number = #{recordNumber,jdbcType=VARCHAR},
-      contract_number = #{contractNumber,jdbcType=VARCHAR},
-      seller = #{seller,jdbcType=VARCHAR},
-      house_id = #{houseId,jdbcType=VARCHAR},
-      house_name = #{houseName,jdbcType=VARCHAR},
-      actual_build_area = #{actualBuildArea,jdbcType=DOUBLE},
-      actual_internal_area = #{actualInternalArea,jdbcType=DOUBLE},
-      actual_share_area = #{actualShareArea,jdbcType=DOUBLE},
-      institution = #{institution,jdbcType=VARCHAR},
-      signing_date = #{signingDate,jdbcType=TIMESTAMP},
-      house_price = #{housePrice,jdbcType=DECIMAL},
-      total_price = #{totalPrice,jdbcType=DECIMAL},
-      buyer_proportion = #{buyerProportion,jdbcType=DOUBLE},
-      buyer_money = #{buyerMoney,jdbcType=DECIMAL},
-      payment_method = #{paymentMethod,jdbcType=INTEGER},
-      deadline = #{deadline,jdbcType=TIMESTAMP},
-      maintenance_funds = #{maintenanceFunds,jdbcType=DECIMAL},
-      maintenance_total_price = #{maintenanceTotalPrice,jdbcType=DECIMAL},
-      contract_status = #{contractStatus,jdbcType=INTEGER},
-      customer_management_id = #{customerManagementId,jdbcType=VARCHAR}
+        contract_number = #{contractNumber,jdbcType=VARCHAR},
+        seller = #{seller,jdbcType=VARCHAR},
+        house_id = #{houseId,jdbcType=VARCHAR},
+        house_name = #{houseName,jdbcType=VARCHAR},
+        actual_build_area = #{actualBuildArea,jdbcType=DOUBLE},
+        actual_internal_area = #{actualInternalArea,jdbcType=DOUBLE},
+        actual_share_area = #{actualShareArea,jdbcType=DOUBLE},
+        institution = #{institution,jdbcType=VARCHAR},
+        signing_date = #{signingDate,jdbcType=TIMESTAMP},
+        house_price = #{housePrice,jdbcType=DECIMAL},
+        total_price = #{totalPrice,jdbcType=DECIMAL},
+        buyer_proportion = #{buyerProportion,jdbcType=DOUBLE},
+        buyer_money = #{buyerMoney,jdbcType=DECIMAL},
+        buyer_name = #{buyerName,jdbcType=VARCHAR},
+        payment_method = #{paymentMethod,jdbcType=INTEGER},
+        deadline = #{deadline,jdbcType=TIMESTAMP},
+        maintenance_funds = #{maintenanceFunds,jdbcType=DECIMAL},
+        maintenance_total_price = #{maintenanceTotalPrice,jdbcType=DECIMAL},
+        contract_status = #{contractStatus,jdbcType=INTEGER},
+        customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
+        subscription_funds = #{subscriptionFunds,jdbcType=DECIMAL},
+        created_id = #{createdId,jdbcType=VARCHAR},
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
+        updated_id = #{updatedId,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>