From f96e59b6062761988d8b5a3a02f6fb21a3618e4e Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 26 Mar 2021 17:28:44 +0800 Subject: [PATCH 1/4] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AlInsuranceListServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java index d8ab91d9..7ed67960 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java @@ -57,8 +57,12 @@ public class AlInsuranceListServiceImpl extends ServiceImpl Date: Fri, 26 Mar 2021 18:12:05 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8A=A0=E4=BF=9D=E5=90=8E=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guarantee/model/response/AlInsuranceListRes.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java index 8ebb772c..1248f6e7 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java @@ -77,6 +77,12 @@ public class AlInsuranceListRes extends BaseRowModel implements Serializable { @ApiModelProperty(value = "申请日期") private Date applyTime; + @ApiModelProperty(value = "贷款银行(用中划线隔开)") + private String bank; + + @ApiModelProperty(value = "贷款用途") + private String amountWide; + /** * 还款额度(元) */ From 751730edb1be8ca5caba7ede53bbf748565cf4eb Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 26 Mar 2021 18:29:56 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8A=A0=E4=BF=9D=E5=90=8E=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml index 7ae607f2..a2c13f0b 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml @@ -27,7 +27,7 @@ re.repayment_status = #{status} - AND re.repayment_date = #{customerNumberOrName} + AND re.repayment_date LIKE CONCAT('%',#{customerNumberOrName},'%') AND re.insurance_id = #{insuranceId} From e1aeeb42d55decae5d82dc0a1ff1148ce17ba8d1 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Mon, 29 Mar 2021 10:21:40 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=9D=E5=90=8E=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/AlInsuranceListMapper.java | 3 +- .../mapper/AlRepaymentEntryMapper.java | 3 +- .../model/response/AlInsuranceListRes.java | 20 +++++ .../model/response/AlRepaymentRes.java | 22 ++++++ .../impl/AlInsuranceListServiceImpl.java | 2 +- .../guarantee/AlRepaymentEntryMapper.xml | 8 +- .../utils/excel/InsuranceStatusConverter.java | 76 +++++++++++++++++++ .../utils/excel/RepaymentStatusConverter.java | 76 +++++++++++++++++++ 8 files changed, 204 insertions(+), 6 deletions(-) create mode 100644 dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/InsuranceStatusConverter.java create mode 100644 dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/RepaymentStatusConverter.java diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlInsuranceListMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlInsuranceListMapper.java index 08f0d47f..9ba5a064 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlInsuranceListMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlInsuranceListMapper.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.daqing.financial.guarantee.model.response.AlInsuranceListRes; import com.daqing.framework.domain.guarantee.AlInsuranceList; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -22,5 +23,5 @@ public interface AlInsuranceListMapper extends BaseMapper { IPage pageByCondition(Page page, String customerNumberOrName,Integer paymentStatus); - List selectListByIds(List ids); + List selectListByIds(@Param("ids")List ids); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java index bc972eac..4ff3d289 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java @@ -9,6 +9,7 @@ import com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes; import com.daqing.financial.guarantee.model.response.AlRepaymentRes; import com.daqing.framework.domain.guarantee.AlRepaymentEntry; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -25,7 +26,7 @@ public interface AlRepaymentEntryMapper extends BaseMapper { IPage pageByCondition(Page page, String customerNumberOrName, Integer status, Integer insuranceId); - List selectListByIds(List ids); + List selectListByIds(@Param("ids")List ids); List listAlRepayment(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java index 1248f6e7..bf52adf8 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java @@ -1,9 +1,12 @@ package com.daqing.financial.guarantee.model.response; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.metadata.BaseRowModel; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.daqing.framework.utils.excel.InsuranceStatusConverter; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -30,6 +33,7 @@ public class AlInsuranceListRes extends BaseRowModel implements Serializable { /** * 主键id */ + @ExcelIgnore @ApiModelProperty(value = "企业id") @TableId(value = "id", type = IdType.AUTO) private Integer id; @@ -37,91 +41,107 @@ public class AlInsuranceListRes extends BaseRowModel implements Serializable { /** * 业务编号 */ + @ExcelProperty(value = "业务编号",index = 0) @ApiModelProperty(value = "业务编号") private String businessCode; /** * 客户名称 */ + @ExcelProperty(value = "客户名称",index = 1) @ApiModelProperty(value = "客户名称") private String customerName; /** * 联系电话 */ + @ExcelProperty(value = "联系电话",index = 2) @ApiModelProperty(value = "联系电话") private String phone; /** * 业务类别 */ + @ExcelProperty(value = "业务类型",index = 3) @ApiModelProperty(value = "业务类别") private String businessType; /** * 担保额度(元) */ + @ExcelProperty(value = "担保额度(元)",index = 4) @ApiModelProperty(value = "担保额度(元)") private BigDecimal guaranteeAmount; /** * 担保期限 */ + @ExcelProperty(value = "担保期限",index = 5) @ApiModelProperty(value = "担保期限") private String guaranteeTime; /** * 申请日期 */ + @ExcelProperty(value = "申请日期",index = 6) @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiModelProperty(value = "申请日期") private Date applyTime; + @ExcelIgnore @ApiModelProperty(value = "贷款银行(用中划线隔开)") private String bank; + @ExcelIgnore @ApiModelProperty(value = "贷款用途") private String amountWide; /** * 还款额度(元) */ + @ExcelProperty(value = "还款额度(元)",index = 7) @ApiModelProperty(value = "还款额度(元)") private BigDecimal repaymentAmount; /** * 剩余额度(元) */ + @ExcelProperty(value = "剩余额度(元)",index = 8) @ApiModelProperty(value = "剩余额度(元)") private BigDecimal remainAmount; /** * 还款期数 */ + @ExcelProperty(value = "还款期数",index = 9) @ApiModelProperty(value = "还款期数") private String repaymentTime; /** * 所属部门 */ + @ExcelProperty(value = "所属部门",index = 10) @ApiModelProperty(value = "所属部门") private String department; /** * 还款状态:1->还款中;2->已逾期;3->已还清;4->已结项; */ + @ExcelProperty(value = "还款状态",index = 11,converter = InsuranceStatusConverter.class) @ApiModelProperty(value = "还款状态:1->还款中;2->已逾期;3->已还清;4->已结项;") private Integer paymentStatus; /** * 创建时间 */ + @ExcelIgnore @ApiModelProperty(value = "创建时间") private Date createTime; /** * 修改时间 */ + @ExcelIgnore @ApiModelProperty(value = "修改时间") private Date updateTime; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java index 7b6794e6..6ed54b41 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java @@ -1,7 +1,10 @@ package com.daqing.financial.guarantee.model.response; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.metadata.BaseRowModel; import com.baomidou.mybatisplus.annotation.*; +import com.daqing.framework.utils.excel.RepaymentStatusConverter; import lombok.Data; import java.io.Serializable; @@ -25,83 +28,102 @@ public class AlRepaymentRes extends BaseRowModel implements Serializable { /** * 主键id */ + @ExcelIgnore @TableId(value = "id", type = IdType.AUTO) private Integer id; /** * 保后外键id */ + @ExcelIgnore private Integer insuranceId; /** * 应还款日 */ + @ExcelProperty(value = "应还款日",index = 0) private Date repaymentDate; /** * 实际还款日 */ + @ExcelProperty(value = "实际还款日",index = 1) private Date actualRepaymentDate; + @ExcelProperty(value = "担保额度(元)",index = 2) + private BigDecimal guaranteeAmount; + /** * 逾期天数 */ + @ExcelProperty(value = "逾期天数",index = 8) private Integer overdueDays; /** * 还款总额(元) */ + @ExcelProperty(value = "还款总额(元)",index = 6) private BigDecimal totalRepayment; /** * 本次还款(元) */ + @ExcelProperty(value = "本次还款(元)",index = 3) private BigDecimal currentRepayment; /** * 利息(元) */ + @ExcelProperty(value = "本次利息(元)",index = 4) private BigDecimal interest; /** * 其他费用(元) */ + @ExcelProperty(value = "其他费用(元)",index = 5) private BigDecimal otherExpenses; /** * 减免金额(元) */ + @ExcelProperty(value = "减免金额(元)",index = 7) private BigDecimal deductionAmount; /** * 还款备注 */ + @ExcelProperty(value = "还款备注",index = 12) private String repaymentNotes; /** * 还款状态:1->待还款;2->已还款;3->已逾期;4->未到期; */ + @ExcelProperty(value = "状态",index = 9,converter = RepaymentStatusConverter.class) private Integer repaymentStatus; /** * 提交人id */ + @ExcelIgnore private Integer submitterId; /** * 提交人名称 */ + @ExcelProperty(value = "提交人名称",index = 10) private String submitterName; /** * 创建时间 */ + @ExcelIgnore @TableField(fill= FieldFill.INSERT) private Date createTime; /** * 修改时间 */ + @ExcelProperty(value = "提交时间",index = 11) @TableField(fill= FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java index 7ed67960..d5d298c4 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java @@ -69,7 +69,7 @@ public class AlInsuranceListServiceImpl extends ServiceImpl ids, HttpServletResponse response) { ListalInsuranceList = this.baseMapper.selectListByIds(ids); try { - ExcelUtil.writeExcelWithSheets(response, alInsuranceList, "还款记录一览表", "repaymentEntry", new AlInsuranceListRes()) + ExcelUtil.writeExcelWithSheets(response, alInsuranceList, "保后管理一览表", "repaymentEntry", new AlInsuranceListRes()) .finish(); return true; } catch (Exception e) { diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml index a2c13f0b..34204424 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml @@ -37,14 +37,16 @@