Merge remote-tracking branch 'origin/master'

master
shijie 4 years ago
commit 85e42f4e21
  1. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerAppletDao.java
  2. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/response/ApplicationRecordResponse.java
  3. 18
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java
  4. 84
      dq-financial-crms/src/main/resources/bootstrap.properties
  5. 9
      dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml
  6. 96
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionController.java
  7. 23
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java
  8. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java
  9. 37
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AlCollectionListRequest.java
  10. 45
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AlCollectionRequest.java
  11. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgLoanCommitteeConsiderRequest.java
  12. 70
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionListResponse.java
  13. 71
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionResponse.java
  14. 1
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentCountRes.java
  15. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgComplianceInvestigationResponse.java
  16. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgLoanCommitteeConsiderInfoResponse.java
  17. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgLoanCommitteeConsiderResponse.java
  18. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java
  19. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java
  20. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListRefuseResponse.java
  21. 25
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListResponse.java
  22. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgWorkConferenceResponse.java
  23. 64
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MoreOverdueDetailResponse.java
  24. 50
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/OverdueDetailResponse.java
  25. 22
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlCollectionService.java
  26. 344
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java
  27. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
  28. 84
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  29. 73
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml
  30. 15
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml
  31. 86
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  32. 86
      dq-financial-hrms/src/main/resources/bootstrap.properties
  33. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/ApplicationRecordPO.java
  34. 38
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlCollection.java
  35. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlRepaymentEntry.java
  36. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanCommitteeConsider.java
  37. 76
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AlCollectionListPO.java
  38. 8
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AlCollectionPO.java
  39. 6
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsPO.java
  40. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsRefusePO.java
  41. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgWorkConferencePO.java
  42. 48
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/CollectionConverter.java
  43. 68
      dq-govern-gateway/src/main/resources/bootstrap.properties

@ -35,5 +35,7 @@ public interface CustomerAppletDao extends BaseMapper<CustomerEntity> {
List<ApplicationRecordPO> getApplyMount(Integer companyId); List<ApplicationRecordPO> getApplyMount(Integer companyId);
Integer businessUnderwayCount(Integer companyId);
ApplyDetailPO getApplyDetail(Integer id); ApplyDetailPO getApplyDetail(Integer id);
} }

@ -7,6 +7,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -29,7 +30,7 @@ public class ApplicationRecordResponse implements Serializable {
private String amountWide; private String amountWide;
@ApiModelProperty("申请额度") @ApiModelProperty("申请额度")
private Double applyAmount; private BigDecimal applyAmount;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("申请日期") @ApiModelProperty("申请日期")

@ -37,6 +37,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
/** /**
@ -367,24 +368,33 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
*/ */
@Override @Override
public Map getApplyMount() { public Map getApplyMount() {
Double company = 0.00; // 这个是否填小数没有影响,主要要是看赋予或计算的值是否包含小数
Map<String, Double> map = new HashMap<>(); BigDecimal company = new BigDecimal(0.00);
// Double company = 0.00;
Map<String, BigDecimal> map = new HashMap<>();
map.put("company", company); map.put("company", company);
// 个人类型暂时没有 // 个人类型暂时没有
map.put("personal", 0.00); map.put("personal", new BigDecimal(0.00));
// 是否与业务正在申请中
map.put("underway", new BigDecimal(0));
Integer customerId = this.getBaseMapper().getCustomerId(Integer.parseInt(this.getUserId()), 1); Integer customerId = this.getBaseMapper().getCustomerId(Integer.parseInt(this.getUserId()), 1);
// 如果查询不到认证信息,直接返回0.00 // 如果查询不到认证信息,直接返回0.00
if (customerId == null) { if (customerId == null) {
map.put("company", company); map.put("company", company);
} else { } else {
Integer companyId = this.getBaseMapper().getCompanyId(customerId); Integer companyId = this.getBaseMapper().getCompanyId(customerId);
// 正在进行贷款数量
Integer count= this.getBaseMapper().businessUnderwayCount(companyId);
if (count > 0) {
map.put("underway", new BigDecimal(1));
}
// 查询申请记录信息 // 查询申请记录信息
List<ApplicationRecordPO> applicationRecordPOList = this.getBaseMapper().getApplyMount(companyId); List<ApplicationRecordPO> applicationRecordPOList = this.getBaseMapper().getApplyMount(companyId);
if (applicationRecordPOList.size() < 1) { if (applicationRecordPOList.size() < 1) {
return map; return map;
} }
for (ApplicationRecordPO applicationRecordPO : applicationRecordPOList) { for (ApplicationRecordPO applicationRecordPO : applicationRecordPOList) {
company += applicationRecordPO.getApplyAmount() == null ? 0.00 : applicationRecordPO.getApplyAmount(); company = company.add(applicationRecordPO.getApplyAmount() == null ? new BigDecimal(0.00) : applicationRecordPO.getApplyAmount());
} }
map.put("company", company); map.put("company", company);
} }

@ -1,20 +1,20 @@
#服务名称 #服务名称
#spring.application.name=dq-financial-crms spring.application.name=dq-financial-crms
##配置中心地址 #配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.server-addr=192.168.31.140: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
@ -30,30 +30,30 @@ ribbon.eureka.enabled=true
# 正式环境(prod) # 正式环境(prod)
#服务名称 #服务名称
spring.application.name=dq-financial-crms #spring.application.name=dq-financial-crms
##配置中心地址 ###配置中心地址
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=25ce05e2-a0eb-4842-92e4-d8b550a489dd #spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd
#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,6 +59,15 @@
AND b.business_status = 2 AND b.business_status = 2
</select> </select>
<select id="businessUnderwayCount" parameterType="integer" resultType="integer">
SELECT COUNT(a.id)
FROM dg_apply_amount_info AS a
INNER JOIN dg_business_process_status AS b
ON a.id = b.business_id
WHERE a.company_id = #{companyId}
AND b.business_status = 1
</select>
<!-- 获取申请记录详情 --> <!-- 获取申请记录详情 -->
<select id="getApplyDetail" parameterType="integer" resultType="com.daqing.framework.domain.crms.ext.ApplyDetailPO"> <select id="getApplyDetail" parameterType="integer" resultType="com.daqing.framework.domain.crms.ext.ApplyDetailPO">
SELECT l.status AS audit_status,l.apply_content AS remark,b.business_status AS business_status SELECT l.status AS audit_status,l.apply_content AS remark,b.business_status AS business_status

@ -1,9 +1,24 @@
package com.daqing.financial.guarantee.controller; package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping; import com.daqing.financial.guarantee.model.request.AlCollectionListRequest;
import com.daqing.financial.guarantee.model.request.AlCollectionRequest;
import com.daqing.financial.guarantee.model.response.AlCollectionListResponse;
import com.daqing.financial.guarantee.model.response.AlCollectionResponse;
import com.daqing.financial.guarantee.model.response.MoreOverdueDetailResponse;
import com.daqing.financial.guarantee.service.IAlCollectionService;
import com.daqing.framework.domain.guarantee.AlCollection;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
/** /**
* <p> * <p>
@ -15,6 +30,83 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@RestController @RestController
@RequestMapping("/al-collection") @RequestMapping("/al-collection")
@Api(value = "催收管理", tags = "催收管理")
public class AlCollectionController { public class AlCollectionController {
@Autowired
private IAlCollectionService alCollectionService;
/**
* 催收管理列表
*/
@GetMapping("/list")
@ApiOperation(value = "催收管理列表", notes = "催收管理列表", response = AlCollectionResponse.class)
public ResponseResult list(@RequestParam("page") Integer page, @RequestParam("size") Integer size,
@RequestParam(name = "codeOrName", required = false) String codeOrName,
@RequestParam(name = "status", required = false) Integer status) {
return ResponseResult.SUCCESS(alCollectionService.list(page, size, codeOrName, status));
}
/**
* 催收
*/
@PostMapping("/collection")
@ApiOperation(value = "催收", notes = "催收")
public ResponseResult collection(@RequestBody @Valid AlCollectionRequest alCollectionRequest) {
Boolean result = alCollectionService.collection(alCollectionRequest);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 催收时展示的详情
*/
@GetMapping("/overdue/detail")
@ApiOperation(value = "催收时展示的详情", notes = "催收时展示的详情")
public ResponseResult overdueDetail(@RequestParam("insuranceId") Integer insuranceId) {
return ResponseResult.SUCCESS(alCollectionService.overdueDetail(insuranceId));
}
/**
* 催收列表
*/
@PostMapping("/collection/list")
@ApiOperation(value = "催收列表", notes = "催收列表", response = AlCollectionListResponse.class)
public ResponseResult collectionList(@RequestBody AlCollectionListRequest alCollectionListRequest) {
return ResponseResult.SUCCESS(alCollectionService.collectionList(alCollectionListRequest));
}
/**
* 查看时的催收详情
*/
@GetMapping("/examine/detail")
@ApiOperation(value = "查看时的催收详情", notes = "查看时的催收详情", response = MoreOverdueDetailResponse.class)
public ResponseResult moreOverdueDetail(@RequestParam("id") Integer id) {
return ResponseResult.SUCCESS(alCollectionService.moreOverdueDetail(id));
}
/**
* 催收管理列表导出
*/
@ApiOperation(value = "催收管理列表导出", notes = "催收管理列表导出")
@GetMapping("/list/export/excel")
public ResponseResult listExportExcel(@RequestParam("insuranceIds") List<Integer> insuranceIds, HttpServletResponse response) throws IOException {
alCollectionService.listExportExcel(insuranceIds, response);
return ResponseResult.SUCCESS();
}
/**
* 催收列表导出
*/
@ApiOperation(value = "催收列表导出", notes = "催收列表导出")
@PostMapping("/collection/list/export/excel")
public ResponseResult collectionListExportExcel(@RequestBody List<Integer> ids, HttpServletResponse response) throws IOException {
alCollectionService.collectionListExportExcel(ids, response);
return ResponseResult.SUCCESS();
}
} }

@ -3,11 +3,18 @@ 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.request.AlCollectionListRequest;
import com.daqing.financial.guarantee.model.response.MoreOverdueDetailResponse;
import com.daqing.financial.guarantee.model.response.OverdueDetailResponse;
import com.daqing.framework.domain.guarantee.AlCollection; import com.daqing.framework.domain.guarantee.AlCollection;
import com.daqing.framework.domain.guarantee.po.AlCollectionListPO;
import com.daqing.framework.domain.guarantee.po.AlCollectionPO; import com.daqing.framework.domain.guarantee.po.AlCollectionPO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
* 保后催收 Mapper 接口 * 保后催收 Mapper 接口
@ -19,5 +26,19 @@ import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface AlCollectionMapper extends BaseMapper<AlCollection> { public interface AlCollectionMapper extends BaseMapper<AlCollection> {
IPage<AlCollectionPO> list(@Param("page") Page page, @Param("codeOrName") String codeOrName); IPage<AlCollectionPO> list(@Param("page") Page page, @Param("codeOrName") String codeOrName,
@Param("status") Integer status);
// collection是个关键字,尽量不要用,特别是别名
Boolean collection(@Param("ac") AlCollection alCollection);
OverdueDetailResponse getOverdueDetailByInsuranceId(Integer insuranceId);
MoreOverdueDetailResponse moreOverdueDetail(Integer id);
Integer getInsuranceIdById(Integer id);
IPage<AlCollectionListPO> collectionList(@Param("page") Page page, @Param("acr") AlCollectionListRequest alCollectionListRequest);
List<AlCollectionListPO> collectionListExcel(@Param("ids") List<Integer> ids);
} }

@ -27,6 +27,10 @@ public interface AlRepaymentEntryMapper extends BaseMapper<AlRepaymentEntry> {
List<AlRepaymentRes> selectListByIds(List<String> ids); List<AlRepaymentRes> selectListByIds(List<String> ids);
List<AlRepaymentEntry> listAlRepayment();
List<AlRepaymentEntry> listAlRepaymentByInsuranceId(Integer id);
List<AlRepaymentCountRes> selectRepaymentList(); List<AlRepaymentCountRes> selectRepaymentList();
List<AlRepaymentEntryRes> selectOverDueDays(); List<AlRepaymentEntryRes> selectOverDueDays();

@ -0,0 +1,37 @@
package com.daqing.financial.guarantee.model.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* 催收列表请求参数
*
* @auther River
* @date 2021/3/23 10:01
*/
@Data
@ToString
public class AlCollectionListRequest implements Serializable {
@ApiModelProperty("page")
private Integer page;
@ApiModelProperty("size")
private Integer size;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("开始时间")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("结束时间")
private Date endTime;
@ApiModelProperty("保后id")
private Integer insuranceId;
}

@ -0,0 +1,45 @@
package com.daqing.financial.guarantee.model.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 催收请求参数
*
* @auther River
* @date 2021/3/22 16:29
*/
@Data
@ToString
public class AlCollectionRequest implements Serializable {
@ApiModelProperty("保后id")
private Integer insuranceId;
@ApiModelProperty("催收方式:1->电话催收;2->上门/外访")
@Min(value = 1, message = "参数格式不正确")
@Max(value = 2, message = "参数格式不正确")
private Integer collectionMethod;
@ApiModelProperty("催收时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@NotNull(message = "请选择催收时间")
private Date collectionTime;
@ApiModelProperty("催收反馈")
@NotNull(message = "请输入催收反馈")
private String collectionFeedback;
@ApiModelProperty("附件")
@NotNull(message = "请上传催收附件")
private String enclosureFile;
}

@ -7,6 +7,7 @@ import lombok.ToString;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -30,7 +31,7 @@ public class DgLoanCommitteeConsiderRequest implements Serializable {
private String additionalItems; private String additionalItems;
@ApiModelProperty("贷款金额") @ApiModelProperty("贷款金额")
private Double loanMoney; private BigDecimal loanMoney;
@ApiModelProperty("贷款期限") @ApiModelProperty("贷款期限")
private String loanTern; private String loanTern;

@ -0,0 +1,70 @@
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.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 催收列表返回类
*
* @auther River
* @date 2021/3/23 10:39
*/
@Data
@ToString
public class AlCollectionListResponse extends BaseRowModel implements Serializable {
@ExcelIgnore
@ApiModelProperty("id")
private Integer id;
@ExcelProperty(value = "客户编号", index = 0)
@ApiModelProperty("客户编号")
private String code;
@ExcelProperty(value = "客户名称", index = 1)
@ApiModelProperty("客户名称")
private String name;
@ExcelProperty(value = "逾期金额", index = 2)
@ApiModelProperty("逾期金额")
private BigDecimal overdueAmount;
@ExcelProperty(value = "逾期利息", index = 3)
@ApiModelProperty("逾期利息")
private BigDecimal overdueInterest;
@ExcelProperty(value = "其他费用", index = 4)
@ApiModelProperty("其他费用")
private BigDecimal otherExpenses;
@ExcelProperty(value = "逾期次数", index = 5)
@ApiModelProperty("逾期次数")
private Integer overduePeriods;
@ExcelProperty(value = "催收方法", index = 6)
@ApiModelProperty("催收方法")
private Integer collectionMethod;
@ExcelProperty(value = "催收人", index = 7)
@ApiModelProperty("催收人")
private String collectionUserName;
@ExcelProperty(value = "催收时间", index = 8)
@ApiModelProperty("催收时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date collectionTime;
@ExcelProperty(value = "催收反馈", index = 9)
@ApiModelProperty("催收反馈")
private String collectionFeedback;
}

@ -0,0 +1,71 @@
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.daqing.framework.utils.excel.CollectionConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 催收管理列表返回类
*
* @auther River
* @date 2021/3/19 16:14
*/
@Data
@ToString
public class AlCollectionResponse extends BaseRowModel implements Serializable {
@ExcelIgnore
@ApiModelProperty("id")
private Integer id;
@ExcelProperty(value = "客户编号", index = 0)
@ApiModelProperty("客户编号")
private String code;
@ExcelProperty(value = "客户名称", index = 1)
@ApiModelProperty("客户名称")
private String name;
@ExcelProperty(value = "联系电话", index = 2)
@ApiModelProperty("联系电话")
private String phone;
@ExcelProperty(value = "业务类别", index = 3)
@ApiModelProperty("业务类别")
private String type;
@ExcelProperty(value = "担保额度", index = 4)
@ApiModelProperty("担保额度")
private BigDecimal amount;
@ExcelProperty(value = "逾期期数", index = 5)
@ApiModelProperty("逾期期数")
private Integer overduePeriods;
@ExcelProperty(value = "逾期额度", index = 6)
@ApiModelProperty("逾期额度")
private BigDecimal overdueAmount;
@ExcelProperty(value = "逾期利息", index = 7)
@ApiModelProperty("逾期利息")
private BigDecimal overdueInterest;
@ExcelProperty(value = "所属部门", index = 8)
@ApiModelProperty("所属部门")
private String department;
@ExcelProperty(value = "催收次数", index = 9)
@ApiModelProperty("催收次数")
private Integer numberOfCollection;
@ExcelProperty(value = "还款状态", index = 10, converter = CollectionConverter.class)
@ApiModelProperty("状态,1->还款中;2->已逾期;3->已还清;4->已结项")
private Integer status;
}

@ -3,7 +3,6 @@ package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import lombok.Data; import lombok.Data;
import org.apache.poi.hpsf.Decimal;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;

@ -11,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -45,7 +46,7 @@ public class DgComplianceInvestigationResponse extends BaseRowModel implements S
@ExcelProperty(value = "金额", index = 4) @ExcelProperty(value = "金额", index = 4)
@ApiModelProperty("金额") @ApiModelProperty("金额")
private Double applyAmount; private BigDecimal applyAmount;
@ExcelProperty(value = "期限", index = 5) @ExcelProperty(value = "期限", index = 5)
@ApiModelProperty("期限") @ApiModelProperty("期限")

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -33,7 +34,7 @@ public class DgLoanCommitteeConsiderInfoResponse implements Serializable {
* 贷款金额贷审会意见 * 贷款金额贷审会意见
*/ */
@ApiModelProperty("贷款金额(贷审会意见)") @ApiModelProperty("贷款金额(贷审会意见)")
private Integer loanMoney; private BigDecimal loanMoney;
/** /**
* 贷款期限贷审会意见 * 贷款期限贷审会意见

@ -12,6 +12,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -46,7 +47,7 @@ public class DgLoanCommitteeConsiderResponse extends BaseRowModel implements Ser
@ExcelProperty(value = "金额" , index = 4) @ExcelProperty(value = "金额" , index = 4)
@ApiModelProperty("金额") @ApiModelProperty("金额")
private Double applyAmount; private BigDecimal applyAmount;
@ExcelProperty(value = "期限" , index = 5) @ExcelProperty(value = "期限" , index = 5)
@ApiModelProperty("期限") @ApiModelProperty("期限")

@ -9,6 +9,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -39,7 +40,7 @@ public class DgStatisticsExcelRefuseResponse extends BaseRowModel implements Ser
@ApiModelProperty("申请额度") @ApiModelProperty("申请额度")
@ExcelProperty(value = "金额", index = 4) @ExcelProperty(value = "金额", index = 4)
private Double applyAmount; private BigDecimal applyAmount;
@ApiModelProperty("申请期限") @ApiModelProperty("申请期限")
@ExcelProperty(value = "期数", index = 5) @ExcelProperty(value = "期数", index = 5)

@ -9,6 +9,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -39,7 +40,7 @@ public class DgStatisticsExcelResponse extends BaseRowModel implements Serializa
@ApiModelProperty("申请额度") @ApiModelProperty("申请额度")
@ExcelProperty(value = "金额", index = 4) @ExcelProperty(value = "金额", index = 4)
private Double applyAmount; private BigDecimal applyAmount;
@ApiModelProperty("申请期限") @ApiModelProperty("申请期限")
@ExcelProperty(value = "期数", index = 5) @ExcelProperty(value = "期数", index = 5)

@ -8,6 +8,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -39,7 +40,7 @@ public class DgStatisticsListRefuseResponse extends BaseRowModel implements Seri
@ApiModelProperty("申请额度") @ApiModelProperty("申请额度")
@ExcelProperty(value = "金额",index = 4) @ExcelProperty(value = "金额",index = 4)
private Double applyAmount; private BigDecimal applyAmount;
@ApiModelProperty("申请期限") @ApiModelProperty("申请期限")
@ExcelProperty(value = "期数",index = 5) @ExcelProperty(value = "期数",index = 5)

@ -8,6 +8,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -22,49 +23,49 @@ import java.util.List;
public class DgStatisticsListResponse extends BaseRowModel implements Serializable { public class DgStatisticsListResponse extends BaseRowModel implements Serializable {
@ApiModelProperty("业务编号") @ApiModelProperty("业务编号")
@ExcelProperty(value = "业务编号",index = 0) @ExcelProperty(value = "业务编号", index = 0)
private String businessCode; private String businessCode;
@ApiModelProperty("客户姓名") @ApiModelProperty("客户姓名")
@ExcelProperty(value = "客户姓名",index = 1) @ExcelProperty(value = "客户姓名", index = 1)
private String name; private String name;
@ApiModelProperty("客户联系方式") @ApiModelProperty("客户联系方式")
@ExcelProperty(value = "联系电话",index = 2) @ExcelProperty(value = "联系电话", index = 2)
private String phone; private String phone;
@ApiModelProperty("业务类型") @ApiModelProperty("业务类型")
@ExcelProperty(value = "产品类型",index = 3) @ExcelProperty(value = "产品类型", index = 3)
private String businessType; private String businessType;
@ApiModelProperty("申请额度") @ApiModelProperty("申请额度")
@ExcelProperty(value = "金额",index = 4) @ExcelProperty(value = "金额", index = 4)
private Double applyAmount; private BigDecimal applyAmount;
@ApiModelProperty("申请期限") @ApiModelProperty("申请期限")
@ExcelProperty(value = "期数",index = 5) @ExcelProperty(value = "期数", index = 5)
private String applyTime; private String applyTime;
@ApiModelProperty("申请日期") @ApiModelProperty("申请日期")
@ExcelProperty(value = "申请日期",index = 6) @ExcelProperty(value = "申请日期", index = 6)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime; private Date createTime;
@ApiModelProperty("完成任务节点id") @ApiModelProperty("完成任务节点id")
@ExcelProperty(value = "完成任务节点id",index = 8) @ExcelProperty(value = "完成任务节点id", index = 8)
private Integer processId; private Integer processId;
@ApiModelProperty("最新操作时间") @ApiModelProperty("最新操作时间")
@ExcelProperty(value = "任务分配时间",index = 9) @ExcelProperty(value = "任务分配时间", index = 9)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date operationTime; private Date operationTime;
@ApiModelProperty("提单人姓名") @ApiModelProperty("提单人姓名")
@ExcelProperty(value = "提单人",index = 10) @ExcelProperty(value = "提单人", index = 10)
private String employeeName; private String employeeName;
@ApiModelProperty("部门") @ApiModelProperty("部门")
@ExcelProperty(value = "所属部门",index = 11) @ExcelProperty(value = "所属部门", index = 11)
private List<String> department; private List<String> department;
} }

@ -12,6 +12,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -46,7 +47,7 @@ public class DgWorkConferenceResponse extends BaseRowModel implements Serializab
@ExcelProperty(value = "金额", index = 4) @ExcelProperty(value = "金额", index = 4)
@ApiModelProperty("金额") @ApiModelProperty("金额")
private Double applyAmount; private BigDecimal applyAmount;
@ExcelProperty(value = "期限", index = 5) @ExcelProperty(value = "期限", index = 5)
@ApiModelProperty("期限") @ApiModelProperty("期限")

@ -0,0 +1,64 @@
package com.daqing.financial.guarantee.model.response;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 查看时的催收详情
*
* @auther River
* @date 2021/3/22 17:00
*/
@Data
@ToString
public class MoreOverdueDetailResponse implements Serializable {
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("业务类别")
private String type;
@ApiModelProperty("客户编号")
private String code;
@ApiModelProperty("逾期期数")
private Integer overduePeriods;
@ApiModelProperty("逾期金额")
private BigDecimal overdueAmount;
@ApiModelProperty("逾期利息")
private BigDecimal overdueInterest;
@ApiModelProperty("逾期费用")
private BigDecimal otherExpenses;
@ApiModelProperty("催收次数")
private Integer numberOfCollection;
@ApiModelProperty("还款记录")
private List<AlRepaymentEntryListRes> alRepaymentEntryList;
@ApiModelProperty("催收方式")
private Integer collectionMethod;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("催收时间")
private Date collectionTime;
@ApiModelProperty("催收反馈")
private String collectionFeedback;
@ApiModelProperty("附件")
private String enclosureFile;
}

@ -0,0 +1,50 @@
package com.daqing.financial.guarantee.model.response;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 催收详情返回类
*
* @auther River
* @date 2021/3/22 14:59
*/
@Data
@ToString
public class OverdueDetailResponse implements Serializable {
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("业务类别")
private String type;
@ApiModelProperty("客户编号")
private String code;
@ApiModelProperty("逾期期数")
private Integer overduePeriods;
@ApiModelProperty("逾期金额")
private BigDecimal overdueAmount;
@ApiModelProperty("逾期利息")
private BigDecimal overdueInterest;
@ApiModelProperty("逾期费用")
private BigDecimal otherExpenses;
@ApiModelProperty("催收次数")
private Integer numberOfCollection;
@ApiModelProperty("还款记录")
private List<AlRepaymentEntryListRes> alRepaymentEntryList;
}

@ -2,9 +2,17 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.AlCollectionListRequest;
import com.daqing.financial.guarantee.model.request.AlCollectionRequest;
import com.daqing.financial.guarantee.model.response.MoreOverdueDetailResponse;
import com.daqing.financial.guarantee.model.response.OverdueDetailResponse;
import com.daqing.framework.domain.guarantee.AlCollection; import com.daqing.framework.domain.guarantee.AlCollection;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/** /**
* <p> * <p>
* 保后催收 服务类 * 保后催收 服务类
@ -15,5 +23,17 @@ import com.daqing.framework.utils.PageUtils;
*/ */
public interface IAlCollectionService extends IService<AlCollection> { public interface IAlCollectionService extends IService<AlCollection> {
PageUtils list(Integer page, Integer size, String codeOrName); PageUtils list(Integer page, Integer size, String codeOrName, Integer status);
Boolean collection(AlCollectionRequest alCollectionRequest);
OverdueDetailResponse overdueDetail(Integer insuranceId);
PageUtils collectionList(AlCollectionListRequest alCollectionListRequest);
MoreOverdueDetailResponse moreOverdueDetail(Integer id);
void listExportExcel(List<Integer> insuranceIds, HttpServletResponse response) throws IOException;
void collectionListExportExcel(List<Integer> ids, HttpServletResponse response) throws IOException;
} }

@ -1,11 +1,43 @@
package com.daqing.financial.guarantee.service.impl; package com.daqing.financial.guarantee.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.AlCollectionMapper; import com.daqing.financial.guarantee.mapper.AlCollectionMapper;
import com.daqing.financial.guarantee.mapper.AlRepaymentEntryMapper;
import com.daqing.financial.guarantee.model.request.AlCollectionListRequest;
import com.daqing.financial.guarantee.model.request.AlCollectionRequest;
import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IAlCollectionService; import com.daqing.financial.guarantee.service.IAlCollectionService;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.AlCollection; import com.daqing.framework.domain.guarantee.AlCollection;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.domain.guarantee.po.AlCollectionListPO;
import com.daqing.framework.domain.guarantee.po.AlCollectionPO;
import com.daqing.framework.domain.hrms.ext.EmployeeVO;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.util.*;
/** /**
* <p> * <p>
@ -18,17 +50,323 @@ import org.springframework.stereotype.Service;
@Service @Service
public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlCollection> implements IAlCollectionService { public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlCollection> implements IAlCollectionService {
@Autowired
private AlRepaymentEntryMapper alRepaymentEntryMapper;
@Autowired
private HrmsFeignService hrmsFeignService;
/** /**
* 催收管理列表 * 催收管理列表
* *
* @param codeOrName 客户编号或者名称 * @param codeOrName 客户编号或者名称
*/ */
@Override @Override
public PageUtils list(Integer page, Integer size, String codeOrName) { public PageUtils list(Integer page, Integer size, String codeOrName, Integer status) {
if (page == null || size == null) { if (page == null || page < 0 || size == null || size < 0) {
page = 1; page = 1;
size = 10; size = 10;
} }
return null; // 曾经逾期过的记录
IPage<AlCollectionPO> alCollectionList = this.getBaseMapper().list(new Page(page, size), codeOrName, status);
// 复制分页信息
IPage<AlCollectionResponse> response = new Page<>();
BeanUtils.copyProperties(alCollectionList, response);
// 返回数据集合
List<AlCollectionResponse> alCollectionResponsesList = new ArrayList<>();
// 还款记录信息
List<AlRepaymentEntry> alRepaymentList = alRepaymentEntryMapper.listAlRepayment();
// 拼装信息
List<AlCollectionPO> records = alCollectionList.getRecords();
for (AlCollectionPO record : records) {
AlCollectionResponse alCollectionResponse = new AlCollectionResponse();
// 逾期次数
Integer overduePeriods = 0;
// 逾期额度
BigDecimal overdueAmount = new BigDecimal(0.00);
// 逾期利息
BigDecimal overdueInterest = new BigDecimal(0.00);
for (AlRepaymentEntry repayment : alRepaymentList) {
if (record.getId().equals(repayment.getInsuranceId())) {
overdueAmount = overdueAmount.add(repayment.getCurrentRepayment());
overdueInterest = overdueInterest.add(repayment.getInterest());
overduePeriods++;
}
}
BeanUtils.copyProperties(record, alCollectionResponse);
alCollectionResponse.setOverdueAmount(overdueAmount);
alCollectionResponse.setOverdueInterest(overdueInterest);
alCollectionResponse.setOverduePeriods(overduePeriods);
alCollectionResponsesList.add(alCollectionResponse);
}
response.setRecords(alCollectionResponsesList);
return new PageUtils(response);
}
/**
* 催收
*/
@Override
public Boolean collection(AlCollectionRequest alCollectionRequest) {
if (alCollectionRequest.getInsuranceId() == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
AlCollection alCollection = new AlCollection();
BeanUtils.copyProperties(alCollectionRequest, alCollection);
// 当前记录逾期额度、逾期利息、其他费用、逾期次数
Map<String, Object> map = this.getOverdueConditionByInsuranceId(alCollectionRequest.getInsuranceId());
alCollection.setOverdueAmount((BigDecimal) map.get("overdueAmount"));
alCollection.setOverdueInterest((BigDecimal) map.get("overdueInterest"));
alCollection.setOtherExpenses((BigDecimal) map.get("otherExpenses"));
alCollection.setOverduePeriods((Integer) map.get("overduePeriods"));
// 当前催收用户
alCollection.setCollectionUser(Integer.parseInt(this.getUserId()));
// alCollection.setCollectionUser(2);
return this.getBaseMapper().collection(alCollection);
}
/**
* 催收详情
*
* @param insuranceId 保后id
*/
@Override
public OverdueDetailResponse overdueDetail(Integer insuranceId) {
if (insuranceId == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
OverdueDetailResponse overdueDetailResponse = this.getBaseMapper().getOverdueDetailByInsuranceId(insuranceId);
// 逾期金额、逾期利息、其他费用、逾期次数
Map<String, Object> map = this.getOverdueConditionByInsuranceId(insuranceId);
overdueDetailResponse.setOverdueAmount((BigDecimal) map.get("overdueAmount"));
overdueDetailResponse.setOverdueInterest((BigDecimal) map.get("overdueInterest"));
overdueDetailResponse.setOtherExpenses((BigDecimal) map.get("otherExpenses"));
overdueDetailResponse.setOverduePeriods((Integer) map.get("overduePeriods"));
// 还款记录
IPage<AlRepaymentEntryListRes> iPage = alRepaymentEntryMapper.pageByCondition(new Page(), null, null, insuranceId);
overdueDetailResponse.setAlRepaymentEntryList(iPage.getRecords());
return overdueDetailResponse;
}
/**
* 催收列表
*/
@Override
public PageUtils collectionList(AlCollectionListRequest alCollectionListRequest) {
if (alCollectionListRequest.getInsuranceId() == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
// 分页参数
if (alCollectionListRequest.getPage() == null
|| alCollectionListRequest.getPage() < 0
|| alCollectionListRequest.getSize() == null
|| alCollectionListRequest.getSize() < 0) {
alCollectionListRequest.setPage(1);
alCollectionListRequest.setSize(10);
}
// 催收列表基本信息
IPage<AlCollectionListPO> alCollectionListPO = this.getBaseMapper().collectionList(new Page(alCollectionListRequest.getPage(), alCollectionListRequest.getSize()),
alCollectionListRequest);
// 创建返回分页类
Page<AlCollectionListResponse> iPage = new Page<>();
// 获取所有的用户id并远程转换成名称
if (alCollectionListPO.getRecords() != null && alCollectionListPO.getRecords().size() != 0) {
Integer[] userIds = new Integer[alCollectionListPO.getRecords().size()];
for (int i = 0; i < userIds.length; i++) {
userIds[i] = alCollectionListPO.getRecords().get(i).getCollectionUser();
}
ResponseResult<List<EmployeeVO>> result = hrmsFeignService.listEmpNameByUserId(userIds);
// 复制分页信息、拼装信息并返回
BeanUtils.copyProperties(alCollectionListPO, iPage);
if (result.getData() != null && result.getData().size() != 0) {
List<AlCollectionListResponse> response = this.jointName(alCollectionListPO.getRecords(), result.getData());
iPage.setRecords(response);
}
}
return new PageUtils(iPage);
}
/**
* 查看时的催收详情
*/
@Override
public MoreOverdueDetailResponse moreOverdueDetail(Integer id) {
if (id == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
// 催收时间、类型、反馈、附件等
MoreOverdueDetailResponse moreOverdueDetailResponse = this.getBaseMapper().moreOverdueDetail(id);
OverdueDetailResponse overdueDetailResponse = overdueDetail(this.getBaseMapper().getInsuranceIdById(id));
// 客户编号、姓名、类型、逾期、还款记录等
moreOverdueDetailResponse.setCode(overdueDetailResponse.getCode());
moreOverdueDetailResponse.setName(overdueDetailResponse.getName());
moreOverdueDetailResponse.setType(overdueDetailResponse.getType());
moreOverdueDetailResponse.setOverdueAmount(overdueDetailResponse.getOverdueAmount());
moreOverdueDetailResponse.setOverdueInterest(overdueDetailResponse.getOverdueInterest());
moreOverdueDetailResponse.setOtherExpenses(overdueDetailResponse.getOtherExpenses());
moreOverdueDetailResponse.setOverduePeriods(overdueDetailResponse.getOverduePeriods());
moreOverdueDetailResponse.setNumberOfCollection(overdueDetailResponse.getNumberOfCollection());
moreOverdueDetailResponse.setAlRepaymentEntryList(overdueDetailResponse.getAlRepaymentEntryList());
return moreOverdueDetailResponse;
}
/**
* 催收管理列表导出
*
* @param insuranceIds 保后id集合
*/
@Override
public void listExportExcel(List<Integer> insuranceIds, HttpServletResponse response) throws IOException {
IPage<AlCollectionPO> alCollectionList = this.getBaseMapper().list(new Page(), null, null);
// 返回数据集合
List<AlCollectionResponse> alCollectionResponsesList = new ArrayList<>();
// 还款记录信息
List<AlRepaymentEntry> alRepaymentList = alRepaymentEntryMapper.listAlRepayment();
// 拼装信息
List<AlCollectionPO> records = alCollectionList.getRecords();
for (AlCollectionPO record : records) {
AlCollectionResponse alCollectionResponse = new AlCollectionResponse();
// 逾期次数
Integer overduePeriods = 0;
// 逾期额度
BigDecimal overdueAmount = new BigDecimal(0.00);
// 逾期利息
BigDecimal overdueInterest = new BigDecimal(0.00);
for (AlRepaymentEntry repayment : alRepaymentList) {
if (record.getId().equals(repayment.getInsuranceId())) {
overdueAmount = overdueAmount.add(repayment.getCurrentRepayment());
overdueInterest = overdueInterest.add(repayment.getInterest());
overduePeriods++;
}
}
BeanUtils.copyProperties(record, alCollectionResponse);
alCollectionResponse.setOverdueAmount(overdueAmount);
alCollectionResponse.setOverdueInterest(overdueInterest);
alCollectionResponse.setOverduePeriods(overduePeriods);
alCollectionResponsesList.add(alCollectionResponse);
Iterator<AlCollectionResponse> iterator = alCollectionResponsesList.iterator();
// 迭代器遍历,删除不需要的数据
while (iterator.hasNext()) {
boolean flag = false;
// Iterator类的next( )方法在同一循环中不能出现两次,会导致最后一次的游标指向空值
AlCollectionResponse next = iterator.next();
for (Integer insuranceId : insuranceIds) {
if (null != next.getId() && next.getId().equals(insuranceId)) {
flag = true;
}
}
if (!flag) {
iterator.remove();
}
}
}
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build();
try {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyExcel没有关系
String fileName = URLEncoder.encode("催收管理列表数据一览表", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
WriteSheet writeSheet = EasyExcel.writerSheet(0, "template").head(AlCollectionResponse.class).build();
excelWriter.write(alCollectionResponsesList, writeSheet);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
/**
* 催收列表导出
*
* @param ids 催收id集合
*/
@Override
public void collectionListExportExcel(List<Integer> ids, HttpServletResponse response) throws IOException {
// 导出的数据集合
List<AlCollectionListResponse> list = new ArrayList<>();
// 根据id查询出数据
List<AlCollectionListPO> alCollectionListPOS = this.getBaseMapper().collectionListExcel(ids);
if (alCollectionListPOS != null && alCollectionListPOS.size() != 0) {
Integer[] userIds = new Integer[alCollectionListPOS.size()];
for (int i = 0; i < userIds.length; i++) {
userIds[i] = alCollectionListPOS.get(i).getCollectionUser();
}
// 根据用户id查询用户姓名
ResponseResult<List<EmployeeVO>> result = hrmsFeignService.listEmpNameByUserId(userIds);
if (result.getData() != null && result.getData().size() != 0) {
// 转换用户id为姓名
list = this.jointName(alCollectionListPOS, result.getData());
}
}
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build();
try {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyExcel没有关系
String fileName = URLEncoder.encode("催收列表数据一览表", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
WriteSheet writeSheet = EasyExcel.writerSheet(0, "template").head(AlCollectionListResponse.class).build();
excelWriter.write(list, writeSheet);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
private Map<String, Object> getOverdueConditionByInsuranceId(Integer insuranceId) {
List<AlRepaymentEntry> alRepaymentList = alRepaymentEntryMapper.listAlRepaymentByInsuranceId(insuranceId);
// 逾期金额
BigDecimal overdueAmount = new BigDecimal(0.00);
// 逾期利息
BigDecimal overdueInterest = new BigDecimal(0.00);
// 其他费用
BigDecimal otherExpenses = new BigDecimal(0.00);
for (AlRepaymentEntry alRepayment : alRepaymentList) {
overdueAmount = overdueAmount.add(alRepayment.getCurrentRepayment());
overdueInterest = overdueInterest.add(alRepayment.getInterest());
otherExpenses = otherExpenses.add(alRepayment.getOtherExpenses());
}
Map<String, Object> map = new HashMap<>();
map.put("overduePeriods", alRepaymentList.size());
map.put("overdueAmount", overdueAmount);
map.put("overdueInterest", overdueInterest);
map.put("otherExpenses", otherExpenses);
return map;
}
/**
* 获取当前登录用户信息
*/
private String getUserId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
String userId = RedisUtil.get("dq:token:" + token);
if (userId == null || userId.length() == 0) {
ExceptionCast.cast(CommonCode.GET_LOGIN_USER_FAIL);
}
return userId;
}
/**
* 将催收人id转换成催收人姓名并返回
*/
private List<AlCollectionListResponse> jointName(List<AlCollectionListPO> alCollectionListPO, List<EmployeeVO> employeeVO) {
List<AlCollectionListResponse> response = new ArrayList<>();
for (AlCollectionListPO collectionListPO : alCollectionListPO) {
AlCollectionListResponse alCollectionListResponse = new AlCollectionListResponse();
for (EmployeeVO employee : employeeVO) {
if (Objects.equals(collectionListPO.getCollectionUser().longValue(), employee.getId())) {
alCollectionListResponse.setCollectionUserName(employee.getName());
}
}
BeanUtils.copyProperties(collectionListPO, alCollectionListResponse);
response.add(alCollectionListResponse);
}
return response;
} }
} }

@ -151,7 +151,7 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
String phone = businessCompany.getPhone(); String phone = businessCompany.getPhone();
String name = businessCompany.getName(); String name = businessCompany.getName();
DgLoanCommitteeConsider loanCommitteeConsider = loanCommitteeConsiderMapper.selectOne(new QueryWrapper<DgLoanCommitteeConsider>().eq("business_id", businessId)); DgLoanCommitteeConsider loanCommitteeConsider = loanCommitteeConsiderMapper.selectOne(new QueryWrapper<DgLoanCommitteeConsider>().eq("business_id", businessId));
Integer loanMoney = loanCommitteeConsider.getLoanMoney(); BigDecimal loanMoney = loanCommitteeConsider.getLoanMoney();
String loanTern = loanCommitteeConsider.getLoanTern(); String loanTern = loanCommitteeConsider.getLoanTern();
//添加数据到保后管理 //添加数据到保后管理
AlInsuranceList alInsuranceList = new AlInsuranceList(); AlInsuranceList alInsuranceList = new AlInsuranceList();
@ -161,7 +161,7 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
alInsuranceList.setApplyTime(createTime); alInsuranceList.setApplyTime(createTime);
alInsuranceList.setPhone(phone); alInsuranceList.setPhone(phone);
alInsuranceList.setCustomerName(name); alInsuranceList.setCustomerName(name);
alInsuranceList.setGuaranteeAmount(BigDecimal.valueOf(loanMoney*10000)); alInsuranceList.setGuaranteeAmount(loanMoney);
alInsuranceList.setGuaranteeTime(loanTern); alInsuranceList.setGuaranteeTime(loanTern);
alInsuranceList.setAmountWide(amountWide); alInsuranceList.setAmountWide(amountWide);
alInsuranceList.setPaymentStatus(1); alInsuranceList.setPaymentStatus(1);

@ -1,21 +1,21 @@
#服务名称 #服务名称
#spring.application.name=dq-financial-guarantee spring.application.name=dq-financial-guarantee
##配置中心地址 #配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.server-addr=192.168.31.140: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
@ -37,29 +37,29 @@ spring.servlet.multipart.max-file-size=10MB
# #
##正式环境(prod) ##正式环境(prod)
##服务名称 ##服务名称
spring.application.name=dq-financial-guarantee #spring.application.name=dq-financial-guarantee
#配置中心地址 ##配置中心地址
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=502bfc93-6e2f-44aa-93ad-f074664c6826 #spring.cloud.nacos.config.namespace=502bfc93-6e2f-44aa-93ad-f074664c6826
#
spring.cloud.nacos.config.ext-config[0].data-id=dq-financial-guarantee.yml #spring.cloud.nacos.config.ext-config[0].data-id=dq-financial-guarantee.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=datasource.yml #spring.cloud.nacos.config.ext-config[1].data-id=datasource.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=mybatis.yml #spring.cloud.nacos.config.ext-config[2].data-id=mybatis.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

@ -12,14 +12,79 @@
<result column="enclosure_file" property="enclosureFile" /> <result column="enclosure_file" property="enclosureFile" />
</resultMap> </resultMap>
<!-- 催收管理列表 -->
<select id="list" resultType="com.daqing.framework.domain.guarantee.po.AlCollectionPO"> <select id="list" resultType="com.daqing.framework.domain.guarantee.po.AlCollectionPO">
SELECT i.id AS id,i.business_code AS code,i.customer_name AS name,i.phone AS phone,i.business_type AS type, SELECT i.id AS id,i.business_code AS code,i.customer_name AS name,i.phone AS phone,i.business_type AS type,
i.guarantee_amount AS amount,i.department AS department,i.payment_status AS status i.guarantee_amount AS amount,i.department AS department,i.payment_status AS status,COUNT(c.id) AS numberOfCollection
FROM al_insurance_list AS i FROM al_insurance_list AS i
INNER JOIN al_repayment_entry AS r LEFT JOIN al_collection AS c
ON i.id = r.insurance_id ON i.id = c.insurance_id
WHERE r.repayment_status = 3 WHERE i.is_overdue = 0
<if test="status != null">
AND i.payment_status = #{status}
</if>
<if test="codeOrName != null and codeOrName != ''">
AND (i.customer_name like CONCAT('%',#{codeOrName},'%') OR i.business_code like CONCAT('%',#{codeOrName},'%'))
</if>
GROUP BY i.id GROUP BY i.id
</select> </select>
<!-- 催收 -->
<insert id="collection" parameterType="com.daqing.framework.domain.guarantee.AlCollection">
INSERT INTO al_collection (insurance_id,collection_method,collection_time,collection_feedback,enclosure_file
,overdue_amount,overdue_interest,other_expenses,collection_user,overdue_periods)
VALUES (#{ac.insuranceId},#{ac.collectionMethod},#{ac.collectionTime},
#{ac.collectionFeedback},#{ac.enclosureFile},
#{ac.overdueAmount},#{ac.overdueInterest},#{ac.otherExpenses},
#{ac.collectionUser},#{ac.overduePeriods})
</insert>
<select id="getOverdueDetailByInsuranceId" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.OverdueDetailResponse">
SELECT i.business_code AS code,i.customer_name AS name,i.business_type AS type,COUNT(c.id) AS numberOfCollection
FROM al_insurance_list AS i
INNER JOIN al_collection AS c
ON i.id = c.insurance_id
WHERE i.id = #{insuranceId}
</select>
<!-- 催收列表 -->
<select id="collectionList" parameterType="com.daqing.financial.guarantee.model.request.AlCollectionListRequest" resultType="com.daqing.framework.domain.guarantee.po.AlCollectionListPO">
SELECT c.id AS id,c.overdue_amount AS overdue_amount,c.overdue_interest AS overdue_interest,c.other_expenses AS other_expenses,
c.overdue_periods AS overdue_periods,c.collection_method AS collection_method,c.collection_user AS collection_user,
c.collection_time AS collection_time,c.collection_feedback AS collection_feedback,i.business_code AS code,
i.customer_name AS name
FROM al_collection AS c
INNER JOIN al_insurance_list AS i
ON i.id = c.insurance_id
WHERE c.insurance_id = #{acr.insuranceId}
<if test="acr.startTime != null and acr.endTime != null">
AND collection_time BETWEEN #{acr.startTime} AND #{acr.endTime}
</if>
</select>
<select id="moreOverdueDetail" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.MoreOverdueDetailResponse">
SELECT collection_method,collection_time,collection_feedback,enclosure_file
FROM al_collection
WHERE id = #{id}
</select>
<select id="getInsuranceIdById" parameterType="integer" resultType="integer">
SELECT insurance_id FROM al_collection WHERE id = #{id}
</select>
<!-- 催收管理列表导出 -->
<select id="collectionListExcel" parameterType="list" resultType="com.daqing.framework.domain.guarantee.po.AlCollectionListPO">
SELECT c.id AS id,c.overdue_amount AS overdue_amount,c.overdue_interest AS overdue_interest,c.other_expenses AS other_expenses,
c.overdue_periods AS overdue_periods,c.collection_method AS collection_method,c.collection_user AS collection_user,
c.collection_time AS collection_time,c.collection_feedback AS collection_feedback,i.business_code AS code,
i.customer_name AS name
FROM al_collection AS c
INNER JOIN al_insurance_list AS i
ON i.id = c.insurance_id
WHERE c.id IN
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</select>
</mapper> </mapper>

@ -64,4 +64,19 @@
left join al_insurance_list il on re.insurance_id=il.id left join al_insurance_list il on re.insurance_id=il.id
</select> </select>
<!-- 还款记录已逾期信息 -->
<select id="listAlRepayment" resultType="com.daqing.framework.domain.guarantee.AlRepaymentEntry">
SELECT insurance_id,current_repayment,interest
FROM al_repayment_entry
WHERE repayment_status = 3
</select>
<!-- 还款记录已逾期信息 -->
<select id="listAlRepaymentByInsuranceId" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.AlRepaymentEntry">
SELECT insurance_id,current_repayment,interest,other_expenses
FROM al_repayment_entry
WHERE repayment_status = 3
AND insurance_id = #{insuranceId}
</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=192.168.31.140: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

@ -1,21 +1,21 @@
#服务名称 #服务名称
#spring.application.name=dq-financial-hrms spring.application.name=dq-financial-hrms
##配置中心地址 #配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.server-addr=192.168.31.140: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
@ -36,30 +36,30 @@ spring.servlet.multipart.max-request-size=10MB
# 正式环境(prod) # 正式环境(prod)
#服务名称 #服务名称
spring.application.name=dq-financial-hrms #spring.application.name=dq-financial-hrms
#配置中心地址 ##配置中心地址
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=69614b55-1521-421c-ac58-dbe4a5b01b43 #spring.cloud.nacos.config.namespace=69614b55-1521-421c-ac58-dbe4a5b01b43
#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

@ -4,6 +4,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -26,7 +27,7 @@ public class ApplicationRecordPO implements Serializable {
/** /**
* 申请额度 * 申请额度
*/ */
private Double applyAmount; private BigDecimal applyAmount;
/** /**
* 贷款用途 * 贷款用途

@ -3,9 +3,13 @@ package com.daqing.framework.domain.guarantee;
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.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -18,6 +22,7 @@ import java.util.Date;
*/ */
@Data @Data
@TableName("al_collection") @TableName("al_collection")
@ToString
public class AlCollection implements Serializable { public class AlCollection implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -31,25 +36,58 @@ public class AlCollection implements Serializable {
/** /**
* 保后主键id * 保后主键id
*/ */
@ApiModelProperty("保后id")
private Integer insuranceId; private Integer insuranceId;
/**
* 逾期金额
*/
@ApiModelProperty("逾期金额")
private BigDecimal overdueAmount;
/**
* 逾期利息
*/
@ApiModelProperty("逾期利息")
private BigDecimal overdueInterest;
/**
* 逾期费用
*/
@ApiModelProperty("逾期费用")
private BigDecimal otherExpenses;
/**
* 逾期期数
*/
private Integer overduePeriods;
/** /**
* 催收方式1->电话催收2->上门/外访 * 催收方式1->电话催收2->上门/外访
*/ */
@ApiModelProperty("催收方式:1->电话催收;2->上门/外访")
private Integer collectionMethod; private Integer collectionMethod;
@ApiModelProperty("催收人")
private Integer collectionUser;
/** /**
* 催收时间 * 催收时间
*/ */
@ApiModelProperty("催收时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date collectionTime; private Date collectionTime;
/** /**
* 催收反馈 * 催收反馈
*/ */
@ApiModelProperty("催收反馈")
private String collectionFeedback; private String collectionFeedback;
/** /**
* 附件 * 附件
*/ */
@ApiModelProperty("附件")
private String enclosureFile; private String enclosureFile;
} }

@ -3,6 +3,7 @@ package com.daqing.framework.domain.guarantee;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -37,11 +38,13 @@ public class AlRepaymentEntry implements Serializable {
/** /**
* 应还款日 * 应还款日
*/ */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date repaymentDate; private Date repaymentDate;
/** /**
* 实际还款日 * 实际还款日
*/ */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date actualRepaymentDate; private Date actualRepaymentDate;
/** /**
@ -97,12 +100,14 @@ public class AlRepaymentEntry implements Serializable {
/** /**
* 创建时间 * 创建时间
*/ */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField(fill= FieldFill.INSERT) @TableField(fill= FieldFill.INSERT)
private Date createTime; private Date createTime;
/** /**
* 修改时间 * 修改时间
*/ */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField(fill= FieldFill.INSERT_UPDATE) @TableField(fill= FieldFill.INSERT_UPDATE)
private Date updateTime; private Date updateTime;
} }

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -67,7 +68,7 @@ public class DgLoanCommitteeConsider implements Serializable {
/** /**
* 贷款金额贷审会意见 * 贷款金额贷审会意见
*/ */
private Integer loanMoney; private BigDecimal loanMoney;
/** /**
* 贷款期限贷审会意见 * 贷款期限贷审会意见

@ -0,0 +1,76 @@
package com.daqing.framework.domain.guarantee.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 催收列表po类
*
* @auther River
* @date 2021/3/23 10:17
*/
@Data
@ToString
public class AlCollectionListPO implements Serializable {
/**
* id
*/
private Integer id;
/**
*客户编号
*/
private String code;
/**
* 客户名称
*/
private String name;
/**
* 逾期金额
*/
private BigDecimal overdueAmount;
/**
* 逾期利息
*/
private BigDecimal overdueInterest;
/**
* 其他费用
*/
private BigDecimal otherExpenses;
/**
* 逾期次数
*/
private Integer overduePeriods;
/**
* 催收方法
*/
private Integer collectionMethod;
/**
* 催收人id
*/
private Integer collectionUser;
/**
* 催收时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date collectionTime;
/**
* 催收反馈
*/
private String collectionFeedback;
}

@ -4,6 +4,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
/** /**
* 催熟管理数据接收 * 催熟管理数据接收
@ -43,13 +44,18 @@ public class AlCollectionPO implements Serializable {
/** /**
* 担保额度 * 担保额度
*/ */
private Double amount; private BigDecimal amount;
/** /**
* 所属部门 * 所属部门
*/ */
private String department; private String department;
/**
* 催收次数
*/
private Integer numberOfCollection;
/** /**
* 状态 * 状态
*/ */

@ -3,6 +3,8 @@ package com.daqing.framework.domain.guarantee.po;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -12,7 +14,7 @@ import java.util.Date;
*/ */
@Data @Data
@ToString @ToString
public class DgStatisticsPO { public class DgStatisticsPO implements Serializable {
/** /**
* 客户名称 * 客户名称
@ -32,7 +34,7 @@ public class DgStatisticsPO {
/** /**
* 申请额度 * 申请额度
*/ */
private Double applyAmount; private BigDecimal applyAmount;
/** /**
* 申请期限 * 申请期限

@ -4,6 +4,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -32,7 +33,7 @@ public class DgStatisticsRefusePO implements Serializable {
/** /**
* 申请额度 * 申请额度
*/ */
private Double applyAmount; private BigDecimal applyAmount;
/** /**
* 申请期限 * 申请期限

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -32,7 +33,7 @@ public class DgWorkConferencePO implements Serializable {
private String businessType; private String businessType;
@ApiModelProperty("金额") @ApiModelProperty("金额")
private Double applyAmount; private BigDecimal applyAmount;
@ApiModelProperty("期限") @ApiModelProperty("期限")
private String applyTime; private String applyTime;

@ -0,0 +1,48 @@
package com.daqing.framework.utils.excel;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
/**
* 催收管理状态转换器
*
* @auther River
* @date 2021/3/24 9:52
*/
public class CollectionConverter implements Converter<Integer> {
@Override
public Class supportJavaTypeKey() {
return Integer.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return 0;
}
@Override
public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
switch (value) {
case 1:
return new CellData("还款中");
case 2:
return new CellData("已逾期");
case 3:
return new CellData("已还清");
case 4:
return new CellData("已结项");
default:
return new CellData(String.valueOf(value));
}
}
}

@ -1,21 +1,21 @@
#服务名称 #服务名称
#spring.application.name=dq-govern-gateway spring.application.name=dq-govern-gateway
##配置中心地址 #配置中心地址
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.server-addr=192.168.31.140: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
@ -29,21 +29,21 @@ spring.servlet.multipart.max-request-size=10MB
# 正式环境(prod) # 正式环境(prod)
#服务名称 #服务名称
spring.application.name=dq-govern-gateway #spring.application.name=dq-govern-gateway
#配置中心地址 ##配置中心地址
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=68738215-903f-426c-8658-2dcd99b20009 #spring.cloud.nacos.config.namespace=68738215-903f-426c-8658-2dcd99b20009
#
spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml #spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.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.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
Loading…
Cancel
Save