LAPTOP-FO2T5SIU\35838 месяцев назад: 8
Родитель
Сommit
996238f1ab

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

@@ -23,7 +23,7 @@ public class ContractManageDto extends ContractManage {
     private BigDecimal receivedMoney;
 
     /**
-     * 尚欠
+     * 尚欠金额
      */
     private BigDecimal arrears;
 

+ 16 - 0
pro-base/src/main/java/com/idea/paymentManagement/controller/RefundManageController.java

@@ -1,10 +1,14 @@
 package com.idea.paymentManagement.controller;
 
+import com.github.pagehelper.PageInfo;
 import com.idea.buildManage.response.ParkRoomResponse;
 import com.idea.paymentManagement.dto.RefundManageDto;
 import com.idea.paymentManagement.service.RefundManageService;
 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 io.swagger.annotations.Api;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -66,4 +70,16 @@ public class RefundManageController extends BaseController {
         return result(result);
     }
 
+
+    @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, RefundManageDto model, DateTrans dt){
+        PageInfo<RefundManageDto> page= modelService.listByModel(tablepar,model,dt);
+        TableSplitResult<RefundManageDto> result = new TableSplitResult<RefundManageDto>(page.getPageNum(), page.getTotal(), page.getList());
+        return  result;
+    }
+
+
+
+
 }

+ 7 - 0
pro-base/src/main/java/com/idea/paymentManagement/dto/RefundManageDto.java

@@ -8,5 +8,12 @@ public class RefundManageDto extends RefundManage {
 
     private String RefundDetailServiceStr;
 
+    private String houseName;
+
+    private String refundDateFrom;
+
+    private String refundDateTo;
+
+    private String contractNumber;
 
 }

+ 17 - 0
pro-base/src/main/java/com/idea/paymentManagement/mapper/RefundManageExtendMapper.java

@@ -0,0 +1,17 @@
+package com.idea.paymentManagement.mapper;
+
+import com.idea.customerManagement.dto.ContractManageDto;
+import com.idea.paymentManagement.dto.RefundManageDto;
+import com.idea.paymentManagement.model.RefundManage;
+import com.idea.paymentManagement.model.RefundManageExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface RefundManageExtendMapper {
+
+    List<RefundManageDto> listByModel(RefundManageDto refundManageDto);
+
+
+
+}

+ 5 - 5
pro-base/src/main/java/com/idea/paymentManagement/model/RefundDetail.java

@@ -9,7 +9,7 @@ public class RefundDetail implements Serializable {
 
     private String refundManageId;
 
-    private Integer contentType;
+    private String type;
 
     private BigDecimal receivedAmount;
 
@@ -43,12 +43,12 @@ public class RefundDetail implements Serializable {
         this.refundManageId = refundManageId == null ? null : refundManageId.trim();
     }
 
-    public Integer getContentType() {
-        return contentType;
+    public String getType() {
+        return type;
     }
 
-    public void setContentType(Integer contentType) {
-        this.contentType = contentType;
+    public void setType(String type) {
+        this.type = type == null ? null : type.trim();
     }
 
     public BigDecimal getReceivedAmount() {

+ 34 - 24
pro-base/src/main/java/com/idea/paymentManagement/model/RefundDetailExample.java

@@ -246,63 +246,73 @@ public class RefundDetailExample {
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeIsNull() {
-            addCriterion("content_type is null");
+        public Criteria andTypeIsNull() {
+            addCriterion("type is null");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeIsNotNull() {
-            addCriterion("content_type is not null");
+        public Criteria andTypeIsNotNull() {
+            addCriterion("type is not null");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeEqualTo(Integer value) {
-            addCriterion("content_type =", value, "contentType");
+        public Criteria andTypeEqualTo(String value) {
+            addCriterion("type =", value, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeNotEqualTo(Integer value) {
-            addCriterion("content_type <>", value, "contentType");
+        public Criteria andTypeNotEqualTo(String value) {
+            addCriterion("type <>", value, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeGreaterThan(Integer value) {
-            addCriterion("content_type >", value, "contentType");
+        public Criteria andTypeGreaterThan(String value) {
+            addCriterion("type >", value, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeGreaterThanOrEqualTo(Integer value) {
-            addCriterion("content_type >=", value, "contentType");
+        public Criteria andTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("type >=", value, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeLessThan(Integer value) {
-            addCriterion("content_type <", value, "contentType");
+        public Criteria andTypeLessThan(String value) {
+            addCriterion("type <", value, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeLessThanOrEqualTo(Integer value) {
-            addCriterion("content_type <=", value, "contentType");
+        public Criteria andTypeLessThanOrEqualTo(String value) {
+            addCriterion("type <=", value, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeIn(List<Integer> values) {
-            addCriterion("content_type in", values, "contentType");
+        public Criteria andTypeLike(String value) {
+            addCriterion("type like", value, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeNotIn(List<Integer> values) {
-            addCriterion("content_type not in", values, "contentType");
+        public Criteria andTypeNotLike(String value) {
+            addCriterion("type not like", value, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeBetween(Integer value1, Integer value2) {
-            addCriterion("content_type between", value1, value2, "contentType");
+        public Criteria andTypeIn(List<String> values) {
+            addCriterion("type in", values, "type");
             return (Criteria) this;
         }
 
-        public Criteria andContentTypeNotBetween(Integer value1, Integer value2) {
-            addCriterion("content_type not between", value1, value2, "contentType");
+        public Criteria andTypeNotIn(List<String> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(String value1, String value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(String value1, String value2) {
+            addCriterion("type not between", value1, value2, "type");
             return (Criteria) this;
         }
 

+ 19 - 0
pro-base/src/main/java/com/idea/paymentManagement/service/RefundManageService.java

@@ -2,8 +2,11 @@ package com.idea.paymentManagement.service;
 
 import cn.hutool.core.util.IdUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.idea.buildManage.mapper.ParkRoomExtendMapper;
 import com.idea.buildManage.response.ParkRoomResponse;
+import com.idea.customerManagement.dto.ContractManageDto;
 import com.idea.customerManagement.mapper.RoomSelectionInfoMapper;
 import com.idea.customerManagement.model.Buyer;
 import com.idea.customerManagement.model.BuyerExample;
@@ -11,15 +14,21 @@ import com.idea.customerManagement.model.RoomSelectionInfo;
 import com.idea.customerManagement.model.RoomSelectionInfoExample;
 import com.idea.customerManagement.service.BuyerService;
 import com.idea.paymentManagement.dto.RefundManageDto;
+import com.idea.paymentManagement.mapper.RefundManageExtendMapper;
 import com.idea.paymentManagement.mapper.RefundManageMapper;
 import com.idea.paymentManagement.model.RefundDetail;
 import com.idea.paymentManagement.model.RefundDetailExample;
 import com.idea.paymentManagement.model.RefundManage;
 import com.idea.paymentManagement.model.RefundManageExample;
 import com.rockstar.common.base.BaseService;
+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 org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -39,6 +48,8 @@ public class RefundManageService implements BaseService<RefundManage, RefundMana
     private ParkRoomExtendMapper roomExtendMapper;
     @Autowired
     private RefundDetailService refundDetailService;
+    @Autowired
+    private RefundManageExtendMapper extendMapper;
 
 
     @Override
@@ -175,6 +186,14 @@ public class RefundManageService implements BaseService<RefundManage, RefundMana
     }
 
 
+    public PageInfo<RefundManageDto> listByModel(Tablepar tablepar, RefundManageDto model, DateTrans dt) {
+        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+        List<RefundManageDto> list = extendMapper.listByModel(model);
+        PageInfo<RefundManageDto> pageInfo = new PageInfo<>(list);
+        return pageInfo;
+    }
+
+
 
 
 

+ 15 - 15
pro-base/src/main/resources/mybatis/paymentManagement/RefundDetailMapper.xml

@@ -4,7 +4,7 @@
   <resultMap id="BaseResultMap" type="com.idea.paymentManagement.model.RefundDetail">
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="refund_manage_id" jdbcType="VARCHAR" property="refundManageId" />
-    <result column="content_type" jdbcType="INTEGER" property="contentType" />
+    <result column="type" jdbcType="VARCHAR" property="type" />
     <result column="received_amount" jdbcType="DECIMAL" property="receivedAmount" />
     <result column="deductible" jdbcType="DECIMAL" property="deductible" />
     <result column="actual_refund_amount" jdbcType="DECIMAL" property="actualRefundAmount" />
@@ -72,8 +72,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, refund_manage_id, content_type, received_amount, deductible, actual_refund_amount,
-    created_id, created_at, updated_at, updated_id
+    id, refund_manage_id, type, received_amount, deductible, actual_refund_amount, created_id,
+    created_at, updated_at, updated_id
   </sql>
   <select id="selectByExample" parameterType="com.idea.paymentManagement.model.RefundDetailExample" resultMap="BaseResultMap">
     select
@@ -106,11 +106,11 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.idea.paymentManagement.model.RefundDetail">
-    insert into refund_detail (id, refund_manage_id, content_type,
+    insert into refund_detail (id, refund_manage_id, type,
                                received_amount, deductible, actual_refund_amount,
                                created_id, created_at, updated_at,
                                updated_id)
-    values (#{id,jdbcType=VARCHAR}, #{refundManageId,jdbcType=VARCHAR}, #{contentType,jdbcType=INTEGER},
+    values (#{id,jdbcType=VARCHAR}, #{refundManageId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
             #{receivedAmount,jdbcType=DECIMAL}, #{deductible,jdbcType=DECIMAL}, #{actualRefundAmount,jdbcType=DECIMAL},
             #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
             #{updatedId,jdbcType=VARCHAR})
@@ -124,8 +124,8 @@
       <if test="refundManageId != null">
         refund_manage_id,
       </if>
-      <if test="contentType != null">
-        content_type,
+      <if test="type != null">
+        type,
       </if>
       <if test="receivedAmount != null">
         received_amount,
@@ -156,8 +156,8 @@
       <if test="refundManageId != null">
         #{refundManageId,jdbcType=VARCHAR},
       </if>
-      <if test="contentType != null">
-        #{contentType,jdbcType=INTEGER},
+      <if test="type != null">
+        #{type,jdbcType=VARCHAR},
       </if>
       <if test="receivedAmount != null">
         #{receivedAmount,jdbcType=DECIMAL},
@@ -197,8 +197,8 @@
       <if test="record.refundManageId != null">
         refund_manage_id = #{record.refundManageId,jdbcType=VARCHAR},
       </if>
-      <if test="record.contentType != null">
-        content_type = #{record.contentType,jdbcType=INTEGER},
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=VARCHAR},
       </if>
       <if test="record.receivedAmount != null">
         received_amount = #{record.receivedAmount,jdbcType=DECIMAL},
@@ -230,7 +230,7 @@
     update refund_detail
     set id = #{record.id,jdbcType=VARCHAR},
     refund_manage_id = #{record.refundManageId,jdbcType=VARCHAR},
-    content_type = #{record.contentType,jdbcType=INTEGER},
+    type = #{record.type,jdbcType=VARCHAR},
     received_amount = #{record.receivedAmount,jdbcType=DECIMAL},
     deductible = #{record.deductible,jdbcType=DECIMAL},
     actual_refund_amount = #{record.actualRefundAmount,jdbcType=DECIMAL},
@@ -248,8 +248,8 @@
       <if test="refundManageId != null">
         refund_manage_id = #{refundManageId,jdbcType=VARCHAR},
       </if>
-      <if test="contentType != null">
-        content_type = #{contentType,jdbcType=INTEGER},
+      <if test="type != null">
+        type = #{type,jdbcType=VARCHAR},
       </if>
       <if test="receivedAmount != null">
         received_amount = #{receivedAmount,jdbcType=DECIMAL},
@@ -278,7 +278,7 @@
   <update id="updateByPrimaryKey" parameterType="com.idea.paymentManagement.model.RefundDetail">
     update refund_detail
     set refund_manage_id = #{refundManageId,jdbcType=VARCHAR},
-        content_type = #{contentType,jdbcType=INTEGER},
+        type = #{type,jdbcType=VARCHAR},
         received_amount = #{receivedAmount,jdbcType=DECIMAL},
         deductible = #{deductible,jdbcType=DECIMAL},
         actual_refund_amount = #{actualRefundAmount,jdbcType=DECIMAL},

+ 30 - 0
pro-base/src/main/resources/mybatis/paymentManagement/RefundManageExtendMapper.xml

@@ -0,0 +1,30 @@
+<?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.RefundManageExtendMapper">
+
+
+  <select id="listByModel" resultType="com.idea.paymentManagement.dto.RefundManageDto">
+    select contract_manage.id contractId, contract_manage.buyer_name, contract_manage.house_name, contract_manage.contract_number,
+           refund_manage.*
+    from contract_manage
+    left join refund_manage on contract_manage.id = refund_manage.contract_id
+    <where>
+      and contract_status = '2'
+      <if test="houseName != null and houseName != ''">
+        and house_name like concat('%',#{houseName},'%')
+      </if>
+      <if test="refundDateFrom != null and refundDateFrom != ''">
+        and refund_manage.created_at >= #{refundDateFrom}
+      </if>
+      <if test="refundDateTo != null and refundDateTo != ''">
+        and refund_manage.created_at &lt;= #{refundDateTo}
+      </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>
+      <if test="applicant != null and applicant != ''">
+        and applicant like concat('%',#{applicant},'%')
+      </if>
+    </where>
+  </select>
+</mapper>