LAPTOP-FO2T5SIU\35838 hai 1 ano
pai
achega
92d0269d9d

+ 4 - 0
pro-base/src/main/java/com/idea/customerManagement/dto/ContractManageDto.java

@@ -17,4 +17,8 @@ public class ContractManageDto extends ContractManage {
 
     private String signingDateTo;
 
+    private BigDecimal receivedMoney;
+
+    private BigDecimal arrears;
+
 }

+ 4 - 0
pro-base/src/main/java/com/idea/customerManagement/model/ContractManage.java

@@ -80,6 +80,10 @@ public class ContractManage implements Serializable {
 
     private String downPaymentsProportion;
 
+    private Integer collectionStatus;
+
+    private Integer fundCollectionStatus;
+
     private static final long serialVersionUID = 1L;
 
 }

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

@@ -1905,6 +1905,126 @@ public class ContractManageExample {
             addCriterion("updated_id not between", value1, value2, "updatedId");
             return (Criteria) this;
         }
+
+        public Criteria andCollectionStatusIsNull() {
+            addCriterion("collection_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusIsNotNull() {
+            addCriterion("collection_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusEqualTo(Integer value) {
+            addCriterion("collection_status =", value, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusNotEqualTo(Integer value) {
+            addCriterion("collection_status <>", value, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusGreaterThan(Integer value) {
+            addCriterion("collection_status >", value, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("collection_status >=", value, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusLessThan(Integer value) {
+            addCriterion("collection_status <", value, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("collection_status <=", value, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusIn(List<Integer> values) {
+            addCriterion("collection_status in", values, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusNotIn(List<Integer> values) {
+            addCriterion("collection_status not in", values, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusBetween(Integer value1, Integer value2) {
+            addCriterion("collection_status between", value1, value2, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCollectionStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("collection_status not between", value1, value2, "collectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusIsNull() {
+            addCriterion("fund_collection_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusIsNotNull() {
+            addCriterion("fund_collection_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusEqualTo(Integer value) {
+            addCriterion("fund_collection_status =", value, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusNotEqualTo(Integer value) {
+            addCriterion("fund_collection_status <>", value, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusGreaterThan(Integer value) {
+            addCriterion("fund_collection_status >", value, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("fund_collection_status >=", value, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusLessThan(Integer value) {
+            addCriterion("fund_collection_status <", value, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("fund_collection_status <=", value, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusIn(List<Integer> values) {
+            addCriterion("fund_collection_status in", values, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusNotIn(List<Integer> values) {
+            addCriterion("fund_collection_status not in", values, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusBetween(Integer value1, Integer value2) {
+            addCriterion("fund_collection_status between", value1, value2, "fundCollectionStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andFundCollectionStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("fund_collection_status not between", value1, value2, "fundCollectionStatus");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 88 - 0
pro-base/src/main/java/com/idea/paymentManagement/controller/PayLogController.java

@@ -0,0 +1,88 @@
+package com.idea.paymentManagement.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.idea.customerManagement.dto.ContractManageDto;
+import com.idea.paymentManagement.model.PayLog;
+import com.idea.paymentManagement.service.PayLogService;
+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;
+import com.rockstar.shiro.util.ShiroUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.Date;
+
+@Controller
+@RequestMapping(value = "BillPayLogController")
+@Api(tags = "房款管理")
+public class PayLogController extends BaseController {
+
+    @Autowired
+    private PayLogService modelService;
+
+
+    @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, ContractManageDto model, DateTrans dt){
+        PageInfo<ContractManageDto> page= modelService.listByModel(tablepar,model,dt);
+        TableSplitResult<ContractManageDto> result = new TableSplitResult<ContractManageDto>(page.getPageNum(), page.getTotal(), page.getList());
+        return  result;
+    }
+
+
+
+    @ApiOperation(value = "收款信息列表")
+    @PostMapping(value = "payListAll",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(PayLog model, DateTrans dt){
+        return  modelService.payListAll(model,dt);
+    }
+
+    /**
+     * 合同部分信息
+     * @param contractId
+     * @return
+     */
+    @PostMapping(value = "getContractPart",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object getContractPart(String contractId){
+        return  modelService.getContractPart(contractId);
+    }
+
+
+    @ApiOperation(value = "删除")
+    @PostMapping(value = "remove/{id}",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("id") String id){
+        int result = modelService.deleteByPrimaryKey(id);
+        return result(result);
+    }
+
+
+    @ApiOperation(value = "新增收款")
+    @PostMapping(value = "add",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult add(PayLog record){
+
+        int result = modelService.add(record);
+        return result(result);
+    }
+
+    @PostMapping(value = "getByContractId",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object getByContractId(String contractId,Integer payType){
+        PayLog result = modelService.getByContractId(contractId, payType);
+        return result;
+    }
+
+
+}

+ 27 - 0
pro-base/src/main/java/com/idea/paymentManagement/dto/PayLogDto.java

@@ -0,0 +1,27 @@
+package com.idea.paymentManagement.dto;
+
+import com.idea.paymentManagement.model.PayLog;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class PayLogDto extends PayLog {
+
+    private String contractNumber;
+
+    private String buyerName;
+
+    private String houseName;
+
+    private String paymentMethodStr;
+
+    private String deadLine;
+
+    private BigDecimal receivableMoney;
+
+    private BigDecimal receivedMoney;
+
+    private BigDecimal arrears;
+
+}

+ 0 - 37
pro-base/src/main/java/com/idea/paymentManagement/mapper/BillPayLogMapper.java

@@ -1,37 +0,0 @@
-package com.idea.paymentManagement.mapper;
-
-import java.util.List;
-
-import com.idea.paymentManagement.model.BillPayLog;
-import com.idea.paymentManagement.model.BillPayLogExample;
-import org.apache.ibatis.annotations.Param;
-
-public interface BillPayLogMapper {
-    long countByExample(BillPayLogExample example);
-
-    int deleteByExample(BillPayLogExample example);
-
-    int deleteByPrimaryKey(String id);
-
-    int insert(BillPayLog record);
-
-    int insertSelective(BillPayLog record);
-
-    List<BillPayLog> selectByExampleWithBLOBs(BillPayLogExample example);
-
-    List<BillPayLog> selectByExample(BillPayLogExample example);
-
-    BillPayLog selectByPrimaryKey(String id);
-
-    int updateByExampleSelective(@Param("record") BillPayLog record, @Param("example") BillPayLogExample example);
-
-    int updateByExampleWithBLOBs(@Param("record") BillPayLog record, @Param("example") BillPayLogExample example);
-
-    int updateByExample(@Param("record") BillPayLog record, @Param("example") BillPayLogExample example);
-
-    int updateByPrimaryKeySelective(BillPayLog record);
-
-    int updateByPrimaryKeyWithBLOBs(BillPayLog record);
-
-    int updateByPrimaryKey(BillPayLog record);
-}

+ 21 - 0
pro-base/src/main/java/com/idea/paymentManagement/mapper/PayLogExtendMapper.java

@@ -0,0 +1,21 @@
+package com.idea.paymentManagement.mapper;
+
+import com.idea.customerManagement.dto.ContractManageDto;
+import com.idea.paymentManagement.model.PayLog;
+import com.idea.paymentManagement.model.PayLogExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface PayLogExtendMapper {
+
+    String getMoneyByContractId(@Param("contractId") String contractId,
+                                @Param("payType") Integer payType);
+
+    List<ContractManageDto> listByModel(ContractManageDto contractManageDto);
+
+
+
+
+
+}

+ 37 - 0
pro-base/src/main/java/com/idea/paymentManagement/mapper/PayLogMapper.java

@@ -0,0 +1,37 @@
+package com.idea.paymentManagement.mapper;
+
+import java.util.List;
+
+import com.idea.paymentManagement.model.PayLog;
+import com.idea.paymentManagement.model.PayLogExample;
+import org.apache.ibatis.annotations.Param;
+
+public interface PayLogMapper {
+    long countByExample(PayLogExample example);
+
+    int deleteByExample(PayLogExample example);
+
+    int deleteByPrimaryKey(String id);
+
+    int insert(PayLog record);
+
+    int insertSelective(PayLog record);
+
+    List<PayLog> selectByExampleWithBLOBs(PayLogExample example);
+
+    List<PayLog> selectByExample(PayLogExample example);
+
+    PayLog selectByPrimaryKey(String id);
+
+    int updateByExampleSelective(@Param("record") PayLog record, @Param("example") PayLogExample example);
+
+    int updateByExampleWithBLOBs(@Param("record") PayLog record, @Param("example") PayLogExample example);
+
+    int updateByExample(@Param("record") PayLog record, @Param("example") PayLogExample example);
+
+    int updateByPrimaryKeySelective(PayLog record);
+
+    int updateByPrimaryKeyWithBLOBs(PayLog record);
+
+    int updateByPrimaryKey(PayLog record);
+}

+ 51 - 11
pro-base/src/main/java/com/idea/paymentManagement/model/BillPayLog.java

@@ -4,9 +4,13 @@ import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
-public class BillPayLog implements Serializable {
+public class PayLog implements Serializable {
     private String id;
 
+    private Integer payType;
+
+    private Integer contentType;
+
     private String bankName;
 
     private String bankBranchName;
@@ -15,8 +19,6 @@ public class BillPayLog implements Serializable {
 
     private BigDecimal payMoney;
 
-    private Integer payType;
-
     private Date payTime;
 
     private Integer paymentMethod;
@@ -33,6 +35,12 @@ public class BillPayLog implements Serializable {
 
     private String remark;
 
+    private String contractId;
+
+    private String customerManagementId;
+
+    private String houseId;
+
     private String fileList;
 
     private static final long serialVersionUID = 1L;
@@ -45,6 +53,22 @@ public class BillPayLog implements Serializable {
         this.id = id == null ? null : id.trim();
     }
 
+    public Integer getPayType() {
+        return payType;
+    }
+
+    public void setPayType(Integer payType) {
+        this.payType = payType;
+    }
+
+    public Integer getContentType() {
+        return contentType;
+    }
+
+    public void setContentType(Integer contentType) {
+        this.contentType = contentType;
+    }
+
     public String getBankName() {
         return bankName;
     }
@@ -77,14 +101,6 @@ public class BillPayLog implements Serializable {
         this.payMoney = payMoney;
     }
 
-    public Integer getPayType() {
-        return payType;
-    }
-
-    public void setPayType(Integer payType) {
-        this.payType = payType;
-    }
-
     public Date getPayTime() {
         return payTime;
     }
@@ -149,6 +165,30 @@ public class BillPayLog implements Serializable {
         this.remark = remark == null ? null : remark.trim();
     }
 
+    public String getContractId() {
+        return contractId;
+    }
+
+    public void setContractId(String contractId) {
+        this.contractId = contractId == null ? null : contractId.trim();
+    }
+
+    public String getCustomerManagementId() {
+        return customerManagementId;
+    }
+
+    public void setCustomerManagementId(String customerManagementId) {
+        this.customerManagementId = customerManagementId == null ? null : customerManagementId.trim();
+    }
+
+    public String getHouseId() {
+        return houseId;
+    }
+
+    public void setHouseId(String houseId) {
+        this.houseId = houseId == null ? null : houseId.trim();
+    }
+
     public String getFileList() {
         return fileList;
     }

+ 332 - 62
pro-base/src/main/java/com/idea/paymentManagement/model/BillPayLogExample.java

@@ -5,14 +5,14 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-public class BillPayLogExample {
+public class PayLogExample {
     protected String orderByClause;
 
     protected boolean distinct;
 
     protected List<Criteria> oredCriteria;
 
-    public BillPayLogExample() {
+    public PayLogExample() {
         oredCriteria = new ArrayList<Criteria>();
     }
 
@@ -176,6 +176,126 @@ public class BillPayLogExample {
             return (Criteria) this;
         }
 
+        public Criteria andPayTypeIsNull() {
+            addCriterion("pay_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeIsNotNull() {
+            addCriterion("pay_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeEqualTo(Integer value) {
+            addCriterion("pay_type =", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeNotEqualTo(Integer value) {
+            addCriterion("pay_type <>", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeGreaterThan(Integer value) {
+            addCriterion("pay_type >", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("pay_type >=", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeLessThan(Integer value) {
+            addCriterion("pay_type <", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("pay_type <=", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeIn(List<Integer> values) {
+            addCriterion("pay_type in", values, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeNotIn(List<Integer> values) {
+            addCriterion("pay_type not in", values, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeBetween(Integer value1, Integer value2) {
+            addCriterion("pay_type between", value1, value2, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("pay_type not between", value1, value2, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeIsNull() {
+            addCriterion("content_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeIsNotNull() {
+            addCriterion("content_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeEqualTo(Integer value) {
+            addCriterion("content_type =", value, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeNotEqualTo(Integer value) {
+            addCriterion("content_type <>", value, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeGreaterThan(Integer value) {
+            addCriterion("content_type >", value, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("content_type >=", value, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeLessThan(Integer value) {
+            addCriterion("content_type <", value, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("content_type <=", value, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeIn(List<Integer> values) {
+            addCriterion("content_type in", values, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeNotIn(List<Integer> values) {
+            addCriterion("content_type not in", values, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeBetween(Integer value1, Integer value2) {
+            addCriterion("content_type between", value1, value2, "contentType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("content_type not between", value1, value2, "contentType");
+            return (Criteria) this;
+        }
+
         public Criteria andBankNameIsNull() {
             addCriterion("bank_name is null");
             return (Criteria) this;
@@ -446,66 +566,6 @@ public class BillPayLogExample {
             return (Criteria) this;
         }
 
-        public Criteria andPayTypeIsNull() {
-            addCriterion("pay_type is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeIsNotNull() {
-            addCriterion("pay_type is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeEqualTo(Integer value) {
-            addCriterion("pay_type =", value, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeNotEqualTo(Integer value) {
-            addCriterion("pay_type <>", value, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeGreaterThan(Integer value) {
-            addCriterion("pay_type >", value, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeGreaterThanOrEqualTo(Integer value) {
-            addCriterion("pay_type >=", value, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeLessThan(Integer value) {
-            addCriterion("pay_type <", value, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeLessThanOrEqualTo(Integer value) {
-            addCriterion("pay_type <=", value, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeIn(List<Integer> values) {
-            addCriterion("pay_type in", values, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeNotIn(List<Integer> values) {
-            addCriterion("pay_type not in", values, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeBetween(Integer value1, Integer value2) {
-            addCriterion("pay_type between", value1, value2, "payType");
-            return (Criteria) this;
-        }
-
-        public Criteria andPayTypeNotBetween(Integer value1, Integer value2) {
-            addCriterion("pay_type not between", value1, value2, "payType");
-            return (Criteria) this;
-        }
-
         public Criteria andPayTimeIsNull() {
             addCriterion("pay_time is null");
             return (Criteria) this;
@@ -1015,6 +1075,216 @@ public class BillPayLogExample {
             addCriterion("remark not between", value1, value2, "remark");
             return (Criteria) this;
         }
+
+        public Criteria andContractIdIsNull() {
+            addCriterion("contract_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdIsNotNull() {
+            addCriterion("contract_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdEqualTo(String value) {
+            addCriterion("contract_id =", value, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdNotEqualTo(String value) {
+            addCriterion("contract_id <>", value, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdGreaterThan(String value) {
+            addCriterion("contract_id >", value, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdGreaterThanOrEqualTo(String value) {
+            addCriterion("contract_id >=", value, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdLessThan(String value) {
+            addCriterion("contract_id <", value, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdLessThanOrEqualTo(String value) {
+            addCriterion("contract_id <=", value, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdLike(String value) {
+            addCriterion("contract_id like", value, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdNotLike(String value) {
+            addCriterion("contract_id not like", value, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdIn(List<String> values) {
+            addCriterion("contract_id in", values, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdNotIn(List<String> values) {
+            addCriterion("contract_id not in", values, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdBetween(String value1, String value2) {
+            addCriterion("contract_id between", value1, value2, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andContractIdNotBetween(String value1, String value2) {
+            addCriterion("contract_id not between", value1, value2, "contractId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdIsNull() {
+            addCriterion("customer_management_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdIsNotNull() {
+            addCriterion("customer_management_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdEqualTo(String value) {
+            addCriterion("customer_management_id =", value, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdNotEqualTo(String value) {
+            addCriterion("customer_management_id <>", value, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdGreaterThan(String value) {
+            addCriterion("customer_management_id >", value, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdGreaterThanOrEqualTo(String value) {
+            addCriterion("customer_management_id >=", value, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdLessThan(String value) {
+            addCriterion("customer_management_id <", value, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdLessThanOrEqualTo(String value) {
+            addCriterion("customer_management_id <=", value, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdLike(String value) {
+            addCriterion("customer_management_id like", value, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdNotLike(String value) {
+            addCriterion("customer_management_id not like", value, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdIn(List<String> values) {
+            addCriterion("customer_management_id in", values, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdNotIn(List<String> values) {
+            addCriterion("customer_management_id not in", values, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdBetween(String value1, String value2) {
+            addCriterion("customer_management_id between", value1, value2, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCustomerManagementIdNotBetween(String value1, String value2) {
+            addCriterion("customer_management_id not between", value1, value2, "customerManagementId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdIsNull() {
+            addCriterion("house_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdIsNotNull() {
+            addCriterion("house_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdEqualTo(String value) {
+            addCriterion("house_id =", value, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdNotEqualTo(String value) {
+            addCriterion("house_id <>", value, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdGreaterThan(String value) {
+            addCriterion("house_id >", value, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdGreaterThanOrEqualTo(String value) {
+            addCriterion("house_id >=", value, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdLessThan(String value) {
+            addCriterion("house_id <", value, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdLessThanOrEqualTo(String value) {
+            addCriterion("house_id <=", value, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdLike(String value) {
+            addCriterion("house_id like", value, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdNotLike(String value) {
+            addCriterion("house_id not like", value, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdIn(List<String> values) {
+            addCriterion("house_id in", values, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdNotIn(List<String> values) {
+            addCriterion("house_id not in", values, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdBetween(String value1, String value2) {
+            addCriterion("house_id between", value1, value2, "houseId");
+            return (Criteria) this;
+        }
+
+        public Criteria andHouseIdNotBetween(String value1, String value2) {
+            addCriterion("house_id not between", value1, value2, "houseId");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 0 - 69
pro-base/src/main/java/com/idea/paymentManagement/service/BillPayLogService.java

@@ -1,69 +0,0 @@
-package com.idea.paymentManagement.service;
-
-import cn.hutool.core.util.IdUtil;
-import com.idea.paymentManagement.mapper.BillPayLogMapper;
-import com.idea.paymentManagement.model.BillPayLog;
-import com.idea.paymentManagement.model.BillPayLogExample;
-import com.rockstar.common.base.BaseService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class BillPayLogService implements BaseService<BillPayLog, BillPayLogExample> {
-
-    @Autowired
-    private BillPayLogMapper modelMapper;
-
-
-    @Override
-    public int deleteByPrimaryKey(String s) {
-        return modelMapper.deleteByPrimaryKey(s);
-    }
-
-    @Override
-    public int insertSelective(BillPayLog billPayLog) {
-        billPayLog.setId(IdUtil.simpleUUID());
-        return modelMapper.insertSelective(billPayLog);
-    }
-
-    public int insertWithoutId(BillPayLog billPayLog) {
-        return modelMapper.insertSelective(billPayLog);
-    }
-
-    @Override
-    public BillPayLog selectByPrimaryKey(String s) {
-        return modelMapper.selectByPrimaryKey(s);
-    }
-
-    @Override
-    public int updateByPrimaryKeySelective(BillPayLog billPayLog) {
-        return modelMapper.updateByPrimaryKeySelective(billPayLog);
-    }
-
-    @Override
-    public int updateByExampleSelective(BillPayLog billPayLog, BillPayLogExample billPayLogExample) {
-        return modelMapper.updateByExampleSelective(billPayLog,billPayLogExample);
-    }
-
-    @Override
-    public int updateByExample(BillPayLog billPayLog, BillPayLogExample billPayLogExample) {
-        return 0;
-    }
-
-    @Override
-    public List<BillPayLog> selectByExample(BillPayLogExample billPayLogExample) {
-        return null;
-    }
-
-    @Override
-    public long countByExample(BillPayLogExample billPayLogExample) {
-        return 0;
-    }
-
-    @Override
-    public int deleteByExample(BillPayLogExample billPayLogExample) {
-        return 0;
-    }
-}

+ 192 - 0
pro-base/src/main/java/com/idea/paymentManagement/service/PayLogService.java

@@ -0,0 +1,192 @@
+package com.idea.paymentManagement.service;
+
+import cn.hutool.core.util.IdUtil;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.model.ParkInfo;
+import com.idea.buildManage.model.ParkInfoExample;
+import com.idea.buildManage.model.ParkRoom;
+import com.idea.customerManagement.dto.ContractManageDto;
+import com.idea.customerManagement.mapper.ContractManageMapper;
+import com.idea.customerManagement.model.ContractManage;
+import com.idea.paymentManagement.dto.PayLogDto;
+import com.idea.paymentManagement.mapper.PayLogExtendMapper;
+import com.idea.paymentManagement.mapper.PayLogMapper;
+import com.idea.paymentManagement.model.PayLog;
+import com.idea.paymentManagement.model.PayLogExample;
+import com.idea.util.DateUtils;
+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.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class PayLogService implements BaseService<PayLog, PayLogExample> {
+
+    @Autowired
+    private PayLogMapper modelMapper;
+    @Autowired
+    private PayLogExtendMapper extendMapper;
+    @Autowired
+    private ContractManageMapper contractManageMapper;
+
+
+    @Override
+    public int deleteByPrimaryKey(String s) {
+        return modelMapper.deleteByPrimaryKey(s);
+    }
+
+    @Override
+    public int insertSelective(PayLog PayLog) {
+        PayLog.setId(IdUtil.simpleUUID());
+        return modelMapper.insertSelective(PayLog);
+    }
+
+    public int insertWithoutId(PayLog PayLog) {
+        return modelMapper.insertSelective(PayLog);
+    }
+
+    @Override
+    public PayLog selectByPrimaryKey(String s) {
+        return modelMapper.selectByPrimaryKey(s);
+    }
+
+    @Override
+    public int updateByPrimaryKeySelective(PayLog PayLog) {
+        return modelMapper.updateByPrimaryKeySelective(PayLog);
+    }
+
+    @Override
+    public int updateByExampleSelective(PayLog PayLog, PayLogExample PayLogExample) {
+        return modelMapper.updateByExampleSelective(PayLog,PayLogExample);
+    }
+
+    @Override
+    public int updateByExample(PayLog PayLog, PayLogExample PayLogExample) {
+        return 0;
+    }
+
+    @Override
+    public List<PayLog> selectByExample(PayLogExample PayLogExample) {
+        return null;
+    }
+
+    @Override
+    public long countByExample(PayLogExample PayLogExample) {
+        return 0;
+    }
+
+    @Override
+    public int deleteByExample(PayLogExample PayLogExample) {
+        return 0;
+    }
+
+
+    public PageInfo<ContractManageDto> listByModel(Tablepar tablepar, ContractManageDto model, DateTrans dt) {
+        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+        List<ContractManageDto> list = extendMapper.listByModel(model);
+        PageInfo<ContractManageDto> pageInfo = new PageInfo<>(list);
+        return pageInfo;
+    }
+
+
+    /**
+     * 新增
+     * @param model
+     * @return
+     */
+    public int add(PayLog model){
+
+        model.setCreatedBy(ShiroUtils.getUserId());
+        model.setCreatedAt(new Date());
+        int result = insertSelective(model);
+        // 更新合同 预收款 收款状态
+        ContractManage contractManage = contractManageMapper.selectByPrimaryKey(model.getContractId());
+        if(model.getPayType() == 1){
+            String receivedMoneyStr = extendMapper.getMoneyByContractId(model.getContractId(),model.getPayType());
+            BigDecimal totalPrice = contractManage.getTotalPrice();
+            BigDecimal receivedMoney = new BigDecimal(receivedMoneyStr);
+            if(receivedMoney.doubleValue() < totalPrice.doubleValue()){
+                // 部分收款
+                contractManage.setContractStatus(1);
+            }else {
+                // 全部收款
+                contractManage.setContractStatus(2);
+            }
+        }
+        // 更新合同 资金 收款状态
+        if(model.getPayType() == 2){
+            // 已收款
+            contractManage.setFundCollectionStatus(2);
+        }
+
+        return result;
+    }
+
+
+    /**
+     * 收款信息
+     * @param model
+     * @param dt
+     * @return
+     */
+    public List<PayLog> payListAll(PayLog model, DateTrans dt){
+        return modelMapper.selectByExample(getCondition(model, dt));
+    }
+
+    private PayLogExample getCondition(PayLog model, DateTrans dt) {
+        PayLogExample ex = new PayLogExample();
+        ex.setOrderByClause("created_at asc");
+        PayLogExample.Criteria criteria = ex.createCriteria();
+        if(StringUtils.isNotEmpty(model.getContractId())){
+            criteria.andContractIdEqualTo(model.getContractId());
+        }
+        return ex;
+    }
+
+    /**
+     * 查询合同部分的信息
+     * @param contractId
+     * @return
+     */
+    public PayLogDto getContractPart(String contractId){
+
+        ContractManage contractManage = contractManageMapper.selectByPrimaryKey(contractId);
+        PayLogDto payLogDto = new PayLogDto();
+        payLogDto.setContractNumber(contractManage.getContractNumber());
+        payLogDto.setBuyerName(contractManage.getBuyerName());
+        payLogDto.setHouseName(contractManage.getHouseName());
+        payLogDto.setPaymentMethod(contractManage.getPaymentMethod());
+        payLogDto.setDeadLine(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,contractManage.getDeadline()));
+        payLogDto.setReceivableMoney(contractManage.getTotalPrice());
+        // 查询已收房款
+        String receivedMoneyStr = extendMapper.getMoneyByContractId(contractId,1);
+        BigDecimal receivedMoney = new BigDecimal(receivedMoneyStr);
+        // 欠款
+        BigDecimal arrears = contractManage.getTotalPrice().subtract(receivedMoney);
+        payLogDto.setReceivedMoney(receivedMoney);
+        payLogDto.setArrears(arrears);
+        return payLogDto;
+    }
+
+    public PayLog getByContractId(String contractId,Integer payType) {
+
+        PayLogExample payLogExample = new PayLogExample();
+        payLogExample.createCriteria().andContractIdEqualTo(contractId).andPayTypeEqualTo(payType);
+        List<PayLog> payLogs = modelMapper.selectByExample(payLogExample);
+        return payLogs.get(0);
+
+    }
+
+
+
+
+
+}

+ 44 - 9
pro-base/src/main/resources/mybatis/customerManagement/ContractManageMapper.xml

@@ -30,6 +30,8 @@
     <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
     <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
     <result column="updated_id" jdbcType="VARCHAR" property="updatedId" />
+    <result column="collection_status" jdbcType="INTEGER" property="collectionStatus" />
+    <result column="fund_collection_status" jdbcType="INTEGER" property="fundCollectionStatus" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.customerManagement.model.ContractManage">
     <result column="remark" jdbcType="LONGVARCHAR" property="remark" />
@@ -99,7 +101,8 @@
     actual_build_area, actual_internal_area, actual_share_area, institution, signing_date,
     house_price, total_price, buyer_proportion, buyer_money, buyer_name, payment_method,
     down_payments_proportion, deadline, maintenance_funds, maintenance_total_price, contract_status,
-    subscription_funds, created_id, created_at, updated_at, updated_id
+    subscription_funds, created_id, created_at, updated_at, updated_id, collection_status,
+    fund_collection_status
   </sql>
   <sql id="Blob_Column_List">
     remark, contract_original, contract_other
@@ -162,9 +165,9 @@
                                  down_payments_proportion, deadline, maintenance_funds,
                                  maintenance_total_price, contract_status,
                                  subscription_funds, created_id, created_at,
-                                 updated_at, updated_id, remark,
-                                 contract_original, contract_other
-    )
+                                 updated_at, updated_id, collection_status,
+                                 fund_collection_status, remark, contract_original,
+                                 contract_other)
     values (#{id,jdbcType=VARCHAR}, #{customerManagementId,jdbcType=VARCHAR}, #{recordNumber,jdbcType=VARCHAR},
             #{contractNumber,jdbcType=VARCHAR}, #{seller,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR},
             #{houseName,jdbcType=VARCHAR}, #{actualBuildArea,jdbcType=DOUBLE}, #{actualInternalArea,jdbcType=DOUBLE},
@@ -174,9 +177,9 @@
             #{downPaymentsProportion,jdbcType=VARCHAR}, #{deadline,jdbcType=TIMESTAMP}, #{maintenanceFunds,jdbcType=DECIMAL},
             #{maintenanceTotalPrice,jdbcType=DECIMAL}, #{contractStatus,jdbcType=INTEGER},
             #{subscriptionFunds,jdbcType=DECIMAL}, #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
-            #{updatedAt,jdbcType=TIMESTAMP}, #{updatedId,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR},
-            #{contractOriginal,jdbcType=LONGVARCHAR}, #{contractOther,jdbcType=LONGVARCHAR}
-           )
+            #{updatedAt,jdbcType=TIMESTAMP}, #{updatedId,jdbcType=VARCHAR}, #{collectionStatus,jdbcType=INTEGER},
+            #{fundCollectionStatus,jdbcType=INTEGER}, #{remark,jdbcType=LONGVARCHAR}, #{contractOriginal,jdbcType=LONGVARCHAR},
+            #{contractOther,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.idea.customerManagement.model.ContractManage">
     insert into contract_manage
@@ -265,6 +268,12 @@
       <if test="updatedId != null">
         updated_id,
       </if>
+      <if test="collectionStatus != null">
+        collection_status,
+      </if>
+      <if test="fundCollectionStatus != null">
+        fund_collection_status,
+      </if>
       <if test="remark != null">
         remark,
       </if>
@@ -360,6 +369,12 @@
       <if test="updatedId != null">
         #{updatedId,jdbcType=VARCHAR},
       </if>
+      <if test="collectionStatus != null">
+        #{collectionStatus,jdbcType=INTEGER},
+      </if>
+      <if test="fundCollectionStatus != null">
+        #{fundCollectionStatus,jdbcType=INTEGER},
+      </if>
       <if test="remark != null">
         #{remark,jdbcType=LONGVARCHAR},
       </if>
@@ -464,6 +479,12 @@
       <if test="record.updatedId != null">
         updated_id = #{record.updatedId,jdbcType=VARCHAR},
       </if>
+      <if test="record.collectionStatus != null">
+        collection_status = #{record.collectionStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.fundCollectionStatus != null">
+        fund_collection_status = #{record.fundCollectionStatus,jdbcType=INTEGER},
+      </if>
       <if test="record.remark != null">
         remark = #{record.remark,jdbcType=LONGVARCHAR},
       </if>
@@ -508,6 +529,8 @@
     created_at = #{record.createdAt,jdbcType=TIMESTAMP},
     updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
     updated_id = #{record.updatedId,jdbcType=VARCHAR},
+    collection_status = #{record.collectionStatus,jdbcType=INTEGER},
+    fund_collection_status = #{record.fundCollectionStatus,jdbcType=INTEGER},
     remark = #{record.remark,jdbcType=LONGVARCHAR},
     contract_original = #{record.contractOriginal,jdbcType=LONGVARCHAR},
     contract_other = #{record.contractOther,jdbcType=LONGVARCHAR}
@@ -544,7 +567,9 @@
     created_id = #{record.createdId,jdbcType=VARCHAR},
     created_at = #{record.createdAt,jdbcType=TIMESTAMP},
     updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
-    updated_id = #{record.updatedId,jdbcType=VARCHAR}
+    updated_id = #{record.updatedId,jdbcType=VARCHAR},
+    collection_status = #{record.collectionStatus,jdbcType=INTEGER},
+    fund_collection_status = #{record.fundCollectionStatus,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -633,6 +658,12 @@
       <if test="updatedId != null">
         updated_id = #{updatedId,jdbcType=VARCHAR},
       </if>
+      <if test="collectionStatus != null">
+        collection_status = #{collectionStatus,jdbcType=INTEGER},
+      </if>
+      <if test="fundCollectionStatus != null">
+        fund_collection_status = #{fundCollectionStatus,jdbcType=INTEGER},
+      </if>
       <if test="remark != null">
         remark = #{remark,jdbcType=LONGVARCHAR},
       </if>
@@ -674,6 +705,8 @@
         created_at = #{createdAt,jdbcType=TIMESTAMP},
         updated_at = #{updatedAt,jdbcType=TIMESTAMP},
         updated_id = #{updatedId,jdbcType=VARCHAR},
+        collection_status = #{collectionStatus,jdbcType=INTEGER},
+        fund_collection_status = #{fundCollectionStatus,jdbcType=INTEGER},
         remark = #{remark,jdbcType=LONGVARCHAR},
         contract_original = #{contractOriginal,jdbcType=LONGVARCHAR},
         contract_other = #{contractOther,jdbcType=LONGVARCHAR}
@@ -707,7 +740,9 @@
         created_id = #{createdId,jdbcType=VARCHAR},
         created_at = #{createdAt,jdbcType=TIMESTAMP},
         updated_at = #{updatedAt,jdbcType=TIMESTAMP},
-        updated_id = #{updatedId,jdbcType=VARCHAR}
+        updated_id = #{updatedId,jdbcType=VARCHAR},
+        collection_status = #{collectionStatus,jdbcType=INTEGER},
+        fund_collection_status = #{fundCollectionStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 39 - 0
pro-base/src/main/resources/mybatis/paymentManagement/PayLogExtendMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.idea.paymentManagement.mapper.PayLogExtendMapper">
+
+
+  <select id="getMoneyByContractId" resultType="java.lang.String">
+    select ifnull(sum(pay_money),0) from pay_log
+    where contract_id = #{contractId} and pay_type = #{payType}
+  </select>
+
+  <select id="listByModel" resultType="com.idea.customerManagement.dto.ContractManageDto">
+    select contract_manage.*, ifnull(sum(pay_log.pay_money),0) receivedMoney,
+           ifnull(contract_manage.total_price - sum(pay_log.pay_money),0) arrears
+    from contract_manage
+    left join pay_log on contract_manage.id = pay_log.contract_id
+    <where>
+      and contract_status = '2'
+      and pay_log.pay_type = #{payType}
+      <if test="houseName != null and houseName != ''">
+        and house_name like concat('%',#{houseName},'%')
+      </if>
+      <if test="contractStatus != null and contractStatus != ''">
+        and contract_status = #{contractStatus}
+      </if>
+      <if test="signingDateFrom != null and signingDateFrom != ''">
+        and signing_date >= #{signingDateFrom}
+      </if>
+      <if test="signingDateTo != null and signingDateTo != ''">
+        and signing_date &lt;= #{signingDateTo}
+      </if>
+      <if test="buyerName != null and buyerName != ''">
+        and contract_manage.customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
+      </if>
+    </where>
+    group by contract_manage.id
+  </select>
+
+
+</mapper>

+ 131 - 60
pro-base/src/main/resources/mybatis/paymentManagement/BillPayLogMapper.xml

@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.idea.paymentManagement.mapper.BillPayLogMapper">
-  <resultMap id="BaseResultMap" type="com.idea.paymentManagement.model.BillPayLog">
+<mapper namespace="com.idea.paymentManagement.mapper.PayLogMapper">
+  <resultMap id="BaseResultMap" type="com.idea.paymentManagement.model.PayLog">
     <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="pay_type" jdbcType="INTEGER" property="payType" />
+    <result column="content_type" jdbcType="INTEGER" property="contentType" />
     <result column="bank_name" jdbcType="VARCHAR" property="bankName" />
     <result column="bank_branch_name" jdbcType="VARCHAR" property="bankBranchName" />
     <result column="bank_number" jdbcType="CHAR" property="bankNumber" />
     <result column="pay_money" jdbcType="DECIMAL" property="payMoney" />
-    <result column="pay_type" jdbcType="INTEGER" property="payType" />
     <result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
     <result column="payment_method" jdbcType="INTEGER" property="paymentMethod" />
     <result column="status" jdbcType="INTEGER" property="status" />
@@ -16,8 +17,11 @@
     <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
     <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
     <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="contract_id" jdbcType="VARCHAR" property="contractId" />
+    <result column="customer_management_id" jdbcType="VARCHAR" property="customerManagementId" />
+    <result column="house_id" jdbcType="VARCHAR" property="houseId" />
   </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.paymentManagement.model.BillPayLog">
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.paymentManagement.model.PayLog">
     <result column="file_list" jdbcType="LONGVARCHAR" property="fileList" />
   </resultMap>
   <sql id="Example_Where_Clause">
@@ -79,13 +83,14 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, bank_name, bank_branch_name, bank_number, pay_money, pay_type, pay_time, payment_method, 
-    status, created_by, created_at, updated_by, updated_at, remark
+    id, pay_type, content_type, bank_name, bank_branch_name, bank_number, pay_money, 
+    pay_time, payment_method, status, created_by, created_at, updated_by, updated_at, 
+    remark, contract_id, customer_management_id, house_id
   </sql>
   <sql id="Blob_Column_List">
     file_list
   </sql>
-  <select id="selectByExampleWithBLOBs" parameterType="com.idea.paymentManagement.model.BillPayLogExample" resultMap="ResultMapWithBLOBs">
+  <select id="selectByExampleWithBLOBs" parameterType="com.idea.paymentManagement.model.PayLogExample" resultMap="ResultMapWithBLOBs">
     select
     <if test="distinct">
       distinct
@@ -93,7 +98,7 @@
     <include refid="Base_Column_List" />
     ,
     <include refid="Blob_Column_List" />
-    from bill_pay_log
+    from pay_log
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -101,13 +106,13 @@
       order by ${orderByClause}
     </if>
   </select>
-  <select id="selectByExample" parameterType="com.idea.paymentManagement.model.BillPayLogExample" resultMap="BaseResultMap">
+  <select id="selectByExample" parameterType="com.idea.paymentManagement.model.PayLogExample" resultMap="BaseResultMap">
     select
     <if test="distinct">
       distinct
     </if>
     <include refid="Base_Column_List" />
-    from bill_pay_log
+    from pay_log
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -120,39 +125,47 @@
     <include refid="Base_Column_List" />
     ,
     <include refid="Blob_Column_List" />
-    from bill_pay_log
+    from pay_log
     where id = #{id,jdbcType=VARCHAR}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-    delete from bill_pay_log
+    delete from pay_log
     where id = #{id,jdbcType=VARCHAR}
   </delete>
-  <delete id="deleteByExample" parameterType="com.idea.paymentManagement.model.BillPayLogExample">
-    delete from bill_pay_log
+  <delete id="deleteByExample" parameterType="com.idea.paymentManagement.model.PayLogExample">
+    delete from pay_log
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
   </delete>
-  <insert id="insert" parameterType="com.idea.paymentManagement.model.BillPayLog">
-    insert into bill_pay_log (id, bank_name, bank_branch_name, 
-      bank_number, pay_money, pay_type, 
-      pay_time, payment_method, status, 
-      created_by, created_at, updated_by, 
-      updated_at, remark, file_list
-      )
-    values (#{id,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{bankBranchName,jdbcType=VARCHAR}, 
-      #{bankNumber,jdbcType=CHAR}, #{payMoney,jdbcType=DECIMAL}, #{payType,jdbcType=INTEGER}, 
-      #{payTime,jdbcType=TIMESTAMP}, #{paymentMethod,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
-      #{createdBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, 
-      #{updatedAt,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{fileList,jdbcType=LONGVARCHAR}
-      )
+  <insert id="insert" parameterType="com.idea.paymentManagement.model.PayLog">
+    insert into pay_log (id, pay_type, content_type, 
+      bank_name, bank_branch_name, bank_number, 
+      pay_money, pay_time, payment_method, 
+      status, created_by, created_at, 
+      updated_by, updated_at, remark, 
+      contract_id, customer_management_id, house_id, 
+      file_list)
+    values (#{id,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, #{contentType,jdbcType=INTEGER}, 
+      #{bankName,jdbcType=VARCHAR}, #{bankBranchName,jdbcType=VARCHAR}, #{bankNumber,jdbcType=CHAR}, 
+      #{payMoney,jdbcType=DECIMAL}, #{payTime,jdbcType=TIMESTAMP}, #{paymentMethod,jdbcType=INTEGER}, 
+      #{status,jdbcType=INTEGER}, #{createdBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, 
+      #{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, 
+      #{contractId,jdbcType=VARCHAR}, #{customerManagementId,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR}, 
+      #{fileList,jdbcType=LONGVARCHAR})
   </insert>
-  <insert id="insertSelective" parameterType="com.idea.paymentManagement.model.BillPayLog">
-    insert into bill_pay_log
+  <insert id="insertSelective" parameterType="com.idea.paymentManagement.model.PayLog">
+    insert into pay_log
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
         id,
       </if>
+      <if test="payType != null">
+        pay_type,
+      </if>
+      <if test="contentType != null">
+        content_type,
+      </if>
       <if test="bankName != null">
         bank_name,
       </if>
@@ -165,9 +178,6 @@
       <if test="payMoney != null">
         pay_money,
       </if>
-      <if test="payType != null">
-        pay_type,
-      </if>
       <if test="payTime != null">
         pay_time,
       </if>
@@ -192,6 +202,15 @@
       <if test="remark != null">
         remark,
       </if>
+      <if test="contractId != null">
+        contract_id,
+      </if>
+      <if test="customerManagementId != null">
+        customer_management_id,
+      </if>
+      <if test="houseId != null">
+        house_id,
+      </if>
       <if test="fileList != null">
         file_list,
       </if>
@@ -200,6 +219,12 @@
       <if test="id != null">
         #{id,jdbcType=VARCHAR},
       </if>
+      <if test="payType != null">
+        #{payType,jdbcType=INTEGER},
+      </if>
+      <if test="contentType != null">
+        #{contentType,jdbcType=INTEGER},
+      </if>
       <if test="bankName != null">
         #{bankName,jdbcType=VARCHAR},
       </if>
@@ -212,9 +237,6 @@
       <if test="payMoney != null">
         #{payMoney,jdbcType=DECIMAL},
       </if>
-      <if test="payType != null">
-        #{payType,jdbcType=INTEGER},
-      </if>
       <if test="payTime != null">
         #{payTime,jdbcType=TIMESTAMP},
       </if>
@@ -239,23 +261,38 @@
       <if test="remark != null">
         #{remark,jdbcType=VARCHAR},
       </if>
+      <if test="contractId != null">
+        #{contractId,jdbcType=VARCHAR},
+      </if>
+      <if test="customerManagementId != null">
+        #{customerManagementId,jdbcType=VARCHAR},
+      </if>
+      <if test="houseId != null">
+        #{houseId,jdbcType=VARCHAR},
+      </if>
       <if test="fileList != null">
         #{fileList,jdbcType=LONGVARCHAR},
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.idea.paymentManagement.model.BillPayLogExample" resultType="java.lang.Long">
-    select count(*) from bill_pay_log
+  <select id="countByExample" parameterType="com.idea.paymentManagement.model.PayLogExample" resultType="java.lang.Long">
+    select count(*) from pay_log
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
   </select>
   <update id="updateByExampleSelective" parameterType="map">
-    update bill_pay_log
+    update pay_log
     <set>
       <if test="record.id != null">
         id = #{record.id,jdbcType=VARCHAR},
       </if>
+      <if test="record.payType != null">
+        pay_type = #{record.payType,jdbcType=INTEGER},
+      </if>
+      <if test="record.contentType != null">
+        content_type = #{record.contentType,jdbcType=INTEGER},
+      </if>
       <if test="record.bankName != null">
         bank_name = #{record.bankName,jdbcType=VARCHAR},
       </if>
@@ -268,9 +305,6 @@
       <if test="record.payMoney != null">
         pay_money = #{record.payMoney,jdbcType=DECIMAL},
       </if>
-      <if test="record.payType != null">
-        pay_type = #{record.payType,jdbcType=INTEGER},
-      </if>
       <if test="record.payTime != null">
         pay_time = #{record.payTime,jdbcType=TIMESTAMP},
       </if>
@@ -295,6 +329,15 @@
       <if test="record.remark != null">
         remark = #{record.remark,jdbcType=VARCHAR},
       </if>
+      <if test="record.contractId != null">
+        contract_id = #{record.contractId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.customerManagementId != null">
+        customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.houseId != null">
+        house_id = #{record.houseId,jdbcType=VARCHAR},
+      </if>
       <if test="record.fileList != null">
         file_list = #{record.fileList,jdbcType=LONGVARCHAR},
       </if>
@@ -304,13 +347,14 @@
     </if>
   </update>
   <update id="updateByExampleWithBLOBs" parameterType="map">
-    update bill_pay_log
+    update pay_log
     set id = #{record.id,jdbcType=VARCHAR},
+      pay_type = #{record.payType,jdbcType=INTEGER},
+      content_type = #{record.contentType,jdbcType=INTEGER},
       bank_name = #{record.bankName,jdbcType=VARCHAR},
       bank_branch_name = #{record.bankBranchName,jdbcType=VARCHAR},
       bank_number = #{record.bankNumber,jdbcType=CHAR},
       pay_money = #{record.payMoney,jdbcType=DECIMAL},
-      pay_type = #{record.payType,jdbcType=INTEGER},
       pay_time = #{record.payTime,jdbcType=TIMESTAMP},
       payment_method = #{record.paymentMethod,jdbcType=INTEGER},
       status = #{record.status,jdbcType=INTEGER},
@@ -319,19 +363,23 @@
       updated_by = #{record.updatedBy,jdbcType=VARCHAR},
       updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
       remark = #{record.remark,jdbcType=VARCHAR},
+      contract_id = #{record.contractId,jdbcType=VARCHAR},
+      customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+      house_id = #{record.houseId,jdbcType=VARCHAR},
       file_list = #{record.fileList,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
   <update id="updateByExample" parameterType="map">
-    update bill_pay_log
+    update pay_log
     set id = #{record.id,jdbcType=VARCHAR},
+      pay_type = #{record.payType,jdbcType=INTEGER},
+      content_type = #{record.contentType,jdbcType=INTEGER},
       bank_name = #{record.bankName,jdbcType=VARCHAR},
       bank_branch_name = #{record.bankBranchName,jdbcType=VARCHAR},
       bank_number = #{record.bankNumber,jdbcType=CHAR},
       pay_money = #{record.payMoney,jdbcType=DECIMAL},
-      pay_type = #{record.payType,jdbcType=INTEGER},
       pay_time = #{record.payTime,jdbcType=TIMESTAMP},
       payment_method = #{record.paymentMethod,jdbcType=INTEGER},
       status = #{record.status,jdbcType=INTEGER},
@@ -339,14 +387,23 @@
       created_at = #{record.createdAt,jdbcType=TIMESTAMP},
       updated_by = #{record.updatedBy,jdbcType=VARCHAR},
       updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
-      remark = #{record.remark,jdbcType=VARCHAR}
+      remark = #{record.remark,jdbcType=VARCHAR},
+      contract_id = #{record.contractId,jdbcType=VARCHAR},
+      customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+      house_id = #{record.houseId,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.idea.paymentManagement.model.BillPayLog">
-    update bill_pay_log
+  <update id="updateByPrimaryKeySelective" parameterType="com.idea.paymentManagement.model.PayLog">
+    update pay_log
     <set>
+      <if test="payType != null">
+        pay_type = #{payType,jdbcType=INTEGER},
+      </if>
+      <if test="contentType != null">
+        content_type = #{contentType,jdbcType=INTEGER},
+      </if>
       <if test="bankName != null">
         bank_name = #{bankName,jdbcType=VARCHAR},
       </if>
@@ -359,9 +416,6 @@
       <if test="payMoney != null">
         pay_money = #{payMoney,jdbcType=DECIMAL},
       </if>
-      <if test="payType != null">
-        pay_type = #{payType,jdbcType=INTEGER},
-      </if>
       <if test="payTime != null">
         pay_time = #{payTime,jdbcType=TIMESTAMP},
       </if>
@@ -386,19 +440,29 @@
       <if test="remark != null">
         remark = #{remark,jdbcType=VARCHAR},
       </if>
+      <if test="contractId != null">
+        contract_id = #{contractId,jdbcType=VARCHAR},
+      </if>
+      <if test="customerManagementId != null">
+        customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
+      </if>
+      <if test="houseId != null">
+        house_id = #{houseId,jdbcType=VARCHAR},
+      </if>
       <if test="fileList != null">
         file_list = #{fileList,jdbcType=LONGVARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.idea.paymentManagement.model.BillPayLog">
-    update bill_pay_log
-    set bank_name = #{bankName,jdbcType=VARCHAR},
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.idea.paymentManagement.model.PayLog">
+    update pay_log
+    set pay_type = #{payType,jdbcType=INTEGER},
+      content_type = #{contentType,jdbcType=INTEGER},
+      bank_name = #{bankName,jdbcType=VARCHAR},
       bank_branch_name = #{bankBranchName,jdbcType=VARCHAR},
       bank_number = #{bankNumber,jdbcType=CHAR},
       pay_money = #{payMoney,jdbcType=DECIMAL},
-      pay_type = #{payType,jdbcType=INTEGER},
       pay_time = #{payTime,jdbcType=TIMESTAMP},
       payment_method = #{paymentMethod,jdbcType=INTEGER},
       status = #{status,jdbcType=INTEGER},
@@ -407,16 +471,20 @@
       updated_by = #{updatedBy,jdbcType=VARCHAR},
       updated_at = #{updatedAt,jdbcType=TIMESTAMP},
       remark = #{remark,jdbcType=VARCHAR},
+      contract_id = #{contractId,jdbcType=VARCHAR},
+      customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
+      house_id = #{houseId,jdbcType=VARCHAR},
       file_list = #{fileList,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.idea.paymentManagement.model.BillPayLog">
-    update bill_pay_log
-    set bank_name = #{bankName,jdbcType=VARCHAR},
+  <update id="updateByPrimaryKey" parameterType="com.idea.paymentManagement.model.PayLog">
+    update pay_log
+    set pay_type = #{payType,jdbcType=INTEGER},
+      content_type = #{contentType,jdbcType=INTEGER},
+      bank_name = #{bankName,jdbcType=VARCHAR},
       bank_branch_name = #{bankBranchName,jdbcType=VARCHAR},
       bank_number = #{bankNumber,jdbcType=CHAR},
       pay_money = #{payMoney,jdbcType=DECIMAL},
-      pay_type = #{payType,jdbcType=INTEGER},
       pay_time = #{payTime,jdbcType=TIMESTAMP},
       payment_method = #{paymentMethod,jdbcType=INTEGER},
       status = #{status,jdbcType=INTEGER},
@@ -424,7 +492,10 @@
       created_at = #{createdAt,jdbcType=TIMESTAMP},
       updated_by = #{updatedBy,jdbcType=VARCHAR},
       updated_at = #{updatedAt,jdbcType=TIMESTAMP},
-      remark = #{remark,jdbcType=VARCHAR}
+      remark = #{remark,jdbcType=VARCHAR},
+      contract_id = #{contractId,jdbcType=VARCHAR},
+      customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
+      house_id = #{houseId,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>