Merge remote-tracking branch 'origin/master'

master
chen 4 years ago
commit 0e1c62ba66
  1. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java
  2. 112
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryListRes.java
  3. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java
  4. 12
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.response.AlRepaymentCountRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentEntryListRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentRes;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
@ -22,7 +23,7 @@ import java.util.List;
@Mapper
public interface AlRepaymentEntryMapper extends BaseMapper<AlRepaymentEntry> {
IPage<AlRepaymentEntry> pageByCondition(Page page, String customerNumberOrName, Integer status,Integer insuranceId);
IPage<AlRepaymentEntryListRes> pageByCondition(Page page, String customerNumberOrName, Integer status, Integer insuranceId);
List<AlRepaymentRes> selectListByIds(List<String> ids);

@ -0,0 +1,112 @@
package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 还款记录表
* </p>
*
* @author Qyq
* @since 2021-03-17
*/
@Data
public class AlRepaymentEntryListRes implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 保后外键id
*/
private Integer insuranceId;
/**
* 应还款日
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date repaymentDate;
/**
* 实际还款日
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date actualRepaymentDate;
/**
* 逾期天数
*/
private Integer overdueDays;
/**
* 还款总额
*/
private BigDecimal totalRepayment;
/**
* 本次还款
*/
private BigDecimal currentRepayment;
/**
* 利息
*/
private BigDecimal interest;
/**
* 其他费用
*/
private BigDecimal otherExpenses;
/**
* 减免金额
*/
private BigDecimal deductionAmount;
/**
* 还款备注
*/
private String repaymentNotes;
/**
* 还款状态1->待还款2->已还款3->已逾期4->未到期
*/
private Integer repaymentStatus;
/**
* 提交人id
*/
private Integer submitterId;
/**
* 提交人名称
*/
private String submitterName;
/**
* 创建时间
*/
@TableField(fill= FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@TableField(fill= FieldFill.INSERT_UPDATE)
private Date updateTime;
/**
* 担保额度
*/
private Double guaranteeAmount;
}

@ -8,6 +8,7 @@ import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.mapper.AlInsuranceListMapper;
import com.daqing.financial.guarantee.mapper.AlRepaymentEntryMapper;
import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq;
import com.daqing.financial.guarantee.model.response.AlRepaymentEntryListRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentRes;
import com.daqing.financial.guarantee.service.IAlRepaymentEntryService;
@ -72,7 +73,7 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
if (size <= 0) {
size = 10;
}
IPage<AlRepaymentEntry> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,status,insuranceId);
IPage<AlRepaymentEntryListRes> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,status,insuranceId);
return new PageUtils(positionVO);
}

@ -20,20 +20,20 @@
<result column="update_time" property="updateTime" />
</resultMap>
<select id="pageByCondition" resultType="com.daqing.framework.domain.guarantee.AlRepaymentEntry">
select * from al_repayment_entry
<select id="pageByCondition" resultType="com.daqing.financial.guarantee.model.response.AlRepaymentEntryListRes">
select re.*,il.guarantee_amount as guaranteeAmount from al_repayment_entry re left join al_insurance_list il on il.id=re.insurance_id
<where>
<if test="status != null">
repayment_status = #{status}
re.repayment_status = #{status}
</if>
<if test="customerNumberOrName != null and customerNumberOrName != '' ">
AND repayment_date = #{customerNumberOrName}
AND re.repayment_date = #{customerNumberOrName}
</if>
<if test="insuranceId != null">
AND insurance_id = #{insuranceId}
AND re.insurance_id = #{insuranceId}
</if>
</where>
order by create_time desc
order by re.create_time desc
</select>
<select id="selectListByIds" resultType="com.daqing.financial.guarantee.model.response.AlRepaymentRes">

Loading…
Cancel
Save