定时任务处理保后管理模块内容

master
shijie 4 years ago
parent 3858e3a7cd
commit 9f4c747361
  1. 38
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java
  2. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java
  3. 13
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlInsuranceListController.java
  4. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java
  5. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java
  6. 67
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentCountRes.java
  7. 68
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryRes.java
  8. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlInsuranceListService.java
  9. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java
  10. 35
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java
  11. 58
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java
  12. 17
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml
  13. 88
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  14. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java
  15. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlInsuranceList.java

@ -59,16 +59,16 @@ public class CrmsCompanyPersonalController {
@PostMapping("/insertCompanyPersonal") @PostMapping("/insertCompanyPersonal")
@ApiOperation(value = "新增个人/企业关联人") @ApiOperation(value = "新增个人/企业关联人")
public ResponseResult insertCompanyPersonal(@RequestBody @Valid CrmsCompanyPersonal crmsCompanyPersonal) { public ResponseResult insertCompanyPersonal(@RequestBody @Valid CrmsCompanyPersonal crmsCompanyPersonal) {
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); // SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
String format = sdf.format(crmsCompanyPersonal.getRegisteredTime()); // String format = sdf.format(crmsCompanyPersonal.getRegisteredTime());
Date parse = null; // Date parse = null;
try { // try {
parse = sdf.parse(format); // parse = sdf.parse(format);
} catch (ParseException e) { // } catch (ParseException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
//
crmsCompanyPersonal.setRegisteredTime(parse); // crmsCompanyPersonal.setRegisteredTime(parse);
boolean result = crmsCompanyPersonalService.save(crmsCompanyPersonal); boolean result = crmsCompanyPersonalService.save(crmsCompanyPersonal);
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
crmsCustomerRelated.setRelatedId(crmsCompanyPersonal.getId().intValue());//关联人Id crmsCustomerRelated.setRelatedId(crmsCompanyPersonal.getId().intValue());//关联人Id
@ -94,15 +94,15 @@ public class CrmsCompanyPersonalController {
@PostMapping("/updateCompanyPersonal") @PostMapping("/updateCompanyPersonal")
@ApiOperation(value = "编辑个人/企业关联人") @ApiOperation(value = "编辑个人/企业关联人")
public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonal crmsCompanyPersonal){ public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonal crmsCompanyPersonal){
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); // SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
String format = sdf.format(crmsCompanyPersonal.getRegisteredTime()); // String format = sdf.format(crmsCompanyPersonal.getRegisteredTime());
Date parse = null; // Date parse = null;
try { // try {
parse = sdf.parse(format); // parse = sdf.parse(format);
} catch (ParseException e) { // } catch (ParseException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
crmsCompanyPersonal.setRegisteredTime(parse); // crmsCompanyPersonal.setRegisteredTime(parse);
boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal); boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal);
return result ? ResponseResult.SUCCESS(crmsCompanyPersonal) : ResponseResult.FAIL(); return result ? ResponseResult.SUCCESS(crmsCompanyPersonal) : ResponseResult.FAIL();
} }

@ -2,6 +2,7 @@ package com.daqing.financial.crms.model.request;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
@ -45,6 +46,7 @@ public class CompanyCustomerRequest implements Serializable {
@ApiModelProperty(value = "联系电话") @ApiModelProperty(value = "联系电话")
private String phone; private String phone;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "注册时间") @ApiModelProperty(value = "注册时间")
private Date registerTime; private Date registerTime;

@ -6,11 +6,13 @@ import com.daqing.financial.guarantee.service.IAlInsuranceListService;
import com.daqing.financial.hrauth.annotation.Log; import com.daqing.financial.hrauth.annotation.Log;
import com.daqing.financial.hrauth.enums.OperationType; import com.daqing.financial.hrauth.enums.OperationType;
import com.daqing.financial.hrauth.enums.OperationUnit; import com.daqing.financial.hrauth.enums.OperationUnit;
import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -87,4 +89,15 @@ public class AlInsuranceListController {
return result>0 ? ResponseResult.SUCCESS("编辑成功!"):ResponseResult.FAIL(60007,"编辑失败!"); return result>0 ? ResponseResult.SUCCESS("编辑成功!"):ResponseResult.FAIL(60007,"编辑失败!");
} }
/**
* 定时任务处理保后管理内容 每隔五秒执行一次
* @param
* @return
*/
@Scheduled(cron ="*/5 * * * * ?")
@GetMapping("/updateInsuranceList")
public void updateInsuranceList() {
int result = alInsuranceListService.updateInsuranceList();
}
} }

@ -12,6 +12,7 @@ import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -129,4 +130,15 @@ public class AlRepaymentEntryController {
return ResponseResult.SUCCESS(map); return ResponseResult.SUCCESS(map);
} }
/**
* 定时任务处理还款记录内容
* @param
* @return
*/
@Scheduled(cron ="*/5 * * * * ?")
@GetMapping("/updateRepaymentEntry")
public void updateRepaymentEntry() {
int result = alRepaymentEntryService.updateRepaymentEntry();
}
} }

@ -3,6 +3,8 @@ package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.response.AlRepaymentCountRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentRes; import com.daqing.financial.guarantee.model.response.AlRepaymentRes;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry; import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -23,4 +25,10 @@ public interface AlRepaymentEntryMapper extends BaseMapper<AlRepaymentEntry> {
IPage<AlRepaymentEntry> pageByCondition(Page page, String customerNumberOrName, Integer status); IPage<AlRepaymentEntry> pageByCondition(Page page, String customerNumberOrName, Integer status);
List<AlRepaymentRes> selectListByIds(List<String> ids); List<AlRepaymentRes> selectListByIds(List<String> ids);
List<AlRepaymentCountRes> selectRepaymentList();
List<AlRepaymentEntryRes> selectOverDueDays();
List<AlRepaymentEntryRes> selectBind();
} }

@ -0,0 +1,67 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.apache.poi.hpsf.Decimal;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 还款记录表
* </p>
*
* @author Qyq
* @since 2021-03-17
*/
@Data
public class AlRepaymentCountRes extends BaseRowModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 保后外键id
*/
private Integer insuranceId;
/**
* 还款期数
*/
private Integer repaymentSum;
/**
* 担保额度
*/
private BigDecimal guaranteeAmount;
/**
* 还款额度
*/
private BigDecimal alreadyPaymentSum;
/**
* 剩余额度
*/
private BigDecimal remainSum;
/**
* 创建时间
*/
@TableField(fill= FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@TableField(fill= FieldFill.INSERT_UPDATE)
private Date updateTime;
}

@ -0,0 +1,68 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.metadata.BaseRowModel;
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 AlRepaymentEntryRes 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;
/**
* 逾期天数
*/
private Integer overdueDays;
/**
* 实际还款日
*/
private Date actualRepaymentDate;
/**
* 剩余额度
*/
private BigDecimal remainAmount;
/**
* 创建时间
*/
@TableField(fill= FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@TableField(fill= FieldFill.INSERT_UPDATE)
private Date updateTime;
}

@ -26,4 +26,6 @@ public interface IAlInsuranceListService extends IService<AlInsuranceList> {
Boolean excelExport(List<String> ids, HttpServletResponse response); Boolean excelExport(List<String> ids, HttpServletResponse response);
int updateStatus(Integer id); int updateStatus(Integer id);
int updateInsuranceList();
} }

@ -33,4 +33,6 @@ public interface IAlRepaymentEntryService extends IService<AlRepaymentEntry> {
Boolean excelExport(List<String> ids, HttpServletResponse response); Boolean excelExport(List<String> ids, HttpServletResponse response);
Map repaymentStatistics(Integer insuranceId,Double guaranteeAmount); Map repaymentStatistics(Integer insuranceId,Double guaranteeAmount);
int updateRepaymentEntry();
} }

@ -5,18 +5,24 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.mapper.AlInsuranceListMapper; import com.daqing.financial.guarantee.mapper.AlInsuranceListMapper;
import com.daqing.financial.guarantee.mapper.AlRepaymentEntryMapper;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes; import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentCountRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentRes; import com.daqing.financial.guarantee.model.response.AlRepaymentRes;
import com.daqing.financial.guarantee.service.IAlInsuranceListService; import com.daqing.financial.guarantee.service.IAlInsuranceListService;
import com.daqing.framework.domain.crms.response.CrmsCode; import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.AlInsuranceList; import com.daqing.framework.domain.guarantee.AlInsuranceList;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil; import com.daqing.framework.utils.excel.ExcelUtil;
import org.apache.poi.hpsf.Decimal;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
@ -31,6 +37,8 @@ import java.util.List;
@Service @Service
public class AlInsuranceListServiceImpl extends ServiceImpl<AlInsuranceListMapper, AlInsuranceList> implements IAlInsuranceListService { public class AlInsuranceListServiceImpl extends ServiceImpl<AlInsuranceListMapper, AlInsuranceList> implements IAlInsuranceListService {
@Autowired
private AlRepaymentEntryMapper alRepaymentEntryMapper;
@Override @Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName) { public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName) {
//分页参数 //分页参数
@ -72,4 +80,31 @@ public class AlInsuranceListServiceImpl extends ServiceImpl<AlInsuranceListMappe
alInsuranceList.setPaymentStatus(4);//已结项 alInsuranceList.setPaymentStatus(4);//已结项
return this.baseMapper.update(alInsuranceList,new QueryWrapper<AlInsuranceList>().eq("id",id)); return this.baseMapper.update(alInsuranceList,new QueryWrapper<AlInsuranceList>().eq("id",id));
} }
@Override
public int updateInsuranceList() {
//统计保后id,还款额度,还款期数
List<AlRepaymentCountRes> list = alRepaymentEntryMapper.selectRepaymentList();
//遍历list计算出剩余额度(剩余额度=担保额度-还款额度)
for (AlRepaymentCountRes res:list) {
BigDecimal guaranteeAmount = res.getGuaranteeAmount();
BigDecimal alreadyPaymentSum = res.getAlreadyPaymentSum();
Double remainSum = guaranteeAmount.doubleValue() - alreadyPaymentSum.doubleValue();
res.setRemainSum(BigDecimal.valueOf(remainSum));
//额度实时更新
AlInsuranceList alInsuranceList = new AlInsuranceList();
if(remainSum==0.00){//剩余额度为0.00,状态为已还清
alInsuranceList.setPaymentStatus(3);//已还清
}
alInsuranceList.setId(res.getInsuranceId());
alInsuranceList.setRepaymentAmount(res.getAlreadyPaymentSum());//还款额度
alInsuranceList.setRepaymentTime(res.getRepaymentSum());//还款期数
alInsuranceList.setRemainAmount(res.getRemainSum());//剩余额度
this.baseMapper.updateById(alInsuranceList);
}
return 1;
}
} }

@ -5,21 +5,28 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; 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.mapper.AlRepaymentEntryMapper;
import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq; import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq;
import com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentRes; import com.daqing.financial.guarantee.model.response.AlRepaymentRes;
import com.daqing.financial.guarantee.service.IAlRepaymentEntryService; import com.daqing.financial.guarantee.service.IAlRepaymentEntryService;
import com.daqing.framework.domain.crms.response.CrmsCode; import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry; import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil; import com.daqing.framework.utils.excel.ExcelUtil;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -35,6 +42,8 @@ import java.util.Map;
@Service @Service
public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMapper, AlRepaymentEntry> implements IAlRepaymentEntryService { public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMapper, AlRepaymentEntry> implements IAlRepaymentEntryService {
@Autowired
private AlInsuranceListMapper alInsuranceListMapper;
@Override @Override
public int repaymentEntry(AlRepaymentEntryReq alRepaymentEntryReq) { public int repaymentEntry(AlRepaymentEntryReq alRepaymentEntryReq) {
AlRepaymentEntry alRepaymentEntry = new AlRepaymentEntry(); AlRepaymentEntry alRepaymentEntry = new AlRepaymentEntry();
@ -144,4 +153,53 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
return map; return map;
} }
@Override
public int updateRepaymentEntry() {
//查询当前日期超过应还款日时的数据
//List<AlRepaymentEntryRes>list = this.baseMapper.selectOverDueDays();
//查询所有数据
//List<AlRepaymentEntry> list = this.baseMapper.selectList(new QueryWrapper<>());
List<AlRepaymentEntryRes>list = this.baseMapper.selectBind();
Date date = new Date();
long times1 = date.getTime();//当前时间
//遍历list取出应还款日,计算逾期天数=当前时间-应还款日
for (AlRepaymentEntryRes res:list) {
long times2 = res.getRepaymentDate().getTime();//应还款日
long times3 = res.getActualRepaymentDate().getTime();//实际还款日
AlRepaymentEntry entry = new AlRepaymentEntry();
entry.setId(res.getId());
AlInsuranceList alInsuranceList = new AlInsuranceList();
alInsuranceList.setId(res.getInsuranceId());
//如果存在当前日期超过应还款日时的数据,则计算逾期天数,并且状态改为已逾期,同时要处理保后管理模块内容
if(times1 > times2){
int days = (int)((times1-times2)/1000/60/60/24);
entry.setOverdueDays(days);
entry.setRepaymentStatus(3);//已逾期
this.baseMapper.updateById(entry);//更新逾期天数和状态
//更新保后管理列表处的状态为已逾期,并且is_overdue设置为0
alInsuranceList.setPaymentStatus(2);//已逾期
alInsuranceList.setIsOverdue(0);//是否逾期过:0->是;1->否;
alInsuranceListMapper.updateById(alInsuranceList);
}else if(times1==times2){//应还款日=当前日期,则显示状态为待还款
entry.setRepaymentStatus(1);//待还款
this.baseMapper.updateById(entry);//更新状态
}else if(times3 <= times1){//实际还款日不超过当前日期时,状态为已还款
entry.setRepaymentStatus(2);//已还款
this.baseMapper.updateById(entry);//更新状态
}else if(times1 <= times2){//当前日期未到应还款日,状态为未到期
entry.setRepaymentStatus(4);//未到期
this.baseMapper.updateById(entry);//更新状态
if(res.getRemainAmount().doubleValue()>0){//如果存在剩余额度,保后管理列表状态为还款中
alInsuranceList.setPaymentStatus(1);//还款中
alInsuranceListMapper.updateById(alInsuranceList);
}
}
}
return 1;
}
} }

@ -44,4 +44,21 @@
order by create_time desc order by create_time desc
</select> </select>
<select id="selectRepaymentList" resultType="com.daqing.financial.guarantee.model.response.AlRepaymentCountRes">
select re.insurance_id,COUNT(re.id) as repaymentSum,SUM(re.current_repayment) as alreadyPaymentSum,il.guarantee_amount as guaranteeAmount
from al_repayment_entry re left join al_insurance_list il on il.id=re.insurance_id
where re.repayment_status=2 and il.payment_status in (1,2)
GROUP BY re.insurance_id
</select>
<select id="selectOverDueDays" resultType="com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes">
select id,insurance_id,repayment_date from al_repayment_entry where DATE_FORMAT(NOW(),'%Y-%m-%d')> repayment_date
</select>
<select id="selectBind" resultType="com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes">
select re.id,re.insurance_id,re.repayment_date,il.remain_amount as remainAmount,re.actual_repayment_date
from al_repayment_entry re
left join al_insurance_list il on re.insurance_id=il.id
</select>
</mapper> </mapper>

@ -1,21 +1,21 @@
#服务名称 #服务名称
#spring.application.name=dq-financial-hrms-auth spring.application.name=dq-financial-hrms-auth
##配置中心地址 #配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#spring.cloud.nacos.config.file-extension=yml spring.cloud.nacos.config.file-extension=yml
##redis配置 #redis配置
#spring.redis.host=127.0.0.1 spring.redis.host=127.0.0.1
#spring.redis.port=6379 spring.redis.port=6379
#spring.redis.password= spring.redis.password=
#spring.redis.database=0 spring.redis.database=0
#spring.redis.timeout=30000 spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8 spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8 spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0 spring.redis.jedis.pool.min-idle=0
#
##本地测试环境 #本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99 spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境 #线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128 #spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
@ -33,30 +33,30 @@ ribbon.ConnectTimeout: 30000
#正式环境(prod) #正式环境(prod)
spring.application.name=dq-financial-hrms-auth #spring.application.name=dq-financial-hrms-auth
#
spring.cloud.nacos.config.server-addr=120.78.127.12:8848 #spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4 #spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4
#spring.cloud.nacos.config.group=prod ##spring.cloud.nacos.config.group=prod
#
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml #spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[0].group=prod #spring.cloud.nacos.config.ext-config[0].group=prod
spring.cloud.nacos.config.ext-config[0].refresh=true #spring.cloud.nacos.config.ext-config[0].refresh=true
#
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml #spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
spring.cloud.nacos.config.ext-config[1].group=prod #spring.cloud.nacos.config.ext-config[1].group=prod
spring.cloud.nacos.config.ext-config[1].refresh=true #spring.cloud.nacos.config.ext-config[1].refresh=true
#
spring.cloud.nacos.config.ext-config[2].data-id=other.yml #spring.cloud.nacos.config.ext-config[2].data-id=other.yml
spring.cloud.nacos.config.ext-config[2].group=prod #spring.cloud.nacos.config.ext-config[2].group=prod
spring.cloud.nacos.config.ext-config[2].refresh=true #spring.cloud.nacos.config.ext-config[2].refresh=true
#
spring.redis.host=127.0.0.1 #spring.redis.host=127.0.0.1
spring.redis.port=6379 #spring.redis.port=6379
spring.redis.password=dq123456 #spring.redis.password=dq123456
spring.redis.database=0 #spring.redis.database=0
spring.redis.timeout=30000 #spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8 #spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1 #spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8 #spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0 #spring.redis.jedis.pool.min-idle=0

@ -59,7 +59,7 @@ public class CrmsCompanyPersonal implements Serializable {
* 注册时间 * 注册时间
*/ */
@ApiModelProperty(value = "注册时间") @ApiModelProperty(value = "注册时间")
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date registeredTime; private Date registeredTime;
/** /**

@ -86,7 +86,7 @@ public class AlInsuranceList implements Serializable {
/** /**
* 还款期数 * 还款期数
*/ */
private String repaymentTime; private Integer repaymentTime;
/** /**
* 所属部门 * 所属部门

Loading…
Cancel
Save