回退版本

master
shijie 4 years ago
parent a6a938e6cd
commit 01682cb132
  1. 6
      dq-financial-crms/pom.xml
  2. 1
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java
  3. 8
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  4. 5
      dq-financial-guarantee/pom.xml
  5. 15
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
  6. 85
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  7. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
  8. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountInfoMapper.java
  9. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java
  10. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java
  11. 26
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java
  12. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
  13. 26
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  14. 23
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  15. 407
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  16. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  17. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  18. 4
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  19. 11
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
  20. 3
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
  21. 13
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/RolePermissionController.java
  22. 8
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java
  23. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java
  24. 8
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/RoleController.java
  25. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  26. 2
      dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java
  27. 1
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalTOI.java
  28. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
  29. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java
  30. 31
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/StatusPO.java
  31. 1
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java
  32. 4
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java
  33. 84
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/ProcessIdConverter.java
  34. 30
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/TaskNodeConverter.java

@ -68,6 +68,12 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version> <version>3.8.1</version>
</dependency> </dependency>
<!--<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.3.4.RELEASE</version>
<scope>compile</scope>
</dependency>-->
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>

@ -32,7 +32,6 @@ public class CompanyCustomerRequest implements Serializable {
@ApiModelProperty(value = "客户类型") @ApiModelProperty(value = "客户类型")
private Integer type; private Integer type;
@NotNull(message = "客户经理人不能为空")
@ApiModelProperty(value = "客户经理人ids") @ApiModelProperty(value = "客户经理人ids")
private Long manager; private Long manager;

@ -378,9 +378,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
customerPersonalTOI.setManager(employeeVO.getId()); customerPersonalTOI.setManager(employeeVO.getId());
} }
} }
if (customerPersonalTOI.getManager() == null) { /*if (customerPersonalTOI.getManager() == null) {
return new ResponseResult<String>().FAIL("导入数据失败,员工" + manager.getManager() + "不存在"); return new ResponseResult<String>().FAIL("导入数据失败,员工" + manager.getManager() + "不存在");
} }*/
} }
this.saveCustomerPersonal(customerPersonalTOI); this.saveCustomerPersonal(customerPersonalTOI);
} }
@ -399,9 +399,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
companyCustomerRequest.setManager(employeeVO.getId()); companyCustomerRequest.setManager(employeeVO.getId());
} }
} }
if (companyCustomerRequest.getManager() == null) { /*if (companyCustomerRequest.getManager() == null) {
return new ResponseResult<String>().FAIL("导入数据失败,员工" + manager.getManager() + "不存在"); return new ResponseResult<String>().FAIL("导入数据失败,员工" + manager.getManager() + "不存在");
} }*/
} }
this.insertCompany(companyCustomerRequest); this.insertCompany(companyCustomerRequest);
// this.saveCustomerCompany(customerCompanyTOI); // this.saveCustomerCompany(customerCompanyTOI);

@ -83,6 +83,11 @@
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.0.7.1</version> <version>3.0.7.1</version>
</dependency> </dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.3.8</version>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>

@ -2,9 +2,11 @@ package com.daqing.financial.guarantee.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.financial.guarantee.service.IDgAuditProcessService;
import com.daqing.framework.domain.guarantee.DgAuditProcess; import com.daqing.framework.domain.guarantee.DgAuditProcess;
import com.daqing.framework.domain.guarantee.po.ProcessPO; import com.daqing.framework.domain.guarantee.po.ProcessPO;
import com.daqing.framework.domain.hrms.RoleEntity;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -34,6 +36,9 @@ public class DgAuditProcessController {
@Autowired @Autowired
private IDgAuditProcessService auditProcessService; private IDgAuditProcessService auditProcessService;
@Autowired
private HrmsFeignService hrmsFeignService;
@ApiOperation(value = "审核流程进程列表") @ApiOperation(value = "审核流程进程列表")
@GetMapping("/auditProcessList") @GetMapping("/auditProcessList")
public ResponseResult processList( public ResponseResult processList(
@ -42,6 +47,16 @@ public class DgAuditProcessController {
@ApiParam(name = "processId", value = "流程id", required = false) @ApiParam(name = "processId", value = "流程id", required = false)
@RequestParam(required = false) String processId){ @RequestParam(required = false) String processId){
List<DgAuditProcess> processList = auditProcessService.queryProcessList(businessId,processId); List<DgAuditProcess> processList = auditProcessService.queryProcessList(businessId,processId);
ResponseResult responseResult = hrmsFeignService.roleList();
//获取角色名称信息
List<RoleEntity> list = (List<RoleEntity>) responseResult.getData();
for (DgAuditProcess process:processList){
for (RoleEntity roleEntity:list){
if (process.getRoleId().equals(roleEntity.getId())){
process.setDeptName(roleEntity.getName());
}
}
}
return ResponseResult.SUCCESS(processList); return ResponseResult.SUCCESS(processList);
} }

@ -1,7 +1,16 @@
package com.daqing.financial.guarantee.controller; 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.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.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.model.response.ResponseResult;
import com.daqing.framework.utils.excel.EasyExcelUtil; import com.daqing.framework.utils.excel.EasyExcelUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -38,6 +47,8 @@ public class DgEfficiencyController {
@Autowired @Autowired
private IDgEfficiencyService dgEfficiencyService; private IDgEfficiencyService dgEfficiencyService;
@Autowired
private HrmsFeignService hrmsFeignService;
/** /**
* 团队效率 * 团队效率
*/ */
@ -47,6 +58,16 @@ public class DgEfficiencyController {
return ResponseResult.SUCCESS(dgEfficiencyService.queryList(dgEfficiencyTeamRequest)); return ResponseResult.SUCCESS(dgEfficiencyService.queryList(dgEfficiencyTeamRequest));
} }
/**
* 统计不同业务状态下业务数量
*/
@GetMapping("/businessCount")
@ApiOperation(value = "统计不同业务状态下业务数量", notes = "统计不同业务状态下业务数量")
public ResponseResult getBusinessCount(){
return ResponseResult.SUCCESS(dgEfficiencyService.getBusinessCount());
}
/** /**
* 首页-近十天的审批数目 * 首页-近十天的审批数目
*/ */
@ -70,7 +91,7 @@ public class DgEfficiencyController {
@ApiOperation(value = "个人效率记录列表") @ApiOperation(value = "个人效率记录列表")
@PostMapping("/personalEfficiencyList") @PostMapping("/personalEfficiencyList")
public ResponseResult personalEfficiencyList( public R personalEfficiencyList(
@ApiParam(name = "personalEfficiencyListRequest", value = "个人效率列表查询对象") @ApiParam(name = "personalEfficiencyListRequest", value = "个人效率列表查询对象")
@RequestBody PersonalEfficiencyListRequest personalEfficiencyListRequest){ @RequestBody PersonalEfficiencyListRequest personalEfficiencyListRequest){
List<PersonalEfficiencyListResponse> responseList = dgEfficiencyService.queryPersonalEfficiencyList(); List<PersonalEfficiencyListResponse> 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()!=null){
// 已发起 // 已发起
if (personalEfficiencyListRequest.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)){ 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)){ }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)){ }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) { 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()) { switch (personalEfficiencyListRequest.getCreateFixedTime()) {
case 0: case 0:
personalEfficiencyListRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin())); personalEfficiencyListRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
@ -152,26 +204,7 @@ public class DgEfficiencyController {
} }
} }
} }
//转换任务节点,并统计操作状态个数 return R.ok().data("responseList",responseList).data("statistics",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:
personalEfficiencyListResponse.setInitiateNum(personalEfficiencyListResponse.getInitiateNum()+1);
case 1:
personalEfficiencyListResponse.setPendingNum(personalEfficiencyListResponse.getPendingNum()+1);
case 2:
personalEfficiencyListResponse.setProcessedNum(personalEfficiencyListResponse.getProcessedNum()+1);
}
}
});
return ResponseResult.SUCCESS(responseList);
} }
public static long getLongDate(String stringDate){ public static long getLongDate(String stringDate){

@ -90,4 +90,7 @@ public interface HrmsFeignService {
@GetMapping("/hrms/permission/info") @GetMapping("/hrms/permission/info")
ResponseResult info(@RequestParam("id") Long id);*/ ResponseResult info(@RequestParam("id") Long id);*/
@GetMapping("/hrms/role/roleList")
ResponseResult roleList();
} }

@ -34,4 +34,8 @@ public interface DgApplyAmountInfoMapper extends BaseMapper<DgApplyAmountInfo> {
DgApplyField queryApplyField(); DgApplyField queryApplyField();
Boolean updateApplyField(@Param("af") DgApplyField dgApplyField); Boolean updateApplyField(@Param("af") DgApplyField dgApplyField);
int selectBusinessTaday(String dateTime);
String selectMaxBusinessTaday(String dateTime);
} }

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import com.daqing.framework.utils.excel.ProcessIdConverter;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -54,7 +55,7 @@ public class DgStatisticsExcelRefuseResponse extends BaseRowModel implements Se
private String refuseName; private String refuseName;
@ApiModelProperty("拒绝节点id") @ApiModelProperty("拒绝节点id")
@ExcelProperty(value = "任务节点",index = 8) @ExcelProperty(value = "任务节点", index = 8, converter = ProcessIdConverter.class)
private Integer processId; private Integer processId;
@ApiModelProperty("拒绝时间") @ApiModelProperty("拒绝时间")

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import com.daqing.framework.utils.excel.ProcessIdConverter;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -50,7 +51,7 @@ public class DgStatisticsExcelResponse extends BaseRowModel implements Serializa
private Date createTime; private Date createTime;
@ApiModelProperty("完成任务节点id") @ApiModelProperty("完成任务节点id")
@ExcelProperty(value = "完成任务节点id",index = 7) @ExcelProperty(value = "完成任务节点id", index = 7, converter = ProcessIdConverter.class)
private Integer processId; private Integer processId;
@ApiModelProperty("最新操作时间") @ApiModelProperty("最新操作时间")

@ -6,12 +6,9 @@ import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter; import com.daqing.framework.utils.excel.BusinessStatusConverter;
import com.daqing.framework.utils.excel.OperatingStatusConverter; import com.daqing.framework.utils.excel.OperatingStatusConverter;
import com.daqing.framework.utils.excel.TaskNodeConverter; import com.daqing.framework.utils.excel.TaskNodeConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date;
/** /**
* @Author chen * @Author chen
* @DATE 2020/12/28 16:31 * @DATE 2020/12/28 16:31
@ -29,39 +26,38 @@ public class PersonalEfficiencyListResponse {
private Integer applicantId; private Integer applicantId;
@ApiModelProperty(value = "提单人") @ApiModelProperty(value = "提单人")
@ExcelProperty(value = "提单人",index = 1) @ExcelProperty(value = "提单人",index = 0)
private String applicant; private String applicant;
@ApiModelProperty("客户名称") @ApiModelProperty("客户名称")
@ExcelProperty(value = "客户名称",index = 2) @ExcelProperty(value = "客户名称",index = 1)
private String clientName; private String clientName;
@ApiModelProperty("申请日期") @ApiModelProperty("申请日期")
@ExcelProperty(value = "申请日期",index = 3) @ExcelProperty(value = "申请日期",index = 2)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String applicationDate;
private Date applicationDate;
@ApiModelProperty("累计耗时") @ApiModelProperty("累计耗时")
@ExcelProperty(value = "累计耗时",index = 4) @ExcelProperty(value = "累计耗时",index = 3)
private String timeConsuming; private String timeConsuming;
@ApiModelProperty("完成时间") @ApiModelProperty("完成时间")
@ExcelProperty(value = "完成时间",index = 5) @ExcelProperty(value = "完成时间",index = 4)
private String completeTime; private String completeTime;
@ApiModelProperty("任务节点") @ApiModelProperty("任务节点")
@ExcelProperty(value = "任务节点",index = 6) @ExcelProperty(value = "任务节点",index = 5,converter = TaskNodeConverter.class)
private Double taskNode; private String taskNode;
@ApiModelProperty("审批状态") @ApiModelProperty("审批状态")
@ExcelProperty(value = "审批状态",index = 7,converter = ApprovalStatusConverter.class) @ExcelProperty(value = "审批状态",index = 6,converter = ApprovalStatusConverter.class)
private Integer approveStatus; private Integer approveStatus;
@ApiModelProperty("业务状态") @ApiModelProperty("业务状态")
@ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class) @ExcelProperty(value = "业务状态",index = 7,converter = BusinessStatusConverter.class)
private Integer businessStatus; private Integer businessStatus;
@ApiModelProperty("操作状态") @ApiModelProperty("操作状态")
@ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class) @ExcelProperty(value = "操作状态",index = 8,converter = OperatingStatusConverter.class)
private Integer operatingStatus; private Integer operatingStatus;
} }

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest; import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest;
import com.daqing.financial.guarantee.model.response.PersonalEfficiencyListResponse;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -22,4 +23,6 @@ public interface IDgEfficiencyService extends IService<DgApplyAmountInfo> {
List notice(); List notice();
Map<String, Integer> getBusinessCount(); Map<String, Integer> getBusinessCount();
List<PersonalEfficiencyListResponse> queryPersonalEfficiencyList();
} }

@ -40,6 +40,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
/** /**
@ -144,7 +145,30 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述 dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型 dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
dgApplyAmountInfo.setCustomerType(businessApplication.getCustomerType());//客户类型 dgApplyAmountInfo.setCustomerType(businessApplication.getCustomerType());//客户类型
dgApplyAmountInfo.setBusinessCode(RandomUtil.getRandomNum(12)); //设置业务编号,查询今天是否申请过业务
String businessCode=null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String dateTime=sdf.format(new Date());
String timeCode=dateTime.replaceAll("-","");
int count = dgApplyAmountInfoMapper.selectBusinessTaday(dateTime);
if(count ==0){//今天没有申请过业务,所以编号从001开始
if(businessApplication.getBusinessType().equals("融资担保")){//融资业务:RZ-20201231001
businessCode="RZ-"+timeCode+"001";
}else{//非融资业务:FRZ-20201231001
businessCode="FRZ-"+timeCode+"001";
}
}else{
//查询最大业务编号
String code = dgApplyAmountInfoMapper.selectMaxBusinessTaday(dateTime);
int codeNumber = Integer.parseInt(code.substring(code.length() - 3));
String newBusinessCode = String.format("%03d", (codeNumber + 1));
if(businessApplication.getBusinessType().equals("融资担保")){//融资业务:RZ-20201231001
businessCode="RZ-"+timeCode+newBusinessCode;
}else{//非融资业务:FRZ-20201231001
businessCode="FRZ-"+timeCode+newBusinessCode;
}
}
dgApplyAmountInfo.setBusinessCode(businessCode);
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo); dgApplyAmountInfoMapper.insert(dgApplyAmountInfo);

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
@ -147,6 +148,11 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//绑定角色关系 //绑定角色关系
hrmsFeignService.insertUserRole(assetsRequest.getEmpId().longValue(), PromptSuccess.ZC_ZY_ID.longValue()); hrmsFeignService.insertUserRole(assetsRequest.getEmpId().longValue(), PromptSuccess.ZC_ZY_ID.longValue());
} }
//同时往审核流程进程表新增一条记录
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,"","","");
return true; return true;
} }
@ -329,7 +335,22 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
dgAssetsInvestigation.setTerm(approvalAssetsRequest.getTerm());//期限 dgAssetsInvestigation.setTerm(approvalAssetsRequest.getTerm());//期限
dgAssetsInvestigation.setApplyContent(approvalAssetsRequest.getApplyContent());//审核意见 dgAssetsInvestigation.setApplyContent(approvalAssetsRequest.getApplyContent());//审核意见
//根据主键id修改资产部记录 //根据主键id修改资产部记录
this.baseMapper.updateById(dgAssetsInvestigation); /* this.baseMapper.updateById(dgAssetsInvestigation);*/
//插入或更新的字段有 空字符串 或者 null
this.baseMapper.update(
null,
Wrappers.<DgAssetsInvestigation>lambdaUpdate()
.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(); DgAssetsInvestigation dgAssets = new DgAssetsInvestigation();
dgAssets.setStatus(StatusCode.SP_REJECT);//驳回 dgAssets.setStatus(StatusCode.SP_REJECT);//驳回

@ -1,28 +1,47 @@
package com.daqing.financial.guarantee.service.impl; 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.mapper.*; 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.request.DgEfficiencyTeamRequest;
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse;
import com.daqing.financial.guarantee.model.response.DgNoticeListResponse; import com.daqing.financial.guarantee.model.response.DgNoticeListResponse;
import com.daqing.financial.guarantee.model.response.EfficiencyApprovalResponse; 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.service.IDgEfficiencyService;
import com.daqing.financial.guarantee.util.DateUtils; import com.daqing.financial.guarantee.util.DateUtils;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.util.RedisUtil; import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils; 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 org.springframework.stereotype.Service;
import com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO; import com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
/** /**
@ -35,6 +54,9 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
@Autowired @Autowired
private DgApplyAmountInfoController dgApplyAmountInfoController; private DgApplyAmountInfoController dgApplyAmountInfoController;
@Autowired
private DgApplyAmountInfoMapper applyAmountInfoMapper;
@Autowired @Autowired
private DgAuditProcessMapper dgAuditProcessMapper; private DgAuditProcessMapper dgAuditProcessMapper;
@ -58,6 +80,36 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
private DgPaymentConfirmationConsiderMapper dgPaymentConfirmationConsiderMapper; private DgPaymentConfirmationConsiderMapper dgPaymentConfirmationConsiderMapper;
@Autowired @Autowired
private DgLoanNoticeMapper dgLoanNoticeMapper; private DgLoanNoticeMapper dgLoanNoticeMapper;
@Autowired
private DgApplyAmountListMapper applyAmountListMapper;
@Autowired
private DgGuaranteeAssignUserMapper guaranteeAssignUserMapper;
@Autowired
private DgAssetsInvestigationMapper assetsInvestigationMapper;
@Autowired
private DgMessageInvestigationMapper messageInvestigationMapper;
@Autowired
private DgComplianceInvestigationMapper complianceInvestigationMapper;
@Autowired
private DgWorkConferenceConsiderMapper workConferenceConsiderMapper;
@Autowired
private DgLoanCommitteeConsiderMapper loanCommitteeConsiderMapper;
@Autowired
private DgGuaranteeLetterAssignUserMapper guaranteeLetterAssignUserMapper;
@Autowired
private DgPaymentConfirmationConsiderMapper paymentConfirmationConsiderMapper;
@Autowired
private DgLoanNoticeMapper loanNoticeMapper;
/** /**
* 团队效率 * 团队效率
*/ */
@ -95,6 +147,17 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
dgEfficiencyTeamRequest.setEndTime(null); dgEfficiencyTeamRequest.setEndTime(null);
} }
} }
// 处理结束时间为当前日期最后一秒
if (dgEfficiencyTeamRequest.getEndTime() != null && dgEfficiencyTeamRequest.getEndTime().length() != 0) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date dateTime = null;
try {
dateTime = dateFormat.parse(dgEfficiencyTeamRequest.getEndTime());
} catch (ParseException e) {
ExceptionCast.cast(GuaranteeCode.EFFICIENCY_TIME_ERROR);
}
dgEfficiencyTeamRequest.setEndTime(dateFormat.format(DateUtils.getDayEndTime(dateTime)));
}
// 查询出所有的数据 // 查询出所有的数据
List<DgTeamEfficiencyPO> teamEfficiencyList = this.getBaseMapper().queryList(dgEfficiencyTeamRequest); List<DgTeamEfficiencyPO> teamEfficiencyList = this.getBaseMapper().queryList(dgEfficiencyTeamRequest);
List<List<DgTeamEfficiencyPO>> list = new ArrayList<>(); List<List<DgTeamEfficiencyPO>> list = new ArrayList<>();
@ -196,8 +259,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
@Override @Override
public List notice() { public List notice() {
//获取当前用户id //获取当前用户id
//String userId = dgApplyAmountInfoController.getUserId(); String userId = dgApplyAmountInfoController.getUserId();
String userId = "5";
//根据角色查询资产部调查列表 //根据角色查询资产部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId); String roleIds = RedisUtil.get("dq:userRole:" + userId);
@ -279,4 +341,345 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
} }
return list; return list;
} }
@Override
public List<PersonalEfficiencyListResponse> queryPersonalEfficiencyList() {
int size = 100;
List<PersonalEfficiencyListResponse> efficiencyList = new ArrayList<>();
//获取当前登录用户id
int currentUser = Integer.parseInt(this.getUserId());
//获取当前用户拥有的角色ids
String roleIds = RedisUtil.get("dq:userRole:" + currentUser);
//字符串格式
List<String> roleIdList = new ArrayList<>();
if (roleIds != null) {
String[] ids = roleIds.split(",");
roleIdList = Arrays.asList(ids);
}
//数字格式
List<Integer> roleList = new ArrayList<>();
if (roleIds != null) {
String[] roleId = roleIds.split(",");
for (String id : roleId) {
roleList.add(Integer.parseInt(id));
}
}
//获取每个业务id的三种状态
HashMap<Integer, Object> hashMap = Maps.newHashMap();
//角色不为空
//担保业务员角色、担保经理角色
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_YWY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID))) {
//业务申请列表查询
IPage<BusinessApplicationListResponse> positionVO = applyAmountListMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId());
List<BusinessApplicationListResponse> 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<GuaranteeListResponse> positionVO = guaranteeAssignUserMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
List<GuaranteeListResponse> 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<AssetsInvestigationListResponse> positionVO = assetsInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
List<AssetsInvestigationListResponse> 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<MessageInvestigationListResponse> positionVO = messageInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
List<MessageInvestigationListResponse> 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<DgComplianceInvestigationResponse> list = complianceInvestigationMapper.list(new Page(1, size), dgComplianceInvestigationRequest, roleList, currentUser);
List<DgComplianceInvestigationResponse> 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<DgWorkConferencePO> list = workConferenceConsiderMapper.list(new Page(1, size), "", roleList, currentUser);
List<DgWorkConferencePO> 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<DgLoanCommitteeConsiderResponse> list = loanCommitteeConsiderMapper.list(new Page(1, size), "", roleList, currentUser);
List<DgLoanCommitteeConsiderResponse> 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<GuaranteeLetterListResponse> iPage = guaranteeLetterAssignUserMapper.pageByCondition(new Page(1, size), currentUser, roleIdList, null, null);
List<GuaranteeLetterListResponse> 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<PaymentConfirmationListResponse> iPage = paymentConfirmationConsiderMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null);
List<PaymentConfirmationListResponse> 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<LoanNoticeListResponse> iPage = loanNoticeMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null);
List<LoanNoticeListResponse> 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<DgAuditProcess> wrapper = new QueryWrapper<>();
wrapper.eq("user_id", currentUser).eq("business_id",key);
List<DgAuditProcess> auditProcessList = dgAuditProcessMapper.selectList(wrapper);
if (auditProcessList != null && auditProcessList.size() != 0) {
//获取累计耗时,完成时间
HashMap<String, Object> 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<String, Object> getTime(Integer businessId, Integer userId) {
HashMap<String, Object> hashMap = Maps.newHashMap();
//根据业务id查询业务流程表
QueryWrapper<DgAuditProcess> wrapper = new QueryWrapper<>();
wrapper.eq("business_id", businessId).orderByAsc("create_time");
List<DgAuditProcess> 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<DgAuditProcess> 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);
}
} }

@ -1,7 +1,9 @@
package com.daqing.financial.guarantee.service.impl; package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
@ -209,11 +211,21 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//AB角调查,修改审核意见以及状态 //AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id /*dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
dgGuaranteeAssignUser.setStatus(StatusCode.SP_REJECT);//状态为驳回(只有A,B角同时同意,状态才改为审核中) dgGuaranteeAssignUser.setStatus(StatusCode.SP_REJECT);//状态为驳回(只有A,B角同时同意,状态才改为审核中)
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理 dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgGuaranteeAssignUser.setApplyContent(investigateGuaranteeRequest.getApplyContent());//审核意见 dgGuaranteeAssignUser.setApplyContent(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser); this.baseMapper.updateById(dgGuaranteeAssignUser);*/
//插入或更新的字段有 空字符串 或者 null
this.baseMapper.update(
null,
Wrappers.<DgGuaranteeAssignUser>lambdaUpdate()
.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<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId()) int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type", 1).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED)); .eq("type", 1).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED));
@ -610,7 +622,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId())); String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),guaranteeUser.getBusinessId(), account, departmentId, approvalGuaranteeRequest.getApplyContent(), roleId,2,reason,loanMoney,loanTerm); AuditProcessUtil.save(Integer.parseInt(this.getUserId()),guaranteeUser.getBusinessId(), account, departmentId, approvalGuaranteeRequest.getApplyContent(), 2,roleId,reason,loanMoney,loanTerm);
return 1; return 1;
} }

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
@ -147,6 +148,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//绑定角色关系 //绑定角色关系
hrmsFeignService.insertUserRole(messageRequest.getEmpId().longValue(), PromptSuccess.XX_ZY_ID.longValue()); hrmsFeignService.insertUserRole(messageRequest.getEmpId().longValue(), PromptSuccess.XX_ZY_ID.longValue());
} }
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),messageRequest.getBusinessId(), account, departmentId, "", 4,PromptSuccess.XX_JL_ID,"","","");
return true; return true;
} }
@ -306,7 +313,17 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理 dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgMessageInvestigation.setRemark(approvalMessageRequest.getRemark());//审核意见 dgMessageInvestigation.setRemark(approvalMessageRequest.getRemark());//审核意见
//根据主键id修改信息部记录 //根据主键id修改信息部记录
this.baseMapper.updateById(dgMessageInvestigation); /*this.baseMapper.updateById(dgMessageInvestigation);*/
//插入或更新的字段有 空字符串 或者 null
this.baseMapper.update(
null,
Wrappers.<DgMessageInvestigation>lambdaUpdate()
.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(); DgMessageInvestigation dgMessage = new DgMessageInvestigation();
dgMessage.setStatus(StatusCode.SP_REJECT);//驳回 dgMessage.setStatus(StatusCode.SP_REJECT);//驳回

@ -1,6 +1,6 @@
##服务名称 #服务名称
spring.application.name=dq-financial-guarantee spring.application.name=dq-financial-guarantee
##配置中心地址 #配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848 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.namespace=58fa89c6-0e23-4530-ac13-95747e873c60
#spring.cloud.nacos.config.group=prod #spring.cloud.nacos.config.group=prod

@ -77,4 +77,15 @@
WHERE id = #{af.id} WHERE id = #{af.id}
</update> </update>
<select id="selectBusinessTaday" parameterType="java.lang.String" resultType="java.lang.Integer">
select count(0) from dg_apply_amount_info where create_time LIKE CONCAT('%',#{dateTime},'%')
</select>
<select id="selectMaxBusinessTaday" parameterType="java.lang.String" resultType="java.lang.String">
select business_code
from dg_apply_amount_info
where create_time LIKE CONCAT('%',#{dateTime},'%')
order by id desc limit 1
</select>
</mapper> </mapper>

@ -13,10 +13,11 @@
<result column="reason" property="reason" /> <result column="reason" property="reason" />
<result column="loan_money" property="loanMoney" /> <result column="loan_money" property="loanMoney" />
<result column="loan_tern" property="loanTern" /> <result column="loan_tern" property="loanTern" />
<result column="role_id" property="roleId" />
</resultMap> </resultMap>
<select id="selectAuditProcessList" resultMap="BaseResultMap"> <select id="selectAuditProcessList" resultMap="BaseResultMap">
select dap.id,dap.business_id,dap.approver,dap.create_time,dap.audit_opinion, 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 dbps.business_status as status,dap.reason,dap.loan_money,dap.loan_tern
from dg_audit_process dap from dg_audit_process dap
left join dg_business_process_status dbps on dbps.business_id = dap.business_id left join dg_business_process_status dbps on dbps.business_id = dap.business_id

@ -8,6 +8,7 @@ import com.daqing.framework.domain.hrms.request.RolePermissionRequest;
import com.daqing.framework.domain.hrms.response.HrmsCode; import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.domain.hrms.response.RolePermissionResponse; import com.daqing.framework.domain.hrms.response.RolePermissionResponse;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -150,6 +151,18 @@ public class RolePermissionController {
if(count >0){ if(count >0){
ExceptionCast.cast(HrmsCode.ROLE_EMP_EXIST); ExceptionCast.cast(HrmsCode.ROLE_EMP_EXIST);
} }
//如果角色id对应了业务管理里面的角色id限制不让删除
if(rolePermission.getRoleId().equals(PromptSuccess.DB_YWY_ID.longValue()) || rolePermission.getRoleId().equals(PromptSuccess.DB_JL_ID.longValue())||
rolePermission.getRoleId().equals(PromptSuccess.DB_A_ID.longValue()) || rolePermission.getRoleId().equals(PromptSuccess.DB_B_ID.longValue())||
rolePermission.getRoleId().equals(PromptSuccess.DB_LD_ID.longValue()) || rolePermission.getRoleId().equals(PromptSuccess.ZC_JL_ID.longValue())||
rolePermission.getRoleId().equals(PromptSuccess.ZC_ZY_ID.longValue()) || rolePermission.getRoleId().equals(PromptSuccess.ZC_LD_ID.longValue())||
rolePermission.getRoleId().equals(PromptSuccess.XX_JL_ID.longValue()) || rolePermission.getRoleId().equals(PromptSuccess.XX_ZY_ID.longValue())||
rolePermission.getRoleId().equals(PromptSuccess.XX_LD_ID.longValue()) || rolePermission.getRoleId().equals(PromptSuccess.FG_JL_ID.longValue())||
rolePermission.getRoleId().equals(PromptSuccess.FG_C_ID.longValue()) || rolePermission.getRoleId().equals(PromptSuccess.FG_LD_ID.longValue())||
rolePermission.getRoleId().equals(PromptSuccess.GZU_ID.longValue()) || rolePermission.getRoleId().equals(PromptSuccess.DSH_ID.longValue())||
rolePermission.getRoleId().equals(PromptSuccess.CWB_ID.longValue())){
ExceptionCast.cast(HrmsCode.ROLE_EMP_LINK);
}
//没有关联则根据roleId删除hrms_role表对应记录 //没有关联则根据roleId删除hrms_role表对应记录
permissionService.deleteHrmsRoleByRoleId(rolePermission.getRoleId()); permissionService.deleteHrmsRoleByRoleId(rolePermission.getRoleId());
//根据角色id删除对应所有权限 //根据角色id删除对应所有权限

@ -151,11 +151,13 @@ public class UserLoginController implements UserLoginControllerApi {
String imgUrl = user.getHeadPortaritUrl(); String imgUrl = user.getHeadPortaritUrl();
String encoder = "UTF-8"; String encoder = "UTF-8";
String account = URLEncoder.encode(username,encoder); String account = URLEncoder.encode(username,encoder);
String headerImg = URLDecoder.decode(imgUrl,encoder); String headerImg=null;
if(imgUrl !=null)
headerImg = URLDecoder.decode(imgUrl,encoder);
//account = new String(username.getBytes("GBK"),"iso-8859-1"); //account = new String(username.getBytes("GBK"),"iso-8859-1");
log.info("account==========="+account+"headerImg============="+headerImg); log.info("account==========="+account+"headerImg============="+headerImg);
response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token+"&account="+account+"&headerImg="+headerImg); response.sendRedirect("http://www.huorantech.cn/dq/index.html#/login?token="+token+"&account="+account+"&headerImg="+headerImg);
//response.sendRedirect(state+"?token="+token+"&head_img="+user.getHeadImg()+"&name="+URLEncoder.encode(user.getName(),"UTF-8")); //response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token+"&account="+account+"&headerImg="+headerImg);
} }
}else { }else {
userService.weChatBinding(code,response,state); userService.weChatBinding(code,response,state);

@ -15,6 +15,7 @@ import com.daqing.framework.domain.hrms.response.RolePermissionResponse;
import com.daqing.framework.model.response.CommonCode; import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -283,6 +284,7 @@ public class EmployeeController implements EmployeeControllerApi {
/** /**
* 根据用户id获取所在部门ids * 根据用户id获取所在部门ids
*/ */
@ApiOperation(value = "根据用户id获取部门")
@GetMapping("/getDepartmentIds") @GetMapping("/getDepartmentIds")
public String getDepartmentIds(Integer userId) { public String getDepartmentIds(Integer userId) {
return employeeService.getDeptIds(userId); return employeeService.getDeptIds(userId);

@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map; import java.util.Map;
@ -35,6 +36,13 @@ public class RoleController {
return ResponseResult.SUCCESS(); return ResponseResult.SUCCESS();
} }
//查询角色名称
@GetMapping("/roleList")
public ResponseResult roleList() {
List<RoleEntity> list = roleService.list();
return ResponseResult.SUCCESS(list);
}
/** /**
* 信息 * 信息

@ -188,7 +188,7 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
ExceptionCast.cast(HrmsCode.EMPLOYEE_IS_NULL); ExceptionCast.cast(HrmsCode.EMPLOYEE_IS_NULL);
} }
String password = Md5Util.md5(PromptSuccess.RESET_PASSWORD + userId); String password = Md5Util.md5(PromptSuccess.RESET_PASSWORD + userId);
return this.getBaseMapper().updatePassword(id, password); return this.getBaseMapper().updatePassword(userId, password);
} }
/** /**

@ -29,6 +29,6 @@ public class Md5Util {
//String s = URLEncoder.encode("www.occupationlab.com", "utf-8"); //String s = URLEncoder.encode("www.occupationlab.com", "utf-8");
//System.out.println(s); //System.out.println(s);
//System.out.println(md5("1234564")); //System.out.println(md5("1234564"));
System.out.println(md5("Aa12341")); System.out.println(md5("Aa123420"));
} }
} }

@ -30,7 +30,6 @@ public class CustomerPersonalTOI implements Serializable {
/** /**
* 客户的经理人id * 客户的经理人id
*/ */
@NotNull(message = "客户经理人不能为空")
@ApiModelProperty(value = "客户经理人id") @ApiModelProperty(value = "客户经理人id")
private Long manager; private Long manager;
/** /**

@ -38,6 +38,9 @@ public class DgAuditProcess implements Serializable {
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private Integer userId; private Integer userId;
@ApiModelProperty(value = "部门名称(实为角色名称)")
private String deptName;
@ApiModelProperty(value = "部门ids") @ApiModelProperty(value = "部门ids")
private String departmentId; private String departmentId;

@ -27,8 +27,9 @@ public enum GuaranteeCode implements ResultCode {
WORK_JUDGE_NOT_NULL(false, 110001, "参会评委不能为空,请重新选择!"), WORK_JUDGE_NOT_NULL(false, 110001, "参会评委不能为空,请重新选择!"),
EXCEL_ID_NOT_NULL(false, 120001, "导出的数据不能为空,请选择要导出的数据!"); EXCEL_ID_NOT_NULL(false, 120001, "导出的数据不能为空,请选择要导出的数据!"),
EFFICIENCY_TIME_ERROR(false, 130001,"时间格式错误!");
/** /**
* 操作是否成功 * 操作是否成功
*/ */

@ -0,0 +1,31 @@
package com.daqing.framework.domain.guarantee.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
/**
* @Author chen
* @DATE 2020/12/30 9:45
* @Version 1.0
*/
@Data
@ToString
public class StatusPO {
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("进程id")
private Integer processId;
@ApiModelProperty("审核状态")
private Integer status;
@ApiModelProperty("业务状态")
private Integer businessStatus;
@ApiModelProperty("操作状态")
private Integer operatingStatus;
}

@ -76,6 +76,7 @@ public enum HrmsCode implements ResultCode {
ROLE_EMP_EXIST(false,44001,"该角色有用户关联,不能删除!"), ROLE_EMP_EXIST(false,44001,"该角色有用户关联,不能删除!"),
ROLE_NAME_EXIST(false,44002,"该角色名称已存在,请重新输入!"), ROLE_NAME_EXIST(false,44002,"该角色名称已存在,请重新输入!"),
EMP_POSITION_EXSIT(false, 22006, "该职位下已关联员工!"), EMP_POSITION_EXSIT(false, 22006, "该职位下已关联员工!"),
ROLE_EMP_LINK(false,44003,"该角色关联业务管理模块,不能删除!"),
EMP_SAME(false, 51001, "A,B角不能选同一个人!"), EMP_SAME(false, 51001, "A,B角不能选同一个人!"),
EMP_TO_BE_CHOOSE(false, 51002, "该用户已经被指派!"); EMP_TO_BE_CHOOSE(false, 51002, "该用户已经被指派!");

@ -15,8 +15,8 @@ public class EasyExcelUtil {
public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException { public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException {
response.setContentType("application/vnd.ms-excel"); response.setContentType("application/vnd.ms-excel");
String filePath = fileName + ".xlsx"; String filePath = fileName + ".xlsx";
fileName = new String(filePath.getBytes(), "ISO-8859-1"); String name = new String(filePath.getBytes(), "ISO-8859-1");
response.addHeader("Content-Disposition", "filename=" + fileName); response.addHeader("Content-Disposition", "filename=" + name);
EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list); EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list);
} }
} }

@ -0,0 +1,84 @@
package com.daqing.framework.utils.excel;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
/**
* @auther River
* @date 2021/1/6 17:23
*/
public class ProcessIdConverter implements Converter<Integer> {
@Override
public Class supportJavaTypeKey() {
return Integer.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
/**
* 这里读的时候会调用
*
* @param cellData
* NotNull
* @param contentProperty
* Nullable
* @param globalConfiguration
* NotNull
* @return
*/
@Override
public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
return 0;
}
/**
* 这里是写的时候会调用
*
* @param value
* NotNull
* @param contentProperty
* Nullable
* @param globalConfiguration
* NotNull
* @return
*/
@Override
public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
switch (value){
case 1:
return new CellData("业务申请");
case 2:
return new CellData("担保部调查");
case 3:
return new CellData("资产部调查");
case 4:
return new CellData("信息部调查");
case 5:
return new CellData("合规调查");
case 6:
return new CellData("工作会");
case 7:
return new CellData("贷审会");
case 8:
return new CellData("担保函");
case 9:
return new CellData("回款确认");
case 10:
return new CellData("放款通知");
default:
return new CellData("");
}
}
}

@ -12,7 +12,7 @@ import com.alibaba.excel.metadata.property.ExcelContentProperty;
* @Version 1.0 * @Version 1.0
* 任务节点转换器 * 任务节点转换器
*/ */
public class TaskNodeConverter implements Converter<Integer> { public class TaskNodeConverter implements Converter<String> {
@Override @Override
public Class supportJavaTypeKey() { public Class supportJavaTypeKey() {
@ -36,9 +36,9 @@ public class TaskNodeConverter implements Converter<Integer> {
* @return * @return
*/ */
@Override @Override
public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, public String convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) { GlobalConfiguration globalConfiguration) {
return 0; return "";
} }
/** /**
@ -53,32 +53,32 @@ public class TaskNodeConverter implements Converter<Integer> {
* @return * @return
*/ */
@Override @Override
public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, public CellData convertToExcelData(String value, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) { GlobalConfiguration globalConfiguration) {
switch (value){ switch (value){
case 1: case "1":
return new CellData("业务申请"); return new CellData("业务申请");
case 2: case "2":
return new CellData("担保部调查"); return new CellData("担保部调查");
case 3: case "3":
return new CellData("资产部调查"); return new CellData("资产部调查");
case 4: case "4":
return new CellData("信息部调查"); return new CellData("信息部调查");
case 5: case "5":
return new CellData("合规调查"); return new CellData("合规调查");
case 6: case "6":
return new CellData("工作会"); return new CellData("工作会");
case 7: case "7":
return new CellData("贷审会"); return new CellData("贷审会");
case 8: case "8":
return new CellData("担保函"); return new CellData("担保函");
case 9: case "9":
return new CellData("回款确认"); return new CellData("回款确认");
case 10: case "10":
return new CellData("放款通知"); return new CellData("放款通知");
default: default:
return new CellData(String.valueOf(value)); return new CellData("");
} }
} }

Loading…
Cancel
Save