重定义用户

master
shijie 4 years ago
parent 1d5af71870
commit e790747202
  1. 33
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  2. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java
  3. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java
  4. 26
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalBusinessRequest.java
  5. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java
  6. 42
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  7. 14
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  8. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  9. 10
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java

@ -4,6 +4,7 @@ package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.DgApplyAmountInfoControllerApi;
import com.daqing.financial.guarantee.feign.CrmsFeignService;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.model.request.ApprovalBusinessRequest;
import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest;
import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse;
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse;
@ -17,6 +18,7 @@ import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -159,8 +161,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
public ResponseResult businessApplicationList(@RequestParam(value="page",required=false) Integer page,@RequestParam(value="size",required=false) Integer size,
@RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName){
//获取当前登录用户id
//String userId = getUserId();
String userId = "5";
String userId = getUserId();
//根据角色查询资产部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId);
@ -172,18 +173,19 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
}
//PageUtils data = applyAmountInfoService.queryPage(page, size,CustomerNumberOrName);
//遍历data里面的数据提单人id,找出匹配id,将用户名以及部门名称赋值进去
List<BusinessApplicationListResponse> list = (List<BusinessApplicationListResponse>) data.getList();
Integer presenterId = list.get(0).getPresenterId();
//根据提单人id查询其部门名称
ResponseResult<EmployeeMessageResponse> employeeMessage = hrmsFeignService.getAccountAndDeptNameById(presenterId.longValue());
if(list.size()>0){
Integer presenterId = list.get(0).getPresenterId();
//根据提单人id查询其部门名称
ResponseResult<EmployeeMessageResponse> employeeMessage = hrmsFeignService.getAccountAndDeptNameById(presenterId.longValue());
for (BusinessApplicationListResponse response:list) {
if(employeeMessage.getData() != null){
if(response.getPresenterId().equals(employeeMessage.getData().getId())){//如果提单人id相同情况下,就往对象里面赋值
response.setAccount(employeeMessage.getData().getAccount());
response.setDeptName(employeeMessage.getData().getDeptName());
for (BusinessApplicationListResponse response:list) {
if(employeeMessage.getData() != null){
if(response.getPresenterId().equals(employeeMessage.getData().getId())){//如果提单人id相同情况下,就往对象里面赋值
response.setAccount(employeeMessage.getData().getAccount());
response.setDeptName(employeeMessage.getData().getDeptName());
}
}
}
}
@ -240,13 +242,16 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
/**
* 根据业务id审核业务申请内容
* @param id
* @param approvalBusinessReq
* @return
*/
@PostMapping("/approvalBusinessApplication")
@ApiOperation(value = "根据业务id审核业务申请内容")
public ResponseResult approvalBusinessApplication(@RequestParam("id") Integer id,@RequestParam("status") Integer status,
@RequestParam(value = "remark", required = false) String remark, @RequestParam("companyId") Integer companyId){
public ResponseResult approvalBusinessApplication(@RequestBody ApprovalBusinessRequest approvalBusinessReq){
Integer id=approvalBusinessReq.getId();
Integer status=approvalBusinessReq.getStatus();
String remark=approvalBusinessReq.getRemark();
Integer companyId=approvalBusinessReq.getCompanyId();
int result = applyAmountInfoService.approvalBusinessApplication(id,status,remark,companyId);
return result>0 ? ResponseResult.SUCCESS("审核成功!"):ResponseResult.FAIL(40006,"审核失败!");
}

@ -62,8 +62,7 @@ public class DgGuaranteeAssignUserController {
@RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName,
@RequestParam(value = "status", required = false) Integer status){
//获取当前登录用户userId
//String userId = dgApplyAmountInfoController.getUserId();
String userId = "5";
String userId = dgApplyAmountInfoController.getUserId();
//根据角色查询担保部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId);
PageUtils data = null;
@ -102,8 +101,7 @@ public class DgGuaranteeAssignUserController {
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId
//String userId = dgApplyAmountInfoController.getUserId();
String userId ="5";
String userId = dgApplyAmountInfoController.getUserId();
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser();
guaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理

@ -33,6 +33,9 @@ public class DgMessageInvestigationController {
@Resource
private IDgMessageInvestigationService dgMessageInvestigationService;
@Resource
private DgApplyAmountInfoController dgApplyAmountInfoController;
/**
* 信息部调查列表
* @param
@ -47,8 +50,7 @@ public class DgMessageInvestigationController {
Integer status=messageInvestigationRequest.getStatus();
//获取当前登录用户userId
//String userId = dgApplyAmountInfoController.getUserId();
String userId = "5";
String userId = dgApplyAmountInfoController.getUserId();
//根据角色查询担保部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId);
PageUtils data = null;

@ -0,0 +1,26 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;
/**
* @Author chen
* @DATE 2020/11/12 17:14
* @Version 1.0
*/
@Data
public class ApprovalBusinessRequest {
@ApiModelProperty(value = "主键id")
private Integer id;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty(value = "审核意见")
private String remark;
@ApiModelProperty(value = "企业id")
private Integer companyId;
}

@ -55,5 +55,10 @@ public class InvestigateAssetsRequest {
@ApiModelProperty(value = "评估价值列表")
private List<DgAssetsAssessmentAssetsLog> assessmentList;
@ApiModelProperty(value = "反担保措施(中划线隔开)")
private String[] enGuaranteeMeasures;
@ApiModelProperty(value = "反担保措施描述")
private String description;
}

@ -100,7 +100,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//申请贷款相关信息
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo();
dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId());
dgApplyAmountInfo.setPresenterId(5);//Integer.parseInt(userId)
dgApplyAmountInfo.setPresenterId(Integer.parseInt(userId));
dgApplyAmountInfo.setApplyAmount(businessApplication.getApplyAmount());//申请额度
dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限
dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行
@ -116,7 +116,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//新增到业务列表
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList();
dgApplyAmountList.setBusinessId(dgApplyAmountInfo.getId());
dgApplyAmountList.setPresenterId(5);//Integer.parseInt(userId)
dgApplyAmountList.setPresenterId(Integer.parseInt(userId));
dgApplyAmountList.setRoleId(PromptSuccess.DB_YWY_ID);
dgApplyAmountList.setType(1);//类型为担保业务员
@ -163,7 +163,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
if(dgApplyAmountList.getStatus().equals(StatusCode.SP_IN_REVIEW) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)){
DgApplyAmountList applyAmountList = new DgApplyAmountList();
applyAmountList.setBusinessId(dgApplyAmountInfo.getId());//主键id
applyAmountList.setPresenterId(5);//Integer.parseInt(userId) 提单人id
applyAmountList.setPresenterId(Integer.parseInt(userId));// 提单人id
applyAmountList.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理角色id
applyAmountList.setType(2);//设置类型
applyAmountList.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
@ -355,10 +355,15 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
applyAmountList.setStatus(StatusCode.SP_RESCINDED);//状态为已撤销
applyAmountList.setOperatingStatus(StatusCode.CZ_TO_BE_DEFINED);//操作状态为待定义,目前前端不展示
dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper<DgApplyAmountList>()
.eq("business_id",applyAmountList.getBusinessId()).eq("type",applyAmountList.getType()));
.eq("business_id",applyAmountList.getBusinessId())
.eq("type",applyAmountList.getType()));
//将业务流程状态设置为已撤销
return 1;
DgBusinessProcessStatus status = new DgBusinessProcessStatus();
status.setBusinessId(dgApplyAmountList1.getBusinessId());
status.setBusinessStatus(StatusCode.YW_RESCINDED);//业务状态设置为已撤销
return dgBusinessProcessStatusMapper.update(status,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",status.getBusinessId()));
}
@Transactional
@ -412,14 +417,31 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountList.setStatus(status);
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态改为已处理
dgApplyAmountList.setApplyContent(remark);
dgApplyAmountList.setEmpId(5);//Integer.parseInt(userId)
dgApplyAmountList.setEmpId(Integer.parseInt(userId));
dgApplyAmountListMapper.update(dgApplyAmountList,new QueryWrapper<DgApplyAmountList>().eq("id",id));
//根据id查询业务id
DgApplyAmountList dgApplyAmountList1 = dgApplyAmountListMapper.selectById(id);
//修改专员那一条记录审核状态
DgApplyAmountList applyAmountList = new DgApplyAmountList();
applyAmountList.setStatus(status);
dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper<DgApplyAmountList>()
.eq("business_id",dgApplyAmountList1.getBusinessId()));
if(status.equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(dgApplyAmountList1.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}
//如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审
if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){
//新增一条记录到担保部
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser();
guaranteeAssignUser.setBusinessId(id);//业务id
guaranteeAssignUser.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id
guaranteeAssignUser.setCompanyId(companyId);//企业id
guaranteeAssignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理角色id
guaranteeAssignUser.setType(3);//角色类型
@ -429,7 +451,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//新增一条记录到资产部
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
dgAssetsInvestigation.setBusinessId(id);//业务id
dgAssetsInvestigation.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id
dgAssetsInvestigation.setCompanyId(companyId);//企业id
dgAssetsInvestigation.setRoleId(PromptSuccess.ZC_JL_ID);//资产部经理角色id
dgAssetsInvestigation.setType(2);//角色类型
@ -439,7 +461,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//新增一条记录到信息部
DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
dgMessageInvestigation.setBusinessId(id);//业务id
dgMessageInvestigation.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id
dgMessageInvestigation.setCompanyId(companyId);//企业id
dgMessageInvestigation.setRoleId(PromptSuccess.XX_JL_ID);//信息部经理角色id
dgMessageInvestigation.setType(2);//角色类型
@ -447,6 +469,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
dgMessageInvestigationMapper.insert(dgMessageInvestigation);
}
return 1;
}

@ -17,6 +17,7 @@ import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService;
import com.daqing.financial.guarantee.util.ArraysUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
import com.daqing.framework.model.StatusCode;
@ -81,8 +82,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId
//String userId = dgApplyAmountInfoController.getUserId();
String userId ="5";
String userId = dgApplyAmountInfoController.getUserId();
DgAssetsInvestigation assetsInvestigation = new DgAssetsInvestigation();
assetsInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
assetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
@ -181,6 +181,14 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
assetsInvestigation.setFile(ArraysUtil.toString(investigateAssetsRequest.getFile()));
this.baseMapper.updateById(assetsInvestigation);
//根据业务id修改反担保措施
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo();
dgApplyAmountInfo.setId(dgAssetsInvestigation.getBusinessId());
dgApplyAmountInfo.setDescription(investigateAssetsRequest.getDescription());
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(investigateAssetsRequest.getEnGuaranteeMeasures()));
dgApplyAmountInfoMapper.updateById(dgApplyAmountInfo);
//根据业务id批量新增数据到评估价值列表
dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
@ -200,7 +208,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
dgAssetsInvestigation.setId(approvalAssetsRequest.getId());
dgAssetsInvestigation.setEmpId(5);//Integer.parseInt(dgApplyAmountInfoController.getUserId())
dgAssetsInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
dgAssetsInvestigation.setRemark(ArraysUtil.toString(approvalAssetsRequest.getRemark()));//补充原因
dgAssetsInvestigation.setStatus(approvalAssetsRequest.getStatus());
dgAssetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//状态设置为已处理

@ -209,7 +209,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(approvalGuaranteeRequest.getId());
dgGuaranteeAssignUser.setEmpId(5);//Integer.parseInt(dgApplyAmountInfoController.getUserId())
dgGuaranteeAssignUser.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
dgGuaranteeAssignUser.setRemark(ArraysUtil.toString(approvalGuaranteeRequest.getRemark()));//补充调查原因
dgGuaranteeAssignUser.setOtherRemark(approvalGuaranteeRequest.getOtherRemark());//其他原因
dgGuaranteeAssignUser.setStatus(approvalGuaranteeRequest.getStatus());

@ -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.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.feign.CrmsFeignService;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper;
@ -56,6 +57,9 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
@Resource
private DgEnclosureInfoMapper dgEnclosureInfoMapper;
@Resource
private DgApplyAmountInfoController dgApplyAmountInfoController;
@Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) {
//分页参数
@ -76,8 +80,8 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId
//String userId = dgApplyAmountInfoController.getUserId();
String userId ="5";
String userId = dgApplyAmountInfoController.getUserId();
DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
dgMessageInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
@ -218,7 +222,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
dgMessageInvestigation.setId(approvalMessageRequest.getId());
dgMessageInvestigation.setEmpId(5);//Integer.parseInt(dgApplyAmountInfoController.getUserId())
dgMessageInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
dgMessageInvestigation.setStatus(approvalMessageRequest.getStatus());//状态
dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgMessageInvestigation.setRemark(approvalMessageRequest.getRemark());//审核意见

Loading…
Cancel
Save