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 @@