parent
ff8d8ad154
commit
7ddcc0cdd5
112 changed files with 3797 additions and 847 deletions
@ -0,0 +1,32 @@ |
|||||||
|
package com.daqing.financial.config; |
||||||
|
|
||||||
|
import org.apache.commons.codec.binary.Base64; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author cool |
||||||
|
* @version V1.0 |
||||||
|
* @className Base64Encoder |
||||||
|
* @description Problem In Chair, Not In Computer. |
||||||
|
* @createDate 2018年07月09日 |
||||||
|
*/ |
||||||
|
public class Base64Encoder { |
||||||
|
|
||||||
|
/** |
||||||
|
* @param bytes |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static byte[] decode(final String bytes) { |
||||||
|
return Base64.decodeBase64(bytes); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 二进制数据编码为BASE64字符串 |
||||||
|
* |
||||||
|
* @param bytes |
||||||
|
* @return |
||||||
|
* @throws Exception |
||||||
|
*/ |
||||||
|
public static String encode(final byte[] bytes) { |
||||||
|
return new String(Base64.encodeBase64(bytes)); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,69 @@ |
|||||||
|
package com.daqing.financial.guarantee.controller; |
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.daqing.financial.guarantee.service.AlCollectionGroupService; |
||||||
|
import com.daqing.financial.guarantee.util.R; |
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionGroup; |
||||||
|
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 javax.validation.Valid; |
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后清收组 前端控制器 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@Api(value = "保后清收组", tags = "清收组管理") |
||||||
|
@RequestMapping("/al-collection-group") |
||||||
|
public class AlCollectionGroupController { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AlCollectionGroupService collectionGroupService; |
||||||
|
|
||||||
|
@ApiOperation(value = "添加或更新清收组") |
||||||
|
@PostMapping("/saveOrUpdate") |
||||||
|
public R saveOrUpdate( |
||||||
|
@ApiParam(name = "collectionGroup", value = "清收组信息", required = true) |
||||||
|
@RequestBody AlCollectionGroup collectionGroup) { |
||||||
|
String groupName = collectionGroup.getGroupName(); |
||||||
|
QueryWrapper<AlCollectionGroup> queryWrapper = new QueryWrapper<>(); |
||||||
|
queryWrapper.eq("group_name",groupName); |
||||||
|
AlCollectionGroup one = collectionGroupService.getOne(queryWrapper); |
||||||
|
if (ObjectUtil.isNotNull(one)){ |
||||||
|
return R.error().message("组名已存在"); |
||||||
|
} |
||||||
|
boolean add = collectionGroupService.saveOrUpdate(collectionGroup); |
||||||
|
return add ? R.ok() : R.error(); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiOperation(value = "清收组列表",response = IPage.class) |
||||||
|
@GetMapping("/list") |
||||||
|
public R list() { |
||||||
|
List<AlCollectionGroup> groupList = collectionGroupService.list(); |
||||||
|
return R.ok().data("groupList",groupList); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiOperation(value = "删除清收组") |
||||||
|
@PostMapping("/delete") |
||||||
|
public R delete( |
||||||
|
@ApiParam(name = "id", value = "id", required = true) |
||||||
|
@RequestParam Integer id) { |
||||||
|
boolean delete = collectionGroupService.removeById(id); |
||||||
|
return delete ? R.ok() : R.error(); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
@ -0,0 +1,160 @@ |
|||||||
|
package com.daqing.financial.guarantee.controller; |
||||||
|
|
||||||
|
|
||||||
|
import com.daqing.financial.guarantee.model.request.CollectionProgressReq; |
||||||
|
import com.daqing.financial.guarantee.model.request.EditStatisticsListReq; |
||||||
|
import com.daqing.financial.guarantee.model.request.GenerateReq; |
||||||
|
import com.daqing.financial.guarantee.model.request.StatisticsListReq; |
||||||
|
import com.daqing.financial.guarantee.model.response.CollectionGroupListResp; |
||||||
|
import com.daqing.financial.guarantee.model.response.CollectionProgressResp; |
||||||
|
import com.daqing.financial.guarantee.model.response.Personnel; |
||||||
|
import com.daqing.financial.guarantee.model.response.StatisticsGroupVo; |
||||||
|
import com.daqing.financial.guarantee.service.AlCollectionStatisticsService; |
||||||
|
import com.daqing.financial.guarantee.util.R; |
||||||
|
import com.daqing.framework.annotation.Log; |
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionStatistics; |
||||||
|
import com.daqing.framework.enums.OperationType; |
||||||
|
import com.daqing.framework.enums.OperationUnit; |
||||||
|
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.scheduling.annotation.Scheduled; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
import javax.validation.Valid; |
||||||
|
import java.io.IOException; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 前端控制器 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-19 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@RequestMapping("/al-collection-statistics") |
||||||
|
@Api(value = "保后数据统计", tags = "清收情况统计和进度查询") |
||||||
|
public class AlCollectionStatisticsController { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AlCollectionStatisticsService collectionStatisticsService; |
||||||
|
|
||||||
|
@Log(detail = "清收进度查询",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT) |
||||||
|
@PostMapping("/queryCollectionProgress") |
||||||
|
@ApiOperation(value = "清收进度查询",response = CollectionProgressResp.class) |
||||||
|
public R queryCollectionProgress(@RequestBody CollectionProgressReq collectionProgressReq){ |
||||||
|
List<CollectionProgressResp> list = collectionStatisticsService.queryCollectionProgress(collectionProgressReq); |
||||||
|
int total = collectionStatisticsService.selectCollectionProgressPageTotal(collectionProgressReq); |
||||||
|
return R.ok().data("list",list).data("total",total); |
||||||
|
} |
||||||
|
|
||||||
|
@Log(detail = "清收进度查询导出",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT) |
||||||
|
@GetMapping("/collectionProgressExport") |
||||||
|
@ApiOperation(value = "清收进度查询导出") |
||||||
|
public void collectionProgressExport( |
||||||
|
@ApiParam(name = "ids", value = "业务id", required = true) |
||||||
|
@RequestParam("ids") String ids, HttpServletResponse response){ |
||||||
|
try { |
||||||
|
collectionStatisticsService.batchExport(response,ids); |
||||||
|
} catch (IOException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@ApiOperation(value = "清收组成员列表") |
||||||
|
@PostMapping("/collectionGroupList") |
||||||
|
public R collectionGroupList(){ |
||||||
|
List<Personnel> list = collectionStatisticsService.collectionGroupList(); |
||||||
|
return R.ok().data("list",list); |
||||||
|
} |
||||||
|
|
||||||
|
@Log(detail = "生成年度统计表",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.INSERT) |
||||||
|
@PostMapping("/generateAnnualStatistics") |
||||||
|
@ApiOperation(value = "生成年度统计表") |
||||||
|
public R generateAnnualStatistics(@Valid @RequestBody GenerateReq generateReq){ |
||||||
|
boolean ok = collectionStatisticsService.selectYear(generateReq.getYear()); |
||||||
|
if (!ok){ |
||||||
|
return R.error().message("生成失败,该年度下无数据!"); |
||||||
|
} |
||||||
|
boolean exist = collectionStatisticsService.selectGenerateYear(generateReq.getYear()); |
||||||
|
if (exist && generateReq.getFlag() == 1){ |
||||||
|
return R.error().message("该年度已存在,如需增减人员请在人员选择处选择!"); |
||||||
|
} |
||||||
|
collectionStatisticsService.generateStatistics(generateReq); |
||||||
|
return R.ok(); |
||||||
|
} |
||||||
|
|
||||||
|
@Log(detail = "年度统计列表",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT) |
||||||
|
@PostMapping("/annualStatisticsList") |
||||||
|
@ApiOperation(value = "年度统计列表",response = AlCollectionStatistics.class) |
||||||
|
public R annualStatisticsList(@Valid @RequestBody StatisticsListReq statisticsListReq){ |
||||||
|
List<AlCollectionStatistics> list = collectionStatisticsService.annualStatisticsList(statisticsListReq); |
||||||
|
int total = collectionStatisticsService.annualStatisticsListTotal(statisticsListReq); |
||||||
|
//数据分组
|
||||||
|
StatisticsGroupVo groupList = new StatisticsGroupVo(); |
||||||
|
Map<Integer, List<AlCollectionStatistics>> collect = list.stream().collect(Collectors.groupingBy(AlCollectionStatistics::getGroupId)); |
||||||
|
groupList.setCollect(collect); |
||||||
|
return R.ok().data("list",list).data("groupList",groupList).data("total",total); |
||||||
|
} |
||||||
|
|
||||||
|
@Log(detail = "编辑年度统计列表",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.UPDATE) |
||||||
|
@PostMapping("/editAnnualStatistics") |
||||||
|
@ApiOperation(value = "编辑年度统计列表") |
||||||
|
public R editAnnualStatistics( |
||||||
|
@ApiParam(name = "req", value = "年度统计信息", required = true) |
||||||
|
@RequestBody EditStatisticsListReq req){ |
||||||
|
boolean update = collectionStatisticsService.updateBatchById(req.getCollectionStatistics()); |
||||||
|
return update ? R.ok() : R.error(); |
||||||
|
} |
||||||
|
|
||||||
|
@Log(detail = "年度统计列表导出",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT) |
||||||
|
@GetMapping("/annualStatisticsListExport") |
||||||
|
@ApiOperation(value = "年度统计列表导出") |
||||||
|
public void annualStatisticsListExport( |
||||||
|
@ApiParam(name = "year", value = "年份", required = true) |
||||||
|
@RequestParam("year") String year, |
||||||
|
@ApiParam(name = "flag", value = "0为组排名、1为公司排名", required = true) |
||||||
|
@RequestParam("flag") String flag, HttpServletResponse response){ |
||||||
|
try { |
||||||
|
collectionStatisticsService.annualStatisticsListExport(year,flag,response); |
||||||
|
} catch (IOException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Log(detail = "年度列表",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT) |
||||||
|
@GetMapping("/annualList") |
||||||
|
@ApiOperation(value = "年度列表") |
||||||
|
public R annualList(){ |
||||||
|
List<String> list = collectionStatisticsService.annualList(); |
||||||
|
return R.ok().data("list",list); |
||||||
|
} |
||||||
|
|
||||||
|
@Log(detail = "人员选择",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT) |
||||||
|
@GetMapping("/personnelSelection") |
||||||
|
@ApiOperation(value = "人员选择") |
||||||
|
public R personnelSelection( |
||||||
|
@ApiParam(name = "year", value = "年份", required = true) |
||||||
|
@RequestParam("year") String year){ |
||||||
|
List<Integer> list = collectionStatisticsService.personnelSelection(year); |
||||||
|
return R.ok().data("list",list); |
||||||
|
} |
||||||
|
|
||||||
|
@Log(detail = "年度统计删除",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.DELETE) |
||||||
|
@PostMapping("/annualStatisticsDeleted") |
||||||
|
@ApiOperation(value = "年度统计删除") |
||||||
|
public R annualStatisticsDeleted( |
||||||
|
@ApiParam(name = "year", value = "年份", required = true) |
||||||
|
@RequestParam("year") String year){ |
||||||
|
boolean delete = collectionStatisticsService.annualStatisticsDeleted(year); |
||||||
|
return delete ? R.ok() : R.error(); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
@ -0,0 +1,50 @@ |
|||||||
|
package com.daqing.financial.guarantee.controller; |
||||||
|
|
||||||
|
|
||||||
|
import com.daqing.financial.guarantee.service.AlReimbursementService; |
||||||
|
import com.daqing.financial.guarantee.util.R; |
||||||
|
import com.daqing.framework.annotation.Log; |
||||||
|
import com.daqing.framework.domain.guarantee.AlReimbursement; |
||||||
|
import com.daqing.framework.enums.OperationType; |
||||||
|
import com.daqing.framework.enums.OperationUnit; |
||||||
|
import com.daqing.framework.model.response.ResponseResult; |
||||||
|
import com.daqing.framework.utils.PageUtils; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后代偿清收相关信息 前端控制器 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
@Api(tags = {"保后代偿清收相关信息"}) |
||||||
|
@RestController |
||||||
|
@RequestMapping("/al-reimbursement") |
||||||
|
public class AlReimbursementController { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AlReimbursementService reimbursementService; |
||||||
|
|
||||||
|
@GetMapping("/modifyReimbursement") |
||||||
|
@ApiOperation(value = "保后代偿清收是否修改") |
||||||
|
public R modifyReimbursement( |
||||||
|
@RequestParam(value = "id", required = false) Integer id, |
||||||
|
@RequestParam(value = "collectionGroupId", required = false) Integer collectionGroupId, |
||||||
|
@RequestParam(value = "personLiableId", required = false) Integer personLiableId){ |
||||||
|
AlReimbursement reimbursement = reimbursementService.getById(id); |
||||||
|
if (!reimbursement.getCollectionGroupId().equals(collectionGroupId)||!reimbursement.getPersonLiableId().equals(personLiableId)){ |
||||||
|
return R.ok().message("更换清收人或清收组会影响已生成的的年度统计信息,该清收负责人需手动重新生成!"); |
||||||
|
} |
||||||
|
return R.ok(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
@ -0,0 +1,18 @@ |
|||||||
|
package com.daqing.financial.guarantee.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionGroup; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后清收组 Mapper 接口 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
@Mapper |
||||||
|
public interface AlCollectionGroupMapper extends BaseMapper<AlCollectionGroup> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,56 @@ |
|||||||
|
package com.daqing.financial.guarantee.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import com.daqing.financial.guarantee.model.request.CollectionProgressReq; |
||||||
|
import com.daqing.financial.guarantee.model.request.StatisticsListReq; |
||||||
|
import com.daqing.financial.guarantee.model.response.CollectionProgressResp; |
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionStatistics; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* Mapper 接口 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-19 |
||||||
|
*/ |
||||||
|
@Mapper |
||||||
|
public interface AlCollectionStatisticsMapper extends BaseMapper<AlCollectionStatistics> { |
||||||
|
|
||||||
|
List<CollectionProgressResp> selectCollectionProgressPage(@Param(value = "cpr") CollectionProgressReq collectionProgressReq); |
||||||
|
|
||||||
|
int selectCollectionProgressPageTotal(@Param(value = "cpr") CollectionProgressReq collectionProgressReq); |
||||||
|
|
||||||
|
List<CollectionProgressResp> selectBatchData(@Param(value = "ids")List<String> idList); |
||||||
|
|
||||||
|
String selectJobNumber(Integer personLiableId); |
||||||
|
|
||||||
|
List<String> selectAnnualList(); |
||||||
|
|
||||||
|
List<AlCollectionStatistics> selectAnnualStatisticsList(@Param(value = "slr")StatisticsListReq statisticsListReq); |
||||||
|
|
||||||
|
List<AlCollectionStatistics> selectAnnualStatisticsListByPersonSort(); |
||||||
|
|
||||||
|
int selectAnnualStatisticsListTotal(@Param(value = "slr")StatisticsListReq statisticsListReq); |
||||||
|
|
||||||
|
int deleteAnnualStatistics(String year); |
||||||
|
|
||||||
|
int selectStatisticsYear(String year); |
||||||
|
|
||||||
|
int selectGenerateYear(String year); |
||||||
|
|
||||||
|
List<Integer> selectYearPerson(String year); |
||||||
|
|
||||||
|
void truncate(); |
||||||
|
|
||||||
|
List<Integer> selectGroupList(Integer id); |
||||||
|
|
||||||
|
ArrayList<Integer> selectPerson(); |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
package com.daqing.financial.guarantee.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.daqing.financial.guarantee.model.response.CollectionGroupListResp; |
||||||
|
import com.daqing.financial.guarantee.model.response.Personnel; |
||||||
|
import com.daqing.framework.domain.guarantee.AlReimbursement; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后代偿清收相关信息 Mapper 接口 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
@Mapper |
||||||
|
public interface AlReimbursementMapper extends BaseMapper<AlReimbursement> { |
||||||
|
|
||||||
|
List<AlReimbursement> selectListByYear(@Param("year")String year,@Param("ids")List<Integer> personLiableIds); |
||||||
|
|
||||||
|
List<Personnel> selectPersonnelList(); |
||||||
|
} |
@ -1,115 +0,0 @@ |
|||||||
package com.daqing.financial.guarantee.model.request; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import lombok.Data; |
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.util.Date; |
|
||||||
|
|
||||||
/** |
|
||||||
* <p> |
|
||||||
* 还款记录表 |
|
||||||
* </p> |
|
||||||
* |
|
||||||
* @author Qyq |
|
||||||
* @since 2021-03-17 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName("al_repayment_entry") |
|
||||||
public class AlRepaymentEntryReq implements Serializable { |
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
/** |
|
||||||
* 主键id |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "主键id") |
|
||||||
@TableId(value = "id", type = IdType.AUTO) |
|
||||||
private Integer id; |
|
||||||
|
|
||||||
/** |
|
||||||
* 保后外键id |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "保后外键id") |
|
||||||
private Integer insuranceId; |
|
||||||
|
|
||||||
/** |
|
||||||
* 应还款日 |
|
||||||
*/ |
|
||||||
@NotNull(message = "应还款日不能为空") |
|
||||||
@ApiModelProperty(value = "应还款日") |
|
||||||
private Date repaymentDate; |
|
||||||
|
|
||||||
/** |
|
||||||
* 实际还款日 |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "实际还款日") |
|
||||||
private Date actualRepaymentDate; |
|
||||||
|
|
||||||
/** |
|
||||||
* 逾期天数 |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "逾期天数") |
|
||||||
private Integer overdueDays; |
|
||||||
|
|
||||||
/** |
|
||||||
* 还款总额(元) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "还款总额(元)") |
|
||||||
private BigDecimal totalRepayment; |
|
||||||
|
|
||||||
/** |
|
||||||
* 本次还款(元) |
|
||||||
*/ |
|
||||||
@NotNull(message = "本次还款不能为空") |
|
||||||
@ApiModelProperty(value = "本次还款(元)") |
|
||||||
private BigDecimal currentRepayment; |
|
||||||
|
|
||||||
/** |
|
||||||
* 利息(元) |
|
||||||
*/ |
|
||||||
@NotNull(message = "利息不能为空") |
|
||||||
@ApiModelProperty(value = "利息(元)") |
|
||||||
private BigDecimal interest; |
|
||||||
|
|
||||||
/** |
|
||||||
* 其他费用(元) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "其他费用(元)") |
|
||||||
private BigDecimal otherExpenses; |
|
||||||
|
|
||||||
/** |
|
||||||
* 减免金额(元) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "减免金额(元)") |
|
||||||
private BigDecimal deductionAmount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 还款备注 |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "还款备注") |
|
||||||
private String repaymentNotes; |
|
||||||
|
|
||||||
/** |
|
||||||
* 还款状态:1->待还款;2->已还款;3->已逾期;4->未到期; |
|
||||||
*/ |
|
||||||
/* @ApiModelProperty(value = "还款状态:1->待还款;2->已还款;3->已逾期;4->未到期;") |
|
||||||
private Integer repaymentStatus;*/ |
|
||||||
|
|
||||||
/** |
|
||||||
* 创建时间 |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "创建时间") |
|
||||||
@TableField(fill= FieldFill.INSERT) |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改时间 |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value = "修改时间") |
|
||||||
@TableField(fill= FieldFill.INSERT_UPDATE) |
|
||||||
private Date updateTime; |
|
||||||
} |
|
@ -0,0 +1,52 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.request; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/20 9:58 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class CollectionProgressReq { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "页号") |
||||||
|
private Integer page; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "页数") |
||||||
|
private Integer size; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "区域") |
||||||
|
private String area; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "经营情况") |
||||||
|
private String operation; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "贷款银行") |
||||||
|
private String bank; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "金额范围符号") |
||||||
|
private String amountSymbol; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿金额") |
||||||
|
private BigDecimal compensationAmount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "余额范围符号") |
||||||
|
private String balanceSymbol; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿余额") |
||||||
|
private BigDecimal compensatoryBalance; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿开始时间") |
||||||
|
private String compensatoryStartTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿结束时间") |
||||||
|
private String compensatoryEndTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "查询条件<企业名称、清收负责人、业务编号>") |
||||||
|
private String queryCondition; |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.request; |
||||||
|
|
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionStatistics; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/31 17:05 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class EditStatisticsListReq implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 2L; |
||||||
|
|
||||||
|
private List<AlCollectionStatistics> collectionStatistics; |
||||||
|
} |
@ -0,0 +1,112 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.request; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore; |
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.daqing.financial.guarantee.util.ExcelAttribute; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/9/2 11:20 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class ExcelImpInsuranceVO { |
||||||
|
|
||||||
|
//第几行
|
||||||
|
@ExcelIgnore |
||||||
|
private Long index; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 0) |
||||||
|
@ApiModelProperty(value = "客户名称") |
||||||
|
@ExcelProperty(value = "客户名称",index = 0) |
||||||
|
private String customerName; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 1) |
||||||
|
@ExcelProperty(value = "贷款银行",index = 1) |
||||||
|
@ApiModelProperty(value = "贷款银行") |
||||||
|
private String bank; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 2) |
||||||
|
@ExcelProperty(value = "担保额度/贷款金额",index = 2) |
||||||
|
@ApiModelProperty(value = "担保额度/贷款金额") |
||||||
|
private String guaranteeAmount; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 3) |
||||||
|
@ExcelProperty(value = "贷款开始日期",index = 3) |
||||||
|
@ApiModelProperty(value = "贷款开始日期") |
||||||
|
private String loanStartTime; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 4) |
||||||
|
@ExcelProperty(value = "贷款结束日期",index = 4) |
||||||
|
@ApiModelProperty(value = "贷款结束日期") |
||||||
|
private String loanEndTime; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 5) |
||||||
|
@ExcelProperty(value = "担保期限",index = 5) |
||||||
|
@ApiModelProperty(value = "担保期限") |
||||||
|
private String guaranteeTime; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 6) |
||||||
|
@ExcelProperty(value = "业务类别",index = 6) |
||||||
|
@ApiModelProperty(value = "业务类别") |
||||||
|
private String businessType; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 7) |
||||||
|
@ExcelProperty(value = "贷款用途",index = 7) |
||||||
|
@ApiModelProperty(value = "贷款用途") |
||||||
|
private String amountWide; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 8) |
||||||
|
@ExcelProperty(value = "代偿金额",index = 8) |
||||||
|
@ApiModelProperty(value = "代偿金额") |
||||||
|
private String compensationAmount; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 9) |
||||||
|
@ExcelProperty(value = "代偿余额",index = 9) |
||||||
|
@ApiModelProperty(value = "代偿余额") |
||||||
|
private String compensatoryBalance; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 10) |
||||||
|
@ExcelProperty(value = "代偿时间",index = 10) |
||||||
|
@ApiModelProperty(value = "代偿时间") |
||||||
|
private String compensatoryTime; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 11) |
||||||
|
@ExcelProperty(value = "清收负责人",index = 11) |
||||||
|
@ApiModelProperty(value = "清收负责人") |
||||||
|
private String personLiable; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 12) |
||||||
|
@ExcelProperty(value = "所属清收组",index = 12) |
||||||
|
@ApiModelProperty(value = "所属清收组") |
||||||
|
private String collectionGroup; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 13) |
||||||
|
@ExcelProperty(value = "所在区域",index = 13) |
||||||
|
@ApiModelProperty(value = "所在区域") |
||||||
|
private String area; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 14) |
||||||
|
@ExcelProperty(value = "经营情况",index = 14) |
||||||
|
@ApiModelProperty(value = "经营情况") |
||||||
|
private String operation; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 15) |
||||||
|
@ExcelProperty(value = "诉讼情况",index = 15) |
||||||
|
@ApiModelProperty(value = "诉讼情况") |
||||||
|
private String litigation; |
||||||
|
|
||||||
|
@ExcelAttribute(sort = 16) |
||||||
|
@ExcelProperty(value = "抵押情况",index = 16) |
||||||
|
@ApiModelProperty(value = "抵押情况") |
||||||
|
private String mortgage; |
||||||
|
|
||||||
|
@ApiModelProperty("失败原因") |
||||||
|
@ExcelAttribute(sort = 17) |
||||||
|
@ExcelProperty(value = "失败原因",index = 17) |
||||||
|
private String failureMsg; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.request; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/26 14:18 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class GenerateReq { |
||||||
|
|
||||||
|
@ApiModelProperty("年份") |
||||||
|
@NotNull(message = "请选择年份") |
||||||
|
private String year; |
||||||
|
|
||||||
|
@ApiModelProperty("人员生成标识") |
||||||
|
private int flag; |
||||||
|
|
||||||
|
@ApiModelProperty("人员ids") |
||||||
|
@NotNull(message = "请选择生成人员") |
||||||
|
private List<Integer> personLiableIds; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,34 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.request; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/9/1 17:53 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
/*public class ImportInsuranceVO implements ExcelConsumeInterface { |
||||||
|
|
||||||
|
*//**
|
||||||
|
* when error will 调用 |
||||||
|
*//*
|
||||||
|
@Override |
||||||
|
public void error(ExcelError excelError) { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void validData(String workbookId, List<ExcelSheetData> sheetDataList, Map<Serializable, Object> excelParam) { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void end(List<ExcelSheetData> sheetDataList, Map<Serializable, Object> excelParam) { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
}*/ |
@ -0,0 +1,22 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.request; |
||||||
|
|
||||||
|
import com.daqing.framework.domain.guarantee.AlInsuranceList; |
||||||
|
import com.daqing.framework.domain.guarantee.AlReimbursement; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/13 15:59 |
||||||
|
* @Version 1.0 |
||||||
|
* 保后业务添加实体类 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class InsuranceSaveReq { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "担保信息") |
||||||
|
private AlInsuranceList alInsuranceList; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "保后代偿清收相关信息") |
||||||
|
private AlReimbursement alReimbursement; |
||||||
|
} |
@ -0,0 +1,40 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.request; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import javax.validation.constraints.Max; |
||||||
|
import javax.validation.constraints.Min; |
||||||
|
import javax.validation.constraints.NotNull; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/30 11:21 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class StatisticsListReq { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "年份") |
||||||
|
@NotNull(message = "请选择年份") |
||||||
|
private String year; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收组id") |
||||||
|
private String groupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "比例范围符号") |
||||||
|
private String proportionSymbol; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "比例") |
||||||
|
private String proportion; |
||||||
|
|
||||||
|
// @ApiModelProperty(value = "清收总额范围符号")
|
||||||
|
// private String totalCollectionSymbol;
|
||||||
|
//
|
||||||
|
// @ApiModelProperty(value = "清收总额")
|
||||||
|
// private String totalCollection;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "查询条件<工号、清收负责人、清收企业>") |
||||||
|
private String queryCondition; |
||||||
|
|
||||||
|
} |
@ -1,147 +0,0 @@ |
|||||||
package com.daqing.financial.guarantee.model.response; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnore; |
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.metadata.BaseRowModel; |
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import com.daqing.framework.utils.excel.InsuranceStatusConverter; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.ToString; |
|
||||||
|
|
||||||
import java.io.Serializable; |
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.util.Date; |
|
||||||
|
|
||||||
/** |
|
||||||
* <p> |
|
||||||
* 保后管理列表 |
|
||||||
* </p> |
|
||||||
* |
|
||||||
* @author Qyq |
|
||||||
* @since 2021-03-17 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@ToString |
|
||||||
public class AlInsuranceListRes extends BaseRowModel implements Serializable { |
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
/** |
|
||||||
* 主键id |
|
||||||
*/ |
|
||||||
@ExcelIgnore |
|
||||||
@ApiModelProperty(value = "企业id") |
|
||||||
@TableId(value = "id", type = IdType.AUTO) |
|
||||||
private Integer id; |
|
||||||
|
|
||||||
/** |
|
||||||
* 业务编号 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "业务编号",index = 0) |
|
||||||
@ApiModelProperty(value = "业务编号") |
|
||||||
private String businessCode; |
|
||||||
|
|
||||||
/** |
|
||||||
* 客户名称 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "客户名称",index = 1) |
|
||||||
@ApiModelProperty(value = "客户名称") |
|
||||||
private String customerName; |
|
||||||
|
|
||||||
/** |
|
||||||
* 联系电话 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "联系电话",index = 2) |
|
||||||
@ApiModelProperty(value = "联系电话") |
|
||||||
private String phone; |
|
||||||
|
|
||||||
/** |
|
||||||
* 业务类别 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "业务类型",index = 3) |
|
||||||
@ApiModelProperty(value = "业务类别") |
|
||||||
private String businessType; |
|
||||||
|
|
||||||
/** |
|
||||||
* 担保额度(元) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "担保额度(元)",index = 4) |
|
||||||
@ApiModelProperty(value = "担保额度(元)") |
|
||||||
private BigDecimal guaranteeAmount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 担保期限 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "担保期限",index = 5) |
|
||||||
@ApiModelProperty(value = "担保期限") |
|
||||||
private String guaranteeTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 申请日期 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "申请日期",index = 6) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|
||||||
@ApiModelProperty(value = "申请日期") |
|
||||||
private Date applyTime; |
|
||||||
|
|
||||||
@ExcelIgnore |
|
||||||
@ApiModelProperty(value = "贷款银行(用中划线隔开)") |
|
||||||
private String bank; |
|
||||||
|
|
||||||
@ExcelIgnore |
|
||||||
@ApiModelProperty(value = "贷款用途") |
|
||||||
private String amountWide; |
|
||||||
|
|
||||||
/** |
|
||||||
* 还款额度(元) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "还款额度(元)",index = 7) |
|
||||||
@ApiModelProperty(value = "还款额度(元)") |
|
||||||
private BigDecimal repaymentAmount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 剩余额度(元) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "剩余额度(元)",index = 8) |
|
||||||
@ApiModelProperty(value = "剩余额度(元)") |
|
||||||
private BigDecimal remainAmount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 还款期数 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "还款期数",index = 9) |
|
||||||
@ApiModelProperty(value = "还款期数") |
|
||||||
private String repaymentTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 所属部门 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "所属部门",index = 10) |
|
||||||
@ApiModelProperty(value = "所属部门") |
|
||||||
private String department; |
|
||||||
|
|
||||||
/** |
|
||||||
* 还款状态:1->还款中;2->已逾期;3->已还清;4->已结项; |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = "还款状态",index = 11,converter = InsuranceStatusConverter.class) |
|
||||||
@ApiModelProperty(value = "还款状态:1->还款中;2->已逾期;3->已还清;4->已结项;") |
|
||||||
private Integer paymentStatus; |
|
||||||
|
|
||||||
/** |
|
||||||
* 创建时间 |
|
||||||
*/ |
|
||||||
@ExcelIgnore |
|
||||||
@ApiModelProperty(value = "创建时间") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改时间 |
|
||||||
*/ |
|
||||||
@ExcelIgnore |
|
||||||
@ApiModelProperty(value = "修改时间") |
|
||||||
private Date updateTime; |
|
||||||
} |
|
@ -0,0 +1,26 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.response; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/26 16:40 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class CollectionGroupListResp { |
||||||
|
|
||||||
|
/* @ApiModelProperty(value = "组id") |
||||||
|
private String id; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "组名") |
||||||
|
private String name;*/ |
||||||
|
|
||||||
|
@ApiModelProperty(value = "组内人员") |
||||||
|
private List<Personnel> personnel; |
||||||
|
|
||||||
|
} |
||||||
|
|
@ -0,0 +1,93 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.response; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore; |
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/20 15:11 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class CollectionProgressResp { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键id") |
||||||
|
@ExcelIgnore |
||||||
|
private Integer id; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "业务编号") |
||||||
|
@ExcelProperty(value = "业务编号",index = 0) |
||||||
|
private String businessCode; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "客户名称") |
||||||
|
@ExcelProperty(value = "企业名称",index = 1) |
||||||
|
private String customerName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "法人-姓名") |
||||||
|
@ExcelProperty(value = "法定代表人",index = 2) |
||||||
|
private String legalName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "联系电话") |
||||||
|
@ExcelProperty(value = "联系电话",index = 3) |
||||||
|
private String phone; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "贷款银行(用中划线隔开)") |
||||||
|
@ExcelProperty(value = "贷款银行",index = 4) |
||||||
|
private String bank; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "贷款金额(元)") |
||||||
|
@ExcelProperty(value = "贷款金额(元)",index = 5) |
||||||
|
private BigDecimal guaranteeAmount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "贷款期限") |
||||||
|
@ExcelProperty(value = "贷款期限",index = 6) |
||||||
|
private String guaranteeTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿时间") |
||||||
|
@ExcelProperty(value = "代偿时间",index = 7) |
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||||
|
private Date compensatoryTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿金额(元)") |
||||||
|
@ExcelProperty(value = "代偿金额(元)",index = 8) |
||||||
|
private BigDecimal compensationAmount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿余额(元)") |
||||||
|
@ExcelProperty(value = "代偿余额(元)",index = 9) |
||||||
|
private BigDecimal compensatoryBalance; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "抵押情况") |
||||||
|
@ExcelProperty(value = "抵押情况",index = 10) |
||||||
|
private String mortgage; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "诉讼情况") |
||||||
|
@ExcelProperty(value = "诉讼情况",index = 11) |
||||||
|
private String litigation; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "经营情况") |
||||||
|
@ExcelProperty(value = "经营情况",index = 12) |
||||||
|
private String operation; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在区域") |
||||||
|
@ExcelProperty(value = "所在区域",index = 13) |
||||||
|
private String area; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清偿方式") |
||||||
|
@ExcelProperty(value = "清偿方式",index = 14) |
||||||
|
private String repaymentMethod; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收负责人") |
||||||
|
@ExcelProperty(value = "清收负责人",index = 15) |
||||||
|
private String personLiable; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注") |
||||||
|
@ExcelProperty(value = "备注",index = 16) |
||||||
|
private String repaymentNotes; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.response; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/9/3 15:29 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class LegalVo { |
||||||
|
|
||||||
|
private String legalPhone; |
||||||
|
private String legalName; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.response; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/30 16:00 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class OtherStatistics { |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收企业") |
||||||
|
private String enterprise; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收现金") |
||||||
|
private BigDecimal cash; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收资产") |
||||||
|
private BigDecimal assets; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "回款时间") |
||||||
|
private Date collectionTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "已清收总金额") |
||||||
|
private BigDecimal totalAmount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "完成比例") |
||||||
|
private String proportion; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注") |
||||||
|
private String description; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,13 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.response; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/9/6 14:04 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class PersonLiableResp { |
||||||
|
private Integer id; |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.response; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/8/26 18:13 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class Personnel{ |
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员id") |
||||||
|
private String id; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员名字") |
||||||
|
private String name; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
package com.daqing.financial.guarantee.model.response; |
||||||
|
|
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionStatistics; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/9/15 14:10 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class StatisticsGroupVo { |
||||||
|
|
||||||
|
private Map<Integer, List<AlCollectionStatistics>> collect; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
package com.daqing.financial.guarantee.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionGroup; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后清收组 服务类 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
public interface AlCollectionGroupService extends IService<AlCollectionGroup> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,53 @@ |
|||||||
|
package com.daqing.financial.guarantee.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||||
|
import com.daqing.financial.guarantee.model.request.CollectionProgressReq; |
||||||
|
import com.daqing.financial.guarantee.model.request.GenerateReq; |
||||||
|
import com.daqing.financial.guarantee.model.request.StatisticsListReq; |
||||||
|
import com.daqing.financial.guarantee.model.response.CollectionGroupListResp; |
||||||
|
import com.daqing.financial.guarantee.model.response.CollectionProgressResp; |
||||||
|
import com.daqing.financial.guarantee.model.response.Personnel; |
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionStatistics; |
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
import java.io.IOException; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 服务类 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-19 |
||||||
|
*/ |
||||||
|
public interface AlCollectionStatisticsService extends IService<AlCollectionStatistics> { |
||||||
|
|
||||||
|
List<CollectionProgressResp> queryCollectionProgress(CollectionProgressReq collectionProgressReq); |
||||||
|
|
||||||
|
int selectCollectionProgressPageTotal(CollectionProgressReq collectionProgressReq); |
||||||
|
|
||||||
|
void batchExport(HttpServletResponse response, String ids) throws IOException; |
||||||
|
|
||||||
|
void generateStatistics(GenerateReq generateReq); |
||||||
|
|
||||||
|
List<Personnel> collectionGroupList(); |
||||||
|
|
||||||
|
List<AlCollectionStatistics> annualStatisticsList(StatisticsListReq statisticsListReq); |
||||||
|
|
||||||
|
List<String> annualList(); |
||||||
|
|
||||||
|
int annualStatisticsListTotal(StatisticsListReq statisticsListReq); |
||||||
|
|
||||||
|
void annualStatisticsListExport(String year,String flag,HttpServletResponse response) throws IOException; |
||||||
|
|
||||||
|
List<Integer> personnelSelection(String year); |
||||||
|
|
||||||
|
boolean annualStatisticsDeleted(String year); |
||||||
|
|
||||||
|
boolean selectYear(String year); |
||||||
|
|
||||||
|
boolean selectGenerateYear(String year); |
||||||
|
|
||||||
|
void updateCompleteStatistics(Integer repaymentId); |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
package com.daqing.financial.guarantee.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||||
|
import com.daqing.framework.domain.guarantee.AlReimbursement; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后代偿清收相关信息 服务类 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
public interface AlReimbursementService extends IService<AlReimbursement> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,21 @@ |
|||||||
|
package com.daqing.financial.guarantee.service.impl; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import com.daqing.financial.guarantee.mapper.AlCollectionGroupMapper; |
||||||
|
import com.daqing.financial.guarantee.service.AlCollectionGroupService; |
||||||
|
import com.daqing.framework.domain.guarantee.AlCollectionGroup; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后清收组 服务实现类 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class AlCollectionGroupServiceImpl extends ServiceImpl<AlCollectionGroupMapper, AlCollectionGroup> implements AlCollectionGroupService { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,418 @@ |
|||||||
|
package com.daqing.financial.guarantee.service.impl; |
||||||
|
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil; |
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams; |
||||||
|
import cn.hutool.core.util.ObjectUtil; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import com.daqing.financial.guarantee.mapper.*; |
||||||
|
import com.daqing.financial.guarantee.model.request.CollectionProgressReq; |
||||||
|
import com.daqing.financial.guarantee.model.request.GenerateReq; |
||||||
|
import com.daqing.financial.guarantee.model.request.StatisticsListReq; |
||||||
|
import com.daqing.financial.guarantee.model.response.*; |
||||||
|
import com.daqing.financial.guarantee.service.AlCollectionStatisticsService; |
||||||
|
import com.daqing.framework.domain.guarantee.*; |
||||||
|
import com.daqing.framework.utils.excel.EasyExcelUtil; |
||||||
|
import com.google.common.collect.Lists; |
||||||
|
import org.apache.commons.lang3.StringUtils; |
||||||
|
import org.apache.poi.ss.usermodel.Workbook; |
||||||
|
import org.apache.poi.util.StringUtil; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import org.springframework.transaction.annotation.Transactional; |
||||||
|
|
||||||
|
import javax.servlet.ServletOutputStream; |
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
import java.io.IOException; |
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.net.URLEncoder; |
||||||
|
import java.text.DecimalFormat; |
||||||
|
import java.text.NumberFormat; |
||||||
|
import java.util.*; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 服务实现类 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-19 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class AlCollectionStatisticsServiceImpl extends ServiceImpl<AlCollectionStatisticsMapper, AlCollectionStatistics> implements AlCollectionStatisticsService { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AlRepaymentEntryMapper repaymentEntryMapper; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AlReimbursementMapper reimbursementMapper; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AlInsuranceListMapper insuranceListMapper; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AlCollectionGroupMapper collectionGroupMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<CollectionProgressResp> queryCollectionProgress(CollectionProgressReq collectionProgressReq) { |
||||||
|
collectionProgressReq.setPage((collectionProgressReq.getPage()-1)*collectionProgressReq.getSize()); |
||||||
|
List<CollectionProgressResp> pageList = baseMapper.selectCollectionProgressPage(collectionProgressReq); |
||||||
|
for (CollectionProgressResp collectionProgressResp : pageList) { |
||||||
|
//查询业务还款信息
|
||||||
|
QueryWrapper<AlRepaymentEntry> wrapper = new QueryWrapper<>(); |
||||||
|
wrapper.eq("insurance_id", collectionProgressResp.getId()); |
||||||
|
List<AlRepaymentEntry> repaymentEntryList = repaymentEntryMapper.selectList(wrapper); |
||||||
|
ArrayList<String> repaymentNotes = Lists.newArrayList(); |
||||||
|
for (AlRepaymentEntry repaymentEntry : repaymentEntryList) { |
||||||
|
if (repaymentEntry.getRepaymentCash() != null && repaymentEntry.getRepaymentCash().compareTo(BigDecimal.ZERO) != 0) { |
||||||
|
if (!repaymentNotes.contains("现金")) { |
||||||
|
repaymentNotes.add("现金"); |
||||||
|
} |
||||||
|
} |
||||||
|
if (repaymentEntry.getRepaymentAssetsAmount() != null && repaymentEntry.getRepaymentAssetsAmount().compareTo(BigDecimal.ZERO) != 0) { |
||||||
|
if (!repaymentNotes.contains("资产")) { |
||||||
|
repaymentNotes.add("资产"); |
||||||
|
} |
||||||
|
} |
||||||
|
if (repaymentEntry.getRepaymentOtherAmount() != null && repaymentEntry.getRepaymentOtherAmount().compareTo(BigDecimal.ZERO) != 0) { |
||||||
|
if (!repaymentNotes.contains("其他")) { |
||||||
|
repaymentNotes.add("其他"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
collectionProgressResp.setRepaymentMethod(repaymentNotes.toString()); |
||||||
|
} |
||||||
|
return pageList; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int selectCollectionProgressPageTotal(CollectionProgressReq collectionProgressReq) { |
||||||
|
return baseMapper.selectCollectionProgressPageTotal(collectionProgressReq); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void batchExport(HttpServletResponse response, String ids) throws IOException { |
||||||
|
List<String> idList= new ArrayList<>(); |
||||||
|
if(ids!=null && !"".equals(ids)){ |
||||||
|
String[] id = ids.split(","); |
||||||
|
idList = Arrays.asList(id); |
||||||
|
} |
||||||
|
List<CollectionProgressResp> excelDataList = baseMapper.selectBatchData(idList); |
||||||
|
for (CollectionProgressResp collectionProgressResp : excelDataList) { |
||||||
|
//查询业务还款信息
|
||||||
|
QueryWrapper<AlRepaymentEntry> wrapper = new QueryWrapper<>(); |
||||||
|
wrapper.eq("insurance_id", collectionProgressResp.getId()); |
||||||
|
List<AlRepaymentEntry> repaymentEntryList = repaymentEntryMapper.selectList(wrapper); |
||||||
|
String note = ""; |
||||||
|
for (AlRepaymentEntry repaymentEntry : repaymentEntryList) { |
||||||
|
ArrayList<String> repaymentNotes = Lists.newArrayList(); |
||||||
|
if (repaymentEntry.getRepaymentCash() != null && repaymentEntry.getRepaymentCash().compareTo(BigDecimal.ZERO) != 0) { |
||||||
|
if (!repaymentNotes.contains("现金")) { |
||||||
|
repaymentNotes.add("现金"); |
||||||
|
} |
||||||
|
} |
||||||
|
if (repaymentEntry.getRepaymentAssetsAmount() != null && repaymentEntry.getRepaymentAssetsAmount().compareTo(BigDecimal.ZERO) != 0) { |
||||||
|
if (!repaymentNotes.contains("资产")) { |
||||||
|
repaymentNotes.add("资产"); |
||||||
|
} |
||||||
|
} |
||||||
|
if (repaymentEntry.getRepaymentOtherAmount() != null && repaymentEntry.getRepaymentOtherAmount().compareTo(BigDecimal.ZERO) != 0) { |
||||||
|
if (!repaymentNotes.contains("其他")) { |
||||||
|
repaymentNotes.add("其他"); |
||||||
|
} |
||||||
|
} |
||||||
|
note = repaymentNotes.toString(); |
||||||
|
} |
||||||
|
collectionProgressResp.setRepaymentMethod(note); |
||||||
|
} |
||||||
|
EasyExcelUtil.download(response,CollectionProgressResp.class,excelDataList,"清收工作进度列表","第一页"); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
@Transactional |
||||||
|
public void generateStatistics(GenerateReq generateReq) { |
||||||
|
//根据年份和负责人id筛选数据
|
||||||
|
String year = generateReq.getYear(); |
||||||
|
List<Integer> personLiableIds = generateReq.getPersonLiableIds(); |
||||||
|
|
||||||
|
|
||||||
|
//有人员id生成数据
|
||||||
|
if (personLiableIds.size() > 0){ |
||||||
|
List<AlReimbursement> reimbursementList = reimbursementMapper.selectListByYear(year,personLiableIds); |
||||||
|
for (AlReimbursement reimbursement : reimbursementList){ |
||||||
|
AlCollectionStatistics collectionStatistics = new AlCollectionStatistics(); |
||||||
|
Integer collectionGroupId = reimbursement.getCollectionGroupId(); |
||||||
|
Integer personLiableId = reimbursement.getPersonLiableId(); |
||||||
|
String personLiable = reimbursement.getPersonLiable(); |
||||||
|
Integer insuranceId = reimbursement.getInsuranceId(); |
||||||
|
//查询工号
|
||||||
|
String jobNumber = baseMapper.selectJobNumber(reimbursement.getPersonLiableId()); |
||||||
|
//查询企业
|
||||||
|
AlInsuranceList alInsuranceList = insuranceListMapper.selectById(insuranceId); |
||||||
|
String customerName = alInsuranceList.getCustomerName(); |
||||||
|
//业务担保额度
|
||||||
|
// BigDecimal guaranteeAmount = alInsuranceList.getGuaranteeAmount();
|
||||||
|
//统计业务还款记录清收现金和资产
|
||||||
|
QueryWrapper<AlRepaymentEntry> repaymentEntryWrapper = new QueryWrapper<>(); |
||||||
|
repaymentEntryWrapper.eq("insurance_id",insuranceId).orderByAsc("id"); |
||||||
|
List<AlRepaymentEntry> repaymentEntryList = repaymentEntryMapper.selectList(repaymentEntryWrapper); |
||||||
|
//清收现金
|
||||||
|
BigDecimal repaymentCash = new BigDecimal(0); |
||||||
|
//清收资产
|
||||||
|
BigDecimal repaymentAssets = new BigDecimal(0); |
||||||
|
StringBuilder note = new StringBuilder(); |
||||||
|
for (AlRepaymentEntry repaymentEntry: repaymentEntryList){ |
||||||
|
//无实际还款日不加入年度统计
|
||||||
|
if (repaymentEntry.getActualRepaymentDate()==null){ |
||||||
|
continue; |
||||||
|
} |
||||||
|
if (repaymentEntry.getRepaymentCash()!=null){ |
||||||
|
repaymentCash = repaymentCash.add(repaymentEntry.getRepaymentCash()); |
||||||
|
} |
||||||
|
if (repaymentEntry.getRepaymentAssetsAmount()!=null){ |
||||||
|
repaymentAssets = repaymentAssets.add(repaymentEntry.getRepaymentAssetsAmount()); |
||||||
|
} |
||||||
|
if (repaymentEntry.getRepaymentOtherAmount()!=null){ |
||||||
|
//其他金额加入清收资产中
|
||||||
|
repaymentAssets = repaymentAssets.add(repaymentEntry.getRepaymentOtherAmount()); |
||||||
|
} |
||||||
|
collectionStatistics.setCollectionTime(repaymentEntry.getActualRepaymentDate()); |
||||||
|
if (repaymentEntry.getRepaymentNotes()!=null){ |
||||||
|
note.append(repaymentEntry.getRepaymentNotes()); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
collectionStatistics.setGroupId(collectionGroupId); |
||||||
|
collectionStatistics.setInsuranceId(insuranceId); |
||||||
|
collectionStatistics.setPersonLiable(personLiable); |
||||||
|
collectionStatistics.setPersonLiableId(personLiableId); |
||||||
|
collectionStatistics.setJobNumber(jobNumber); |
||||||
|
collectionStatistics.setEnterprise(customerName); |
||||||
|
collectionStatistics.setCash(repaymentCash); |
||||||
|
collectionStatistics.setAssets(repaymentAssets); |
||||||
|
collectionStatistics.setDescription(note.toString()); |
||||||
|
baseMapper.insert(collectionStatistics); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<Personnel> collectionGroupList() { |
||||||
|
/*List<CollectionGroupListResp> groupListResp = new ArrayList<>(); |
||||||
|
List<AlCollectionGroup> groups = collectionGroupMapper.selectList(null); |
||||||
|
for (AlCollectionGroup group : groups){ |
||||||
|
CollectionGroupListResp collectionGroupListResp = new CollectionGroupListResp(); |
||||||
|
Integer id = group.getId(); |
||||||
|
collectionGroupListResp.setId(id+"group"); |
||||||
|
collectionGroupListResp.setName(group.getGroupName()); |
||||||
|
QueryWrapper<AlReimbursement> wrapper = new QueryWrapper<>(); |
||||||
|
wrapper.eq("collection_group_id",id).select("person_liable","person_liable_id"); |
||||||
|
List<AlReimbursement> repaymentEntryList = reimbursementMapper.selectList(wrapper); |
||||||
|
List<Personnel> personnelList = new ArrayList<>(); |
||||||
|
for (AlReimbursement reimbursement : repaymentEntryList){ |
||||||
|
Personnel personnel = new Personnel(); |
||||||
|
Integer personLiableId = reimbursement.getPersonLiableId(); |
||||||
|
String personLiable = reimbursement.getPersonLiable(); |
||||||
|
personnel.setId(id+","+personLiableId); |
||||||
|
personnel.setName(personLiable); |
||||||
|
if(!personnelList.contains(personnel)){ |
||||||
|
personnelList.add(personnel); |
||||||
|
} |
||||||
|
} |
||||||
|
collectionGroupListResp.setPersonnel(personnelList); |
||||||
|
groupListResp.add(collectionGroupListResp); |
||||||
|
}*/ |
||||||
|
|
||||||
|
List<Personnel> personnel = reimbursementMapper.selectPersonnelList(); |
||||||
|
return personnel; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<AlCollectionStatistics> annualStatisticsList(StatisticsListReq statisticsListReq) { |
||||||
|
return baseMapper.selectAnnualStatisticsList(statisticsListReq); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int annualStatisticsListTotal(StatisticsListReq statisticsListReq) { |
||||||
|
return baseMapper.selectAnnualStatisticsListTotal(statisticsListReq); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<String> annualList() { |
||||||
|
return baseMapper.selectAnnualList(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void annualStatisticsListExport(String year,String flag,HttpServletResponse response) throws IOException { |
||||||
|
StatisticsListReq statisticsListReq = new StatisticsListReq(); |
||||||
|
statisticsListReq.setYear(year); |
||||||
|
List<AlCollectionStatistics> statisticsList = baseMapper.selectAnnualStatisticsList(statisticsListReq); |
||||||
|
List<AlCollectionStatistics> statisticsLists = new ArrayList<>(); |
||||||
|
if ("0".equals(flag)){ |
||||||
|
//根据组进行排名
|
||||||
|
Map<Integer, List<AlCollectionStatistics>> collect = statisticsList.stream(). |
||||||
|
sorted(Comparator.comparing(AlCollectionStatistics::getTotalAmount).reversed()). |
||||||
|
collect(Collectors.groupingBy(AlCollectionStatistics::getGroupId)); |
||||||
|
int sort = 0; |
||||||
|
for (Integer s : collect.keySet()){ |
||||||
|
List<AlCollectionStatistics> statisticsList1 = collect.get(s); |
||||||
|
++sort; |
||||||
|
for (AlCollectionStatistics alCollectionStatistics : statisticsList1){ |
||||||
|
alCollectionStatistics.setSort(sort); |
||||||
|
String proportion = alCollectionStatistics.getProportion(); |
||||||
|
if (proportion!=null){ |
||||||
|
float v1 = alCollectionStatistics.getTotalAmount().floatValue(); |
||||||
|
float v2 = Float.parseFloat(proportion); |
||||||
|
DecimalFormat df = new DecimalFormat("##.##%");//传入格式模板
|
||||||
|
String result = df.format(v1/v2); |
||||||
|
alCollectionStatistics.setProportion(result); |
||||||
|
} |
||||||
|
} |
||||||
|
statisticsLists.addAll(statisticsList1); |
||||||
|
} |
||||||
|
}else { |
||||||
|
//根据公司进行排名...
|
||||||
|
List<AlCollectionStatistics> annualStatisticsListByPersonSort = baseMapper.selectAnnualStatisticsListByPersonSort(); |
||||||
|
int sort = 0; |
||||||
|
for (AlCollectionStatistics alCollectionStatistics : annualStatisticsListByPersonSort){ |
||||||
|
alCollectionStatistics.setSort(++sort); |
||||||
|
String proportion = alCollectionStatistics.getProportion(); |
||||||
|
if (proportion!=null){ |
||||||
|
//获取分母
|
||||||
|
String denominator = proportion.substring(proportion.lastIndexOf(",")+1); |
||||||
|
float v1 = alCollectionStatistics.getTotalAmount().floatValue(); |
||||||
|
float v2 = Float.parseFloat(denominator); |
||||||
|
DecimalFormat df = new DecimalFormat("##.##%");//传入格式模板
|
||||||
|
String result = df.format(v1/v2); |
||||||
|
alCollectionStatistics.setProportion(result); |
||||||
|
} |
||||||
|
} |
||||||
|
statisticsLists.addAll(annualStatisticsListByPersonSort); |
||||||
|
} |
||||||
|
|
||||||
|
// 告诉浏览器用什么软件可以打开此文件
|
||||||
|
response.setHeader("content-Type", "application/vnd.ms-excel"); |
||||||
|
// 下载文件的默认名称
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("年度统计列表", "UTF-8") + ".xls"); |
||||||
|
//编码
|
||||||
|
response.setCharacterEncoding("UTF-8"); |
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), AlCollectionStatistics.class, statisticsLists); |
||||||
|
workbook.write(response.getOutputStream()); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回该年份已经存在的负责人id |
||||||
|
* @param year 年份 |
||||||
|
* @return 负责人id |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<Integer> personnelSelection(String year) { |
||||||
|
List<Integer> list = baseMapper.selectYearPerson(year); |
||||||
|
/*ArrayList<String> ids = Lists.newArrayList(); |
||||||
|
list.forEach(id -> { |
||||||
|
List<Integer> groupList = baseMapper.selectGroupList(id); |
||||||
|
groupList.forEach(g -> { |
||||||
|
String s = g + ","+id; |
||||||
|
ids.add(s); |
||||||
|
}); |
||||||
|
});*/ |
||||||
|
return list; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean annualStatisticsDeleted(String year) { |
||||||
|
int delete = baseMapper.deleteAnnualStatistics(year); |
||||||
|
return delete > 0; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean selectYear(String year) { |
||||||
|
int have = baseMapper.selectStatisticsYear(year); |
||||||
|
return have > 0; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean selectGenerateYear(String year) { |
||||||
|
int have = baseMapper.selectGenerateYear(year); |
||||||
|
return have > 0; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 还款添加或编辑或删除,根据还款记录id查询保后业务数据更新年度清收数据 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void updateCompleteStatistics(Integer insuranceId) { |
||||||
|
//查询清收代偿信息
|
||||||
|
QueryWrapper<AlReimbursement> wrapper = new QueryWrapper<>(); |
||||||
|
wrapper.eq("insurance_id",insuranceId); |
||||||
|
AlReimbursement reimbursement = reimbursementMapper.selectOne(wrapper); |
||||||
|
Integer groupId = reimbursement.getCollectionGroupId(); |
||||||
|
Integer personLiableId = reimbursement.getPersonLiableId(); |
||||||
|
String personLiable = reimbursement.getPersonLiable(); |
||||||
|
//查询该人员是否在统计列表中,在统计列表中,计算该业务下的年度统计情况
|
||||||
|
ArrayList<Integer> list = baseMapper.selectPerson(); |
||||||
|
boolean contains = list.contains(personLiableId); |
||||||
|
if (contains){ |
||||||
|
AlCollectionStatistics collectionStatistics = new AlCollectionStatistics(); |
||||||
|
//查询工号
|
||||||
|
String jobNumber = baseMapper.selectJobNumber(reimbursement.getPersonLiableId()); |
||||||
|
//查询企业
|
||||||
|
AlInsuranceList alInsuranceList = insuranceListMapper.selectById(insuranceId); |
||||||
|
String customerName = alInsuranceList.getCustomerName(); |
||||||
|
//统计该业务下还款记录清收现金和资产
|
||||||
|
QueryWrapper<AlRepaymentEntry> repaymentEntryWrapper = new QueryWrapper<>(); |
||||||
|
repaymentEntryWrapper.eq("insurance_id",insuranceId).orderByAsc("id"); |
||||||
|
List<AlRepaymentEntry> repaymentEntryList = repaymentEntryMapper.selectList(repaymentEntryWrapper); |
||||||
|
//无还款记录则删除该年度业务统计
|
||||||
|
if (ObjectUtil.isNull(repaymentEntryList)){ |
||||||
|
QueryWrapper<AlCollectionStatistics> deleteWrapper = new QueryWrapper<>(); |
||||||
|
deleteWrapper.eq("insurance_id",insuranceId).eq("group_id",groupId); |
||||||
|
baseMapper.delete(deleteWrapper); |
||||||
|
}else { |
||||||
|
//先清空之前数据
|
||||||
|
QueryWrapper<AlCollectionStatistics> deleteWrapper = new QueryWrapper<>(); |
||||||
|
deleteWrapper.eq("insurance_id",insuranceId).eq("group_id",groupId); |
||||||
|
baseMapper.delete(deleteWrapper); |
||||||
|
//清收现金
|
||||||
|
BigDecimal repaymentCash = new BigDecimal(0); |
||||||
|
//清收资产
|
||||||
|
BigDecimal repaymentAssets = new BigDecimal(0); |
||||||
|
|
||||||
|
StringBuilder note = new StringBuilder(); |
||||||
|
for (AlRepaymentEntry repayment: repaymentEntryList){ |
||||||
|
//无实际还款日不加入年度统计
|
||||||
|
if (repayment.getActualRepaymentDate()==null){ |
||||||
|
continue; |
||||||
|
} |
||||||
|
if (repayment.getRepaymentCash()!=null){ |
||||||
|
repaymentCash = repaymentCash.add(repayment.getRepaymentCash()); |
||||||
|
} |
||||||
|
if (repayment.getRepaymentAssetsAmount()!=null){ |
||||||
|
repaymentAssets = repaymentAssets.add(repayment.getRepaymentAssetsAmount()); |
||||||
|
} |
||||||
|
if (repayment.getRepaymentOtherAmount()!=null){ |
||||||
|
//其他金额加入清收资产中
|
||||||
|
repaymentAssets = repaymentAssets.add(repayment.getRepaymentOtherAmount()); |
||||||
|
} |
||||||
|
collectionStatistics.setCollectionTime(repayment.getActualRepaymentDate()); |
||||||
|
if (repayment.getRepaymentNotes()!=null){ |
||||||
|
note.append(repayment.getRepaymentNotes()); |
||||||
|
} |
||||||
|
} |
||||||
|
//添加年度数据
|
||||||
|
collectionStatistics.setGroupId(groupId); |
||||||
|
collectionStatistics.setInsuranceId(insuranceId); |
||||||
|
collectionStatistics.setPersonLiable(personLiable); |
||||||
|
collectionStatistics.setPersonLiableId(personLiableId); |
||||||
|
collectionStatistics.setJobNumber(jobNumber); |
||||||
|
collectionStatistics.setEnterprise(customerName); |
||||||
|
collectionStatistics.setCash(repaymentCash); |
||||||
|
collectionStatistics.setAssets(repaymentAssets); |
||||||
|
collectionStatistics.setDescription(note.toString()); |
||||||
|
baseMapper.insert(collectionStatistics); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,21 @@ |
|||||||
|
package com.daqing.financial.guarantee.service.impl; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import com.daqing.financial.guarantee.mapper.AlReimbursementMapper; |
||||||
|
import com.daqing.financial.guarantee.service.AlReimbursementService; |
||||||
|
import com.daqing.framework.domain.guarantee.AlReimbursement; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后代偿清收相关信息 服务实现类 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class AlReimbursementServiceImpl extends ServiceImpl<AlReimbursementMapper, AlReimbursement> implements AlReimbursementService { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.daqing.financial.guarantee.util; |
||||||
|
|
||||||
|
import java.lang.annotation.ElementType; |
||||||
|
import java.lang.annotation.Retention; |
||||||
|
import java.lang.annotation.RetentionPolicy; |
||||||
|
import java.lang.annotation.Target; |
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME) |
||||||
|
@Target(ElementType.FIELD) |
||||||
|
public @interface ExcelAttribute { |
||||||
|
/** |
||||||
|
* 对应的列名称 |
||||||
|
*/ |
||||||
|
String name() default ""; |
||||||
|
|
||||||
|
/** |
||||||
|
* excel列的索引 |
||||||
|
*/ |
||||||
|
int sort(); |
||||||
|
|
||||||
|
/** |
||||||
|
* 字段类型对应的格式 |
||||||
|
*/ |
||||||
|
String format() default ""; |
||||||
|
} |
@ -0,0 +1,310 @@ |
|||||||
|
package com.daqing.financial.guarantee.util; |
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil; |
||||||
|
import com.daqing.financial.guarantee.model.request.ExcelImpInsuranceVO; |
||||||
|
import com.deepoove.poi.util.RegexUtils; |
||||||
|
import org.apache.commons.lang.StringUtils; |
||||||
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
||||||
|
import org.apache.poi.ss.usermodel.*; |
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
||||||
|
import org.springframework.web.multipart.MultipartFile; |
||||||
|
|
||||||
|
import java.io.IOException; |
||||||
|
import java.text.DecimalFormat; |
||||||
|
import java.text.Format; |
||||||
|
import java.text.SimpleDateFormat; |
||||||
|
import java.util.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author chen |
||||||
|
* @DATE 2021/9/2 11:17 |
||||||
|
* @Version 1.0 |
||||||
|
*/ |
||||||
|
public class ExcelImportHelper { |
||||||
|
|
||||||
|
private static final Calendar fromCal = Calendar.getInstance(); |
||||||
|
|
||||||
|
/** |
||||||
|
* 按日期加天数得出全新日期 |
||||||
|
* |
||||||
|
* @param date 需要加天数的日期 |
||||||
|
* @param day 需要增加的天数 |
||||||
|
* @return 新的日期 |
||||||
|
*/ |
||||||
|
public static Date addDate(Date date, int day) { |
||||||
|
try { |
||||||
|
fromCal.setTime(date); |
||||||
|
fromCal.add(Calendar.DATE, day); |
||||||
|
|
||||||
|
return fromCal.getTime(); |
||||||
|
} catch (Exception e) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private static Workbook getWorkbook(MultipartFile file) { |
||||||
|
String fileName = file.getOriginalFilename(); |
||||||
|
Workbook workbook = null; |
||||||
|
|
||||||
|
if (fileName.endsWith("xlsx")) { |
||||||
|
try { |
||||||
|
workbook = new XSSFWorkbook(file.getInputStream()); |
||||||
|
} catch (IOException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
} else if (fileName.endsWith("xls")) { |
||||||
|
try { |
||||||
|
workbook = new HSSFWorkbook(file.getInputStream()); |
||||||
|
} catch (IOException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
} |
||||||
|
return workbook; |
||||||
|
} |
||||||
|
|
||||||
|
//判断row是否为空
|
||||||
|
public static boolean isRowEmpty(Row row) { |
||||||
|
if (null == row) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
int firstCellNum = row.getFirstCellNum(); //第一个列位置
|
||||||
|
int lastCellNum = row.getLastCellNum(); //最后一列位置
|
||||||
|
int nullCellNum = 0; //空列数量
|
||||||
|
for (int c = firstCellNum; c < lastCellNum; c++) { |
||||||
|
Cell cell = row.getCell(c); |
||||||
|
if (null == cell || CellType.BLANK == cell.getCellType()) { |
||||||
|
nullCellNum++; |
||||||
|
continue; |
||||||
|
} |
||||||
|
cell.setCellType(CellType.STRING); |
||||||
|
String cellValue = cell.getStringCellValue().trim(); |
||||||
|
if (StringUtils.isEmpty(cellValue)) { |
||||||
|
nullCellNum++; |
||||||
|
} |
||||||
|
} |
||||||
|
//所有列都为空
|
||||||
|
return nullCellNum == (lastCellNum - firstCellNum); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 读取文件数据 |
||||||
|
* |
||||||
|
* @param file |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static List<ExcelImpInsuranceVO> readInsuranceManagement(MultipartFile file) throws Exception { |
||||||
|
List<ExcelImpInsuranceVO> list = new ArrayList<ExcelImpInsuranceVO>(); |
||||||
|
|
||||||
|
Workbook workbook = getWorkbook(file); |
||||||
|
ExcelImpInsuranceVO impInsuranceVO = null; |
||||||
|
// 循环工作表Sheet
|
||||||
|
for (int numSheet = 0; numSheet < workbook.getNumberOfSheets(); numSheet++) { |
||||||
|
Sheet hssfSheet = workbook.getSheetAt(numSheet); |
||||||
|
if (hssfSheet == null) { |
||||||
|
continue; |
||||||
|
} |
||||||
|
|
||||||
|
int count = 1; |
||||||
|
// 循环行Row//开始行2
|
||||||
|
for (int rowNum = 2; rowNum <= hssfSheet.getLastRowNum(); rowNum++) { |
||||||
|
Row row = hssfSheet.getRow(rowNum); |
||||||
|
|
||||||
|
if (isRowEmpty(row)) { |
||||||
|
count++; |
||||||
|
if (count == hssfSheet.getLastRowNum()) { |
||||||
|
throw new Exception("导入失败,导入数据为空!"); |
||||||
|
} |
||||||
|
continue; |
||||||
|
} |
||||||
|
|
||||||
|
Cell customerName;//客户名称
|
||||||
|
Cell bank;//贷款银行
|
||||||
|
Cell guaranteeAmount;//担保额度
|
||||||
|
Cell loanStartTime;//贷款开始日期
|
||||||
|
Cell loanEndTime;//贷款结束日期
|
||||||
|
Cell guaranteeTime;//担保期限
|
||||||
|
Cell businessType;//业务类别
|
||||||
|
Cell amountWide;//贷款用途
|
||||||
|
Cell compensationAmount;//代偿金额
|
||||||
|
Cell compensatoryBalance;//代偿余额
|
||||||
|
Cell compensatoryTime;//代偿时间
|
||||||
|
Cell personLiable;//清收负责人
|
||||||
|
Cell collectionGroup;//所属清收组
|
||||||
|
Cell area;//所在区域
|
||||||
|
Cell operation;//经营情况
|
||||||
|
Cell litigation;//诉讼情况
|
||||||
|
Cell mortgage;//抵押情况
|
||||||
|
|
||||||
|
if (row != null) { |
||||||
|
|
||||||
|
impInsuranceVO = new ExcelImpInsuranceVO(); |
||||||
|
|
||||||
|
if (row.getCell(16) != null) { |
||||||
|
row.getCell(16).setCellType(CellType.STRING); |
||||||
|
mortgage = row.getCell(16); |
||||||
|
} else { |
||||||
|
mortgage = row.createCell(16); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(15) != null) { |
||||||
|
row.getCell(15).setCellType(CellType.STRING); |
||||||
|
litigation = row.getCell(15); |
||||||
|
} else { |
||||||
|
litigation = row.createCell(15); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(14) != null) { |
||||||
|
row.getCell(14).setCellType(CellType.STRING); |
||||||
|
operation = row.getCell(14); |
||||||
|
} else { |
||||||
|
operation = row.createCell(14); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(13) != null) { |
||||||
|
row.getCell(13).setCellType(CellType.STRING); |
||||||
|
area = row.getCell(13); |
||||||
|
} else { |
||||||
|
area = row.createCell(13); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(12) != null) { |
||||||
|
row.getCell(12).setCellType(CellType.STRING); |
||||||
|
collectionGroup = row.getCell(12); |
||||||
|
} else { |
||||||
|
collectionGroup = row.createCell(12); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(11) != null) { |
||||||
|
row.getCell(11).setCellType(CellType.STRING); |
||||||
|
personLiable = row.getCell(11); |
||||||
|
} else { |
||||||
|
personLiable = row.createCell(11); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(10) != null) { |
||||||
|
row.getCell(10).setCellType(CellType.STRING); |
||||||
|
compensatoryTime = row.getCell(10); |
||||||
|
} else { |
||||||
|
compensatoryTime = row.createCell(10); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(9) != null) { |
||||||
|
row.getCell(9).setCellType(CellType.STRING); |
||||||
|
compensatoryBalance = row.getCell(9); |
||||||
|
} else { |
||||||
|
compensatoryBalance = row.createCell(9); |
||||||
|
} |
||||||
|
if (row.getCell(8) != null) { |
||||||
|
row.getCell(8).setCellType(CellType.STRING); |
||||||
|
compensationAmount = row.getCell(8); |
||||||
|
} else { |
||||||
|
compensationAmount = row.createCell(8); |
||||||
|
} |
||||||
|
if (row.getCell(7) != null) { |
||||||
|
row.getCell(7).setCellType(CellType.STRING); |
||||||
|
amountWide = row.getCell(7); |
||||||
|
} else { |
||||||
|
amountWide = row.createCell(7); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(6) != null) { |
||||||
|
row.getCell(6).setCellType(CellType.STRING); |
||||||
|
businessType = row.getCell(6); |
||||||
|
} else { |
||||||
|
businessType = row.createCell(6); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(5) != null) { |
||||||
|
row.getCell(5).setCellType(CellType.STRING); |
||||||
|
guaranteeTime = row.getCell(5); |
||||||
|
} else { |
||||||
|
guaranteeTime = row.createCell(5); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(4) != null) { |
||||||
|
row.getCell(4).setCellType(CellType.STRING); |
||||||
|
loanEndTime = row.getCell(4); |
||||||
|
} else { |
||||||
|
loanEndTime = row.createCell(4); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(3) != null) { |
||||||
|
row.getCell(3).setCellType(CellType.STRING); |
||||||
|
loanStartTime = row.getCell(3); |
||||||
|
} else { |
||||||
|
loanStartTime = row.createCell(3); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(2) != null) { |
||||||
|
row.getCell(2).setCellType(CellType.STRING); |
||||||
|
guaranteeAmount = row.getCell(2); |
||||||
|
} else { |
||||||
|
guaranteeAmount = row.createCell(3); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(1) != null) { |
||||||
|
row.getCell(1).setCellType(CellType.STRING); |
||||||
|
bank = row.getCell(1); |
||||||
|
} else { |
||||||
|
bank = row.createCell(1); |
||||||
|
} |
||||||
|
|
||||||
|
if (row.getCell(0) != null) { |
||||||
|
row.getCell(0).setCellType(CellType.STRING); |
||||||
|
customerName = row.getCell(0); |
||||||
|
} else { |
||||||
|
customerName = row.createCell(0); |
||||||
|
} |
||||||
|
|
||||||
|
impInsuranceVO.setCustomerName(customerName.getStringCellValue()); |
||||||
|
impInsuranceVO.setBank(bank.getStringCellValue()); |
||||||
|
impInsuranceVO.setGuaranteeAmount(guaranteeAmount.getStringCellValue()); |
||||||
|
|
||||||
|
Calendar calendar = new GregorianCalendar(1900, 0, -1); |
||||||
|
Date d = calendar.getTime(); |
||||||
|
|
||||||
|
boolean numeric = StringUtils.isNumeric(loanStartTime.getStringCellValue()); |
||||||
|
if (numeric && !"".equals(loanStartTime.getStringCellValue())) { |
||||||
|
Date d1 = ExcelImportHelper.addDate(d, Integer.parseInt(loanStartTime.getStringCellValue())); |
||||||
|
String start = DateUtil.formatDateTime(d1); |
||||||
|
impInsuranceVO.setLoanStartTime(start); |
||||||
|
} |
||||||
|
|
||||||
|
boolean numeric1 = StringUtils.isNumeric(loanEndTime.getStringCellValue()); |
||||||
|
if (numeric1 && !"".equals(loanEndTime.getStringCellValue())) { |
||||||
|
Date d2 = ExcelImportHelper.addDate(d, Integer.parseInt(loanEndTime.getStringCellValue())); |
||||||
|
String end = DateUtil.formatDateTime(d2); |
||||||
|
impInsuranceVO.setLoanEndTime(end); |
||||||
|
} |
||||||
|
|
||||||
|
impInsuranceVO.setGuaranteeTime(guaranteeTime.getStringCellValue()); |
||||||
|
impInsuranceVO.setBusinessType(businessType.getStringCellValue()); |
||||||
|
impInsuranceVO.setAmountWide(amountWide.getStringCellValue()); |
||||||
|
impInsuranceVO.setCompensationAmount(compensationAmount.getStringCellValue()); |
||||||
|
impInsuranceVO.setCompensatoryBalance(compensatoryBalance.getStringCellValue()); |
||||||
|
|
||||||
|
String compensatory = ""; |
||||||
|
boolean numeric2 = StringUtils.isNumeric(compensatoryTime.getStringCellValue()); |
||||||
|
if (numeric2 && !"".equals(compensatoryTime.getStringCellValue())) { |
||||||
|
Date d3 = ExcelImportHelper.addDate(d, Integer.parseInt(compensatoryTime.getStringCellValue())); |
||||||
|
compensatory = DateUtil.formatDateTime(d3); |
||||||
|
} |
||||||
|
|
||||||
|
impInsuranceVO.setCompensatoryTime(compensatory); |
||||||
|
impInsuranceVO.setPersonLiable(personLiable.getStringCellValue()); |
||||||
|
impInsuranceVO.setCollectionGroup(collectionGroup.getStringCellValue()); |
||||||
|
impInsuranceVO.setArea(area.getStringCellValue()); |
||||||
|
impInsuranceVO.setOperation(operation.getStringCellValue()); |
||||||
|
impInsuranceVO.setLitigation(litigation.getStringCellValue()); |
||||||
|
impInsuranceVO.setMortgage(mortgage.getStringCellValue()); |
||||||
|
|
||||||
|
list.add(impInsuranceVO); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
return list; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,5 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="com.daqing.financial.guarantee.mapper.AlCollectionGroupMapper"> |
||||||
|
|
||||||
|
</mapper> |
@ -0,0 +1,207 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="com.daqing.financial.guarantee.mapper.AlCollectionStatisticsMapper"> |
||||||
|
<delete id="deleteAnnualStatistics"> |
||||||
|
delete from al_collection_statistics where year(create_time) = #{year} |
||||||
|
</delete> |
||||||
|
<delete id="truncate"> |
||||||
|
TRUNCATE al_collection_statistics |
||||||
|
</delete> |
||||||
|
|
||||||
|
<select id="selectCollectionProgressPage" |
||||||
|
resultType="com.daqing.financial.guarantee.model.response.CollectionProgressResp"> |
||||||
|
SELECT |
||||||
|
ai.id, |
||||||
|
ai.business_code, |
||||||
|
ai.customer_name, |
||||||
|
ai.legal_name, |
||||||
|
ai.phone, |
||||||
|
ai.bank, |
||||||
|
ai.guarantee_amount, |
||||||
|
ai.guarantee_time, |
||||||
|
ar.compensatory_time, |
||||||
|
ar.compensation_amount, |
||||||
|
ar.compensatory_balance, |
||||||
|
ar.mortgage, |
||||||
|
ar.operation, |
||||||
|
ar.area, |
||||||
|
ar.litigation, |
||||||
|
ar.person_liable, |
||||||
|
(select GROUP_CONCAT(repayment_notes) from al_repayment_entry where insurance_id = ar.insurance_id) as repayment_notes |
||||||
|
FROM |
||||||
|
al_insurance_list ai |
||||||
|
LEFT JOIN al_reimbursement ar ON ai.id = ar.insurance_id |
||||||
|
where 1=1 |
||||||
|
<if test="cpr.area != null and cpr.area != ''"> |
||||||
|
AND ar.area = #{cpr.area} |
||||||
|
</if> |
||||||
|
<if test="cpr.operation != null and cpr.operation != '' "> |
||||||
|
AND ar.operation = #{cpr.operation} |
||||||
|
</if> |
||||||
|
<if test="cpr.bank != null and cpr.bank != ''"> |
||||||
|
AND ai.bank = #{cpr.bank} |
||||||
|
</if> |
||||||
|
<if test="cpr.compensationAmount != null and cpr.compensationAmount != ''"> |
||||||
|
AND ar.compensation_amount ${cpr.amountSymbol} #{cpr.compensationAmount} |
||||||
|
</if> |
||||||
|
<if test="cpr.compensatoryBalance != null and cpr.compensatoryBalance != ''"> |
||||||
|
AND ar.compensatory_balance ${cpr.balanceSymbol} #{cpr.compensatoryBalance} |
||||||
|
</if> |
||||||
|
<if test="cpr.compensatoryStartTime != null and cpr.compensatoryEndTime != ''"> |
||||||
|
AND ar.compensatory_time between #{cpr.compensatoryStartTime} and #{cpr.compensatoryEndTime} |
||||||
|
</if> |
||||||
|
<if test="cpr.queryCondition != null and cpr.queryCondition != ''"> |
||||||
|
AND CONCAT(ai.customer_name LIKE '%' #{cpr.queryCondition} '%' OR ar.person_liable LIKE '%' #{cpr.queryCondition} '%' OR ai.business_code LIKE '%' #{cpr.queryCondition} '%') |
||||||
|
</if> |
||||||
|
order by ai.id desc |
||||||
|
limit #{cpr.page},#{cpr.size} |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectCollectionProgressPageTotal" resultType="java.lang.Integer"> |
||||||
|
SELECT count(1) |
||||||
|
FROM |
||||||
|
al_insurance_list ai |
||||||
|
LEFT JOIN al_reimbursement ar ON ai.id = ar.insurance_id |
||||||
|
where 1=1 |
||||||
|
<if test="cpr.area != null and cpr.area != ''"> |
||||||
|
AND ar.area = #{cpr.area} |
||||||
|
</if> |
||||||
|
<if test="cpr.operation != null and cpr.operation != '' "> |
||||||
|
AND ar.operation = #{cpr.operation} |
||||||
|
</if> |
||||||
|
<if test="cpr.bank != null and cpr.bank != ''"> |
||||||
|
AND ai.bank = #{cpr.bank} |
||||||
|
</if> |
||||||
|
<if test="cpr.compensationAmount != null and cpr.compensationAmount != ''"> |
||||||
|
AND ar.compensation_amount ${cpr.amountSymbol} #{cpr.compensationAmount} |
||||||
|
</if> |
||||||
|
<if test="cpr.compensatoryBalance != null and cpr.compensatoryBalance != ''"> |
||||||
|
AND ar.compensatory_balance ${cpr.balanceSymbol} #{cpr.compensatoryBalance} |
||||||
|
</if> |
||||||
|
<if test="cpr.compensatoryStartTime != null and cpr.compensatoryEndTime != ''"> |
||||||
|
AND ar.compensatory_time between #{cpr.compensatoryStartTime} and #{cpr.compensatoryEndTime} |
||||||
|
</if> |
||||||
|
<if test="cpr.queryCondition != null and cpr.queryCondition != ''"> |
||||||
|
AND CONCAT(ai.customer_name LIKE '%' #{cpr.queryCondition} '%' OR ar.person_liable LIKE '%' #{cpr.queryCondition} '%' OR ai.business_code LIKE '%' #{cpr.queryCondition} '%') |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
<select id="selectBatchData" |
||||||
|
resultType="com.daqing.financial.guarantee.model.response.CollectionProgressResp"> |
||||||
|
SELECT |
||||||
|
ai.id, |
||||||
|
ai.business_code, |
||||||
|
ai.customer_name, |
||||||
|
ai.legal_name, |
||||||
|
ai.phone, |
||||||
|
ai.bank, |
||||||
|
ai.guarantee_amount, |
||||||
|
ai.guarantee_time, |
||||||
|
ar.compensatory_time, |
||||||
|
ar.compensation_amount, |
||||||
|
ar.compensatory_balance, |
||||||
|
ar.mortgage, |
||||||
|
ar.operation, |
||||||
|
ar.area, |
||||||
|
ar.litigation, |
||||||
|
ar.person_liable, |
||||||
|
(select GROUP_CONCAT(repayment_notes) from al_repayment_entry where insurance_id = ar.insurance_id) as repayment_notes |
||||||
|
FROM |
||||||
|
al_insurance_list ai |
||||||
|
LEFT JOIN al_reimbursement ar ON ai.id = ar.insurance_id |
||||||
|
<where> |
||||||
|
<if test="ids != null and ids.size>0"> |
||||||
|
ai.id in |
||||||
|
<foreach collection="ids" close=")" open="(" item="id" separator=","> |
||||||
|
#{id} |
||||||
|
</foreach> |
||||||
|
</if> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
<select id="selectJobNumber" resultType="java.lang.String"> |
||||||
|
select job_number from dq_financial_hrms.hrms_employee where user_id = #{personLiableId} |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectAnnualList" resultType="java.lang.String"> |
||||||
|
select DISTINCT(year(create_time)) from al_collection_statistics |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
<select id="selectAnnualStatisticsList" |
||||||
|
resultType="com.daqing.framework.domain.guarantee.AlCollectionStatistics"> |
||||||
|
select ac.id,ac.group_id,ac.person_liable,ac.job_number,ac.enterprise,ac.cash,ac.assets, |
||||||
|
DATE_FORMAT(collection_time,'%Y-%m-%d') as collection_time, |
||||||
|
(select sum(cash + assets) from al_collection_statistics where id = ac.id ) as total_amount, |
||||||
|
ac.proportion,ac.description,ag.group_name |
||||||
|
from al_collection_statistics ac |
||||||
|
left join al_collection_group ag on ac.group_id = ag.id |
||||||
|
where year(ac.create_time) = #{slr.year} |
||||||
|
<if test="slr.groupId != null and slr.groupId != ''"> |
||||||
|
AND ac.group_id = #{slr.groupId} |
||||||
|
</if> |
||||||
|
<if test="slr.proportionSymbol != null and slr.proportion != ''"> |
||||||
|
AND ac.proportion ${slr.proportionSymbol} ${slr.proportion} |
||||||
|
</if> |
||||||
|
<if test="slr.queryCondition != null and slr.queryCondition != ''"> |
||||||
|
AND CONCAT(ac.job_number LIKE '%' #{slr.queryCondition} '%' OR ac.person_liable LIKE '%' #{slr.queryCondition} '%' OR ac.enterprise LIKE '%' #{slr.queryCondition} '%') |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
<select id="selectAnnualStatisticsListTotal" resultType="java.lang.Integer"> |
||||||
|
select count(1) |
||||||
|
from al_collection_statistics ac |
||||||
|
left join al_collection_group ag on ac.group_id = ag.id |
||||||
|
where year(ac.create_time) = #{slr.year} |
||||||
|
<if test="slr.groupId != null and slr.groupId != ''"> |
||||||
|
AND ac.group_id = #{slr.groupId} |
||||||
|
</if> |
||||||
|
<if test="slr.proportionSymbol != null and slr.proportion != ''"> |
||||||
|
AND ac.proportion ${slr.proportionSymbol} #{slr.proportion} |
||||||
|
</if> |
||||||
|
<if test="slr.queryCondition != null and slr.queryCondition != ''"> |
||||||
|
AND CONCAT(ac.job_number LIKE '%' #{slr.queryCondition} '%' OR ac.person_liable LIKE '%' #{slr.queryCondition} '%' OR ac.enterprise LIKE '%' #{slr.queryCondition} '%') |
||||||
|
</if> |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectStatisticsYear" resultType="java.lang.Integer"> |
||||||
|
select count(1) from al_repayment_entry where year(actual_repayment_date) = #{year} |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectGenerateYear" resultType="java.lang.Integer"> |
||||||
|
select count(1) from al_collection_statistics where year(actual_repayment_date) = #{year} |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectYearPerson" resultType="java.lang.Integer"> |
||||||
|
select DISTINCT(person_liable_id) from al_collection_statistics where year(create_time) = #{year} |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectGroupList" resultType="java.lang.Integer"> |
||||||
|
select group_id from al_collection_statistics where person_liable_id = #{id} GROUP BY group_id |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectPerson" resultType="java.lang.Integer"> |
||||||
|
select DISTINCT(person_liable_id) from al_collection_statistics |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectAnnualStatisticsListByPersonSort" |
||||||
|
resultType="com.daqing.framework.domain.guarantee.AlCollectionStatistics"> |
||||||
|
SELECT |
||||||
|
ac.person_liable, |
||||||
|
ac.job_number, |
||||||
|
GROUP_CONCAT( ac.enterprise ) as enterprise, |
||||||
|
sum( ac.cash ) as cash, |
||||||
|
sum( ac.assets ) as assets, |
||||||
|
sum(ac.cash + ac.assets) as total_amount, |
||||||
|
GROUP_CONCAT( ac.proportion ) as proportion, |
||||||
|
GROUP_CONCAT( DATE_FORMAT(ac.collection_time,'%Y-%m-%d')) as collection_time, |
||||||
|
GROUP_CONCAT( ac.description ) as description, |
||||||
|
GROUP_CONCAT(ag.group_name) as group_name |
||||||
|
FROM |
||||||
|
al_collection_statistics ac |
||||||
|
left JOIN al_collection_group ag ON ac.group_id = ag.id |
||||||
|
GROUP BY |
||||||
|
ac.person_liable_id |
||||||
|
ORDER BY sum(ac.cash + ac.assets) desc |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
@ -0,0 +1,43 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="com.daqing.financial.guarantee.mapper.AlReimbursementMapper"> |
||||||
|
|
||||||
|
<!--<select id="selectListByYear" resultType="com.daqing.framework.domain.guarantee.AlReimbursement"> |
||||||
|
select * from al_reimbursement |
||||||
|
<where> |
||||||
|
<if test="year != null and year != ''"> |
||||||
|
AND year(create_time) = #{year} |
||||||
|
</if> |
||||||
|
<if test="ids != null and ids.size>0"> |
||||||
|
AND person_liable_id in |
||||||
|
<foreach collection="ids" close=")" open="(" item="id" separator=","> |
||||||
|
#{id} |
||||||
|
</foreach> |
||||||
|
</if> |
||||||
|
</where> |
||||||
|
</select>--> |
||||||
|
|
||||||
|
<select id="selectListByYear" resultType="com.daqing.framework.domain.guarantee.AlReimbursement"> |
||||||
|
SELECT |
||||||
|
ar.* |
||||||
|
FROM |
||||||
|
al_reimbursement ar |
||||||
|
LEFT JOIN al_repayment_entry al ON ar.insurance_id = al.insurance_id |
||||||
|
WHERE |
||||||
|
YEAR ( al.actual_repayment_date ) = #{year} |
||||||
|
<if test="ids != null and ids.size>0"> |
||||||
|
AND ar.person_liable_id in |
||||||
|
<foreach collection="ids" close=")" open="(" item="id" separator=","> |
||||||
|
#{id} |
||||||
|
</foreach> |
||||||
|
</if> |
||||||
|
GROUP BY |
||||||
|
ar.insurance_id |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
<select id="selectPersonnelList" |
||||||
|
resultType="com.daqing.financial.guarantee.model.response.Personnel"> |
||||||
|
select DISTINCT(person_liable_id) as id ,person_liable as name from al_reimbursement |
||||||
|
</select> |
||||||
|
</mapper> |
@ -1,13 +0,0 @@ |
|||||||
//package com.daqing.financial.guarantee.dqfinancialguarantee;
|
|
||||||
//
|
|
||||||
//import org.junit.jupiter.api.Test;
|
|
||||||
//import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
//
|
|
||||||
//@SpringBootTest
|
|
||||||
//class DqFinancialGuaranteeApplicationTests {
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// void contextLoads() {
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
@ -0,0 +1,48 @@ |
|||||||
|
package com.daqing.framework.domain.guarantee; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import java.io.Serializable; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后清收组 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
@ApiModel(value="AlCollectionGroup对象", description="保后清收组") |
||||||
|
public class AlCollectionGroup implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键") |
||||||
|
@TableId(value = "id", type = IdType.AUTO) |
||||||
|
private Integer id; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "组名") |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间") |
||||||
|
@TableField(fill = FieldFill.INSERT) |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间") |
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE) |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -0,0 +1,119 @@ |
|||||||
|
package com.daqing.framework.domain.guarantee; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||||
|
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore; |
||||||
|
import cn.afterturn.easypoi.excel.annotation.ExcelTarget; |
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-19 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
@ApiModel(value="AlCollectionStatistics对象", description="") |
||||||
|
@ExcelTarget("AlCollectionStatistics") |
||||||
|
public class AlCollectionStatistics implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键id") |
||||||
|
@ExcelIgnore |
||||||
|
@TableId(value = "id", type = IdType.AUTO) |
||||||
|
private Integer id; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收组id") |
||||||
|
@ExcelIgnore |
||||||
|
private Integer groupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序号") |
||||||
|
@TableField(exist = false) |
||||||
|
@Excel(name = "公司排名",mergeVertical = true, width = 15) |
||||||
|
private Integer sort; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "实际还款日") |
||||||
|
@ExcelIgnore |
||||||
|
@TableField(value = "actual_repayment_date") |
||||||
|
private String actualRepaymentDate; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "组名") |
||||||
|
@TableField(exist = false) |
||||||
|
@Excel(name = "清收组",orderNum = "1",mergeVertical = true, isImportField = "groupName", width = 15) |
||||||
|
private String groupName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收负责人id") |
||||||
|
@ExcelIgnore |
||||||
|
private Integer personLiableId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "保后id") |
||||||
|
@ExcelIgnore |
||||||
|
private Integer insuranceId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收负责人") |
||||||
|
@Excel(name = "清收负责人", orderNum = "2", isImportField = "personLiable", width = 15) |
||||||
|
private String personLiable; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "工号") |
||||||
|
@Excel(name = "工号", orderNum = "3", mergeVertical = true, isImportField = "jobNumber", width = 15) |
||||||
|
private String jobNumber; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收企业") |
||||||
|
@Excel(name = "清收企业", orderNum = "4", isImportField = "enterprise", width = 15) |
||||||
|
private String enterprise; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收现金") |
||||||
|
@Excel(name = "清收现金", orderNum = "5", isImportField = "cash", width = 15) |
||||||
|
private BigDecimal cash; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收资产") |
||||||
|
@Excel(name = "清收资产", orderNum = "6", isImportField = "assets", width = 15) |
||||||
|
private BigDecimal assets; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "回款时间") |
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||||
|
@Excel(name = "回款时间", orderNum = "7",databaseFormat = "yyyy-MM-dd",isImportField = "collectionTime", width = 15) |
||||||
|
private String collectionTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "已清收总金额") |
||||||
|
@ExcelProperty(value = "已清收总金额",index = 7) |
||||||
|
@Excel(name = "已清收总金额", orderNum = "8", isImportField = "totalAmount", width = 15) |
||||||
|
private BigDecimal totalAmount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "完成比例") |
||||||
|
@Excel(name = "完成比例", orderNum = "9", isImportField = "proportion", width = 15) |
||||||
|
private String proportion; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注") |
||||||
|
@Excel(name = "备注", orderNum = "10", isImportField = "description", width = 30) |
||||||
|
private String description; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间") |
||||||
|
@ExcelIgnore |
||||||
|
@TableField(fill = FieldFill.INSERT) |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间") |
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE) |
||||||
|
@ExcelIgnore |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
} |
@ -1,117 +1,137 @@ |
|||||||
package com.daqing.framework.domain.guarantee; |
package com.daqing.framework.domain.guarantee; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore; |
||||||
|
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.FieldFill; |
||||||
import lombok.Data; |
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
import java.io.Serializable; |
import java.io.Serializable; |
||||||
import java.math.BigDecimal; |
|
||||||
import java.util.Date; |
import com.daqing.framework.utils.excel.InsuranceStatusConverter; |
||||||
|
import com.daqing.framework.utils.excel.SourceStatusConverter; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
/** |
/** |
||||||
* <p> |
* <p> |
||||||
* 保后管理列表 |
* 保后管理列表 |
||||||
* </p> |
* </p> |
||||||
* |
* |
||||||
* @author Qyq |
* @author lr |
||||||
* @since 2021-03-17 |
* @since 2021-08-12 |
||||||
*/ |
*/ |
||||||
@Data |
@Data |
||||||
@TableName("al_insurance_list") |
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
@ApiModel(value="AlInsuranceList对象", description="保后管理列表") |
||||||
public class AlInsuranceList implements Serializable { |
public class AlInsuranceList implements Serializable { |
||||||
|
|
||||||
private static final long serialVersionUID = 1L; |
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "主键id") |
||||||
* 主键id |
|
||||||
*/ |
|
||||||
@TableId(value = "id", type = IdType.AUTO) |
@TableId(value = "id", type = IdType.AUTO) |
||||||
|
@ExcelIgnore |
||||||
private Integer id; |
private Integer id; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "业务编号") |
||||||
* 业务编号 |
@ExcelProperty(value = "业务编号",index = 0) |
||||||
*/ |
|
||||||
private String businessCode; |
private String businessCode; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "客户名称") |
||||||
* 客户名称 |
@ExcelProperty(value = "客户名称",index = 1) |
||||||
*/ |
|
||||||
private String customerName; |
private String customerName; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "法人-姓名") |
||||||
* 联系电话 |
@ExcelIgnore |
||||||
*/ |
private String legalName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "联系电话") |
||||||
|
@ExcelProperty(value = "联系电话",index = 2) |
||||||
private String phone; |
private String phone; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "业务类别") |
||||||
* 业务类别 |
@ExcelProperty(value = "业务类型",index = 3) |
||||||
*/ |
|
||||||
private String businessType; |
private String businessType; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "担保额度(元)") |
||||||
* 担保额度(元) |
@ExcelProperty(value = "担保额度(元)",index = 4) |
||||||
*/ |
|
||||||
private BigDecimal guaranteeAmount; |
private BigDecimal guaranteeAmount; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "担保期限") |
||||||
* 担保期限 |
@ExcelProperty(value = "担保期限",index = 5) |
||||||
*/ |
|
||||||
private String guaranteeTime; |
private String guaranteeTime; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "贷款开始日期") |
||||||
* 申请日期 |
@ExcelIgnore |
||||||
*/ |
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||||
|
private Date loanStartTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "贷款结束日期") |
||||||
|
@ExcelIgnore |
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||||
|
private Date loanEndTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请日期") |
||||||
|
@ExcelProperty(value = "申请日期",index = 6) |
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||||
|
@TableField(fill = FieldFill.INSERT) |
||||||
private Date applyTime; |
private Date applyTime; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "贷款银行(用中划线隔开)") |
||||||
* 贷款银行 |
@ExcelIgnore |
||||||
*/ |
|
||||||
private String bank; |
private String bank; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "贷款用途") |
||||||
* 贷款用途 |
@ExcelIgnore |
||||||
*/ |
|
||||||
private String amountWide; |
private String amountWide; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "还款额度(元)") |
||||||
* 还款额度(元) |
@ExcelProperty(value = "还款额度(元)",index = 7) |
||||||
*/ |
|
||||||
private BigDecimal repaymentAmount; |
private BigDecimal repaymentAmount; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "剩余额度(元)") |
||||||
* 剩余额度(元) |
@ExcelProperty(value = "剩余额度(元)",index = 8) |
||||||
*/ |
|
||||||
private BigDecimal remainAmount; |
private BigDecimal remainAmount; |
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "还款期数") |
||||||
* 还款期数 |
@ExcelProperty(value = "还款期数",index = 9) |
||||||
*/ |
|
||||||
private Integer repaymentTime; |
private Integer repaymentTime; |
||||||
|
|
||||||
/** |
// @ApiModelProperty(value = "所属部门")
|
||||||
* 所属部门 |
// @ExcelProperty(value = "所属部门",index = 10)
|
||||||
*/ |
// private String department;
|
||||||
private String department; |
|
||||||
|
|
||||||
/** |
@ApiModelProperty(value = "还款状态:1->还款中;2->已逾期;3->已还清;4->已结项;") |
||||||
* 还款状态:1->还款中;2->已逾期;3->已还清;4->已结项; |
@ExcelProperty(value = "还款状态",index = 10,converter = InsuranceStatusConverter.class) |
||||||
*/ |
|
||||||
private Integer paymentStatus; |
private Integer paymentStatus; |
||||||
|
|
||||||
/** |
@ExcelProperty(value = "来源",index = 11,converter = SourceStatusConverter.class) |
||||||
* 是否逾期过:0->是;1->否; |
@ApiModelProperty(value = "来源,默认为0系统流转,1为手动添加") |
||||||
*/ |
private int source; |
||||||
|
|
||||||
|
@ExcelIgnore |
||||||
|
@ApiModelProperty(value = "是否逾期过:0->是;1->否;") |
||||||
private Integer isOverdue; |
private Integer isOverdue; |
||||||
|
|
||||||
/** |
@ExcelIgnore |
||||||
* 创建时间 |
@ApiModelProperty(value = "创建时间") |
||||||
*/ |
@TableField(fill = FieldFill.INSERT) |
||||||
@TableField(fill= FieldFill.INSERT) |
|
||||||
private Date createTime; |
private Date createTime; |
||||||
|
|
||||||
/** |
@ExcelIgnore |
||||||
* 修改时间 |
@ApiModelProperty(value = "修改时间") |
||||||
*/ |
|
||||||
@TableField(fill = FieldFill.INSERT_UPDATE) |
@TableField(fill = FieldFill.INSERT_UPDATE) |
||||||
private Date updateTime; |
private Date updateTime; |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
|
@ -0,0 +1,80 @@ |
|||||||
|
package com.daqing.framework.domain.guarantee; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import java.io.Serializable; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
|
/** |
||||||
|
* <p> |
||||||
|
* 保后代偿清收相关信息 |
||||||
|
* </p> |
||||||
|
* |
||||||
|
* @author lr |
||||||
|
* @since 2021-08-12 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
@ApiModel(value="AlReimbursement对象", description="保后代偿清收相关信息") |
||||||
|
public class AlReimbursement implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键") |
||||||
|
@TableId(value = "id", type = IdType.AUTO) |
||||||
|
private Integer id; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "保后id") |
||||||
|
private Integer insuranceId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿金额") |
||||||
|
private BigDecimal compensationAmount; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿余额") |
||||||
|
private BigDecimal compensatoryBalance; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "代偿时间") |
||||||
|
private Date compensatoryTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收负责人") |
||||||
|
private String personLiable; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "清收负责人id") |
||||||
|
private Integer personLiableId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "所属清收组id") |
||||||
|
private Integer collectionGroupId; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在区域") |
||||||
|
private String area; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "经营情况") |
||||||
|
private String operation; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "诉讼情况") |
||||||
|
private String litigation; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "抵押情况") |
||||||
|
private String mortgage; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间") |
||||||
|
@TableField(fill = FieldFill.INSERT) |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间") |
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE) |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
|
||||||
|
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue