From 01682cb132a35a39505d36ffd087d2db244e19fc Mon Sep 17 00:00:00 2001
From: shijie <648688341@qq.com>
Date: Thu, 7 Jan 2021 10:32:51 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
dq-financial-crms/pom.xml | 6 +
.../model/request/CompanyCustomerRequest.java | 1 -
.../service/impl/CustomerServiceImpl.java | 8 +-
dq-financial-guarantee/pom.xml | 5 +
.../controller/DgAuditProcessController.java | 15 +
.../controller/DgEfficiencyController.java | 87 ++--
.../guarantee/feign/HrmsFeignService.java | 3 +
.../mapper/DgApplyAmountInfoMapper.java | 4 +
.../DgStatisticsExcelRefuseResponse.java | 29 +-
.../response/DgStatisticsExcelResponse.java | 23 +-
.../PersonalEfficiencyListResponse.java | 28 +-
.../service/IDgEfficiencyService.java | 3 +
.../impl/DgApplyAmountInfoServiceImpl.java | 30 +-
.../DgAssetsInvestigationServiceImpl.java | 23 +-
.../service/impl/DgEfficiencyServiceImpl.java | 407 +++++++++++++++++-
.../DgGuaranteeAssignUserServiceImpl.java | 18 +-
.../DgMessageInvestigationServiceImpl.java | 19 +-
.../src/main/resources/bootstrap.properties | 4 +-
.../guarantee/DgApplyAmountInfoMapper.xml | 11 +
.../mapper/guarantee/DgAuditProcessMapper.xml | 3 +-
.../controller/RolePermissionController.java | 13 +
.../controller/UserLoginController.java | 8 +-
.../hrms/controller/EmployeeController.java | 2 +
.../hrms/controller/RoleController.java | 8 +
.../service/impl/EmployeeServiceImpl.java | 2 +-
.../com/daqing/framework/util/Md5Util.java | 2 +-
.../domain/crms/ext/CustomerPersonalTOI.java | 1 -
.../domain/guarantee/DgAuditProcess.java | 3 +
.../domain/guarantee/GuaranteeCode.java | 3 +-
.../domain/guarantee/po/StatusPO.java | 31 ++
.../domain/hrms/response/HrmsCode.java | 1 +
.../framework/utils/excel/EasyExcelUtil.java | 4 +-
.../utils/excel/ProcessIdConverter.java | 84 ++++
.../utils/excel/TaskNodeConverter.java | 30 +-
34 files changed, 809 insertions(+), 110 deletions(-)
create mode 100644 dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/StatusPO.java
create mode 100644 dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/ProcessIdConverter.java
diff --git a/dq-financial-crms/pom.xml b/dq-financial-crms/pom.xml
index 2e677483..4151e277 100644
--- a/dq-financial-crms/pom.xml
+++ b/dq-financial-crms/pom.xml
@@ -68,6 +68,12 @@
maven-compiler-plugin
3.8.1
+
diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java
index a321465e..a276f795 100644
--- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java
+++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java
@@ -32,7 +32,6 @@ public class CompanyCustomerRequest implements Serializable {
@ApiModelProperty(value = "客户类型")
private Integer type;
- @NotNull(message = "客户经理人不能为空")
@ApiModelProperty(value = "客户经理人ids")
private Long manager;
diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
index 9b0fff26..ce8e8d7f 100644
--- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
+++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
@@ -378,9 +378,9 @@ public class CustomerServiceImpl extends ServiceImpl().FAIL("导入数据失败,员工" + manager.getManager() + "不存在");
- }
+ }*/
}
this.saveCustomerPersonal(customerPersonalTOI);
}
@@ -399,9 +399,9 @@ public class CustomerServiceImpl extends ServiceImpl().FAIL("导入数据失败,员工" + manager.getManager() + "不存在");
- }
+ }*/
}
this.insertCompany(companyCustomerRequest);
// this.saveCustomerCompany(customerCompanyTOI);
diff --git a/dq-financial-guarantee/pom.xml b/dq-financial-guarantee/pom.xml
index 88806050..d93e7339 100644
--- a/dq-financial-guarantee/pom.xml
+++ b/dq-financial-guarantee/pom.xml
@@ -83,6 +83,11 @@
mybatis-plus-boot-starter
3.0.7.1
+
+ cn.hutool
+ hutool-all
+ 5.3.8
+
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
index cf6703d0..ca12ec50 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
@@ -2,9 +2,11 @@ package com.daqing.financial.guarantee.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.service.IDgAuditProcessService;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import com.daqing.framework.domain.guarantee.po.ProcessPO;
+import com.daqing.framework.domain.hrms.RoleEntity;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -34,6 +36,9 @@ public class DgAuditProcessController {
@Autowired
private IDgAuditProcessService auditProcessService;
+ @Autowired
+ private HrmsFeignService hrmsFeignService;
+
@ApiOperation(value = "审核流程进程列表")
@GetMapping("/auditProcessList")
public ResponseResult processList(
@@ -42,6 +47,16 @@ public class DgAuditProcessController {
@ApiParam(name = "processId", value = "流程id", required = false)
@RequestParam(required = false) String processId){
List processList = auditProcessService.queryProcessList(businessId,processId);
+ ResponseResult responseResult = hrmsFeignService.roleList();
+ //获取角色名称信息
+ List list = (List) responseResult.getData();
+ for (DgAuditProcess process:processList){
+ for (RoleEntity roleEntity:list){
+ if (process.getRoleId().equals(roleEntity.getId())){
+ process.setDeptName(roleEntity.getName());
+ }
+ }
+ }
return ResponseResult.SUCCESS(processList);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
index 514a973b..ff152d29 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
@@ -1,7 +1,16 @@
package com.daqing.financial.guarantee.controller;
+import com.alibaba.fastjson.JSONObject;
+import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest;
+import com.daqing.financial.guarantee.model.request.PersonalEfficiencyListRequest;
+import com.daqing.financial.guarantee.model.response.NumResponse;
+import com.daqing.financial.guarantee.model.response.PersonalEfficiencyListResponse;
import com.daqing.financial.guarantee.service.IDgEfficiencyService;
+import com.daqing.financial.guarantee.util.DateUtils;
+import com.daqing.financial.guarantee.util.R;
+import com.daqing.financial.guarantee.util.TaskNodeUtil;
+import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import io.swagger.annotations.Api;
@@ -38,6 +47,8 @@ public class DgEfficiencyController {
@Autowired
private IDgEfficiencyService dgEfficiencyService;
+ @Autowired
+ private HrmsFeignService hrmsFeignService;
/**
* 团队效率
*/
@@ -47,6 +58,16 @@ public class DgEfficiencyController {
return ResponseResult.SUCCESS(dgEfficiencyService.queryList(dgEfficiencyTeamRequest));
}
+ /**
+ * 统计不同业务状态下业务数量
+ */
+ @GetMapping("/businessCount")
+ @ApiOperation(value = "统计不同业务状态下业务数量", notes = "统计不同业务状态下业务数量")
+ public ResponseResult getBusinessCount(){
+
+ return ResponseResult.SUCCESS(dgEfficiencyService.getBusinessCount());
+ }
+
/**
* 首页-近十天的审批数目
*/
@@ -68,9 +89,9 @@ public class DgEfficiencyController {
return ResponseResult.SUCCESS(result);
}
- @ApiOperation(value = "个人效率记录列表 ")
+ @ApiOperation(value = "个人效率记录列表")
@PostMapping("/personalEfficiencyList")
- public ResponseResult personalEfficiencyList(
+ public R personalEfficiencyList(
@ApiParam(name = "personalEfficiencyListRequest", value = "个人效率列表查询对象")
@RequestBody PersonalEfficiencyListRequest personalEfficiencyListRequest){
List responseList = dgEfficiencyService.queryPersonalEfficiencyList();
@@ -95,23 +116,54 @@ public class DgEfficiencyController {
}
}
}
+
+ NumResponse numResponse = new NumResponse();
+ //转换任务节点,并统计操作状态个数
+ responseList.forEach(personalEfficiencyListResponse -> {
+ String taskNode = personalEfficiencyListResponse.getTaskNode();
+ if (taskNode!=null){
+ String converter = TaskNodeUtil.converter(taskNode);
+ personalEfficiencyListResponse.setTaskNode(converter);
+ }
+ if (personalEfficiencyListResponse.getOperatingStatus()!=null){
+ switch (personalEfficiencyListResponse.getOperatingStatus()){
+ case 0:
+ numResponse.setInitiateNum(numResponse.getInitiateNum()+1);
+ break;
+ case 1:
+ numResponse.setPendingNum(numResponse.getPendingNum()+1);
+ break;
+ case 2:
+ numResponse.setProcessedNum(numResponse.getProcessedNum()+1);
+ break;
+ default:
+ numResponse.setInitiateNum(0);
+ numResponse.setPendingNum(0);
+ numResponse.setProcessedNum(0);
+ break;
+ }
+ }
+ });
//根据条件筛选数据
+ //迭代器进行筛选
if (personalEfficiencyListRequest.getOperatingStatus()!=null){
// 已发起
if (personalEfficiencyListRequest.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)){
- responseList = responseList.stream().filter(p -> p.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)).collect(Collectors.toList());
+ responseList.removeIf(next -> !next.getOperatingStatus().equals(StatusCode.CZ_LAUNCH));
+ // responseList = responseList.stream().filter(p -> !p.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)).collect(Collectors.toList());
// 待处理
}else if (personalEfficiencyListRequest.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)){
- responseList = responseList.stream().filter(p -> p.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)).collect(Collectors.toList());
+ responseList.removeIf(next -> !next.getOperatingStatus().equals(StatusCode.CZ_ON_HAND));
+ // responseList = responseList.stream().filter(p -> !p.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)).collect(Collectors.toList());
// 已处理
}else if (personalEfficiencyListRequest.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){
- responseList = responseList.stream().filter(p -> p.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)).collect(Collectors.toList());
+ responseList.removeIf(next -> !next.getOperatingStatus().equals(StatusCode.CZ_PROCESSED));
+ // responseList = responseList.stream().filter(p -> !p.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)).collect(Collectors.toList());
}
}
-
// 时间筛选(固定时间)
if (personalEfficiencyListRequest.getCreateFixedTime() != null && personalEfficiencyListRequest.getStartTime() == null && personalEfficiencyListRequest.getEndTime() == null) {
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
switch (personalEfficiencyListRequest.getCreateFixedTime()) {
case 0:
personalEfficiencyListRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
@@ -152,26 +204,7 @@ public class DgEfficiencyController {
}
}
}
- //转换任务节点,并统计操作状态个数
- responseList.forEach(personalEfficiencyListResponse -> {
- String taskNode = personalEfficiencyListResponse.getTaskNode();
- if (taskNode!=null){
- String converter = TaskNodeUtil.converter(taskNode);
- personalEfficiencyListResponse.setTaskNode(converter);
- }
- if (personalEfficiencyListResponse.getOperatingStatus()!=null){
- switch (personalEfficiencyListResponse.getOperatingStatus()){
- case 0:
- personalEfficiencyListResponse.setInitiateNum(personalEfficiencyListResponse.getInitiateNum()+1);
- case 1:
- personalEfficiencyListResponse.setPendingNum(personalEfficiencyListResponse.getPendingNum()+1);
- case 2:
- personalEfficiencyListResponse.setProcessedNum(personalEfficiencyListResponse.getProcessedNum()+1);
- }
- }
- });
-
- return ResponseResult.SUCCESS(responseList);
+ return R.ok().data("responseList",responseList).data("statistics",numResponse);
}
public static long getLongDate(String stringDate){
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
index 6a9a0662..31cb0345 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
@@ -90,4 +90,7 @@ public interface HrmsFeignService {
@GetMapping("/hrms/permission/info")
ResponseResult info(@RequestParam("id") Long id);*/
+
+ @GetMapping("/hrms/role/roleList")
+ ResponseResult roleList();
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountInfoMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountInfoMapper.java
index 3980a1c3..88d93acd 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountInfoMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountInfoMapper.java
@@ -34,4 +34,8 @@ public interface DgApplyAmountInfoMapper extends BaseMapper {
DgApplyField queryApplyField();
Boolean updateApplyField(@Param("af") DgApplyField dgApplyField);
+
+ int selectBusinessTaday(String dateTime);
+
+ String selectMaxBusinessTaday(String dateTime);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java
index b393322c..dcd8976e 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java
@@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
+import com.daqing.framework.utils.excel.ProcessIdConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -18,59 +19,59 @@ import java.util.Date;
*/
@Data
@ToString
-public class DgStatisticsExcelRefuseResponse extends BaseRowModel implements Serializable {
+public class DgStatisticsExcelRefuseResponse extends BaseRowModel implements Serializable {
@ApiModelProperty("业务编号")
- @ExcelProperty(value = "业务编号",index = 0)
+ @ExcelProperty(value = "业务编号", index = 0)
private String businessCode;
@ApiModelProperty("客户姓名")
- @ExcelProperty(value = "客户姓名",index = 1)
+ @ExcelProperty(value = "客户姓名", index = 1)
private String name;
@ApiModelProperty("客户联系方式")
- @ExcelProperty(value = "联系电话",index = 2)
+ @ExcelProperty(value = "联系电话", index = 2)
private String phone;
@ApiModelProperty("业务类型")
- @ExcelProperty(value = "产品类型",index = 3)
+ @ExcelProperty(value = "产品类型", index = 3)
private String businessType;
@ApiModelProperty("申请额度")
- @ExcelProperty(value = "金额",index = 4)
+ @ExcelProperty(value = "金额", index = 4)
private Double applyAmount;
@ApiModelProperty("申请期限")
- @ExcelProperty(value = "期数",index = 5)
+ @ExcelProperty(value = "期数", index = 5)
private String applyTime;
@ApiModelProperty("申请日期")
- @ExcelProperty(value = "申请日期",index = 6)
+ @ExcelProperty(value = "申请日期", index = 6)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("拒绝人")
- @ExcelProperty(value = "当前审批人",index = 7)
+ @ExcelProperty(value = "当前审批人", index = 7)
private String refuseName;
@ApiModelProperty("拒绝节点id")
- @ExcelProperty(value = "任务节点",index = 8)
+ @ExcelProperty(value = "任务节点", index = 8, converter = ProcessIdConverter.class)
private Integer processId;
@ApiModelProperty("拒绝时间")
- @ExcelProperty(value = "拒绝时间",index = 9)
+ @ExcelProperty(value = "拒绝时间", index = 9)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date refuseTime;
@ApiModelProperty("拒绝原因")
- @ExcelProperty(value = "拒绝原因",index = 10)
+ @ExcelProperty(value = "拒绝原因", index = 10)
private String refuseOpinion;
@ApiModelProperty("提单人姓名")
- @ExcelProperty(value = "提单人",index = 11)
+ @ExcelProperty(value = "提单人", index = 11)
private String employeeName;
@ApiModelProperty("部门")
- @ExcelProperty(value = "所属部门",index = 12)
+ @ExcelProperty(value = "所属部门", index = 12)
private String department;
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java
index e3852870..52aecfe2 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java
@@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
+import com.daqing.framework.utils.excel.ProcessIdConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -21,49 +22,49 @@ import java.util.Date;
public class DgStatisticsExcelResponse extends BaseRowModel implements Serializable {
@ApiModelProperty("业务编号")
- @ExcelProperty(value = "业务编号",index = 0)
+ @ExcelProperty(value = "业务编号", index = 0)
private String businessCode;
@ApiModelProperty("客户姓名")
- @ExcelProperty(value = "客户姓名",index = 1)
+ @ExcelProperty(value = "客户姓名", index = 1)
private String name;
@ApiModelProperty("客户联系方式")
- @ExcelProperty(value = "联系电话",index = 2)
+ @ExcelProperty(value = "联系电话", index = 2)
private String phone;
@ApiModelProperty("业务类型")
- @ExcelProperty(value = "产品类型",index = 3)
+ @ExcelProperty(value = "产品类型", index = 3)
private String businessType;
@ApiModelProperty("申请额度")
- @ExcelProperty(value = "金额",index = 4)
+ @ExcelProperty(value = "金额", index = 4)
private Double applyAmount;
@ApiModelProperty("申请期限")
- @ExcelProperty(value = "期数",index = 5)
+ @ExcelProperty(value = "期数", index = 5)
private String applyTime;
@ApiModelProperty("申请日期")
- @ExcelProperty(value = "申请日期",index = 6)
+ @ExcelProperty(value = "申请日期", index = 6)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("完成任务节点id")
- @ExcelProperty(value = "完成任务节点id",index = 7)
+ @ExcelProperty(value = "完成任务节点id", index = 7, converter = ProcessIdConverter.class)
private Integer processId;
@ApiModelProperty("最新操作时间")
- @ExcelProperty(value = "任务分配时间",index = 8)
+ @ExcelProperty(value = "任务分配时间", index = 8)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date operationTime;
@ApiModelProperty("提单人姓名")
- @ExcelProperty(value = "提单人",index = 9)
+ @ExcelProperty(value = "提单人", index = 9)
private String employeeName;
@ApiModelProperty("部门")
- @ExcelProperty(value = "所属部门",index = 10)
+ @ExcelProperty(value = "所属部门", index = 10)
private String department;
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java
index 3e807e7c..ca8a1d2e 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java
@@ -6,12 +6,9 @@ import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
import com.daqing.framework.utils.excel.OperatingStatusConverter;
import com.daqing.framework.utils.excel.TaskNodeConverter;
-import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
-import java.util.Date;
-
/**
* @Author chen
* @DATE 2020/12/28 16:31
@@ -21,7 +18,7 @@ import java.util.Date;
public class PersonalEfficiencyListResponse {
@ExcelIgnore
- @ApiModelProperty(value = " 业务id")
+ @ApiModelProperty(value = "业务id")
private Integer businessId;
@ExcelIgnore
@@ -29,39 +26,38 @@ public class PersonalEfficiencyListResponse {
private Integer applicantId;
@ApiModelProperty(value = "提单人")
- @ExcelProperty(value = "提单人",index = 1)
+ @ExcelProperty(value = "提单人",index = 0)
private String applicant;
@ApiModelProperty("客户名称")
- @ExcelProperty(value = "客户名称",index = 2)
+ @ExcelProperty(value = "客户名称",index = 1)
private String clientName;
@ApiModelProperty("申请日期")
- @ExcelProperty(value = "申请日期",index = 3)
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date applicationDate;
+ @ExcelProperty(value = "申请日期",index = 2)
+ private String applicationDate;
@ApiModelProperty("累计耗时")
- @ExcelProperty(value = "累计耗时",index = 4)
+ @ExcelProperty(value = "累计耗时",index = 3)
private String timeConsuming;
@ApiModelProperty("完成时间")
- @ExcelProperty(value = "完成时间",index = 5)
+ @ExcelProperty(value = "完成时间",index = 4)
private String completeTime;
@ApiModelProperty("任务节点")
- @ExcelProperty(value = "任务节点",index = 6)
- private Double taskNode;
+ @ExcelProperty(value = "任务节点",index = 5,converter = TaskNodeConverter.class)
+ private String taskNode;
@ApiModelProperty("审批状态")
- @ExcelProperty(value = "审批状态",index = 7,converter = ApprovalStatusConverter.class)
+ @ExcelProperty(value = "审批状态",index = 6,converter = ApprovalStatusConverter.class)
private Integer approveStatus;
@ApiModelProperty("业务状态")
- @ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class)
+ @ExcelProperty(value = "业务状态",index = 7,converter = BusinessStatusConverter.class)
private Integer businessStatus;
@ApiModelProperty("操作状态")
- @ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class)
+ @ExcelProperty(value = "操作状态",index = 8,converter = OperatingStatusConverter.class)
private Integer operatingStatus;
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
index 82525389..69d4073d 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
@@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest;
+import com.daqing.financial.guarantee.model.response.PersonalEfficiencyListResponse;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import org.springframework.stereotype.Service;
@@ -22,4 +23,6 @@ public interface IDgEfficiencyService extends IService {
List notice();
Map getBusinessCount();
+
+ List queryPersonalEfficiencyList();
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
index ca15ff73..334e4e4e 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
@@ -40,6 +40,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
import java.util.*;
/**
@@ -122,8 +123,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpllambdaUpdate()
+ .set(DgAssetsInvestigation::getApplyContent, approvalAssetsRequest.getApplyContent()) //把email设置成null
+ .set(DgAssetsInvestigation::getEmpId, Integer.parseInt(dgApplyAmountInfoController.getUserId()))
+ .set(DgAssetsInvestigation::getRemark, ArraysUtil.toString(approvalAssetsRequest.getRemark()))
+ .set(DgAssetsInvestigation::getOtherRemark, approvalAssetsRequest.getOtherRemark())
+ .set(DgAssetsInvestigation::getStatus, approvalAssetsRequest.getStatus())
+ .set(DgAssetsInvestigation::getOperatingStatus, StatusCode.CZ_PROCESSED)
+ .set(DgAssetsInvestigation::getAmount, approvalAssetsRequest.getAmount())
+ .set(DgAssetsInvestigation::getTerm, approvalAssetsRequest.getTerm())
+ .eq(DgAssetsInvestigation::getId, approvalAssetsRequest.getId())
+ );
DgAssetsInvestigation dgAssets = new DgAssetsInvestigation();
dgAssets.setStatus(StatusCode.SP_REJECT);//驳回
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
index 4bb2513d..51c879b3 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
@@ -1,28 +1,47 @@
package com.daqing.financial.guarantee.service.impl;
+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.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.*;
+import com.daqing.financial.guarantee.mapper.*;
+import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest;
import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest;
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse;
import com.daqing.financial.guarantee.model.response.DgNoticeListResponse;
import com.daqing.financial.guarantee.model.response.EfficiencyApprovalResponse;
+import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgEfficiencyService;
import com.daqing.financial.guarantee.util.DateUtils;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
+import com.daqing.framework.domain.guarantee.DgAuditProcess;
+import com.daqing.framework.domain.guarantee.GuaranteeCode;
+import com.daqing.framework.domain.guarantee.po.DgWorkConferencePO;
+import com.daqing.framework.domain.guarantee.po.StatusPO;
+import com.daqing.framework.exception.ExceptionCast;
+import com.daqing.framework.model.response.PromptSuccess;
+import com.daqing.framework.util.RedisUtil;
+import com.google.common.collect.Maps;
import org.springframework.stereotype.Service;
import com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO;
+import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
@@ -35,6 +54,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl teamEfficiencyList = this.getBaseMapper().queryList(dgEfficiencyTeamRequest);
List> list = new ArrayList<>();
@@ -196,8 +259,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl queryPersonalEfficiencyList() {
+ int size = 100;
+ List efficiencyList = new ArrayList<>();
+ //获取当前登录用户id
+ int currentUser = Integer.parseInt(this.getUserId());
+ //获取当前用户拥有的角色ids
+ String roleIds = RedisUtil.get("dq:userRole:" + currentUser);
+ //字符串格式
+ List roleIdList = new ArrayList<>();
+ if (roleIds != null) {
+ String[] ids = roleIds.split(",");
+ roleIdList = Arrays.asList(ids);
+ }
+ //数字格式
+ List roleList = new ArrayList<>();
+ if (roleIds != null) {
+ String[] roleId = roleIds.split(",");
+ for (String id : roleId) {
+ roleList.add(Integer.parseInt(id));
+ }
+ }
+ //获取每个业务id的三种状态
+ HashMap hashMap = Maps.newHashMap();
+ //角色不为空
+ //担保业务员角色、担保经理角色
+ if (roleIdList.contains(String.valueOf(PromptSuccess.DB_YWY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID))) {
+ //业务申请列表查询
+ IPage positionVO = applyAmountListMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId());
+ List records = positionVO.getRecords();
+ if (records!=null && records.size()!=0){
+ records.forEach(businessApplicationListResponse -> {
+ StatusPO statusPO = new StatusPO();
+ Integer businessId = businessApplicationListResponse.getBusinessId();
+ String name = businessApplicationListResponse.getName();
+ Integer status = businessApplicationListResponse.getStatus();
+ Integer operatingStatus = businessApplicationListResponse.getOperatingStatus();
+ Integer businessStatus = businessApplicationListResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setName(name);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(1);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //担保经理角色、担保A角角色、担保B角角色、担保领导角色
+ if (roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_LD_ID))) {
+ // 担保部调查列表
+ IPage positionVO = guaranteeAssignUserMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
+ List records = positionVO.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(guaranteeListResponse -> {
+ StatusPO statusPO = new StatusPO();
+ Integer businessId = guaranteeListResponse.getBusinessId();
+ Integer status = guaranteeListResponse.getStatus();
+ String name = guaranteeListResponse.getName();
+ Integer operatingStatus = guaranteeListResponse.getOperatingStatus();
+ Integer businessStatus = guaranteeListResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(2);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //资产经理角色、资产专员角色、资产领导角色
+ if (roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_LD_ID))) {
+ // 资产部调查列表
+ IPage positionVO = assetsInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
+ List records = positionVO.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(assetsInvestigationListResponse -> {
+ StatusPO statusPO = new StatusPO();
+ Integer businessId = assetsInvestigationListResponse.getBusinessId();
+ Integer status = assetsInvestigationListResponse.getStatus();
+ String name = assetsInvestigationListResponse.getName();
+ Integer operatingStatus = assetsInvestigationListResponse.getOperatingStatus();
+ Integer businessStatus = assetsInvestigationListResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(3);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //信息经理角色、信息专员角色、信息领导角色
+ if (roleIdList.contains(String.valueOf(PromptSuccess.XX_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_LD_ID))) {
+ // 信息部调查列表
+ IPage positionVO = messageInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
+ List records = positionVO.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(messageInvestigationListResponse -> {
+ StatusPO statusPO = new StatusPO();
+ Integer businessId = messageInvestigationListResponse.getBusinessId();
+ Integer status = messageInvestigationListResponse.getStatus();
+ String name = messageInvestigationListResponse.getName();
+ Integer operatingStatus = messageInvestigationListResponse.getOperatingStatus();
+ Integer businessStatus = messageInvestigationListResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(4);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //担保部A/B角、法规经理角色、法规部C角、法规部分管领导
+ if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_C_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_LD_ID))) {
+ // 合规调查列表
+ DgComplianceInvestigationRequest dgComplianceInvestigationRequest = new DgComplianceInvestigationRequest();
+ IPage list = complianceInvestigationMapper.list(new Page(1, size), dgComplianceInvestigationRequest, roleList, currentUser);
+ List records = list.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(dgComplianceInvestigationResponse -> {
+ StatusPO statusPO = new StatusPO();
+ Integer businessId = dgComplianceInvestigationResponse.getBusinessId();
+ String name = dgComplianceInvestigationResponse.getName();
+ Integer status = dgComplianceInvestigationResponse.getAuditStatus();
+ Integer operatingStatus = dgComplianceInvestigationResponse.getOperationStatus();
+ Integer businessStatus = dgComplianceInvestigationResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(5);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //工作会
+ if (roleIdList.contains(String.valueOf(PromptSuccess.GZU_ID))) {
+ IPage list = workConferenceConsiderMapper.list(new Page(1, size), "", roleList, currentUser);
+ List records = list.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(dgWorkConferencePO -> {
+ StatusPO statusPO = new StatusPO();
+ Integer businessId = dgWorkConferencePO.getBusinessId();
+ String name = dgWorkConferencePO.getName();
+ Integer status = dgWorkConferencePO.getAuditStatus();
+ Integer operatingStatus = dgWorkConferencePO.getOperationStatus();
+ Integer businessStatus = dgWorkConferencePO.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(6);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //担保部A/B角、贷审会
+ if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DSH_ID))) {
+ IPage list = loanCommitteeConsiderMapper.list(new Page(1, size), "", roleList, currentUser);
+ List records = list.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(dgLoanCommitteeConsiderResponse -> {
+ StatusPO statusPO = new StatusPO();
+ Integer businessId = dgLoanCommitteeConsiderResponse.getBusinessId();
+ Integer status = dgLoanCommitteeConsiderResponse.getStatus();
+ String name = dgLoanCommitteeConsiderResponse.getName();
+ Integer operatingStatus = dgLoanCommitteeConsiderResponse.getOperatingStatus();
+ Integer businessStatus = dgLoanCommitteeConsiderResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(7);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //法规经理、担保部A/B角、资产部经理
+ if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) ) {
+ //担保函
+ IPage iPage = guaranteeLetterAssignUserMapper.pageByCondition(new Page(1, size), currentUser, roleIdList, null, null);
+ List records = iPage.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(guaranteeLetterListResponse -> {
+ StatusPO statusPO = new StatusPO();
+ String name = guaranteeLetterListResponse.getName();
+ Integer businessId = guaranteeLetterListResponse.getBusinessId();
+ Integer status = guaranteeLetterListResponse.getStatus();
+ Integer operatingStatus = guaranteeLetterListResponse.getOperatingStatus();
+ Integer businessStatus = guaranteeLetterListResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(8);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //财务部、法规经理
+ if (roleIdList.contains(String.valueOf(PromptSuccess.CWB_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) {
+ //回款确认
+ IPage iPage = paymentConfirmationConsiderMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null);
+ List records = iPage.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(paymentConfirmationListResponse -> {
+ StatusPO statusPO = new StatusPO();
+ String name = paymentConfirmationListResponse.getName();
+ Integer businessId = paymentConfirmationListResponse.getBusinessId();
+ Integer status = paymentConfirmationListResponse.getStatus();
+ Integer operatingStatus = paymentConfirmationListResponse.getOperatingStatus();
+ Integer businessStatus = paymentConfirmationListResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(9);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //法规经理
+ if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) {
+ //放款通知
+ IPage iPage = loanNoticeMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null);
+ List records = iPage.getRecords();
+ if (records!=null && records.size()!=0) {
+ records.forEach(loanNoticeListResponse -> {
+ StatusPO statusPO = new StatusPO();
+ String name = loanNoticeListResponse.getName();
+ Integer businessId = loanNoticeListResponse.getBusinessId();
+ Integer status = loanNoticeListResponse.getStatus();
+ Integer operatingStatus = loanNoticeListResponse.getOperatingStatus();
+ Integer businessStatus = loanNoticeListResponse.getBusinessStatus();
+ statusPO.setBusinessStatus(businessStatus);
+ statusPO.setOperatingStatus(operatingStatus);
+ statusPO.setProcessId(10);
+ statusPO.setName(name);
+ statusPO.setStatus(status);
+ hashMap.put(businessId, statusPO);
+ });
+ }
+ }
+ //遍历map,key值为业务id
+ for (Integer key : hashMap.keySet()) {
+ PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse();
+ efficiencyListResponse.setBusinessId(key);
+ StatusPO po = (StatusPO)hashMap.get(key);
+ Integer businessStatus = po.getBusinessStatus();
+ Integer operatingStatus = po.getOperatingStatus();
+ Integer processId = po.getProcessId();
+ Integer status = po.getStatus();
+ String name = po.getName();
+ //根据业务id查询业务
+ DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(key);
+ //业务申请日期
+ Date createTime = dgApplyAmountInfo.getCreateTime();
+ //客户公司id
+ Integer companyId = dgApplyAmountInfo.getCompanyId();
+ //提单人id
+ Integer presenterId = dgApplyAmountInfo.getPresenterId();
+ efficiencyListResponse.setOperatingStatus(operatingStatus);
+ efficiencyListResponse.setApproveStatus(status);
+ efficiencyListResponse.setBusinessStatus(businessStatus);
+ efficiencyListResponse.setTaskNode(String.valueOf(processId));
+ efficiencyListResponse.setClientName(name);
+ efficiencyListResponse.setApplicantId(presenterId);
+ efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime));
+ efficiencyListResponse.setClientName(String.valueOf(companyId));
+ //用户处理过业务,统计耗时
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq("user_id", currentUser).eq("business_id",key);
+ List auditProcessList = dgAuditProcessMapper.selectList(wrapper);
+ if (auditProcessList != null && auditProcessList.size() != 0) {
+ //获取累计耗时,完成时间
+ HashMap hashMapTime = getTime(key, currentUser);
+ Object countTime = hashMapTime.get("countTime");
+ Object endTime = hashMapTime.get("endTime");
+ efficiencyListResponse.setTimeConsuming(countTime(String.valueOf(countTime)));
+ efficiencyListResponse.setCompleteTime(String.valueOf(endTime));
+ }
+ efficiencyList.add(efficiencyListResponse);
+ }
+ return efficiencyList;
+ }
+
+ //根据业务id和用户id统计耗时
+ private HashMap getTime(Integer businessId, Integer userId) {
+ HashMap hashMap = Maps.newHashMap();
+ //根据业务id查询业务流程表
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq("business_id", businessId).orderByAsc("create_time");
+ List auditProcessList = dgAuditProcessMapper.selectList(wrapper);
+ long countTime = 0L;
+ if (auditProcessList.size()>1){
+ //遍历业务流程数据,统计该用户的耗时
+ for (int i = 1; i <= auditProcessList.size() - 1; i++) {
+ //从第二条数据开始,获取该数据
+ DgAuditProcess auditProcess = auditProcessList.get(i);
+ //该数据是当前用户处理的
+ if (auditProcess.getUserId().equals(userId)) {
+ //获取上一流程的时间节点
+ DgAuditProcess previousProcess = auditProcessList.get(i - 1);
+ Date previousTime = previousProcess.getCreateTime();
+ Date currentTime = auditProcess.getCreateTime();
+ long currentTimeTime = currentTime.getTime();
+ long previousTimeTime = previousTime.getTime();
+ //累计耗时,毫秒
+ countTime = currentTimeTime - previousTimeTime;
+ }
+ }
+ }
+ //查询结束时间
+ QueryWrapper wrapperTime = new QueryWrapper<>();
+ wrapperTime.eq("business_id", businessId).eq("user_id", userId).orderByDesc("create_time").last("limit 1");
+ DgAuditProcess auditProcess = dgAuditProcessMapper.selectOne(wrapperTime);
+ Date endTime = auditProcess.getCreateTime();
+ hashMap.put("countTime", countTime);
+ hashMap.put("endTime", new SimpleDateFormat("yyyy-MM-dd").format(endTime));
+ return hashMap;
+ }
+
+ public static String countTime(String totalTime) {
+ long time = Long.parseLong(totalTime);
+ long days = time/ (1000 * 60 * 60 * 24);
+ long hours = (time% (1000 * 60 * 60 * 24)) / (1000 * 60 * 60);
+ long minutes = (time% (1000 * 60 * 60)) / (1000 * 60);
+ long seconds = (time% (1000 * 60)) / 1000;
+ return days + "天" + hours + "小时"+ minutes +"分钟";
+ }
+
+ /**
+ * 获取当前登录用户信息
+ */
+ private String getUserId() {
+ HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ String token = request.getHeader("token");
+ return RedisUtil.get("dq:token:" + token);
+ }
}
\ No newline at end of file
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
index 9680eb81..1d10f335 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
@@ -1,7 +1,9 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
@@ -209,11 +211,21 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpllambdaUpdate()
+ .set(DgGuaranteeAssignUser::getApplyContent, investigateGuaranteeRequest.getApplyContent()) //把email设置成null
+ .set(DgGuaranteeAssignUser::getOperatingStatus, StatusCode.CZ_PROCESSED)
+ .set(DgGuaranteeAssignUser::getStatus, StatusCode.SP_REJECT)
+ .eq(DgGuaranteeAssignUser::getId, investigateGuaranteeRequest.getId())
+ );
int i = this.baseMapper.selectCount(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type", 1).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED));
@@ -610,7 +622,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpllambdaUpdate()
+ .set(DgMessageInvestigation::getEmpId, Integer.parseInt(dgApplyAmountInfoController.getUserId()))
+ .set(DgMessageInvestigation::getStatus, approvalMessageRequest.getStatus())
+ .set(DgMessageInvestigation::getOperatingStatus, StatusCode.CZ_PROCESSED)
+ .set(DgMessageInvestigation::getRemark, approvalMessageRequest.getRemark())
+ .eq(DgMessageInvestigation::getId, approvalMessageRequest.getId())
+ );
DgMessageInvestigation dgMessage = new DgMessageInvestigation();
dgMessage.setStatus(StatusCode.SP_REJECT);//驳回
diff --git a/dq-financial-guarantee/src/main/resources/bootstrap.properties b/dq-financial-guarantee/src/main/resources/bootstrap.properties
index bd324b95..e7f3f91c 100644
--- a/dq-financial-guarantee/src/main/resources/bootstrap.properties
+++ b/dq-financial-guarantee/src/main/resources/bootstrap.properties
@@ -1,6 +1,6 @@
-##服务名称
+#服务名称
spring.application.name=dq-financial-guarantee
-##配置中心地址
+#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.namespace=58fa89c6-0e23-4530-ac13-95747e873c60
#spring.cloud.nacos.config.group=prod
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
index 9b38217f..1d754f18 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
@@ -77,4 +77,15 @@
WHERE id = #{af.id}
+
+
+
+
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
index 13f22582..03ef475e 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
@@ -13,10 +13,11 @@
+