保后管理更新

master
chen 3 years ago
parent ff8d8ad154
commit 7ddcc0cdd5
  1. 5
      dq-financial-api/pom.xml
  2. 32
      dq-financial-api/src/main/java/com/daqing/financial/config/Base64Encoder.java
  3. 10
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java
  4. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  5. 8
      dq-financial-crms/src/main/resources/bootstrap.properties
  6. 52
      dq-financial-guarantee/pom.xml
  7. 66
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionController.java
  8. 69
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionGroupController.java
  9. 160
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionStatisticsController.java
  10. 112
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlInsuranceListController.java
  11. 50
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlReimbursementController.java
  12. 30
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java
  13. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  14. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAssetsInvestigationController.java
  15. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java
  16. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
  17. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java
  18. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java
  19. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessManageController.java
  20. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionGroupMapper.java
  21. 56
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionStatisticsMapper.java
  22. 14
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlInsuranceListMapper.java
  23. 26
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlReimbursementMapper.java
  24. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java
  25. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AlCollectionRequest.java
  26. 115
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AlRepaymentEntryReq.java
  27. 52
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/CollectionProgressReq.java
  28. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/EditStatisticsListReq.java
  29. 112
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ExcelImpInsuranceVO.java
  30. 28
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/GenerateReq.java
  31. 34
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ImportInsuranceVO.java
  32. 22
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InsuranceSaveReq.java
  33. 40
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/StatisticsListReq.java
  34. 147
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java
  35. 26
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/CollectionGroupListResp.java
  36. 93
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/CollectionProgressResp.java
  37. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/LegalVo.java
  38. 10
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MoreOverdueDetailResponse.java
  39. 38
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/OtherStatistics.java
  40. 13
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonLiableResp.java
  41. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/Personnel.java
  42. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/StatisticsGroupVo.java
  43. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/AlCollectionGroupService.java
  44. 53
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/AlCollectionStatisticsService.java
  45. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/AlReimbursementService.java
  46. 24
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlInsuranceListService.java
  47. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java
  48. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionGroupServiceImpl.java
  49. 7
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java
  50. 418
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionStatisticsServiceImpl.java
  51. 652
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java
  52. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlReimbursementServiceImpl.java
  53. 251
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java
  54. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  55. 22
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  56. 10
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  57. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  58. 9
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
  59. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  60. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgProcessManageServiceImpl.java
  61. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/ArraysUtil.java
  62. 25
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/ExcelAttribute.java
  63. 310
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/ExcelImportHelper.java
  64. 10
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/ImgUtil.java
  65. 19
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  66. 0
      dq-financial-guarantee/src/main/resources/excel-config.xml
  67. 5
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionGroupMapper.xml
  68. 6
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml
  69. 207
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionStatisticsMapper.xml
  70. 27
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlInsuranceListMapper.xml
  71. 43
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlReimbursementMapper.xml
  72. 8
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml
  73. 3
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
  74. 13
      dq-financial-guarantee/src/test/java/com/daqing/financial/guarantee/dqfinancialguarantee/DqFinancialGuaranteeApplicationTests.java
  75. 7
      dq-financial-hrms-auth/pom.xml
  76. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/config/CustomExpiredSessionStrategy.java
  77. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/handle/MyAuthenticationToken.java
  78. 13
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/CommonUtil.java
  79. 5
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/MultiReadHttpServletRequest.java
  80. 4
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/MultiReadHttpServletResponse.java
  81. 5
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/PKCS7Encoder.java
  82. 15
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/WXBizDataCrypt.java
  83. 8
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  84. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/PermissionController.java
  85. 8
      dq-financial-hrms/src/main/resources/bootstrap.properties
  86. 7
      dq-framework-common/pom.xml
  87. 2
      dq-framework-common/src/main/java/com/daqing/framework/exception/CustomException.java
  88. 6
      dq-framework-common/src/main/java/com/daqing/framework/model/Constant.java
  89. 6
      dq-framework-common/src/main/java/com/daqing/framework/model/response/CommonCode.java
  90. 8
      dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java
  91. 2
      dq-framework-common/src/main/java/com/daqing/framework/util/ArraysUtil.java
  92. 13
      dq-framework-model/pom.xml
  93. 6
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CrmsCode.java
  94. 45
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlCollection.java
  95. 48
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlCollectionGroup.java
  96. 119
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlCollectionStatistics.java
  97. 144
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlInsuranceList.java
  98. 80
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlReimbursement.java
  99. 99
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlRepaymentEntry.java
  100. 6
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -14,6 +14,10 @@
<description>系统API统一定义</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
@ -41,6 +45,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>

@ -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));
}
}

@ -156,10 +156,7 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
}
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
if (customer && company > 0 && user) {
return true;
}
return false;
return customer && company > 0 && user;
}
/**
@ -313,10 +310,7 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
}
if (customer && company > 0) {
return true;
}
return false;
return customer && company > 0;
}
/**

@ -662,10 +662,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
}
if (customer && company > 0) {
return true;
}
return false;
return customer && company > 0;
}
/**

@ -14,18 +14,18 @@ spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#请求处理的超时时间
ribbon.ReadTimeout: 120000
ribbon.ReadTimeout= 120000
#请求连接的超时时间
ribbon.ConnectTimeout: 120000
ribbon.ConnectTimeout= 120000
ribbon.eureka.enabled=true
# 正式环境(prod)

@ -17,9 +17,52 @@
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Greenwich.SR3</spring-cloud.version>
<!--<poi.version>4.1.1</poi.version>
<poi-ooxml.version>4.1.1</poi-ooxml.version>
<poi-ooxml-schemas.version>4.1.1</poi-ooxml-schemas.version>-->
</properties>
<dependencies>
<!--指定poi版本-->
<!-- <dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>4.1.1</version>
</dependency>-->
<!-- Easy poi-->
<!-- excle导入导出依赖包 start -->
<!-- excel文件导入导出 -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>4.1.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-web</artifactId>
<version>4.1.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>4.1.3</version>
</dependency>
<!--redis-->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -101,6 +144,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

@ -8,11 +8,17 @@ import com.daqing.financial.guarantee.model.response.AlCollectionResponse;
import com.daqing.financial.guarantee.model.response.MoreOverdueDetailResponse;
import com.daqing.financial.guarantee.model.response.OverdueDetailResponse;
import com.daqing.financial.guarantee.service.IAlCollectionService;
import com.daqing.framework.annotation.Log;
import com.daqing.framework.domain.guarantee.AlCollection;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.enums.OperationType;
import com.daqing.framework.enums.OperationUnit;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.ArraysUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -38,76 +44,74 @@ public class AlCollectionController {
@Autowired
private IAlCollectionService alCollectionService;
/**
* 催收管理列表
*/
@GetMapping("/list")
@ApiOperation(value = "催收管理列表", notes = "催收管理列表", response = AlCollectionResponse.class)
public ResponseResult list(@RequestParam("page") Integer page, @RequestParam("size") Integer size,
public ResponseResult list(
@RequestParam("page") Integer page, @RequestParam("size") Integer size,
@RequestParam(name = "codeOrName", required = false) String codeOrName,
@RequestParam(name = "status", required = false) Integer status) {
return ResponseResult.SUCCESS(alCollectionService.list(page, size, codeOrName, status));
}
/**
* 催收
*/
@PostMapping("/collection")
@ApiOperation(value = "催收", notes = "催收")
@ApiOperation(value = "催收", notes = "新增催收")
public ResponseResult collection(@RequestBody @Valid AlCollectionRequest alCollectionRequest) {
Boolean result = alCollectionService.collection(alCollectionRequest);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 催收时展示的详情
*/
@Log(detail = "更新催收信息",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.UPDATE)
@PostMapping("/updateCollection")
@ApiOperation(value = "编辑催收信息")
public ResponseResult updateCollection(@RequestBody @Valid AlCollectionRequest alCollectionRequest){
AlCollection collection = new AlCollection();
BeanUtils.copyProperties(alCollectionRequest, collection);
collection.setEnclosureFile(ArraysUtil.toString(alCollectionRequest.getEnclosureFiles()));
boolean update = alCollectionService.updateById(collection);
return update ? ResponseResult.SUCCESS("编辑成功!"):ResponseResult.FAIL(60007,"编辑失败!");
}
@Log(detail = "删除催收信息",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.DELETE)
@PostMapping("/delCollection")
@ApiOperation(value = "删除催收信息")
public ResponseResult delCollection(@RequestParam String id){
boolean remove = alCollectionService.removeById(id);
return remove ? ResponseResult.SUCCESS("删除成功!"):ResponseResult.FAIL(60008,"删除失败!");
}
@GetMapping("/overdue/detail")
@ApiOperation(value = "催收时展示的详情", notes = "催收时展示的详情", response = OverdueDetailResponse.class)
public ResponseResult overdueDetail(@RequestParam("insuranceId") Integer insuranceId) {
return ResponseResult.SUCCESS(alCollectionService.overdueDetail(insuranceId));
}
/**
* 催收列表
*/
@PostMapping("/collection/list")
@ApiOperation(value = "催收列表", notes = "催收列表", response = AlCollectionListResponse.class)
public ResponseResult collectionList(@RequestBody AlCollectionListRequest alCollectionListRequest) {
return ResponseResult.SUCCESS(alCollectionService.collectionList(alCollectionListRequest));
}
/**
* 查看时的催收详情
*/
@GetMapping("/examine/detail")
@ApiOperation(value = "查看时的催收详情", notes = "查看时的催收详情", response = MoreOverdueDetailResponse.class)
public ResponseResult moreOverdueDetail(@RequestParam("id") Integer id) {
return ResponseResult.SUCCESS(alCollectionService.moreOverdueDetail(id));
}
/**
* 催收管理列表导出
*/
@ApiOperation(value = "催收管理列表导出", notes = "催收管理列表导出")
@GetMapping("/list/export/excel")
public ResponseResult listExportExcel(@RequestParam("insuranceIds") List<Integer> insuranceIds, HttpServletResponse response) throws IOException {
public ResponseResult listExportExcel(
@RequestParam("insuranceIds") List<Integer> insuranceIds,
HttpServletResponse response) throws IOException {
alCollectionService.listExportExcel(insuranceIds, response);
return ResponseResult.SUCCESS();
}
/**
* 催收列表导出
*/
@ApiOperation(value = "催收列表导出", notes = "催收列表导出")
@GetMapping("/collection/list/export/excel")
public ResponseResult collectionListExportExcel(@RequestParam("ids") List<Integer> ids,@RequestParam("insuranceId")Integer insuranceId, HttpServletResponse response) throws IOException {
public ResponseResult collectionListExportExcel(
@RequestParam("ids") List<Integer> ids,
@RequestParam("insuranceId")Integer insuranceId,
HttpServletResponse response) throws IOException {
alCollectionService.collectionListExportExcel(ids,insuranceId, response);
return ResponseResult.SUCCESS();
}

@ -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();
}
}

@ -1,8 +1,9 @@
package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.financial.guarantee.model.request.InsuranceSaveReq;
import com.daqing.financial.guarantee.service.IAlInsuranceListService;
import com.daqing.financial.guarantee.util.R;
import com.daqing.framework.annotation.Log;
import com.daqing.framework.enums.OperationType;
import com.daqing.framework.enums.OperationUnit;
@ -10,13 +11,16 @@ import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
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 org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -30,57 +34,75 @@ import java.util.List;
@RestController
@RequestMapping("/al-insurance-list")
public class AlInsuranceListController {
@Autowired
private IAlInsuranceListService alInsuranceListService;
/**
* 保后管理列表
* @param
* @return
*/
@Log(detail = "保后管理列表",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/insuranceList")
@ApiOperation(value = "保后管理列表")
public ResponseResult insuranceList(@RequestParam(value="page",required=false) Integer page, @RequestParam(value="size",required=false) Integer size,
public ResponseResult insuranceList(
@RequestParam(value="page",required=false) Integer page,
@RequestParam(value="size",required=false) Integer size,
@RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName,
@RequestParam(value = "paymentStatus", required = false) Integer paymentStatus){
PageUtils data = alInsuranceListService.queryPage(page, size, CustomerNumberOrName, paymentStatus);
return ResponseResult.SUCCESS(data);
}
return new ResponseResult<PageUtils>().SUCCESS(data);
@Log(detail = "添加保后业务",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.INSERT)
@ApiOperation(value = "添加保后业务")
@PostMapping("/saveInsurance")
public R saveInsurance(
@ApiParam(name = "insuranceSaveReq", value = "保后业务信息", required = true)
@RequestBody InsuranceSaveReq insuranceSaveReq) {
boolean save = alInsuranceListService.saveInsurance(insuranceSaveReq);
return save ? R.ok() : R.error();
}
@Log(detail = "编辑保后业务",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.UPDATE)
@ApiOperation(value = "编辑保后业务")
@PostMapping("/updateInsurance")
public R updateInsurance(
@ApiParam(name = "insuranceSaveReq", value = "保后业务信息", required = true)
@RequestBody InsuranceSaveReq insuranceSaveReq) {
Integer insuranceId = alInsuranceListService.updateInsurance(insuranceSaveReq);
return R.ok().data("insuranceId",insuranceId);
}
@Log(detail = "删除保后业务",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.DELETE)
@ApiOperation(value = "删除保后业务")
@PostMapping("/deleteInsurance")
public R deleteInsurance(
@ApiParam(name = "insuranceId", value = "保后业务id", required = true)
@RequestParam Integer insuranceId) {
boolean delete = alInsuranceListService.deleteInsurance(insuranceId);
return delete ? R.ok() : R.error();
}
/**
* 担保详细
* @param id
* @return
*/
@Log(detail = "担保详细",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/insuranceDetail")
@ApiOperation(value = "担保详细")
public ResponseResult insuranceDetail(Integer id){
AlInsuranceListRes response = alInsuranceListService.insuranceDetail(id);
return ResponseResult.SUCCESS(response);
public R insuranceDetail(Integer id){
return alInsuranceListService.insuranceDetail(id);
}
@Log(detail = "代偿情况",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/compensationSituation")
@ApiOperation(value = "代偿情况")
public R compensationSituation(String date,Integer insuranceId){
return alInsuranceListService.compensationSituation(date,insuranceId);
}
/**
* 导出
*/
@Log(detail = "导出保后管理列表",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/excelExport")
@ApiOperation(value = "导出保后管理列表")
public ResponseResult excelExport(@RequestParam("ids") List<String> ids, HttpServletResponse response) {
Boolean result = alInsuranceListService.excelExport(ids,response);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
public void excelExport(
@ApiParam(name = "ids", value = "保后id")
@RequestParam("ids")List<Integer> ids, HttpServletResponse response) {
alInsuranceListService.excelExport(ids,response);
}
/**
* 办理结项
* @param id
* @return
*/
@Log(detail = "办理结项",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.UPDATE)
@GetMapping("/updateStatus")
@ApiOperation(value = "办理结项")
@ -89,15 +111,29 @@ public class AlInsuranceListController {
return result>0 ? ResponseResult.SUCCESS("编辑成功!"):ResponseResult.FAIL(60007,"编辑失败!");
}
@PostMapping("/importInsurance")
@ApiOperation("批量导入保后业务")
public R importQuestion(@RequestParam(name = "file") MultipartFile file ,HttpServletResponse response) throws IOException {
try {
Map<String, String> importInsurance = alInsuranceListService.importInsurance(file);
return R.ok().data("import",importInsurance);
} catch (Exception e) {
e.printStackTrace();
}
return R.ok();
}
/**
* 定时任务处理保后管理内容 每隔五秒执行一次
* @param
* @return
* 批量导入保后业务失败数据导出
* @throws Exception e
*/
@Scheduled(cron ="*/5 * * * * ?")
@GetMapping("/updateInsuranceList")
public void updateInsuranceList() {
int result = alInsuranceListService.updateInsuranceList();
@ApiOperation(value = "批量导入保后业务失败数据导出")
@GetMapping("/exportFailure")
public void exportFailureRecord(
@ApiParam(name = "exportCode", value = "importInsurance接口返回的exportCode", required = true)
@RequestParam String exportCode,
HttpServletResponse response) throws Exception {
alInsuranceListService.exportFailureRecord(response, exportCode);
}
}

@ -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();
}
}

@ -1,7 +1,6 @@
package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq;
import com.daqing.financial.guarantee.service.IAlRepaymentEntryService;
import com.daqing.framework.annotation.Log;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
@ -38,21 +37,17 @@ public class AlRepaymentEntryController {
/**
* 还款录入
* @param alRepaymentEntryReq
* @return
*/
@Log(detail = "还款录入",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.INSERT)
@PostMapping("/repaymentEntry")
@ApiOperation(value = "还款录入")
public ResponseResult repaymentEntry(@RequestBody @Valid AlRepaymentEntryReq alRepaymentEntryReq){
public ResponseResult repaymentEntry(@RequestBody @Valid AlRepaymentEntry alRepaymentEntryReq){
int result = alRepaymentEntryService.repaymentEntry(alRepaymentEntryReq);
return result>0 ? ResponseResult.SUCCESS("录入成功"):ResponseResult.FAIL(60006,"录入失败");
}
/**
* 还款详细
* @param id
* @return
*/
@Log(detail = "还款详细",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/repaymentDetail")
@ -64,8 +59,6 @@ public class AlRepaymentEntryController {
/**
* 还款记录列表
* @param
* @return
*/
@Log(detail = "还款记录列表",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/repaymentList")
@ -80,21 +73,17 @@ public class AlRepaymentEntryController {
/**
* 编辑还款信息
* @param alRepaymentEntryReq
* @return
*/
@Log(detail = "编辑还款信息",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.UPDATE)
@PostMapping("/updateRepayment")
@ApiOperation(value = "编辑还款信息")
public ResponseResult updateRepayment(@RequestBody @Valid AlRepaymentEntryReq alRepaymentEntryReq){
public ResponseResult updateRepayment(@RequestBody @Valid AlRepaymentEntry alRepaymentEntryReq){
int result = alRepaymentEntryService.updateRepayment(alRepaymentEntryReq);
return result>0 ? ResponseResult.SUCCESS("编辑成功!"):ResponseResult.FAIL(60007,"编辑失败!");
}
/**
* 批量删除还款信息
* @param ids
* @return
*/
@Log(detail = "批量删除还款信息",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.DELETE)
@PostMapping("/delRepayment")
@ -120,25 +109,22 @@ public class AlRepaymentEntryController {
/**
* 还款统计
* @param insuranceId 保后Id guaranteeAmount 担保额度
* @return
*/
@Log(detail = "还款统计",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/repaymentStatistics")
@ApiOperation(value = "还款统计")
public ResponseResult repaymentStatistics(@RequestParam("insuranceId") Integer insuranceId,@RequestParam("guaranteeAmount") Double guaranteeAmount){
Map map = alRepaymentEntryService.repaymentStatistics(insuranceId,guaranteeAmount);
public ResponseResult repaymentStatistics(@RequestParam("insuranceId") Integer insuranceId){
Map map = alRepaymentEntryService.repaymentStatistics(insuranceId);
return ResponseResult.SUCCESS(map);
}
/**
* 定时任务处理还款记录内容
* @param
* @return
* 定时任务处理还款记录内容 朝九晚六工作时间每隔十分钟执行一次
*/
@Scheduled(cron ="*/5 * * * * ?")
/*@Scheduled(cron ="0 0/10 9-18 * * ?")
@GetMapping("/updateRepaymentEntry")
public void updateRepaymentEntry() {
int result = alRepaymentEntryService.updateRepaymentEntry();
}
alRepaymentEntryService.updateRepaymentEntry();
}*/
}

@ -169,7 +169,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
try (FileInputStream inputStream = new FileInputStream(file);
OutputStream outStream = response.getOutputStream();
BufferedInputStream buffStream = new BufferedInputStream(inputStream);) {
BufferedInputStream buffStream = new BufferedInputStream(inputStream)) {
int i = 0;
while ((i = buffStream.read(buffer)) != -1) {
outStream.write(buffer);
@ -248,10 +248,12 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
if(employeeMessage!= null && employeeMessage.size()>0){
for (BusinessApplicationListResponse response:list) {
for(LinkedHashMap res : employeeMessage){
if (response.getPresenterId()!=null){
if(response.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值
response.setAccount(JSONObject.toJSONString(res.get("account")).replace("\"",""));
response.setDeptName(JSONObject.toJSONString(res.get("deptName")).replace("\"",""));
}
}
if(response != null){
if(response.getAccount()==null){
response.setAccount("客户");

@ -54,7 +54,7 @@ public class DgAssetsInvestigationController {
String CustomerNumberOrName=assetsInvestigationRequest.getCustomerNumberOrName();
Integer status=assetsInvestigationRequest.getStatus();
//获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
//根据角色查询资产部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId);
PageUtils data = null;

@ -53,7 +53,7 @@ public class DgGuaranteeAssignUserController {
@RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName,
@RequestParam(value = "status", required = false) Integer status){
//获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
//根据角色查询担保部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId);
PageUtils data = null;

@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Date;
import java.util.HashMap;
@ -130,7 +131,7 @@ public class DgGuaranteeLetterAssignUserController {
try {
httpServletResponse.setContentType("application/msword");
String filePath = name + "担保函申请.docx";
String fileName = new String(filePath.getBytes(), "ISO-8859-1");
String fileName = new String(filePath.getBytes(), StandardCharsets.ISO_8859_1);
httpServletResponse.addHeader("Content-Disposition", "filename=" + fileName);
template.write(httpServletResponse.getOutputStream());
} catch (IOException e) {

@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
/**
@ -116,7 +117,7 @@ public class DgLoanNoticeController {
try {
httpServletResponse.setContentType("application/msword");
String filePath = name + "放款通知.docx";
String fileName = new String(filePath.getBytes(), "ISO-8859-1");
String fileName = new String(filePath.getBytes(), StandardCharsets.ISO_8859_1);
httpServletResponse.addHeader("Content-Disposition", "filename=" + fileName);
template.write(httpServletResponse.getOutputStream());
} catch (IOException e) {

@ -54,7 +54,7 @@ public class DgMessageInvestigationController {
Integer status=messageInvestigationRequest.getStatus();
//获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
//根据角色查询担保部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId);
PageUtils data = null;

@ -51,7 +51,7 @@ public class DgProcessManageController {
@ApiOperation(value = "流程管理列表")
public ResponseResult processManageList(){
//获取当前登录用户id
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
//查询可见范围内的人可见列表
List<DgProcessManage> list = iDgProcessManageService.processManageList(userId);
return new ResponseResult<PageUtils>().SUCCESS(list);

@ -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();
}

@ -3,12 +3,10 @@ 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.response.AlInsuranceListRes;
import com.daqing.financial.guarantee.model.response.LegalVo;
import com.daqing.financial.guarantee.model.response.PersonLiableResp;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
@ -21,7 +19,11 @@ import java.util.List;
@Mapper
public interface AlInsuranceListMapper extends BaseMapper<AlInsuranceList> {
IPage<AlInsuranceListRes> pageByCondition(Page page, String customerNumberOrName,Integer paymentStatus);
IPage<AlInsuranceList> pageByCondition(Page page, String customerNumberOrName,Integer paymentStatus);
int selectBank(String bank);
PersonLiableResp selectPersonLiable(String personLiable);
List<AlInsuranceListRes> selectListByIds(@Param("ids")List<String> ids);
LegalVo selectLegal(String customerName);
}

@ -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();
}

@ -32,9 +32,11 @@ public interface AlRepaymentEntryMapper extends BaseMapper<AlRepaymentEntry> {
List<AlRepaymentEntry> listAlRepaymentByInsuranceId(Integer id);
List<AlRepaymentCountRes> selectRepaymentList();
List<AlRepaymentCountRes> selectRepaymentList(Integer insuranceId);
List<AlRepaymentEntryRes> selectOverDueDays();
List<AlRepaymentEntryRes> selectBind();
Integer compensationSituation(@Param("date")String date, @Param("insuranceId")Integer insuranceId);
}

@ -24,9 +24,12 @@ public class AlCollectionRequest implements Serializable {
@ApiModelProperty("保后id")
private Integer insuranceId;
@ApiModelProperty("催收方式:1->电话催收;2->上门/外访")
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("催收方式:1->电话催收;2->上门/外访,3其他催收描述")
@Min(value = 1, message = "参数格式不正确")
@Max(value = 2, message = "参数格式不正确")
@Max(value = 3, message = "参数格式不正确")
private Integer collectionMethod;
@ApiModelProperty("催收时间")
@ -38,6 +41,17 @@ public class AlCollectionRequest implements Serializable {
@NotNull(message = "请输入催收反馈")
private String collectionFeedback;
@ApiModelProperty("拜访人")
@NotNull(message = "拜访人不能为空")
private String visitor;
@ApiModelProperty("其他催收描述")
private String other;
@ApiModelProperty("情况说明")
@NotNull(message = "请输入情况说明")
private String situationDescription;
@ApiModelProperty("附件")
@NotNull(message = "请上传催收附件")
private String[] enclosureFiles;

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

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -58,9 +59,18 @@ public class MoreOverdueDetailResponse implements Serializable {
@ApiModelProperty("催收反馈")
private String collectionFeedback;
@ApiModelProperty("情况说明")
private String situationDescription;
@ApiModelProperty("附件")
private String enclosureFile;
@ApiModelProperty("其他描述")
private String other;
@ApiModelProperty("拜访人")
private String visitor;
@ApiModelProperty("附件")
private List<String> enclosureFiles;

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

@ -2,12 +2,15 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.financial.guarantee.model.request.InsuranceSaveReq;
import com.daqing.financial.guarantee.util.R;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import com.daqing.framework.utils.PageUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -21,11 +24,24 @@ public interface IAlInsuranceListService extends IService<AlInsuranceList> {
PageUtils queryPage(Integer page, Integer size, String customerNumberOrName,Integer paymentStatus);
AlInsuranceListRes insuranceDetail(Integer id);
R insuranceDetail(Integer id);
Boolean excelExport(List<String> ids, HttpServletResponse response);
void excelExport(List<Integer> ids, HttpServletResponse response);
int updateStatus(Integer id);
int updateInsuranceList();
// int updateInsuranceList();
boolean saveInsurance(InsuranceSaveReq insuranceSaveReq);
Integer updateInsurance(InsuranceSaveReq insuranceSaveReq);
boolean deleteInsurance(Integer insuranceId);
R compensationSituation(String date,Integer insuranceId);
Map<String, String> importInsurance(MultipartFile file) throws Exception;
void exportFailureRecord(HttpServletResponse response, String exportCode);
}

@ -2,10 +2,8 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.utils.PageUtils;
import io.swagger.models.auth.In;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@ -21,19 +19,21 @@ import java.util.Map;
*/
public interface IAlRepaymentEntryService extends IService<AlRepaymentEntry> {
int repaymentEntry(AlRepaymentEntryReq alRepaymentEntryReq);
int repaymentEntry(AlRepaymentEntry alRepaymentEntryReq);
void updateReimbursementData(Integer insuranceId);
AlRepaymentEntry repaymentDetail(Integer id);
PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, Integer status, Integer insuranceId);
int updateRepayment(AlRepaymentEntryReq alRepaymentEntryReq);
int updateRepayment(AlRepaymentEntry alRepaymentEntryReq);
int delRepayment(List<Integer> ids);
Boolean excelExport(List<String> ids,Integer insuranceId, HttpServletResponse response);
Map repaymentStatistics(Integer insuranceId,Double guaranteeAmount);
Map repaymentStatistics(Integer insuranceId);
int updateRepaymentEntry();
void updateRepaymentEntry(Integer insuranceId);
}

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

@ -129,8 +129,9 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
}
// 当前催收用户
alCollection.setCollectionUser(Integer.parseInt(this.getUserId()));
// alCollection.setCollectionUser(2);
return this.getBaseMapper().collection(alCollection);
int insert = baseMapper.insert(alCollection);
return insert > 0;
}
/**
@ -220,7 +221,7 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
if(measures != null){
if(measures.length()>0){
String a = measures.substring(1,measures.length()-1);
String arry[]=a.split(",");
String[] arry =a.split(",");
List<String> demoList = Arrays.asList(arry);
moreOverdueDetailResponse.setEnclosureFiles(demoList);
}

@ -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);
}
}
}
}

@ -1,30 +1,42 @@
package com.daqing.financial.guarantee.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.mapper.AlInsuranceListMapper;
import com.daqing.financial.guarantee.mapper.AlRepaymentEntryMapper;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentCountRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentRes;
import com.daqing.financial.guarantee.mapper.*;
import com.daqing.financial.guarantee.model.request.ExcelImpInsuranceVO;
import com.daqing.financial.guarantee.model.request.InsuranceSaveReq;
import com.daqing.financial.guarantee.model.response.LegalVo;
import com.daqing.financial.guarantee.model.response.PersonLiableResp;
import com.daqing.financial.guarantee.service.AlCollectionStatisticsService;
import com.daqing.financial.guarantee.service.IAlInsuranceListService;
import com.daqing.financial.guarantee.service.IAlRepaymentEntryService;
import com.daqing.financial.guarantee.util.ExcelImportHelper;
import com.daqing.financial.guarantee.util.R;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.domain.guarantee.*;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import org.apache.poi.hpsf.Decimal;
import org.springframework.beans.BeanUtils;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
* <p>
@ -39,6 +51,28 @@ public class AlInsuranceListServiceImpl extends ServiceImpl<AlInsuranceListMappe
@Autowired
private AlRepaymentEntryMapper alRepaymentEntryMapper;
@Autowired
StringRedisTemplate stringRedisTemplate;
@Autowired
private AlCollectionGroupMapper collectionGroupMapper;
@Autowired
private AlCollectionMapper collectionMapper;
@Autowired
private AlCollectionStatisticsMapper collectionStatisticsMapper;
@Autowired
private AlCollectionStatisticsService collectionStatisticsService;
@Autowired
private AlReimbursementMapper reimbursementMapper;
@Autowired
private AlRepaymentEntryServiceImpl repaymentEntryService;
@Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, Integer paymentStatus) {
//分页参数
@ -48,33 +82,33 @@ public class AlInsuranceListServiceImpl extends ServiceImpl<AlInsuranceListMappe
if (size <= 0) {
size = 10;
}
IPage<AlInsuranceListRes> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,paymentStatus);
IPage<AlInsuranceList> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size), customerNumberOrName, paymentStatus);
return new PageUtils(positionVO);
}
@Override
public AlInsuranceListRes insuranceDetail(Integer id) {
AlInsuranceList alInsuranceList = this.baseMapper.selectById(id);
AlInsuranceListRes res = new AlInsuranceListRes();
if(alInsuranceList!=null){
BeanUtils.copyProperties(alInsuranceList,res);
return res;
}else{
return null;
}
public R insuranceDetail(Integer id) {
AlInsuranceList insuranceList = baseMapper.selectById(id);
QueryWrapper<AlReimbursement> wrapper = new QueryWrapper<>();
wrapper.eq("insurance_id", insuranceList.getId());
AlReimbursement reimbursement = reimbursementMapper.selectOne(wrapper);
return R.ok().data("insuranceList", insuranceList).data("reimbursement", reimbursement);
}
@Override
public Boolean excelExport(List<String> ids, HttpServletResponse response) {
List<AlInsuranceListRes>alInsuranceList = this.baseMapper.selectListByIds(ids);
public void excelExport(List<Integer> ids, HttpServletResponse response) {
List<AlInsuranceList> alInsuranceList = null;
//为空默认导出全部数据
if (ids.size()==0){
alInsuranceList = baseMapper.selectList(null);
}else {
alInsuranceList = baseMapper.selectBatchIds(ids);
}
try {
ExcelUtil.writeExcelWithSheets(response, alInsuranceList, "保后管理一览表", "repaymentEntry", new AlInsuranceListRes())
.finish();
return true;
EasyExcelUtil.download(response, AlInsuranceList.class,alInsuranceList,"保后管理一览表","第一页");
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
return false;
}
}
@ -86,29 +120,551 @@ public class AlInsuranceListServiceImpl extends ServiceImpl<AlInsuranceListMappe
}
@Override
public int updateInsuranceList() {
//统计保后id,还款额度,还款期数
List<AlRepaymentCountRes> list = alRepaymentEntryMapper.selectRepaymentList();
//遍历list计算出剩余额度(剩余额度=担保额度-还款额度)
for (AlRepaymentCountRes res:list) {
BigDecimal guaranteeAmount = res.getGuaranteeAmount();
BigDecimal alreadyPaymentSum = res.getAlreadyPaymentSum();
Double remainSum = guaranteeAmount.doubleValue() - alreadyPaymentSum.doubleValue();
res.setRemainSum(BigDecimal.valueOf(remainSum));
//额度实时更新
AlInsuranceList alInsuranceList = new AlInsuranceList();
@Transactional
public boolean saveInsurance(InsuranceSaveReq insuranceSaveReq) {
AlInsuranceList alInsuranceList = insuranceSaveReq.getAlInsuranceList();
AlReimbursement alReimbursement = insuranceSaveReq.getAlReimbursement();
long time = System.currentTimeMillis();
alInsuranceList.setBusinessCode("SD-"+time);
//添加固定为手动录入
alInsuranceList.setSource(1);
alInsuranceList.setApplyTime(new Date());
//默认数据
alInsuranceList.setRepaymentAmount(new BigDecimal(0));
alInsuranceList.setRemainAmount(alInsuranceList.getGuaranteeAmount());
alInsuranceList.setRepaymentTime(0);
int insert = baseMapper.insert(alInsuranceList);
int ok = 0;
//添加担保信息
if (insert > 0) {
alReimbursement.setInsuranceId(alInsuranceList.getId());
ok = reimbursementMapper.insert(alReimbursement);
}
return ok > 0;
}
@Override
@Transactional
public Integer updateInsurance(InsuranceSaveReq insuranceSaveReq) {
//获取更新数据
AlInsuranceList alInsuranceList = insuranceSaveReq.getAlInsuranceList();
AlReimbursement alReimbursement = insuranceSaveReq.getAlReimbursement();
//更新业务信息
baseMapper.updateById(alInsuranceList);
//查询清收代偿信息
QueryWrapper<AlReimbursement> wrapper = new QueryWrapper<>();
wrapper.eq("insurance_id",alInsuranceList.getId());
AlReimbursement reimbursement = reimbursementMapper.selectOne(wrapper);
//数据存在及更新,流转即添加
if (ObjectUtil.isNotNull(reimbursement)){
//之前清收负责人或清收组数据和本次更新不一致,清除之前数据
if (!reimbursement.getCollectionGroupId().equals(alReimbursement.getCollectionGroupId())||!reimbursement.getPersonLiableId().equals(alReimbursement.getPersonLiableId())){
//查询之前人员是否在统计列表中,存在则清除
ArrayList<Integer> list = collectionStatisticsMapper.selectPerson();
boolean contains = list.contains(reimbursement.getPersonLiableId());
if (contains){
//清空之前统计该业务数据
QueryWrapper<AlCollectionStatistics> deleteWrapper = new QueryWrapper<>();
deleteWrapper.eq("insurance_id",alInsuranceList.getId());
int delete = collectionStatisticsMapper.delete(deleteWrapper);
// System.out.println("删除条数"+delete);
if (delete>0){
//根据业务id更新年度统计
collectionStatisticsService.updateCompleteStatistics(alInsuranceList.getId());
}
}
}
//更新清收代偿数据
alReimbursement.setId(reimbursement.getId());
reimbursementMapper.updateById(alReimbursement);
}else {
reimbursementMapper.insert(alReimbursement);
}
return alInsuranceList.getId();
}
@Override
@Transactional
public boolean deleteInsurance(Integer insuranceId) {
//删除保后
int delete = baseMapper.deleteById(insuranceId);
QueryWrapper<AlReimbursement> wrapper = new QueryWrapper<>();
wrapper.eq("insurance_id",insuranceId);
//删除清收代偿
reimbursementMapper.delete(wrapper);
QueryWrapper<AlRepaymentEntry> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("insurance_id",insuranceId);
//删除还款记录
alRepaymentEntryMapper.delete(queryWrapper);
//删除催收记录
QueryWrapper<AlCollection> collectionQueryWrapper = new QueryWrapper<>();
collectionQueryWrapper.eq("insurance_id",insuranceId);
collectionMapper.delete(collectionQueryWrapper);
//删除清收年度统计数据
QueryWrapper<AlCollectionStatistics> statisticsQueryWrapper = new QueryWrapper<>();
statisticsQueryWrapper.eq("insurance_id",insuranceId);
collectionStatisticsMapper.delete(statisticsQueryWrapper);
return delete > 0;
}
/**
* 代偿情况根据代偿时间返回该日期之后的本次还款金额+其他费用+利息用于计算代偿余额相关信息
* @param date 代偿时间
* @param insuranceId 业务id
* @return 还款金额
*/
@Override
public R compensationSituation(String date,Integer insuranceId) {
Integer amount = alRepaymentEntryMapper.compensationSituation(date,insuranceId);
return R.ok().data("amount",amount);
}
@Override
public Map<String, String> importInsurance(MultipartFile file) throws Exception {
//获取文件数据
List<ExcelImpInsuranceVO> impInsuranceVOList = ExcelImportHelper.readInsuranceManagement(file);
if (impInsuranceVOList.size() <= 0) {
//小于等于0为上传空模板的情况下 抛出异常
throw new Exception("模板为空");
}
//导入失败数据
List<ExcelImpInsuranceVO> impInsuranceFailVo = new ArrayList<>();
// 参数合法性校验,只能上传.xlsx后缀的文件
if (org.apache.commons.lang3.StringUtils.isBlank(file.getOriginalFilename())
|| !file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")).equals(".xlsx")) {
throw new Exception("只能上传.xlsx后缀的文件");
}
Map<String, String> map = new HashMap<>();
Long ii = 1L;//用于记录序列号
Integer countNum = 0;//用于失败原因排序 eg:1、XXXXX 2、XXXXXXX
try {
Integer countSuccess = 0;//统计成功次数
Integer countError = 0;//统计失败次数
for (ExcelImpInsuranceVO impInsuranceVO : impInsuranceVOList) {
boolean ret = true;
++ii;
String errMsg = "";
//去除Excel中的全角半角空格,判断空字符再截取
String customerName = "";
if (StringUtils.isNotBlank(impInsuranceVO.getCustomerName())){
customerName = impInsuranceVO.getCustomerName().replaceAll("\\u00A0", "").trim();
}
String bank = "";
if (StringUtils.isNotBlank(impInsuranceVO.getBank())){
bank = impInsuranceVO.getBank().replaceAll("\\u00A0", "").trim();
}
String guaranteeAmount = "";
if (StringUtils.isNotBlank(impInsuranceVO.getGuaranteeAmount())){
guaranteeAmount = impInsuranceVO.getGuaranteeAmount().replaceAll("\\u00A0", "").trim();
}
String loanStartTime = "";
if (StringUtils.isNotBlank(impInsuranceVO.getLoanStartTime())){
loanStartTime = impInsuranceVO.getLoanStartTime().replaceAll("\\u00A0", "").trim();
}
String loanEndTime = "";
if (StringUtils.isNotBlank(impInsuranceVO.getLoanEndTime())){
loanEndTime = impInsuranceVO.getLoanEndTime().replaceAll("\\u00A0", "").trim();
}
String guaranteeTime = "";
if (StringUtils.isNotBlank(impInsuranceVO.getGuaranteeTime())){
guaranteeTime = impInsuranceVO.getGuaranteeTime().replaceAll("\\u00A0", "").trim();
}
String businessType = "";
if (StringUtils.isNotBlank(impInsuranceVO.getBusinessType())){
businessType = impInsuranceVO.getBusinessType().replaceAll("\\u00A0", "").trim();
}
String amountWide = "";
if (StringUtils.isNotBlank(impInsuranceVO.getAmountWide())){
amountWide = impInsuranceVO.getAmountWide().replaceAll("\\u00A0", "").trim();
}
String compensationAmount = "";
if (StringUtils.isNotBlank(impInsuranceVO.getCompensationAmount())){
compensationAmount = impInsuranceVO.getCompensationAmount().replaceAll("\\u00A0", "").trim();
}
String compensatoryBalance = "";
if (StringUtils.isNotBlank(impInsuranceVO.getCompensatoryBalance())){
compensatoryBalance = impInsuranceVO.getCompensatoryBalance().replaceAll("\\u00A0", "").trim();
}
String compensatoryTime = "";
if (StringUtils.isNotBlank(impInsuranceVO.getCompensatoryTime())){
compensatoryTime = impInsuranceVO.getCompensatoryTime().replaceAll("\\u00A0", "").trim();
}
String personLiable = "";
if (StringUtils.isNotBlank(impInsuranceVO.getPersonLiable())){
personLiable = impInsuranceVO.getPersonLiable().replaceAll("\\u00A0", "").trim();
}
String collectionGroup = "";
if (StringUtils.isNotBlank(impInsuranceVO.getCollectionGroup())){
collectionGroup = impInsuranceVO.getCollectionGroup().replaceAll("\\u00A0", "").trim();
}
String area = "";
if (StringUtils.isNotBlank(impInsuranceVO.getArea())){
area = impInsuranceVO.getArea().replaceAll("\\u00A0", "").trim();
}
String operation = "";
if (StringUtils.isNotBlank(impInsuranceVO.getOperation())){
operation = impInsuranceVO.getOperation().replaceAll("\\u00A0", "").trim();
}
String litigation = "";
if (StringUtils.isNotBlank(impInsuranceVO.getLitigation())){
litigation = impInsuranceVO.getLitigation().replaceAll("\\u00A0", "").trim();
}
if(remainSum==0.00){//剩余额度为0.00,状态为已还清
alInsuranceList.setPaymentStatus(3);//已还清
String mortgage = "";
if (StringUtils.isNotBlank(impInsuranceVO.getMortgage())){
mortgage = impInsuranceVO.getMortgage().replaceAll("\\u00A0", "").trim();
}
alInsuranceList.setId(res.getInsuranceId());
alInsuranceList.setRepaymentAmount(res.getAlreadyPaymentSum());//还款额度
alInsuranceList.setRepaymentTime(res.getRepaymentSum());//还款期数
alInsuranceList.setRemainAmount(res.getRemainSum());//剩余额度
this.baseMapper.updateById(alInsuranceList);
String legalName = "";
String legalPhone = "";
ExcelImpInsuranceVO failVo = new ExcelImpInsuranceVO();
failVo.setIndex(ii);
//检验客户
if ("".equals(customerName)) {
++countNum;
failVo.setCustomerName(customerName + " *必填项:(客户名称不能为空) ");
errMsg += countNum + "必填项:(客户名称不能为空)";
ret = false;
} else {
//查询企业信息
LegalVo legalVo = baseMapper.selectLegal(customerName);
if (ObjectUtil.isNull(legalVo)) {
failVo.setCustomerName(customerName + " *必填项:(客户不存在) ");
errMsg += countNum + "必填项:(客户不存在)";
ret = false;
} else {
//法定代表人
legalName = legalVo.getLegalName();
//联系电话
legalPhone = legalVo.getLegalPhone();
}
failVo.setCustomerName(customerName);
}
if ("".equals(bank)) {
++countNum;
failVo.setBank(bank + " *必填项:(银行不能为空)");
errMsg += countNum + " *必填项:(银行不能为空)";
ret = false;
} else {
int ok = baseMapper.selectBank(bank);
if (ok == 0) {
failVo.setBank(bank + " *必填项:(银行不存在) ");
errMsg += countNum + "必填项:(银行不存在)";
ret = false;
}
failVo.setBank(bank);
}
if ("".equals(guaranteeAmount)) {
++countNum;
failVo.setGuaranteeAmount(guaranteeAmount + " *必填项:(担保额度不能为空)");
errMsg += countNum + " *必填项:(担保额度不能为空)";
ret = false;
}else {
boolean numeric = StringUtils.isNumeric(guaranteeAmount);
if(!numeric){
++countNum;
failVo.setGuaranteeAmount(guaranteeAmount + " *必填项:(担保额度不能字符)");
errMsg += countNum + " *必填项:(担保额度不能字符)";
ret = false;
}
failVo.setGuaranteeAmount(guaranteeAmount);
}
if ("".equals(loanStartTime)) {
++countNum;
failVo.setLoanStartTime(loanStartTime + " *必填项:(贷款开始日期不能为空)");
errMsg += countNum + " *必填项:(贷款开始日期不能为空)";
ret = false;
}else {
boolean validDate = isValidDate(loanStartTime);
if (!validDate){
++countNum;
failVo.setLoanStartTime(loanStartTime + " *必填项:(贷款开始日期格式错误)");
errMsg += countNum + " *必填项:(贷款开始日期格式错误)";
ret = false;
}
failVo.setLoanStartTime(loanStartTime);
}
if ("".equals(loanEndTime)) {
++countNum;
failVo.setLoanEndTime(loanEndTime + " *必填项:(贷款结束日期不能为空)");
errMsg += countNum + " *必填项:(贷款结束日期不能为空)";
ret = false;
}else {
boolean validDate = isValidDate(loanEndTime);
if (!validDate){
++countNum;
failVo.setLoanEndTime(loanEndTime + " *必填项:(贷款结束日期格式错误)");
errMsg += countNum + " *必填项:(贷款结束日期格式错误)";
ret = false;
}
failVo.setLoanEndTime(loanEndTime);
}
if ("".equals(guaranteeTime)) {
++countNum;
failVo.setGuaranteeTime(guaranteeTime + " *必填项:(担保期限不能为空)");
errMsg += countNum + " *必填项:(担保期限不能为空)";
ret = false;
}else {
boolean numeric = StringUtils.isNumeric(guaranteeTime);
if(!numeric){
++countNum;
failVo.setGuaranteeTime(guaranteeTime + " *必填项:(担保期限格式错误,请输入数字)");
errMsg += countNum + " *必填项:(担保期限格式错误,请输入数字)";
ret = false;
}
failVo.setGuaranteeTime(guaranteeTime);
}
if ("".equals(businessType)) {
++countNum;
failVo.setBusinessType(businessType + " *必填项:(业务类别不能为空)");
errMsg += countNum + " *必填项:(业务类别不能为空)";
ret = false;
} else {
switch (businessType.trim()) {
case "融资担保":
case "担保":
case "借贷":
case "小额贷":
case "企业大贷":
case "其他":
break;
default:
++countNum;
failVo.setBusinessType(businessType + " *必填项:(业务类别不存在)");
errMsg += countNum + " *必填项:(业务类别不存在)";
ret = false;
}
failVo.setBusinessType(businessType);
}
if ("".equals(amountWide)) {
++countNum;
failVo.setAmountWide(amountWide + " *必填项:(贷款用途不能为空)");
errMsg += countNum + " *必填项:(贷款用途不能为空)";
ret = false;
} else {
switch (amountWide.trim()) {
case "短期周转":
case "购房贷款":
case "装修贷款":
case "购车贷款":
case "教育贷款":
case "投资创业":
case "其他":
break;
default:
++countNum;
failVo.setAmountWide(amountWide + " *必填项:(贷款用途不存在)");
errMsg += countNum + " *必填项:(贷款用途不存在)";
ret = false;
}
failVo.setAmountWide(amountWide);
}
Integer personLiableId = 0;
if ("".equals(personLiable)) {
++countNum;
failVo.setPersonLiable(personLiable + " *必填项:(清收负责人不能为空)");
errMsg += countNum + " *必填项:(清收负责人不能为空)";
ret = false;
} else {
PersonLiableResp personLiableResp = baseMapper.selectPersonLiable(personLiable);
if (ObjectUtil.isNull(personLiableResp)) {
failVo.setPersonLiable(personLiable + " *必填项:(清收负责人不存在) ");
errMsg += countNum + "必填项:(清收负责人不存在)";
ret = false;
}else {
personLiableId = personLiableResp.getId();
}
failVo.setPersonLiable(personLiable);
}
int collectionGroupId = 0;
if ("".equals(collectionGroup)) {
++countNum;
failVo.setCollectionGroup(collectionGroup + " *必填项:(清收组不能为空)");
errMsg += countNum + " *必填项:(清收组不能为空)";
ret = false;
} else {
QueryWrapper<AlCollectionGroup> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("group_name", collectionGroup);
AlCollectionGroup one = collectionGroupMapper.selectOne(queryWrapper);
if (ObjectUtil.isNull(one)) {
failVo.setCollectionGroup(collectionGroup + " *必填项:(清收组不存在) ");
errMsg += countNum + "必填项:(清收组不存在)";
ret = false;
}else {
collectionGroupId = one.getId();
}
failVo.setCollectionGroup(collectionGroup);
}
if ("".equals(area)) {
++countNum;
failVo.setArea(area + " *必填项:(所在区域不能为空)");
errMsg += countNum + " *必填项:(所在区域不能为空)";
ret = false;
} else {
switch (area.trim()) {
case "萨尔图区":
case "高新区":
case "龙凤区":
case "让胡同路区":
case "大同区":
case "肇县区":
break;
default:
++countNum;
failVo.setArea(area + " *必填项:(所在区域不存在)");
errMsg += countNum + " *必填项:(所在区域不存在)";
ret = false;
}
failVo.setArea(area);
}
//效验都通过添加数据
if (ret) {
InsuranceSaveReq insuranceSaveReq = new InsuranceSaveReq();
AlInsuranceList insuranceList = new AlInsuranceList();
AlReimbursement reimbursement = new AlReimbursement();
insuranceList.setCustomerName(customerName);
insuranceList.setBank(bank);
insuranceList.setLegalName(legalName);
insuranceList.setPhone(legalPhone);
insuranceList.setBusinessType(businessType);
insuranceList.setGuaranteeAmount(new BigDecimal(guaranteeAmount));
insuranceList.setGuaranteeTime(guaranteeTime);
insuranceList.setLoanStartTime(DateUtil.parse(loanStartTime));
insuranceList.setLoanEndTime(DateUtil.parse(loanEndTime));
insuranceList.setAmountWide(amountWide);
if (!"".equals(compensationAmount)) {
reimbursement.setCompensationAmount(new BigDecimal(compensationAmount));
}
if (!"".equals(compensatoryBalance)) {
reimbursement.setCompensatoryBalance(new BigDecimal(compensatoryBalance));
}
if (!"".equals(compensatoryTime)) {
reimbursement.setCompensatoryTime(DateUtil.parse(compensatoryTime));
}
reimbursement.setPersonLiable(personLiable);
reimbursement.setPersonLiableId(personLiableId);
reimbursement.setCollectionGroupId(collectionGroupId);
reimbursement.setArea(area);
reimbursement.setOperation(operation);
reimbursement.setLitigation(litigation);
reimbursement.setMortgage(mortgage);
insuranceSaveReq.setAlInsuranceList(insuranceList);
insuranceSaveReq.setAlReimbursement(reimbursement);
this.saveInsurance(insuranceSaveReq);
countSuccess++;
} else {
countError++;
failVo.setFailureMsg(errMsg);
//添加失败数据
impInsuranceFailVo.add(failVo);
}
}
String exportCode = "";
// 有导入失败的数据,才会存入redis
if (countError > 0) {
//生成token
exportCode = "FAILURE_IMPORT" + UUID.randomUUID().toString().replace("-", "");
ValueOperations<String, String> ops = stringRedisTemplate.opsForValue();
String failureVOJson = JSON.toJSONString(impInsuranceFailVo);
ops.set(exportCode, failureVOJson, 30 * 60, TimeUnit.SECONDS);
}
map.put("exportCode", exportCode);//返回导出code
map.put("successNum", countSuccess + "");//本次新增成功数量
map.put("failureNum", countError + "");//本次新增失败数量
return map;
} catch (RuntimeException e) {
throw new RuntimeException();
}
return 1;
}
@Override
public void exportFailureRecord(HttpServletResponse response, String exportCode) {
if (StringUtils.isEmpty(exportCode)) {
return;
}
ValueOperations<String, String> ops = stringRedisTemplate.opsForValue();
//获取数据
String record = ops.get(exportCode);
if (StringUtils.isEmpty(record)) {
return;
}
List<ExcelImpInsuranceVO> parse = JSON.parseObject(record, new TypeReference<List<ExcelImpInsuranceVO>>() {
});
parse.sort(Comparator.comparing(ExcelImpInsuranceVO::getIndex));
try {
EasyExcelUtil.download(response, ExcelImpInsuranceVO.class,parse,"导入失败数据表","第一页");
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
}
}
public static boolean isValidDate(String str) {
boolean convertSuccess = true;
// 指定日期格式为四位年/两位月份/两位日期,注意yyyy/MM/dd区分大小写;
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat format1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
if (str.contains("-")) {
str=str.replace("-", "/");
}
try {
// 设置lenient为false. 否则SimpleDateFormat会比较宽松地验证日期,比如2007/02/29会被接受,并转换成2007/03/01
if (str.length()==8) {
str=str.substring(0, 5)+"0"+str.substring(5, 7)+"0"+str.charAt(7);
format.setLenient(false);
format.parse(str);
}else if(str.length()==9){
str=str.substring(0, 5)+"0"+str.substring(5, 9);
format.setLenient(false);
format.parse(str);
}else if(str.length()==10){
format.setLenient(false);
format.parse(str);
}else {
format1.setLenient(false);
format1.parse(str);
}
} catch (ParseException e) {
// e.printStackTrace();
// 如果throw java.text.ParseException或者NullPointerException,就说明格式不对
convertSuccess = false;
}
return convertSuccess;
}
}

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

@ -1,5 +1,7 @@
package com.daqing.financial.guarantee.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -7,24 +9,26 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.mapper.AlInsuranceListMapper;
import com.daqing.financial.guarantee.mapper.AlReimbursementMapper;
import com.daqing.financial.guarantee.mapper.AlRepaymentEntryMapper;
import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq;
import com.daqing.financial.guarantee.model.response.AlRepaymentEntryListRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentRes;
import com.daqing.financial.guarantee.service.AlCollectionStatisticsService;
import com.daqing.financial.guarantee.service.IAlRepaymentEntryService;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import com.daqing.framework.domain.guarantee.AlReimbursement;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import io.swagger.models.auth.In;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
@ -45,41 +49,71 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
@Autowired
private AlInsuranceListMapper alInsuranceListMapper;
@Override
public int repaymentEntry(AlRepaymentEntryReq alRepaymentEntryReq) {
AlRepaymentEntry alRepaymentEntry = new AlRepaymentEntry();
BeanUtils.copyProperties(alRepaymentEntryReq,alRepaymentEntry);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date one = null;
Date two = null;
@Autowired
private AlReimbursementMapper reimbursementMapper;
try {
if(alRepaymentEntry.getRepaymentDate() != null){
one = formatter2.parse(formatter.format(alRepaymentEntry.getRepaymentDate())+" 00:00:00");
}
if(alRepaymentEntry.getActualRepaymentDate() != null){
two = formatter2.parse(formatter.format(alRepaymentEntry.getActualRepaymentDate())+" 00:00:00");
}
} catch (ParseException e) {
e.printStackTrace();
}
alRepaymentEntry.setRepaymentDate(one);
alRepaymentEntry.setActualRepaymentDate(two);
@Autowired
private AlRepaymentEntryMapper alRepaymentEntryMapper;
@Autowired
private AlCollectionStatisticsService collectionStatisticsService;
@Override
public int repaymentEntry(AlRepaymentEntry alRepaymentEntry) {
//效验信息
BigDecimal repaymentCash = alRepaymentEntry.getRepaymentCash();
BigDecimal repaymentAssetsAmount = alRepaymentEntry.getRepaymentAssetsAmount();
BigDecimal repaymentOtherAmount = alRepaymentEntry.getRepaymentOtherAmount();
if (repaymentCash==null&&repaymentAssetsAmount==null&&repaymentOtherAmount==null){
ExceptionCast.cast(HrmsCode.REQUIRED);
}
Map map = DgApplyAmountInfoController.getUserIdAndName();
String name = map.get("name").toString();
Integer userId = Integer.parseInt(map.get("userId").toString());
alRepaymentEntry.setSubmitterId(userId);
alRepaymentEntry.setSubmitterName(name);
return this.baseMapper.insert(alRepaymentEntry);
int insert = baseMapper.insert(alRepaymentEntry);
Integer insuranceId = alRepaymentEntry.getInsuranceId();
//更新代偿信息
updateReimbursementData(insuranceId);
//更新业务状态
updateRepaymentEntry(insuranceId);
//更新统计还款记录数据
repaymentStatistics(insuranceId);
//更新年度统计
collectionStatisticsService.updateCompleteStatistics(insuranceId);
return insert;
}
@Override
public void updateReimbursementData(Integer insuranceId) {
QueryWrapper<AlReimbursement> wrapper = new QueryWrapper<>();
wrapper.eq("insurance_id",insuranceId);
AlReimbursement reimbursement = reimbursementMapper.selectOne(wrapper);
if (ObjectUtil.isNotNull(reimbursement)){
//代偿金额和代偿时间不为空,则计算代偿余额
if (reimbursement.getCompensationAmount()!=null&&reimbursement.getCompensatoryTime()!=null){
//还款记录都删除,则余额与金额相同
QueryWrapper<AlRepaymentEntry> repaymentEntryQueryWrapper = new QueryWrapper<>();
repaymentEntryQueryWrapper.eq("insurance_id",insuranceId);
Integer integer = alRepaymentEntryMapper.selectCount(repaymentEntryQueryWrapper);
if (integer==0){
reimbursement.setCompensatoryBalance(reimbursement.getCompensationAmount());
}else {
Integer amount = alRepaymentEntryMapper.compensationSituation(DateUtil.formatDate(reimbursement.getCompensatoryTime()), insuranceId);
BigDecimal compensationAmount = reimbursement.getCompensationAmount();
compensationAmount = compensationAmount.subtract(new BigDecimal(amount));
reimbursement.setCompensatoryBalance(compensationAmount);
}
reimbursementMapper.updateById(reimbursement);
}
}
}
@Override
public AlRepaymentEntry repaymentDetail(Integer id) {
AlRepaymentEntry alRepaymentEntry = this.baseMapper.selectById(id);
return alRepaymentEntry;
return baseMapper.selectById(id);
}
@Override
@ -97,41 +131,33 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
}
@Override
public int updateRepayment(AlRepaymentEntryReq alRepaymentEntryReq) {
AlRepaymentEntry entry = new AlRepaymentEntry();
BeanUtils.copyProperties(alRepaymentEntryReq,entry);
Map map = DgApplyAmountInfoController.getUserIdAndName();
String name = map.get("name").toString();
Integer userId = Integer.parseInt(map.get("userId").toString());
entry.setSubmitterId(userId);
entry.setSubmitterName(name);
//插入或更新的字段有 空字符串 或者 null
return this.baseMapper.update(
null,
Wrappers.<AlRepaymentEntry>lambdaUpdate()
.set(AlRepaymentEntry::getActualRepaymentDate, entry.getActualRepaymentDate()) //把email设置成null
.set(AlRepaymentEntry::getCurrentRepayment, entry.getCurrentRepayment())
.set(AlRepaymentEntry::getInterest, entry.getInterest())
.set(AlRepaymentEntry::getInsuranceId, entry.getInsuranceId())
.set(AlRepaymentEntry::getOtherExpenses, entry.getOtherExpenses())
.set(AlRepaymentEntry::getRepaymentDate, entry.getRepaymentDate())
.set(AlRepaymentEntry::getDeductionAmount, entry.getDeductionAmount())
.set(AlRepaymentEntry::getOverdueDays, entry.getOverdueDays())
.set(AlRepaymentEntry::getRepaymentNotes, entry.getRepaymentNotes())
.set(AlRepaymentEntry::getTotalRepayment, entry.getTotalRepayment())
.set(AlRepaymentEntry::getSubmitterId, entry.getSubmitterId())
.set(AlRepaymentEntry::getSubmitterName, entry.getSubmitterName())
.set(AlRepaymentEntry::getRepaymentStatus, entry.getRepaymentStatus())
.set(AlRepaymentEntry::getCreateTime, entry.getCreateTime())
.set(AlRepaymentEntry::getUpdateTime, entry.getUpdateTime())
.eq(AlRepaymentEntry::getId, entry.getId())
);
//return this.baseMapper.updateById(entry);
public int updateRepayment(AlRepaymentEntry alRepaymentEntryReq) {
int update = baseMapper.updateById(alRepaymentEntryReq);
//更新代偿信息
updateReimbursementData(alRepaymentEntryReq.getInsuranceId());
//更新业务状态
updateRepaymentEntry(alRepaymentEntryReq.getInsuranceId());
//更新统计还款记录数据
repaymentStatistics(alRepaymentEntryReq.getInsuranceId());
//更新年度统计
collectionStatisticsService.updateCompleteStatistics(alRepaymentEntryReq.getInsuranceId());
return update;
}
@Override
public int delRepayment(List<Integer> ids) {
return this.baseMapper.deleteBatchIds(ids);
if (ids.size()>0){
AlRepaymentEntry repaymentEntry = baseMapper.selectById(ids.get(0));
int i = baseMapper.deleteBatchIds(ids);
//更新统计还款记录数据
repaymentStatistics(repaymentEntry.getInsuranceId());
//更新代偿信息
updateReimbursementData(repaymentEntry.getInsuranceId());
//更新年度统计
collectionStatisticsService.updateCompleteStatistics(repaymentEntry.getInsuranceId());
return i;
}
return 0;
}
@Override
@ -149,8 +175,8 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
}
@Override
public Map repaymentStatistics(Integer insuranceId,Double guaranteeAmount) {
Map map = new HashMap();
public Map repaymentStatistics(Integer insuranceId) {
Map<String, Object> map = new HashMap<>();
//统计还款期数(统计状态为已还款期数)
int count1 = this.baseMapper.selectCount(new QueryWrapper<AlRepaymentEntry>()
.eq("repayment_status",2).eq("insurance_id",insuranceId));
@ -188,15 +214,94 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
}
map.put("alreadyPaymentSum",alreadyPaymentSum);
//统计剩余额度(元)(担保额度-还款额度)
Double remainSum = guaranteeAmount-alreadyPaymentSum;
AlInsuranceList insuranceList = alInsuranceListMapper.selectById(insuranceId);
if (ObjectUtil.isNotNull(insuranceList)){
BigDecimal guaranteeAmount = insuranceList.getGuaranteeAmount();
map.put("company",insuranceList.getCustomerName());
//剩余额度
BigDecimal remainSum = guaranteeAmount.subtract(new BigDecimal(alreadyPaymentSum));
map.put("remainSum",remainSum);
if (remainSum.compareTo(BigDecimal.ZERO) <= 0) {//剩余额度为0.00,状态为已还清
insuranceList.setPaymentStatus(3);//已还清
}
insuranceList.setRemainAmount(remainSum);//剩余额度
//额度更新
insuranceList.setRepaymentAmount(new BigDecimal(alreadyPaymentSum));//还款额度
insuranceList.setRepaymentTime(count1);//还款期数
alInsuranceListMapper.updateById(insuranceList);
}
QueryWrapper<AlReimbursement> wrapper = new QueryWrapper<>();
wrapper.eq("insurance_id",insuranceId);
AlReimbursement reimbursement = reimbursementMapper.selectOne(wrapper);
if (ObjectUtil.isNotNull(reimbursement)){
map.put("compensationAmount",reimbursement.getCompensationAmount());
map.put("compensatoryBalance",reimbursement.getCompensatoryBalance());
}
return map;
}
@Override
public int updateRepaymentEntry() {
List<AlRepaymentEntryRes>list = this.baseMapper.selectBind();
public void updateRepaymentEntry(Integer insuranceId) {
//根据业务id查询该业务下的还款记录
QueryWrapper<AlRepaymentEntry> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("insurance_id",insuranceId);
List<AlRepaymentEntry> repaymentEntryList = baseMapper.selectList(queryWrapper);
if (repaymentEntryList.size()>0){
AlInsuranceList alInsuranceList = alInsuranceListMapper.selectById(insuranceId);
int status = 1;
//统计还款数据更新业务的相关状态
for (AlRepaymentEntry repaymentEntry : repaymentEntryList){
long times1 = new Date().getTime();//当前时间
long times2 = repaymentEntry.getRepaymentDate().getTime();//应还款日
long times3 = 0L;
if(repaymentEntry.getActualRepaymentDate()!=null){
times3 = DateUtil.parseDate(repaymentEntry.getActualRepaymentDate()).getTime();//实际还款日
}
//如果存在当前日期超过应还款日时的数据,则计算逾期天数,并且状态改为已逾期,同时要处理保后管理模块内容
if(repaymentEntry.getActualRepaymentDate()==null && times1 > times2){
int days = (int)((times1-times2)/1000/60/60/24);
repaymentEntry.setOverdueDays(days);
repaymentEntry.setRepaymentStatus(3);//已逾期
baseMapper.updateById(repaymentEntry);//更新逾期天数和状态
//更新保后管理列表处的状态为已逾期,并且is_overdue设置为0
// alInsuranceList.setPaymentStatus(2);//已逾期
// alInsuranceList.setIsOverdue(0);//是否逾期过:0->是;1->否;
}else if(repaymentEntry.getActualRepaymentDate()==null && times1==times2){//应还款日=当前日期,则显示状态为待还款
repaymentEntry.setRepaymentStatus(1);//待还款
baseMapper.updateById(repaymentEntry);//更新状态
}else if(repaymentEntry.getActualRepaymentDate()!=null && times3 <= times1){//实际还款日不超过当前日期时,状态为已还款
repaymentEntry.setRepaymentStatus(2);//已还款
baseMapper.updateById(repaymentEntry);//更新状态
}else if(repaymentEntry.getActualRepaymentDate()==null && times1 <= times2){//当前日期未到应还款日,状态为未到期
repaymentEntry.setRepaymentStatus(4);//未到期
baseMapper.updateById(repaymentEntry);//更新状态
}else if (alInsuranceList.getRemainAmount()!=null && repaymentEntry.getActualRepaymentDate()==null && alInsuranceList.getRemainAmount().doubleValue()>0){
//如果存在剩余额度,保后管理列表状态为还款中
alInsuranceList.setPaymentStatus(1);//还款中
}
//有逾期数据更换数值
if (repaymentEntry.getRepaymentStatus()==3){
status = 3;
}
}
if (status==3){
alInsuranceList.setPaymentStatus(2);//已逾期
alInsuranceList.setIsOverdue(0);//是否逾期过:0->是;1->否;
}else {
alInsuranceList.setPaymentStatus(1);//还款中
}
alInsuranceListMapper.updateById(alInsuranceList);
}
/*List<AlRepaymentEntryRes> list = this.baseMapper.selectBind();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -233,17 +338,19 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
//times3 = res.getActualRepaymentDate().getTime();//实际还款日
}
AlRepaymentEntry entry = new AlRepaymentEntry();
entry.setId(res.getId());
AlInsuranceList alInsuranceList = new AlInsuranceList();
alInsuranceList.setId(res.getInsuranceId());
QueryWrapper<AlRepaymentEntry> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("id",res.getId());
AlRepaymentEntry entry = baseMapper.selectOne(queryWrapper);
QueryWrapper<AlInsuranceList> wrapper = new QueryWrapper<>();
wrapper.eq("id",res.getInsuranceId());
AlInsuranceList alInsuranceList = alInsuranceListMapper.selectOne(wrapper);
//如果存在当前日期超过应还款日时的数据,则计算逾期天数,并且状态改为已逾期,同时要处理保后管理模块内容
if(res.getActualRepaymentDate()==null && times1 > times2){
int days = (int)((times1-times2)/1000/60/60/24);
entry.setOverdueDays(days);
entry.setRepaymentStatus(3);//已逾期
this.baseMapper.updateById(entry);//更新逾期天数和状态
//更新保后管理列表处的状态为已逾期,并且is_overdue设置为0
alInsuranceList.setPaymentStatus(2);//已逾期
alInsuranceList.setIsOverdue(0);//是否逾期过:0->是;1->否;
@ -257,13 +364,11 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
}else if(res.getActualRepaymentDate()==null && times1 <= times2){//当前日期未到应还款日,状态为未到期
entry.setRepaymentStatus(4);//未到期
this.baseMapper.updateById(entry);//更新状态
if(res.getRemainAmount()!=null && res.getActualRepaymentDate()==null && res.getRemainAmount().doubleValue()>0){//如果存在剩余额度,保后管理列表状态为还款中
}else if (res.getRemainAmount()!=null && res.getActualRepaymentDate()==null && res.getRemainAmount().doubleValue()>0){
//如果存在剩余额度,保后管理列表状态为还款中
alInsuranceList.setPaymentStatus(1);//还款中
alInsuranceListMapper.updateById(alInsuranceList);
}
}
}
return 1;
}*/
}
}

@ -248,7 +248,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
}
//如果不为保存就往审核流程进程表新增一条记录
if(businessApplication.getIsSaveOrCommit()==1){
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(userId));
AuditProcessUtil.save(Integer.parseInt(userId),dgApplyAmountInfo.getId(),account,
departmentId,"",1,PromptSuccess.DB_YWY_ID,"","","",StatusCode.CZ_LAUNCH);
@ -327,7 +327,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
if(measures != null){
if(measures.length()>0){
String a = measures.substring(1,measures.length()-1);
String arry[]=a.split(",");
String[] arry =a.split(",");
List<String> demoList = Arrays.asList(arry);
dgApplyAmountInfo.setEnGuaranteeMeasure(demoList);
}
@ -360,7 +360,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
List<String> arr1List;
if(list.get(i)!=null){
String a1 = list.get(i).substring(1,list.get(i).length()-1);
String arr1[]=a1.split(",");
String[] arr1 =a1.split(",");
arr1List = Arrays.asList(arr1);
arr1List2.add(i,arr1List);
}else{
@ -515,7 +515,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
.eq("business_id",businessApplication.getBusinessId()));
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),businessApplication.getBusinessId(),account,
departmentId,"",1,PromptSuccess.DB_YWY_ID,"","","",StatusCode.CZ_LAUNCH);
@ -545,7 +545,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
.eq("business_id",applyAmountList.getBusinessId())
.eq("type",applyAmountList.getType()));
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),dgApplyAmountList1.getBusinessId(),
account,departmentId,"",1,PromptSuccess.DB_YWY_ID,"","","",StatusCode.CZ_LAUNCH);
@ -739,7 +739,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
roleId = PromptSuccess.DB_JL_ID;
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),dgApplyAmountList1.getBusinessId(),
account,departmentId,remark,1,roleId,"","","",status);

@ -131,7 +131,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
DgAssetsInvestigation assetsInvestigation = new DgAssetsInvestigation();
assetsInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
assetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
@ -157,7 +157,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
hrmsFeignService.insertUserRole(assetsRequest.getEmpId().longValue(), PromptSuccess.ZC_ZY_ID.longValue());
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),assetsRequest.getBusinessId(),
account, departmentId, "", 3,PromptSuccess.ZC_JL_ID,"","","",StatusCode.SP_REVIEWED);
@ -175,7 +175,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
if(remarks != null){
if(remarks.length()>0){
String a = remarks.substring(1,remarks.length()-1);
String arry[]=a.split(",");
String[] arry =a.split(",");
List<String> demoList = Arrays.asList(arry);
assetsResponse.setRemarkList(demoList);
}
@ -189,7 +189,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
if(assetsAmounts != null){
if(assetsAmounts.length()>0){
String a = assetsAmounts.substring(1,assetsAmounts.length()-1);
String arry[]=a.split(",");
String[] arry =a.split(",");
List<String> demoList = Arrays.asList(arry);
assetsResponse.setAssetsAmountList(demoList);
}
@ -215,7 +215,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
if(files != null){
if(files.length()>0){
String a = files.substring(1,files.length()-1);
String arry[]=a.split(",");
String[] arry =a.split(",");
List<String> demoList = Arrays.asList(arry);
assetsResponse.setFileList(demoList);
}
@ -226,7 +226,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
String measures=dgApplyAmountInfo.getEnGuaranteeMeasures();
if(measures.length()>0){
String a = measures.substring(1,measures.length()-1);
String arry[]=a.split(",");
String[] arry =a.split(",");
List<String> demoList = Arrays.asList(arry);
dgApplyAmountInfo.setEnGuaranteeMeasure(demoList);
}
@ -248,7 +248,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
.eq("business_id", assetsResponse.getBusinessId()).eq("type", 1));
if(assetsInvestigate !=null){
Integer empCId = assetsInvestigate.getEmpId();
Integer arr[] = new Integer[]{
Integer[] arr = new Integer[]{
empCId
};
if(arr.length>0){
@ -337,7 +337,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
eq("business_id",dgAssetsInvestigation.getBusinessId()).eq("type",2));
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),dgAssetsInvestigation.getBusinessId(),
@ -356,7 +356,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
dgAssetsInvestigation.setId(approvalAssetsRequest.getId());
dgAssetsInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
dgAssetsInvestigation.setEmpId(Integer.parseInt(DgApplyAmountInfoController.getUserId()));
dgAssetsInvestigation.setRemark(ArraysUtil.toString(approvalAssetsRequest.getRemark()));//补充原因
dgAssetsInvestigation.setOtherRemark(approvalAssetsRequest.getOtherRemark());//其他原因
if(assetsInvestigation.getType()==2 && approvalAssetsRequest.getStatus()==2){
@ -377,7 +377,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
null,
Wrappers.<DgAssetsInvestigation>lambdaUpdate()
.set(DgAssetsInvestigation::getApplyContent, approvalAssetsRequest.getApplyContent()) //把email设置成null
.set(DgAssetsInvestigation::getEmpId, Integer.parseInt(dgApplyAmountInfoController.getUserId()))
.set(DgAssetsInvestigation::getEmpId, Integer.parseInt(DgApplyAmountInfoController.getUserId()))
.set(DgAssetsInvestigation::getRemark, ArraysUtil.toString(approvalAssetsRequest.getRemark()))
.set(DgAssetsInvestigation::getOtherRemark, approvalAssetsRequest.getOtherRemark())
.set(DgAssetsInvestigation::getStatus, dgAssetsInvestigation.getStatus())//approvalAssetsRequest.getStatus()
@ -514,7 +514,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
}
String loanTerm = approvalAssetsRequest.getTerm();//期限
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),assetsInvestigation.getBusinessId(),
account,departmentId,approvalAssetsRequest.getApplyContent(),

@ -210,11 +210,11 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
timeSumByDepId.put(dl,time);
if(timeSumByDepId.size()>1){
// 累计时间加上本次时间
existMap.put(processId, (Integer.parseInt(existTime)) + "," + count);
existMap.put(processId, (Long.parseLong(existTime)) + "," + count);
}else{
existMap.put(processId, (Integer.parseInt(existTime) + Integer.parseInt(time)) + "," + count);
// existMap.put(processId, (Integer.parseInt(existTime) + Integer.parseInt(time)) + "," + count);
existMap.put(processId, (Long.parseLong(existTime) + Long.parseLong(time)) + "," + count);
}
// existMap.put(processId, (Math.abs(Long.parseLong(existTime) + Long.parseLong(time))) + "," + count);
}
hashMap.put(Integer.parseInt(departmentId), existMap);
@ -247,7 +247,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
@Override
public Map approvalNum() {
//获取当前用户id
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
//近十天的日期数组
List<String> timeList = dgAuditProcessMapper.selectTenDays(Integer.parseInt(userId));
//近十天审批数目的值的数组
@ -800,7 +800,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
@Override
public List notice() {
//获取当前用户id
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
//根据角色查询资产部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId);
PageUtils data = null;

@ -120,7 +120,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
if(measures != null){
if (measures.length() > 0) {
String a = measures.substring(1, measures.length() - 1);
String arry[] = a.split(",");
String[] arry = a.split(",");
List<String> demoList = Arrays.asList(arry);
dgApplyAmountInfo.setEnGuaranteeMeasure(demoList);
}
@ -162,7 +162,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
List<String> arr1List;
if (list.get(i) != null) {
String a1 = list.get(i).substring(1, list.get(i).length() - 1);
String arr1[] = a1.split(",");
String[] arr1 = a1.split(",");
arr1List = Arrays.asList(arr1);
arr1List2.add(i, arr1List);
} else {
@ -208,7 +208,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
if(remarks != null){
if (remarks.length() > 0) {
String a = remarks.substring(1, remarks.length() - 1);
String arry[] = a.split(",");
String[] arry = a.split(",");
List<String> demoList = Arrays.asList(arry);
assignUser.setRemark(demoList);
}
@ -224,7 +224,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
if(assignUser2 !=null || assignUser3 != null){
Integer empAId = assignUser2.getEmpId();
Integer empBId = assignUser3.getEmpId();
Integer arr[] = new Integer[]{
Integer[] arr = new Integer[]{
empAId,empBId
};
if(arr.length>0){
@ -581,7 +581,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
}
//不为保存的情况则往审核流程进程表新增一条记录
if(!investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_DRAFT)){
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),guaranteeAssignUser.getBusinessId(),
account, departmentId, investigateGuaranteeRequest.getApplyContent(), 2,roleId,
@ -599,7 +599,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(approvalGuaranteeRequest.getId());
dgGuaranteeAssignUser.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
dgGuaranteeAssignUser.setEmpId(Integer.parseInt(DgApplyAmountInfoController.getUserId()));
dgGuaranteeAssignUser.setRemark(ArraysUtil.toString(approvalGuaranteeRequest.getRemark()));//补充调查原因
dgGuaranteeAssignUser.setOtherRemark(approvalGuaranteeRequest.getOtherRemark());//其他原因
if(guaranteeUser.getType()==3 && approvalGuaranteeRequest.getStatus()==2){
@ -742,7 +742,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
}
String loanTerm = approvalGuaranteeRequest.getTerm();//期限
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),guaranteeUser.getBusinessId(),
account, departmentId, approvalGuaranteeRequest.getApplyContent(),
@ -808,7 +808,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
}
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser();
guaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
@ -864,7 +864,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
}
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),guaranteeRequest.getBusinessId(),
account, departmentId, "", 2,PromptSuccess.DB_JL_ID,"","","",StatusCode.SP_REVIEWED);

@ -11,6 +11,7 @@ import com.daqing.financial.guarantee.mapper.*;
import com.daqing.financial.guarantee.model.request.LoanNoticeQueryRequest;
import com.daqing.financial.guarantee.model.request.LoanNoticeUpdateRequest;
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse;
import com.daqing.financial.guarantee.model.response.LegalVo;
import com.daqing.financial.guarantee.model.response.LoanNoticeDetailRes;
import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse;
import com.daqing.financial.guarantee.service.IDgCopyForService;
@ -27,6 +28,7 @@ import com.daqing.framework.utils.excel.EasyExcelUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@ -116,6 +118,7 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
}
@Override
@Transactional
public boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest) {
//取出条件
Integer businessId = loanNoticeUpdateRequest.getBusinessId();
@ -169,13 +172,15 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
alInsuranceList.setApplyTime(createTime);
alInsuranceList.setPhone(phone);
alInsuranceList.setCustomerName(name);
alInsuranceList.setLegalName(businessCompany.getLegalName());
//转换单位
BigDecimal quota = new BigDecimal("10000");
alInsuranceList.setGuaranteeAmount(loanMoney.multiply(quota));
alInsuranceList.setGuaranteeTime(loanTern);
alInsuranceList.setAmountWide(amountWide);
alInsuranceList.setPaymentStatus(1);
ArrayList<Integer> arr = new ArrayList<>();
//无需所属部门
/*ArrayList<Integer> arr = new ArrayList<>();
arr.add(presenterId);
//根据提单人id查询其部门名称
ResponseResult responseResult = hrmsFeignService.getAccountAndDeptNameById(arr);
@ -189,7 +194,7 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
alInsuranceList.setDepartment(JSONObject.toJSONString(res.get("deptName")).replace("\"",""));
}
}
}
}*/
//添加抄送数据
try {
copyForService.copySendUser(businessId,10,null);

@ -128,7 +128,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId();
String userId = DgApplyAmountInfoController.getUserId();
DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
dgMessageInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
@ -157,7 +157,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),messageRequest.getBusinessId(),
account, departmentId, "", 4,
@ -178,7 +178,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
if(measures != null){
if(measures.length()>0){
String a = measures.substring(1,measures.length()-1);
String arry[]=a.split(",");
String[] arry =a.split(",");
List<String> demoList = Arrays.asList(arry);
dgApplyAmountInfo.setEnGuaranteeMeasure(demoList);
}
@ -193,7 +193,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
String files=messageInvestigation.getFile();
if(files!=null){
String a = files.substring(1,files.length()-1);
String arry[]=a.split(",");
String[] arry =a.split(",");
List<String> demoList = Arrays.asList(arry);
messageDetailResponse.setMessageFileList(demoList);
}
@ -235,7 +235,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
List<String> arr1List;
if(list.get(i)!=null){
String a1 = list.get(i).substring(1,list.get(i).length()-1);
String arr1[]=a1.split(",");
String[] arr1 =a1.split(",");
arr1List = Arrays.asList(arr1);
arr1List2.add(i,arr1List);
}else{
@ -265,7 +265,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
.eq("business_id", dgMessageInvestigation.getBusinessId()).eq("type", 1));
if(messageInvestigate !=null){
Integer empCId = messageInvestigate.getEmpId();
Integer arr[] = new Integer[]{
Integer[] arr = new Integer[]{
empCId
};
if(arr.length>0){
@ -329,7 +329,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),messageInvestigation.getBusinessId(),
account,departmentId,investigateMessageRequest.getRemark(),4,
@ -346,7 +346,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
dgMessageInvestigation.setId(approvalMessageRequest.getId());
dgMessageInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
dgMessageInvestigation.setEmpId(Integer.parseInt(DgApplyAmountInfoController.getUserId()));
if(messageInvestigation.getType()==2 && approvalMessageRequest.getStatus()==2){
//区分经理,领导审核,此处为经理审核
dgMessageInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//审核中
@ -361,7 +361,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
this.baseMapper.update(
null,
Wrappers.<DgMessageInvestigation>lambdaUpdate()
.set(DgMessageInvestigation::getEmpId, Integer.parseInt(dgApplyAmountInfoController.getUserId()))
.set(DgMessageInvestigation::getEmpId, Integer.parseInt(DgApplyAmountInfoController.getUserId()))
.set(DgMessageInvestigation::getStatus, dgMessageInvestigation.getStatus())//approvalMessageRequest.getStatus()
.set(DgMessageInvestigation::getOperatingStatus, StatusCode.CZ_PROCESSED)
.set(DgMessageInvestigation::getRemark, approvalMessageRequest.getRemark())
@ -482,7 +482,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
roleId = PromptSuccess.XX_LD_ID;
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String account = DgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),messageInvestigation.getBusinessId(),
account,departmentId,approvalMessageRequest.getRemark(),4,roleId,

@ -71,11 +71,7 @@ public class DgProcessManageServiceImpl extends ServiceImpl<DgProcessManageMappe
list.add(dgProcessManageVisual);
}
int i = dgProcessManageVisualMapper.insertUserVisual(list);
if(i>0){
return true;
}else{
return false;
}
return i > 0;
}
@Override
@ -100,7 +96,7 @@ public class DgProcessManageServiceImpl extends ServiceImpl<DgProcessManageMappe
//添加用户可见审批模板
int a = dgProcessManageVisualMapper.insertUserVisual(visualList);
return a>0?true:false;
return a > 0;
}
@ -108,12 +104,12 @@ public class DgProcessManageServiceImpl extends ServiceImpl<DgProcessManageMappe
public Boolean delUserVisual(Integer userId) {
System.out.println("userId~~~~~~~~~~~~~~~~~~~~~"+userId);
int count = dgProcessManageVisualMapper.delete(new QueryWrapper<DgProcessManageVisual>().eq("user_id", userId));
return count>0?true:false;
return count > 0;
}
@Override
public Boolean delBatchUserVisual(List<Integer> userId) {
int count = dgProcessManageVisualMapper.delBatchUserVisual(userId);
return count>0?true:false;
return count > 0;
}
}

@ -158,7 +158,7 @@ public class ArraysUtil {
StringBuilder b = new StringBuilder();
b.append('[');
for (int i = 0; ; i++) {
b.append(String.valueOf(a[i]));
b.append(a[i]);
if (i == iMax)
return b.append(']').toString();
b.append(",");

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

@ -1,6 +1,6 @@
package com.daqing.financial.guarantee.util;
import sun.misc.BASE64Decoder;
import java.io.*;
@ -9,13 +9,13 @@ import java.io.*;
* @DATE 2021/1/15 9:45
* @Version 1.0
*/
public class ImgUtil {
/*public class ImgUtil {
/**
*//**
* base64字符串转化成图片
* @param imgData 图片编码
* @param imgFilePath 存放到本地路径
*/
*//*
public static boolean generateImage(String imgData, String imgFilePath) throws IOException { // 对字节数组字符串进行Base64解码并生成图片
// 图像数据为空
if (imgData == null) {
@ -46,4 +46,4 @@ public class ImgUtil {
return true;
}
}
}*/

@ -6,7 +6,7 @@ spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.password=dq123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
@ -14,29 +14,32 @@ spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#请求处理的超时时间
ribbon.ReadTimeout: 120000
ribbon.ReadTimeout= 120000
#请求连接的超时时间
ribbon.ConnectTimeout: 120000
ribbon.ConnectTimeout= 120000
ribbon.eureka.enabled=true
#全局忽略判断
#mybatis-plus.global-config.db-config.field-strategy=ignored
# 上传文件总的最大值
spring.servlet.multipart.max-request-size=10MB
# 单个文件的最大值
spring.servlet.multipart.max-file-size=10MB
#
##正式环境(prod)
##服务名称
#正式环境(prod)
#服务名称
#spring.application.name=dq-financial-guarantee
##配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848

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

@ -33,11 +33,11 @@
<!-- 催收 -->
<insert id="collection" parameterType="com.daqing.framework.domain.guarantee.AlCollection">
INSERT INTO al_collection (insurance_id,collection_method,collection_time,collection_feedback,enclosure_file
,overdue_amount,overdue_interest,other_expenses,collection_user,overdue_periods)
,overdue_amount,overdue_interest,other_expenses,collection_user,overdue_periods,situation_description)
VALUES (#{ac.insuranceId},#{ac.collectionMethod},#{ac.collectionTime},
#{ac.collectionFeedback},#{ac.enclosureFile},
#{ac.overdueAmount},#{ac.overdueInterest},#{ac.otherExpenses},
#{ac.collectionUser},#{ac.overduePeriods})
#{ac.collectionUser},#{ac.overduePeriods},#{ac.situationDescription})
</insert>
<!--<select id="getOverdueDetailByInsuranceId" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.OverdueDetailResponse">
@ -76,7 +76,7 @@
</select>
<select id="moreOverdueDetail" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.MoreOverdueDetailResponse">
SELECT collection_method,collection_time,collection_feedback,enclosure_file
SELECT collection_method,collection_time,collection_feedback,enclosure_file,situation_description,other,visitor
FROM al_collection
WHERE id = #{id}
</select>

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

@ -17,13 +17,12 @@
<result column="repayment_amount" property="repaymentAmount" />
<result column="remain_amount" property="remainAmount" />
<result column="repayment_time" property="repaymentTime" />
<result column="department" property="department" />
<result column="payment_status" property="paymentStatus" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<select id="pageByCondition" resultType="com.daqing.financial.guarantee.model.response.AlInsuranceListRes">
<select id="pageByCondition" resultType="com.daqing.framework.domain.guarantee.AlInsuranceList">
select * from al_insurance_list
<where>
<if test="paymentStatus != null">
@ -36,17 +35,19 @@
order by create_time desc
</select>
<select id="selectListByIds" resultType="com.daqing.financial.guarantee.model.response.AlInsuranceListRes">
select * from al_insurance_list
<where>
<if test="ids != null and ids.size>0">
id IN
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</if>
</where>
order by create_time desc
<select id="selectBank" resultType="java.lang.Integer">
select count(1) from dg_bank where bank_name = #{bank}
</select>
<select id="selectPersonLiable" resultType="com.daqing.financial.guarantee.model.response.PersonLiableResp">
select id from dq_financial_hrms.hrms_employee where name = #{personLiable} limit 1
</select>
<select id="selectLegal" resultType="com.daqing.financial.guarantee.model.response.LegalVo">
SELECT cu.legal_phone,cu.legal_name
FROM crms_company_customer cu
left join crms_customer cc on cu.customer_id = cc.id
WHERE cc.name = #{customerName}
</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>

@ -57,7 +57,7 @@
<select id="selectRepaymentList" resultType="com.daqing.financial.guarantee.model.response.AlRepaymentCountRes">
select re.insurance_id,COUNT(re.id) as repaymentSum,SUM(re.current_repayment) as alreadyPaymentSum,il.guarantee_amount as guaranteeAmount
from al_repayment_entry re left join al_insurance_list il on il.id=re.insurance_id
where re.repayment_status=2 and il.payment_status in (1,2)
where re.repayment_status=2 and il.payment_status in (1,2) and re.insurance_id = #{insuranceId}
GROUP BY re.insurance_id
</select>
@ -86,4 +86,10 @@
AND insurance_id = #{insuranceId}
</select>
<select id="compensationSituation" resultType="java.lang.Integer">
select IFNULL(sum( current_repayment+interest+other_expenses),0)
from al_repayment_entry
where insurance_id = #{insuranceId} and DATE_FORMAT(actual_repayment_date,'%Y-%m-%d') >= #{date}
</select>
</mapper>

@ -16,8 +16,6 @@
<result column="role_id" property="roleId" />
</resultMap>
<select id="selectAuditProcessList" resultMap="BaseResultMap">
select dap.id,dap.business_id,dap.approver,dap.create_time,dap.audit_opinion,dap.role_id,
dbps.business_status as status,dap.reason,dap.loan_money,dap.loan_tern
@ -32,6 +30,7 @@
<select id="selectProcessId" resultType="java.lang.Integer">
SELECT process_id FROM dg_audit_process WHERE business_id = #{businessId} group by process_id order by process_id asc
</select>
<select id="selectTenDays" resultType="java.lang.String">
SELECT
date_format( create_time, '%Y-%m-%d' ) AS create_time2

@ -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() {
// }
//
//}

@ -130,11 +130,8 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration >
<classifier>exec</classifier>
</configuration>
</plugin>
<!-- <plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
@ -142,7 +139,7 @@
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>-->
</plugin>
</plugins>
</build>

@ -16,7 +16,7 @@ public class CustomExpiredSessionStrategy implements SessionInformationExpiredSt
//前后端分离返回JSON的方式
//jackson的JSON处理对象
private ObjectMapper objectMapper = new ObjectMapper();
private final ObjectMapper objectMapper = new ObjectMapper();
@Override

@ -17,7 +17,7 @@ public class MyAuthenticationToken extends AbstractAuthenticationToken {
private Map<String,Object> map;
public MyAuthenticationToken(Object principal, Object credentials) {
super((Collection)null);
super(null);
this.principal = principal;
this.credentials = credentials;
this.setAuthenticated(false);

@ -8,6 +8,7 @@ import java.io.UnsupportedEncodingException;
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
@ -49,13 +50,13 @@ public class CommonUtil {
if (null != outputStr) {
OutputStream outputStream = httpUrlConn.getOutputStream();
// 注意编码格式,防止中文乱码
outputStream.write(outputStr.getBytes("UTF-8"));
outputStream.write(outputStr.getBytes(StandardCharsets.UTF_8));
outputStream.close();
}
// 将返回的输入流转换成字符串
InputStream inputStream = httpUrlConn.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String str = null;
@ -103,13 +104,13 @@ public class CommonUtil {
if (null != outputStr) {
OutputStream outputStream = httpUrlConn.getOutputStream();
// 注意编码格式,防止中文乱码
outputStream.write(outputStr.getBytes("UTF-8"));
outputStream.write(outputStr.getBytes(StandardCharsets.UTF_8));
outputStream.close();
}
// 将返回的输入流转换成字符串
InputStream inputStream = httpUrlConn.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String str = null;
@ -171,13 +172,13 @@ public class CommonUtil {
if (null != outputStr) {
OutputStream outputStream = httpUrlConn.getOutputStream();
// 注意编码格式,防止中文乱码
outputStream.write(outputStr.getBytes("UTF-8"));
outputStream.write(outputStr.getBytes(StandardCharsets.UTF_8));
outputStream.close();
}
// 将返回的输入流转换成字符串
InputStream inputStream = httpUrlConn.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String str = null;

@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
@ -28,7 +29,7 @@ public class MultiReadHttpServletRequest extends HttpServletRequestWrapper {
public MultiReadHttpServletRequest(HttpServletRequest request) throws IOException {
super(request);
body = getBodyString(request).getBytes(Charset.forName("UTF-8"));
body = getBodyString(request).getBytes(StandardCharsets.UTF_8);
}
@Override
@ -77,7 +78,7 @@ public class MultiReadHttpServletRequest extends HttpServletRequestWrapper {
BufferedReader reader = null;
try {
inputStream = request.getInputStream();
reader = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("UTF-8")));
reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
String line = "";
while ((line = reader.readLine()) != null) {
sb.append(line);

@ -21,8 +21,8 @@ import java.io.PrintWriter;
*/
public class MultiReadHttpServletResponse extends HttpServletResponseWrapper {
private ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
private HttpServletResponse response;
private final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
private final HttpServletResponse response;
public MultiReadHttpServletResponse(HttpServletResponse response) {
super(response);

@ -6,6 +6,7 @@ package com.daqing.financial.hrauth.util;
*/
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
/**
@ -13,7 +14,7 @@ import java.util.Arrays;
*/
public class PKCS7Encoder {
private static final Charset CHARSET = Charset.forName("utf-8");
private static final Charset CHARSET = StandardCharsets.UTF_8;
private static final int BLOCK_SIZE = 32;
/**
@ -30,7 +31,7 @@ public class PKCS7Encoder {
}
// 获得补位所用的字符
char padChr = chr(amountToPad);
String tmp = new String();
String tmp = "";
for (int index = 0; index < amountToPad; index++) {
tmp += padChr;
}

@ -5,9 +5,10 @@ import javax.crypto.spec.SecretKeySpec;
import cn.hutool.core.codec.Base64;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import sun.misc.BASE64Decoder;
import com.alibaba.fastjson.JSONObject;
import com.daqing.financial.config.Base64Encoder;
import java.nio.charset.StandardCharsets;
import java.security.AlgorithmParameters;
import java.security.Security;
import java.util.Arrays;
@ -61,16 +62,16 @@ public class WXBizDataCrypt {
public String decrypt(String encryptedData, String sessionKey, String iv, String encodingFormat) throws Exception {
try {
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] _encryptedData = base64Decoder.decodeBuffer(encryptedData);
byte[] _sessionKey = base64Decoder.decodeBuffer(sessionKey);
byte[] _iv = base64Decoder.decodeBuffer(iv);
// BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] _encryptedData = Base64Encoder.decode(encryptedData);
byte[] _sessionKey = Base64Encoder.decode(sessionKey);
byte[] _iv = Base64Encoder.decode(iv);
SecretKeySpec secretKeySpec = new SecretKeySpec(_sessionKey, "AES");
IvParameterSpec ivParameterSpec = new IvParameterSpec(_iv);
cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, ivParameterSpec);
byte[] original = cipher.doFinal(_encryptedData);
byte[] bytes = PKCS7Encoder.decode(original);
String originalString = new String(bytes, "UTF-8");//ISO-8859-1
String originalString = new String(bytes, StandardCharsets.UTF_8);//ISO-8859-1
return originalString;
} catch (Exception ex) {
return null;
@ -112,7 +113,7 @@ public class WXBizDataCrypt {
cipher.init(Cipher.DECRYPT_MODE, spec, parameters);// 初始化
byte[] resultByte = cipher.doFinal(dataByte);
if (null != resultByte && resultByte.length > 0) {
String result = new String(resultByte, "UTF-8");
String result = new String(resultByte, StandardCharsets.UTF_8);
return JSONObject.parseObject(result);
}
} catch (Exception e) {

@ -15,18 +15,18 @@ spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#请求处理的超时时间
ribbon.ReadTimeout: 120000
ribbon.ReadTimeout= 120000
#请求连接的超时时间
ribbon.ConnectTimeout: 30000
ribbon.ConnectTimeout= 30000
#ribbon.eureka.enabled: true
#eureka.client.fetch-registry: false
#feign.hystrix.enabled=true

@ -6,6 +6,7 @@ import com.daqing.framework.domain.hrms.PermissionEntity;
import com.daqing.framework.domain.hrms.RolePermissionEntity;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@ -121,6 +122,7 @@ public class PermissionController implements PermissionControllerApi {
@Transactional
@GetMapping("/getPermission")
@ApiOperation(value = "获取个人权限列表", notes = "获取个人权限列表")
public ResponseResult getPermission() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");

@ -15,18 +15,18 @@ spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#请求处理的超时时间
ribbon.ReadTimeout: 120000
ribbon.ReadTimeout= 120000
#请求连接的超时时间
ribbon.ConnectTimeout: 30000
ribbon.ConnectTimeout= 30000
#ribbon.eureka.enabled: true
#eureka.client.fetch-registry: false
#feign.hystrix.enabled=true

@ -7,6 +7,11 @@
<artifactId>dq-framework-common</artifactId>
<version>1.0-SNAPSHOT</version>
<description>每一个微服务公共的依赖</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<!-- <plugin>
@ -22,6 +27,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
</configuration>
@ -179,4 +185,5 @@
</dependency>
</dependencies>
</dependencyManagement>
</project>

@ -9,7 +9,7 @@ import com.daqing.framework.model.response.ResultCode;
* @Modified By:
*/
public class CustomException extends RuntimeException {
private ResultCode resultCode;
private final ResultCode resultCode;
public CustomException(ResultCode resultCode) {
//异常信息为错误码+异常信息

@ -48,7 +48,7 @@ public class Constant {
*/
BUTTON(2);
private int value;
private final int value;
MenuType(int value) {
this.value = value;
@ -76,7 +76,7 @@ public class Constant {
*/
PAUSE(1);
private int value;
private final int value;
ScheduleStatus(int value) {
this.value = value;
@ -104,7 +104,7 @@ public class Constant {
*/
QCLOUD(3);
private int value;
private final int value;
CloudService(int value) {
this.value = value;

@ -39,19 +39,19 @@ public enum CommonCode implements ResultCode {
* 操作是否成功
*/
@Getter
private boolean success;
private final boolean success;
/**
* 状态码
*/
@Getter
private int code;
private final int code;
/**
* 提示信息
*/
@Getter
private String message;
private final String message;
@Override
public boolean success() {

@ -32,15 +32,15 @@ public class PromptSuccess {
public static final String UPLOAD_FILE_PATH = "//usr//local//nginx//html//admin//headImg//"; // linux图片存放路径
public static final String IMAGE_URL_PATH = "https://test.feifanhitech.com/headImg/"; // 数据库/预加载图片路径
// public static final String IMAGE_URL_PATH = "https://www.feifanhitech.com/headImg/"; // 数据库/预加载图片路径
// public static final String IMAGE_URL_PATH = "https://test.feifanhitech.com/headImg/"; // 数据库/预加载图片路径
public static final String IMAGE_URL_PATH = "https://www.feifanhitech.com/headImg/"; // 数据库/预加载图片路径
public static final String[] LETTERS = {"A","B","C","D","E"}; // 员工姓名重复时自动加的字母,可再添加
public static final String STATUS_REFUSE = "拒绝";
public static final String ENCLOSUREFILE_URL_PATH = "https://test.feifanhitech.com/enclosureFile/"; // 附件文件存放路径
// public static final String ENCLOSUREFILE_URL_PATH = "https://www.feifanhitech.com/enclosureFile/"; // 附件文件存放路径
// public static final String ENCLOSUREFILE_URL_PATH = "https://test.feifanhitech.com/enclosureFile/"; // 附件文件存放路径
public static final String ENCLOSUREFILE_URL_PATH = "https://www.feifanhitech.com/enclosureFile/"; // 附件文件存放路径
public static final String FILE_URL_PATH = "//usr//local//nginx//html//admin//enclosureFile//"; // 附件文件存放路径

@ -158,7 +158,7 @@ public class ArraysUtil {
StringBuilder b = new StringBuilder();
b.append('[');
for (int i = 0; ; i++) {
b.append(String.valueOf(a[i]));
b.append(a[i]);
if (i == iMax)
return b.append(']').toString();
b.append(",");

@ -10,6 +10,10 @@
<description>统一管理项目涉及到的实体类</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.daqing.framework</groupId>
@ -21,6 +25,12 @@
<artifactId>dq-framework-utils</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>4.1.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
@ -28,11 +38,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -30,19 +30,19 @@ public enum CrmsCode implements ResultCode {
* 操作是否成功
*/
@Getter
private boolean success;
private final boolean success;
/**
* 状态码
*/
@Getter
private int code;
private final int code;
/**
* 提示信息
*/
@Getter
private String message;
private final String message;
public boolean success() {
return this.success;

@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -27,33 +28,19 @@ public class AlCollection implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty("主键id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 保后主键id
*/
@ApiModelProperty("保后id")
private Integer insuranceId;
/**
* 逾期金额
*/
@ApiModelProperty("逾期金额")
private BigDecimal overdueAmount;
/**
* 逾期利息
*/
@ApiModelProperty("逾期利息")
private BigDecimal overdueInterest;
/**
* 逾期费用
*/
@ApiModelProperty("逾期费用")
private BigDecimal otherExpenses;
@ -62,32 +49,34 @@ public class AlCollection implements Serializable {
*/
private Integer overduePeriods;
/**
* 催收方式1->电话催收2->上门/外访
*/
@ApiModelProperty("催收方式:1->电话催收;2->上门/外访")
@NotNull(message = "催收方式不能为空")
private Integer collectionMethod;
@ApiModelProperty("催收人")
private Integer collectionUser;
/**
* 催收时间
*/
@ApiModelProperty("催收时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@NotNull(message = "催收时间不能为空")
private Date collectionTime;
/**
* 催收反馈
*/
@ApiModelProperty("催收反馈")
@NotNull(message = "催收反馈不能为空")
private String collectionFeedback;
/**
* 附件
*/
@ApiModelProperty("附件")
@NotNull(message = "附件不能为空")
private String enclosureFile;
@ApiModelProperty("情况说明")
@NotNull(message = "情况说明不能为空")
private String situationDescription;
@ApiModelProperty("拜访人")
@NotNull(message = "拜访人不能为空")
private String visitor;
@ApiModelProperty("其他催收描述")
private String other;
}

@ -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;
import java.math.BigDecimal;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
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 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>
*
* @author Qyq
* @since 2021-03-17
* @author lr
* @since 2021-08-12
*/
@Data
@TableName("al_insurance_list")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="AlInsuranceList对象", description="保后管理列表")
public class AlInsuranceList implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
@ExcelIgnore
private Integer id;
/**
* 业务编号
*/
@ApiModelProperty(value = "业务编号")
@ExcelProperty(value = "业务编号",index = 0)
private String businessCode;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
@ExcelProperty(value = "客户名称",index = 1)
private String customerName;
/**
* 联系电话
*/
@ApiModelProperty(value = "法人-姓名")
@ExcelIgnore
private String legalName;
@ApiModelProperty(value = "联系电话")
@ExcelProperty(value = "联系电话",index = 2)
private String phone;
/**
* 业务类别
*/
@ApiModelProperty(value = "业务类别")
@ExcelProperty(value = "业务类型",index = 3)
private String businessType;
/**
* 担保额度
*/
@ApiModelProperty(value = "担保额度(元)")
@ExcelProperty(value = "担保额度(元)",index = 4)
private BigDecimal guaranteeAmount;
/**
* 担保期限
*/
@ApiModelProperty(value = "担保期限")
@ExcelProperty(value = "担保期限",index = 5)
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;
/**
* 贷款银行
*/
@ApiModelProperty(value = "贷款银行(用中划线隔开)")
@ExcelIgnore
private String bank;
/**
* 贷款用途
*/
@ApiModelProperty(value = "贷款用途")
@ExcelIgnore
private String amountWide;
/**
* 还款额度
*/
@ApiModelProperty(value = "还款额度(元)")
@ExcelProperty(value = "还款额度(元)",index = 7)
private BigDecimal repaymentAmount;
/**
* 剩余额度
*/
@ApiModelProperty(value = "剩余额度(元)")
@ExcelProperty(value = "剩余额度(元)",index = 8)
private BigDecimal remainAmount;
/**
* 还款期数
*/
@ApiModelProperty(value = "还款期数")
@ExcelProperty(value = "还款期数",index = 9)
private Integer repaymentTime;
/**
* 所属部门
*/
private String department;
// @ApiModelProperty(value = "所属部门")
// @ExcelProperty(value = "所属部门",index = 10)
// private String department;
/**
* 还款状态1->还款中2->已逾期3->已还清4->已结项
*/
@ApiModelProperty(value = "还款状态:1->还款中;2->已逾期;3->已还清;4->已结项;")
@ExcelProperty(value = "还款状态",index = 10,converter = InsuranceStatusConverter.class)
private Integer paymentStatus;
/**
* 是否逾期过0->1->
*/
@ExcelProperty(value = "来源",index = 11,converter = SourceStatusConverter.class)
@ApiModelProperty(value = "来源,默认为0系统流转,1为手动添加")
private int source;
@ExcelIgnore
@ApiModelProperty(value = "是否逾期过:0->是;1->否;")
private Integer isOverdue;
/**
* 创建时间
*/
@ExcelIgnore
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@ExcelIgnore
@ApiModelProperty(value = "修改时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
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;
}

@ -1,11 +1,11 @@
package com.daqing.framework.domain.guarantee;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
@ -24,90 +24,79 @@ public class AlRepaymentEntry 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;
/**
* 应还款日
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@NotNull(message = "应还款日不能为空")
@ApiModelProperty(value = "应还款日")
private Date repaymentDate;
/**
* 实际还款日
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date actualRepaymentDate;
@ApiModelProperty(value = "实际还款日")
@TableField(value = "actual_repayment_date",strategy = FieldStrategy.IGNORED)
private String 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 = "还款备注")
@TableField(strategy = FieldStrategy.IGNORED)
private String repaymentNotes;
/**
* 还款状态1->待还款2->已还款3->已逾期4->未到期
*/
@ApiModelProperty(value = "还款状态:1->待还款;2->已还款;3->已逾期;4->未到期;")
private Integer repaymentStatus;
/**
* 提交人id
*/
@ApiModelProperty(value = "提交人id")
private Integer submitterId;
/**
* 提交人名称
*/
@ApiModelProperty(value = "提交人名称")
private String submitterName;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "清偿现金")
@TableField(strategy = FieldStrategy.IGNORED)
private BigDecimal repaymentCash;
@ApiModelProperty(value = "清偿资产名称")
@TableField(strategy = FieldStrategy.IGNORED)
private String repaymentAssetsName;
@ApiModelProperty(value = "清偿资产金额")
@TableField(strategy = FieldStrategy.IGNORED)
private BigDecimal repaymentAssetsAmount;
@ApiModelProperty(value = "清偿其他名称")
@TableField(strategy = FieldStrategy.IGNORED)
private String repaymentOtherName;
@ApiModelProperty(value = "清偿其他金额")
@TableField(strategy = FieldStrategy.IGNORED)
private BigDecimal repaymentOtherAmount;
@ApiModelProperty(value = "创建时间")
@TableField(fill= FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "修改时间")
@TableField(fill= FieldFill.INSERT_UPDATE)
private Date updateTime;
}

@ -39,19 +39,19 @@ public enum GuaranteeCode implements ResultCode {
* 操作是否成功
*/
@Getter
private boolean success;
private final boolean success;
/**
* 状态码
*/
@Getter
private int code;
private final int code;
/**
* 提示信息
*/
@Getter
private String message;
private final String message;
public boolean success() {
return this.success;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save