Merge remote-tracking branch 'origin/master'

# Conflicts:
#	dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
#	dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
#	dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
master
shijie 4 years ago
commit 7a79510208
  1. 6
      dq-financial-guarantee/pom.xml
  2. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
  3. 57
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java
  4. 42
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  5. 28
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  6. 63
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java
  7. 32
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  8. 44
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
  9. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java
  10. 13
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
  11. 32
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  12. 22
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java
  13. 23
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java
  14. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java
  15. 38
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/OrdinaryUtil.java
  16. 6
      dq-financial-hrms-auth/pom.xml
  17. 9
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java
  18. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java
  19. 31
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  20. 7
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java

@ -25,6 +25,12 @@
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.3.8</version>
</dependency>
<!--redis-->
<dependency>
<groupId>org.springframework.boot</groupId>

@ -69,6 +69,12 @@ public interface HrmsFeignService {
@GetMapping("hrms/employee/selectUserRole")
ResponseResult selectUserRole(@RequestParam("userId") Long userId,@RequestParam("roleId")Long roleId);
/**
* 根据用户id获取所在部门ids
*/
@GetMapping("/hrms/employee/getDepartmentIds")
String getDepartmentIds(@RequestParam("userId") Integer userId);
/* *//**
* 根据角色id查询所有权限
*//*

@ -0,0 +1,57 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty;
import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
import com.daqing.framework.utils.excel.OperatingStatusConverter;
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
* @Version 1.0
*/
@Data
public class PersonalEfficiencyListResponse {
@ApiModelProperty(value = "提单人")
@ExcelProperty(value = "提单人",index = 1)
private String applicant;
@ApiModelProperty("客户名称")
@ExcelProperty(value = "客户名称",index = 2)
private String clientName;
@ApiModelProperty("申请日期")
@ExcelProperty(value = "申请日期",index = 3)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date applicationDate;
@ApiModelProperty("累计耗时")
@ExcelProperty(value = "累计耗时",index = 4)
private String timeConsuming;
@ApiModelProperty("完成时间")
@ExcelProperty(value = "完成时间",index = 5)
private String completeTime;
@ApiModelProperty("任务节点")
@ExcelProperty(value = "任务节点",index = 6)
private Double taskNode;
@ApiModelProperty("审批状态")
@ExcelProperty(value = "审核状态",index = 7,converter = ApprovalStatusConverter.class)
private Integer approveStatus;
@ApiModelProperty("业务状态")
@ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class)
private Integer businessStatus;
@ApiModelProperty("操作状态")
@ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class)
private Integer operatingStatus;
}

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
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.feign.CrmsFeignService;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
@ -14,29 +15,22 @@ import com.daqing.financial.guarantee.model.response.BusinessApplicationListResp
import com.daqing.financial.guarantee.model.response.DgApplyAmountInfoResponse;
import com.daqing.financial.guarantee.model.response.DgEnclosureInfoResponse;
import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.ArraysUtil;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.framework.domain.crms.CrmsCustomerRelated;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.*;
import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse;
import com.daqing.framework.domain.hrms.DepartmentVO;
import com.daqing.framework.domain.hrms.PermissionEntity;
import com.daqing.framework.domain.hrms.ext.UserDeptVO;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RandomUtil;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.ConvertUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -46,8 +40,10 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.stream.Collectors;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
/**
* <p>
@ -209,7 +205,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//如果不为保存就往审核流程进程表新增一条记录
if(businessApplication.getIsSaveOrCommit()==1){
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(dgApplyAmountInfo.getId(),account,"担保业务员","",1,PromptSuccess.DB_YWY_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(userId));
AuditProcessUtil.save(Integer.parseInt(userId),dgApplyAmountInfo.getId(),account,departmentId,"",1,PromptSuccess.DB_YWY_ID,"","","");
}
return 1;
}
@ -412,7 +409,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessApplication.getBusinessId(),account,"担保业务员","",1,PromptSuccess.DB_YWY_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),businessApplication.getBusinessId(),account,departmentId,"",1,PromptSuccess.DB_YWY_ID,"","","");
//附件新增
return dgEnclosureInfoMapper.insert(dgEnclosureInfo);
@ -440,7 +438,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
.eq("type",applyAmountList.getType()));
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(dgApplyAmountList1.getBusinessId(),account,"担保业务员","",1,PromptSuccess.DB_YWY_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),dgApplyAmountList1.getBusinessId(),account,departmentId,"",1,PromptSuccess.DB_YWY_ID,"","","");
//将业务流程状态设置为已撤销
@ -603,9 +602,22 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(dgApplyAmountList1.getBusinessId(),account,deptName,remark,1,roleId,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),dgApplyAmountList1.getBusinessId(),account,departmentId,remark,1,roleId,"","","");
return 1;
}
/**
* 获取当前登录用户信息
*/
private String getUserId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
String userId = RedisUtil.get("dq:token:" + token);
if (userId == null || userId.length() == 0) {
ExceptionCast.cast(CommonCode.GET_LOGIN_USER_FAIL);
}
return userId;
}
}

@ -15,23 +15,28 @@ import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService;
import com.daqing.financial.guarantee.util.ArraysUtil;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.*;
import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
@ -299,7 +304,9 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(dgAssetsInvestigation.getBusinessId(),account,"资产部专员",investigateAssetsRequest.getApplyContent(),3,PromptSuccess.ZC_ZY_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),dgAssetsInvestigation.getBusinessId(),account,departmentId,investigateAssetsRequest.getApplyContent(),3,PromptSuccess.ZC_ZY_ID,"","","");
return 1;
}
@ -446,7 +453,8 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
String loanTerm = approvalAssetsRequest.getTerm();//期限
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,deptName,approvalAssetsRequest.getApplyContent(),3,roleId,reason,loanMoney,loanTerm);
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),assetsInvestigation.getBusinessId(),account,departmentId,approvalAssetsRequest.getApplyContent(),3,roleId,reason,loanMoney,loanTerm);
return 1;
}
@ -464,4 +472,18 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
return false;
}
}
/**
* 获取当前登录用户信息
*/
private String getUserId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
String userId = RedisUtil.get("dq:token:" + token);
if (userId == null || userId.length() == 0) {
ExceptionCast.cast(CommonCode.GET_LOGIN_USER_FAIL);
}
return userId;
}
}

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service.impl;
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.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgAssetsInvestigationMapper;
@ -11,9 +12,9 @@ import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationReq
import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService;
import com.daqing.financial.guarantee.service.IDgComplianceInvestigationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
@ -136,8 +137,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
Boolean result2 = (Boolean) responseResult.getData();
if (result2) {
// 在审核进程表中插入一条指派成功的数据
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_JL_NAME, null, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, null, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
}
}
}
@ -175,8 +177,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
StatusCode.CZ_ON_HAND, PromptSuccess.FG_JL_ID);
// 在业务流程表中插入一条调查成功的数据
if (result2) {
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_C_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_C_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_C_ID,"","","");
}
}
}
@ -202,8 +205,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
.getBusinessId(), StatusCode.CZ_ON_HAND);
if (result3) {
// 在业务流程表中插入一条驳回成功的数据(记得带上驳回的意见)
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_C_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_C_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_C_ID,"","","");
}
}
}
@ -241,8 +245,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
StatusCode.CZ_ON_HAND, PromptSuccess.FG_C_ID);
if (result1) {
// 在业务流程表中插入一条法规经理同意的数据
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
}
}
}
@ -263,8 +268,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
StatusCode.CZ_ON_HAND, PromptSuccess.FG_C_ID);
if (result2) {
// 在业务流程表中插入一条法规经理驳回的数据
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
}
}
}
@ -286,8 +292,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.YW_REJECTED);
if (result2) {
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
}
}
}
@ -327,8 +334,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
}
if (result1) {
// 在业务流程表中插入一条法规经理审核成功的数据
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
}
}
}
@ -349,8 +357,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
StatusCode.CZ_ON_HAND, PromptSuccess.FG_C_ID);
if (result2) {
// 在业务流程表中插入一条法规经理驳回的数据
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
}
}
}
@ -372,8 +381,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.YW_REJECTED);
if (result2) {
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_JL_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_JL_ID,"","","");
}
}
}
@ -413,8 +423,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
}
if (result1) {
// 在业务流程表中插入一条法规领导审核成功的数据
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_LD_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_LD_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_LD_ID,"","","");
}
}
}
@ -439,8 +450,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
StatusCode.CZ_ON_HAND, PromptSuccess.FG_JL_ID);
if (result2) {
// 在业务流程表中插入一条法规领导驳回的数据
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_LD_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_LD_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_LD_ID,"","","");
}
}
}
@ -466,8 +478,9 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.YW_REJECTED);
if (result2) {
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.FG_LD_NAME, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_LD_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.HG_PROCESS_ID,PromptSuccess.FG_LD_ID,"","","");
}
}
}

@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.service.impl;
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.feign.CrmsFeignService;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
@ -12,17 +13,17 @@ import com.daqing.financial.guarantee.model.request.GuaranteeRequest;
import com.daqing.financial.guarantee.model.request.InvestigateGuaranteeRequest;
import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.ArraysUtil;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.*;
import com.daqing.framework.domain.guarantee.po.DgGuaranteePO;
import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse;
import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
@ -38,7 +39,10 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
/**
* <p>
@ -457,7 +461,8 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//不为保存的情况则往审核流程进程表新增一条记录
if(!investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_DRAFT)){
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(), account, deptName, investigateGuaranteeRequest.getApplyContent(), 2,roleId,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),guaranteeAssignUser.getBusinessId(), account, departmentId, investigateGuaranteeRequest.getApplyContent(), 2,roleId,"","","");
}
return 1;
}
@ -604,7 +609,8 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
String loanTerm = approvalGuaranteeRequest.getTerm();//期限
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeUser.getBusinessId(), account, deptName, approvalGuaranteeRequest.getApplyContent(), roleId,2,reason,loanMoney,loanTerm);
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);
return 1;
}
@ -713,11 +719,23 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeRequest.getBusinessId(), account, "担保部经理", "", 2,PromptSuccess.DB_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),guaranteeRequest.getBusinessId(), account, departmentId, "", 2,PromptSuccess.DB_JL_ID,"","","");
return ResponseResult.SUCCESS();
}
/**
* 获取当前登录用户信息
*/
private String getUserId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
String userId = RedisUtil.get("dq:token:" + token);
if (userId == null || userId.length() == 0) {
ExceptionCast.cast(CommonCode.GET_LOGIN_USER_FAIL);
}
return userId;
}
}

@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.service.impl;
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.DgGuaranteeAssignUserMapper;
import com.daqing.financial.guarantee.mapper.DgGuaranteeLetterAssignUserMapper;
@ -11,22 +12,18 @@ import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper
import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.exception.ExceptionCatch;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import com.daqing.framework.utils.excel.ExcelUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -167,10 +164,10 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
Integer companyId = guaranteeLetterAssignUser.getCompanyId();
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion,8,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.FG_JL_ID,"","","");
//更新成功,添加ab角数据
if (i > 0){
//获取之前指定的a角用户
@ -243,7 +240,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion,8,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.FG_JL_ID,"","","");
//更新成功,更新ab角数据及资产部经理数据
if (i > 0){
//更新a角
@ -302,7 +300,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion,8,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.FG_JL_ID,"","","");
//更新成功,更新贷审会数据
if (i > 0){
//根据业务id查询贷审会数据
@ -342,7 +341,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"资产部经理",auditOpinion,8,PromptSuccess.ZC_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.ZC_JL_ID,"","","");
//获取公司id
Integer companyId = guaranteeLetterAssignUser.getCompanyId();
//更新成功,添加回款确认数据及更新整个业务的审核状态
@ -408,7 +408,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"资产部经理",auditOpinion,8,PromptSuccess.ZC_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.ZC_JL_ID,"","","");
//更新成功,更新回款确认数据及更新整个业务的审核状态
if (i > 0){
//更新法规部经理数据
@ -466,7 +467,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"资产部经理",auditOpinion,8,PromptSuccess.ZC_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.ZC_JL_ID,"","","");
//更新成功,更新AB角数据
if (i > 0){
//更新法规部经理数据
@ -528,7 +530,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
log.info(i > 0 ? "首次a角用户确认担保函更新成功" : "首次a角用户确认担保函更新失败");
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8,PromptSuccess.DB_A_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.DB_A_ID,"","","");
//更新成功后,判断b角用户是否确认
if (i > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
@ -577,7 +580,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
log.info(i > 0 ? "驳回后a角用户确认担保函更新成功" : "驳回后a角用户确认担保函更新失败");
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8,PromptSuccess.DB_A_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.DB_A_ID,"","","");
//更新成功后,判断b角用户是否确认
if (i > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
@ -618,7 +622,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
log.info(i > 0 ? "a角用户驳回担保函更新成功" : "a角用户驳回担保函更新失败");
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8,PromptSuccess.DB_A_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.DB_A_ID,"","","");
//更新成功后,更新b角数据及更新法规部经理数据
if (i > 0){
//更新b用户的审核状态为驳回,操作状态为已处理
@ -667,7 +672,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
log.info(i > 0 ? "首次b角用户确认担保函更新成功" : "首次b角用户确认担保函更新失败");
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8,PromptSuccess.DB_B_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.DB_B_ID,"","","");
//更新成功后,判断a角用户是否确认
if (i > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
@ -717,7 +723,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
log.info(i > 0 ? "驳回后b角用户确认担保函更新成功" : "驳回后b角用户确认担保函更新失败");
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8,PromptSuccess.DB_B_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.DB_B_ID,"","","");
//更新成功后,判断a角用户是否确认
if (i > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
@ -758,7 +765,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
log.info(i > 0 ? "b角用户驳回担保函更新成功" : "b角用户驳回担保函更新失败");
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8,PromptSuccess.DB_B_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,8,PromptSuccess.DB_B_ID,"","","");
//更新成功后,更新a角数据及更新法规部经理数据
if (i > 0){
//更新a用户的审核状态为驳回,操作状态为已处理

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service.impl;
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.DgComplianceInvestigationMapper;
import com.daqing.financial.guarantee.mapper.DgGuaranteeAssignUserMapper;
@ -12,8 +13,8 @@ import com.daqing.financial.guarantee.model.response.DgLoanCommitteeConsiderInfo
import com.daqing.financial.guarantee.model.response.DgLoanCommitteeConsiderResponse;
import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService;
import com.daqing.financial.guarantee.service.IDgLoanCommitteeConsiderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
@ -144,9 +145,10 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
}
if (result1) {
// 在业务流程表中插入一条审议成功的数据
return AuditProcessUtil.save(this.getBaseMapper().getDgLoanCommitteeConsider(
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getBaseMapper().getDgLoanCommitteeConsider(
dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.DSH_NAME, null, PromptSuccess.DSH_PROCESS_ID,PromptSuccess.DSH_ID,"","","");
departmentId, null, PromptSuccess.DSH_PROCESS_ID,PromptSuccess.DSH_ID,"","","");
}
}
}
@ -176,9 +178,10 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
StatusCode.YW_REJECTED);
if (result2) {
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return AuditProcessUtil.save(this.getBaseMapper().getDgLoanCommitteeConsider(
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getBaseMapper().getDgLoanCommitteeConsider(
dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.DSH_NAME, dgLoanCommitteeConsiderRequest.getRefuseOpinion(), PromptSuccess.DSH_PROCESS_ID,
departmentId, dgLoanCommitteeConsiderRequest.getRefuseOpinion(), PromptSuccess.DSH_PROCESS_ID,
PromptSuccess.DSH_ID,"","","");
}
}
@ -215,9 +218,10 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommit
StatusCode.CZ_ON_HAND);
if (result3) {
// 在业务流程表中插入一条驳回成功的数据(记得带上驳回的意见)
return AuditProcessUtil.save(this.getBaseMapper().getDgLoanCommitteeConsider(
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getBaseMapper().getDgLoanCommitteeConsider(
dgLoanCommitteeConsiderRequest.getId()).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.DSH_NAME, dgLoanCommitteeConsiderRequest.getRefuseOpinion(), PromptSuccess.DSH_PROCESS_ID,
departmentId, dgLoanCommitteeConsiderRequest.getRefuseOpinion(), PromptSuccess.DSH_PROCESS_ID,
PromptSuccess.DSH_ID,"","","");
}
}

@ -3,18 +3,17 @@ package com.daqing.financial.guarantee.service.impl;
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.DgBusinessProcessStatusMapper;
import com.daqing.financial.guarantee.mapper.DgLoanNoticeMapper;
import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper;
import com.daqing.financial.guarantee.model.request.LoanNoticeQueryRequest;
import com.daqing.financial.guarantee.model.request.LoanNoticeUpdateRequest;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgLoanNoticeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus;
import com.daqing.framework.domain.guarantee.DgLoanNotice;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
@ -23,8 +22,6 @@ import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import com.daqing.framework.utils.excel.ExcelUtil;
import jdk.nashorn.internal.ir.IfNode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -116,7 +113,8 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
int update = baseMapper.updateById(loanNotice);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion,10,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,10,PromptSuccess.FG_JL_ID,"","","");
//更新成功更新业务流程已完成
if (update > 0){
QueryWrapper<DgBusinessProcessStatus> businessProcessStatusQueryWrapper = new QueryWrapper<>();
@ -142,7 +140,8 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
int update = baseMapper.updateById(loanNotice);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion,10,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,10,PromptSuccess.FG_JL_ID,"","","");
//更新成功,更新回款确认的法规部经理和财务部经理数据
if (update > 0){
QueryWrapper<DgPaymentConfirmationConsider> queryWrapper = new QueryWrapper<>();

@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.service.impl;
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.feign.CrmsFeignService;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
@ -10,25 +11,33 @@ import com.daqing.financial.guarantee.mapper.*;
import com.daqing.financial.guarantee.model.request.ApprovalMessageRequest;
import com.daqing.financial.guarantee.model.request.InvestigateMessageRequest;
import com.daqing.financial.guarantee.model.request.MessageRequest;
import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.model.response.DgApplyAmountInfoResponse;
import com.daqing.financial.guarantee.model.response.DgEnclosureInfoResponse;
import com.daqing.financial.guarantee.model.response.MessageDetailResponse;
import com.daqing.financial.guarantee.model.response.MessageInvestigationListResponse;
import com.daqing.financial.guarantee.service.IDgMessageInvestigationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.ArraysUtil;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.*;
import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
@ -278,7 +287,8 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,"信息部专员",investigateMessageRequest.getRemark(),4,PromptSuccess.XX_ZY_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),messageInvestigation.getBusinessId(),account,departmentId,investigateMessageRequest.getRemark(),4,PromptSuccess.XX_ZY_ID,"","","");
return 1;
}
@ -407,7 +417,8 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,deptName,approvalMessageRequest.getRemark(),4,roleId,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
AuditProcessUtil.save(Integer.parseInt(this.getUserId()),messageInvestigation.getBusinessId(),account,departmentId,approvalMessageRequest.getRemark(),4,roleId,"","","");
return 1;
}
@ -426,4 +437,17 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
return false;
}
}
/**
* 获取当前登录用户信息
*/
private String getUserId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
String userId = RedisUtil.get("dq:token:" + token);
if (userId == null || userId.length() == 0) {
ExceptionCast.cast(CommonCode.GET_LOGIN_USER_FAIL);
}
return userId;
}
}

@ -1,9 +1,9 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
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.DgGuaranteeLetterAssignUserMapper;
import com.daqing.financial.guarantee.mapper.DgLoanNoticeMapper;
@ -12,8 +12,8 @@ import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequ
import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.domain.guarantee.DgLoanNotice;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
@ -143,7 +143,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
int update = baseMapper.updateById(paymentConfirmationConsider);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"财务部经理",auditOpinion,9,PromptSuccess.CWB_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,9,PromptSuccess.CWB_ID,"","","");
Integer companyId = paymentConfirmationConsider.getCompanyId();
//更新成功,添加法规部经理数据
if (update > 0){
@ -183,7 +184,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
int update = baseMapper.updateById(paymentConfirmationConsider);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"财务部经理",auditOpinion, 9,PromptSuccess.CWB_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion, 9,PromptSuccess.CWB_ID,"","","");
//更新成功,更新法规部经理数据
if (update > 0){
QueryWrapper<DgPaymentConfirmationConsider> wrapperTemp = new QueryWrapper<>();
@ -212,7 +214,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
int update = baseMapper.updateById(paymentConfirmationConsider);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"财务部经理",auditOpinion,9,PromptSuccess.CWB_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,9,PromptSuccess.CWB_ID,"","","");
//更新成功,更新资产部经理数据及其他人的数据
if (update > 0){
//更新法规部经理数据
@ -275,7 +278,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion,9,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,9,PromptSuccess.FG_JL_ID,"","","");
Integer companyId = paymentConfirmationConsider.getCompanyId();
//更新成功,添加法规部经理数据和更新财务部数据
if (update > 0){
@ -319,7 +323,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
int update = baseMapper.updateById(paymentConfirmationConsider);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion, 9,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion, 9,PromptSuccess.FG_JL_ID,"","","");
//更新成功,更新法规部经理数据和财务部经理数据
if (update > 0){
QueryWrapper<DgPaymentConfirmationConsider> queryWrapperCwb = new QueryWrapper<>();
@ -354,7 +359,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
int update = baseMapper.updateById(paymentConfirmationConsider);
//同时往审核流程进程表新增一条记录
String account = DgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessId,account,"法规部经理",auditOpinion,9,PromptSuccess.FG_JL_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(currentUser);
AuditProcessUtil.save(currentUser,businessId,account,departmentId,auditOpinion,9,PromptSuccess.FG_JL_ID,"","","");
//更新成功,更新财务部经理数据
if (update > 0){
QueryWrapper<DgPaymentConfirmationConsider> queryWrapperT = new QueryWrapper<>();

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.service.impl;
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.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgComplianceInvestigationMapper;
@ -13,8 +14,8 @@ import com.daqing.financial.guarantee.model.response.DgWorkConferenceResponse;
import com.daqing.financial.guarantee.model.response.GuaranteeDetailResponse;
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService;
import com.daqing.financial.guarantee.service.IDgWorkConferenceConsiderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.financial.guarantee.util.OrdinaryUtil;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
@ -154,8 +155,9 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
StatusCode.SP_REVIEWED, StatusCode.CZ_ON_HAND, new Date(), names.toString());
if (result) {
// 在业务流程表中插入一条审议通过的数据
return AuditProcessUtil.save(this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.GZU_NAME, opinion, PromptSuccess.GZU_PROCESS_ID,PromptSuccess.GZU_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(userId));
return AuditProcessUtil.save(Integer.parseInt(userId),this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.GZU_PROCESS_ID,PromptSuccess.GZU_ID,"","","");
}
}
// 拒绝
@ -178,8 +180,9 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), StatusCode.YW_REJECTED);
if (result2) {
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return AuditProcessUtil.save(this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.GZU_NAME, opinion, PromptSuccess.GZU_PROCESS_ID,PromptSuccess.GZU_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(userId));
return AuditProcessUtil.save(Integer.parseInt(userId),this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.GZU_PROCESS_ID,PromptSuccess.GZU_ID,"","","");
}
}
}
@ -209,8 +212,9 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
.getWorkConferenceConsider(id).getBusinessId(), StatusCode.CZ_ON_HAND, PromptSuccess.FG_LD_ID);
if (result3) {
// 在业务流程表中插入一条工作会驳回的数据
return AuditProcessUtil.save(this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.GZU_NAME, opinion, PromptSuccess.GZU_PROCESS_ID,PromptSuccess.GZU_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(userId));
return AuditProcessUtil.save(Integer.parseInt(userId),this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, opinion, PromptSuccess.GZU_PROCESS_ID,PromptSuccess.GZU_ID,"","","");
}
}
}
@ -261,8 +265,9 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
Boolean result2 = this.getBaseMapper().updateOperationStatus(id, StatusCode.CZ_PROCESSED);
if (result2) {
// 在业务流程表中插入一条评委抽取成功的数据
return AuditProcessUtil.save(this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
PromptSuccess.GZU_NAME, null, PromptSuccess.GZU_PROCESS_ID,PromptSuccess.GZU_ID,"","","");
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
return AuditProcessUtil.save(Integer.parseInt(this.getUserId()),this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), DgApplyAmountInfoController.getAccount(),
departmentId, null, PromptSuccess.GZU_PROCESS_ID,PromptSuccess.GZU_ID,"","","");
}
}
}

@ -20,20 +20,33 @@ public class AuditProcessUtil{
private static AuditProcessUtil auditProcessUtil;
@PostConstruct
public void init() {
auditProcessUtil = this;
auditProcessUtil.auditProcessMapper = this.auditProcessMapper;
}
public static boolean save(Integer businessId, String approver, String departmentName, String auditOpinion,Integer processId,Integer roleId,String reason,String loanMoney,String loanTern) {
/**
* 业务流程工具类
* @param userId 操作用户id
* @param businessId 业务id
* @param approver 操作用户账户
* @param departmentIds 用户所在部门多个部门id
* @param auditOpinion 审批意见
* @param processId 进程id
* @param roleId 用户操作角色
* @param reason 驳回原因
* @param loanMoney 审批金额
* @param loanTern 审批期限
* @return 添加状态
*/
public static boolean save(Integer userId,Integer businessId, String approver, String departmentIds, String auditOpinion,Integer processId,Integer roleId,String reason,String loanMoney,String loanTern) {
DgAuditProcess auditProcess = new DgAuditProcess();
auditProcess.setApprover(approver);
auditProcess.setAuditOpinion(auditOpinion);
auditProcess.setUserId(userId);
auditProcess.setBusinessId(businessId);
auditProcess.setDepartmentName(departmentName);
auditProcess.setDepartmentId(departmentIds);
auditProcess.setRoleId(roleId);
auditProcess.setProcessId(processId);
auditProcess.setLoanMoney(loanMoney);

@ -0,0 +1,38 @@
package com.daqing.financial.guarantee.util;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
/**
* @Author chen
* @DATE 2020/12/25 16:34
* @Version 1.0
*/
@Component
public class OrdinaryUtil {
@Autowired
private HrmsFeignService hrmsFeignService;
private static OrdinaryUtil ordinaryUtil;
@PostConstruct
public void init() {
ordinaryUtil = this;
ordinaryUtil.hrmsFeignService = this.hrmsFeignService;
}
/**
* 根据用户id获取所在部门id
* @param userId 角色id
* @return 部门ids
*/
public static String getDepartmentId(Integer userId) {
String departmentIds = ordinaryUtil.hrmsFeignService.getDepartmentIds(userId);
return departmentIds;
}
}

@ -98,9 +98,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration >
<classifier>exec</classifier>
</configuration>
<!-- <configuration >-->
<!-- <classifier>exec</classifier>-->
<!-- </configuration>-->
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>

@ -278,4 +278,13 @@ public class EmployeeController implements EmployeeControllerApi {
int i = employeeService.selectUserRole(userId, roleId);
return ResponseResult.SUCCESS(i);
}
/**
* 根据用户id获取所在部门ids
*/
@GetMapping("/getDepartmentIds")
public String getDepartmentIds(Integer userId) {
return employeeService.getDeptIds(userId);
}
}

@ -75,5 +75,7 @@ public interface EmployeeService extends IService<EmployeeEntity> {
List<EmployeeVO> listEmpNameByUserId(List<Integer> userIds);
int selectUserRole(Long userId, Long roleId);
String getDeptIds(Integer userId);
}

@ -1,5 +1,6 @@
package com.daqing.financial.hrms.service.impl;
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;
@ -44,6 +45,9 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
@Autowired
private DeptDao deptDao;
@Autowired
private EmployeeDeptDao employeeDeptDao;
@Autowired
private PositionDao positionDao;
@ -642,4 +646,31 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
public int selectUserRole(Long userId, Long roleId) {
return this.getBaseMapper().selectUserRole(userId, roleId);
}
@Override
public String getDeptIds(Integer userId) {
QueryWrapper<EmployeeEntity> wrapper = new QueryWrapper<>();
wrapper.eq("user_id",userId).select("id");
EmployeeEntity employeeEntity = baseMapper.selectOne(wrapper);
//获取员工id
Long employeeId = employeeEntity.getId();
//根据员工id获取对应部门ids
QueryWrapper<EmployeeDeptEntity> employeeDeptEntityQueryWrapper = new QueryWrapper<>();
employeeDeptEntityQueryWrapper.eq("employee_id",employeeId);
List<EmployeeDeptEntity> deptList = employeeDeptDao.selectList(employeeDeptEntityQueryWrapper);
StringBuilder stringBuilder = new StringBuilder();
if (deptList!=null && deptList.size()!=0){
//拼接部门id
deptList.forEach(employeeDeptEntity -> {
Long deptId = employeeDeptEntity.getDeptId();
stringBuilder.append(deptId).append(",");
});
}
String s = stringBuilder.toString();
String ids = "";
if (s.length()!=0){
ids = s.substring(0, s.length()-1);
}
return ids;
}
}

@ -35,8 +35,11 @@ public class DgAuditProcess implements Serializable {
@ApiModelProperty(value = "角色id")
private Integer roleId;
@ApiModelProperty(value = "部门名称")
private String departmentName;
@ApiModelProperty(value = "用户id")
private Integer userId;
@ApiModelProperty(value = "部门ids")
private String departmentId;
@ApiModelProperty(value = "通过时间")
@TableField(fill = FieldFill.INSERT)

Loading…
Cancel
Save