修改指派角色跟业务相关

master
shijie 4 years ago
parent 920c19091e
commit 3f76218a3e
  1. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java
  2. 68
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java
  3. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java
  4. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgApplyAmountInfoResponse.java
  5. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java
  6. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  7. 39
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  8. 321
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  9. 40
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  10. 4
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  11. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
  12. 2
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/RolePermissionMapper.xml
  13. 6
      dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
  14. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java
  15. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java

@ -85,7 +85,7 @@ public class CompanyCustomerRequest implements Serializable {
private String legalName; private String legalName;
@ApiModelProperty(value = "法人-性别 1、男,0、女") @ApiModelProperty(value = "法人-性别 1、男,0、女")
private String legalGender; private Integer legalGender;
@ApiModelProperty(value = "法人-身份证号") @ApiModelProperty(value = "法人-身份证号")
private String legalIdNumber; private String legalIdNumber;

@ -10,6 +10,8 @@ import com.daqing.financial.guarantee.model.response.GuaranteeDetailResponse;
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService; import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import com.daqing.framework.domain.guarantee.po.DgGuaranteePO; import com.daqing.framework.domain.guarantee.po.DgGuaranteePO;
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.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
@ -46,12 +48,6 @@ public class DgGuaranteeAssignUserController {
@Autowired @Autowired
private IDgGuaranteeAssignUserService dgGuaranteeAssignUserService; private IDgGuaranteeAssignUserService dgGuaranteeAssignUserService;
@Resource
private DgGuaranteeAssignUserMapper dgGuaranteeAssignUserMapper;
@Resource
private HrmsFeignService hrmsFeignService;
/** /**
* 担保部调查列表 * 担保部调查列表
* @param * @param
@ -69,22 +65,9 @@ public class DgGuaranteeAssignUserController {
PageUtils data = null; PageUtils data = null;
if(roleIds != null) { if(roleIds != null) {
String[] ids = roleIds.split(","); String[] ids = roleIds.split(",");
List<String> roleIdlist = Arrays.asList(ids); List<String> roleIdlist = Arrays.asList(ids);
data = dgGuaranteeAssignUserService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId, status); data = dgGuaranteeAssignUserService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId, status);
/* String A = String.valueOf(PromptSuccess.DB_A_ID);
String B = String.valueOf(PromptSuccess.DB_B_ID);
//判断角色数组中是否包含A角或者B角元素
Boolean f = Arrays.asList(ids).contains(A);
Boolean g = Arrays.asList(ids).contains(B);
if (f.equals(true) || g.equals(true)) {//如果存在A,B元素,则要根据角色以及用户id查询列表
data = dgGuaranteeAssignUserService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId);
} else {
data = dgGuaranteeAssignUserService.queryPage(page, size, CustomerNumberOrName, roleIdlist, null);
}*/
} }
return new ResponseResult<PageUtils>().SUCCESS(data); return new ResponseResult<PageUtils>().SUCCESS(data);
@ -112,52 +95,7 @@ public class DgGuaranteeAssignUserController {
@Transactional @Transactional
public ResponseResult assignCorners(@RequestBody GuaranteeRequest guaranteeRequest){ public ResponseResult assignCorners(@RequestBody GuaranteeRequest guaranteeRequest){
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id return dgGuaranteeAssignUserService.assignCorners(guaranteeRequest);
//获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId();
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser();
guaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
guaranteeAssignUser.setEmpId(Integer.parseInt(userId));
guaranteeAssignUser.setId(guaranteeRequest.getId());
dgGuaranteeAssignUserMapper.updateById(guaranteeAssignUser);
//新增A角记录到担保部记录表
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setBusinessId(guaranteeRequest.getBusinessId());//业务id
dgGuaranteeAssignUser.setCompanyId(guaranteeRequest.getCompanyId());//企业id
dgGuaranteeAssignUser.setEmpId(guaranteeRequest.getEmpAId());//用户A角id
dgGuaranteeAssignUser.setRoleId(PromptSuccess.DB_A_ID);//角色设置为A角
dgGuaranteeAssignUser.setType(1);//A角操作
dgGuaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser);
//新增B角记录到担保部记录表
DgGuaranteeAssignUser dgGuaranteeAssignUser2 = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser2.setBusinessId(guaranteeRequest.getBusinessId());//业务id
dgGuaranteeAssignUser2.setCompanyId(guaranteeRequest.getCompanyId());//企业id
dgGuaranteeAssignUser2.setEmpId(guaranteeRequest.getEmpBId());//用户B角id
dgGuaranteeAssignUser2.setRoleId(PromptSuccess.DB_B_ID);//角色设置为B角
dgGuaranteeAssignUser2.setType(2);//B角操作
dgGuaranteeAssignUser2.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
dgGuaranteeAssignUser2.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser2);
List<DgGuaranteePO> list = new ArrayList();
DgGuaranteePO dgGuaranteePO1 = new DgGuaranteePO();
dgGuaranteePO1.setUserId(guaranteeRequest.getEmpAId().longValue());
dgGuaranteePO1.setRoleId(PromptSuccess.DB_A_ID.longValue());
DgGuaranteePO dgGuaranteePO2 = new DgGuaranteePO();
dgGuaranteePO2.setUserId(guaranteeRequest.getEmpBId().longValue());
dgGuaranteePO2.setRoleId(PromptSuccess.DB_B_ID.longValue());
list.add(dgGuaranteePO1);
list.add(dgGuaranteePO2);
//批量绑定角色关系
hrmsFeignService.insertUsrRole(list);
//hrmsFeignService.insertUserRole(guaranteeRequest.getEmpAId().longValue(),PromptSuccess.DB_A_ID.longValue());
//hrmsFeignService.insertUserRole(guaranteeRequest.getEmpBId().longValue(),PromptSuccess.DB_B_ID.longValue());
return new ResponseResult<PageUtils>().SUCCESS();
} }

@ -82,6 +82,9 @@ public class BusinessApplicationRequest implements Serializable {
@ApiModelProperty(value = "反担保措施描述") @ApiModelProperty(value = "反担保措施描述")
private String description; private String description;
@ApiModelProperty(value = "客户类型")
private String customerType;
/** /**
* 业务类型 * 业务类型
*/ */

@ -73,6 +73,11 @@ public class DgApplyAmountInfoResponse implements Serializable {
*/ */
private String enGuaranteeMeasures; private String enGuaranteeMeasures;
/**
* 客户类型
*/
private String customerType;
/** /**
* 业务类型 * 业务类型
*/ */

@ -2,9 +2,11 @@ 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.ApprovalGuaranteeRequest; import com.daqing.financial.guarantee.model.request.ApprovalGuaranteeRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeRequest;
import com.daqing.financial.guarantee.model.request.InvestigateGuaranteeRequest; import com.daqing.financial.guarantee.model.request.InvestigateGuaranteeRequest;
import com.daqing.financial.guarantee.model.response.GuaranteeDetailResponse; import com.daqing.financial.guarantee.model.response.GuaranteeDetailResponse;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -29,4 +31,6 @@ public interface IDgGuaranteeAssignUserService extends IService<DgGuaranteeAssig
int approvalGuarantee(ApprovalGuaranteeRequest approvalGuaranteeRequest); int approvalGuarantee(ApprovalGuaranteeRequest approvalGuaranteeRequest);
Boolean excelExport(List<String> ids, HttpServletResponse response); Boolean excelExport(List<String> ids, HttpServletResponse response);
ResponseResult assignCorners(GuaranteeRequest guaranteeRequest);
} }

@ -121,6 +121,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(businessApplication.getEnGuaranteeMeasures()));//反担保措施 dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(businessApplication.getEnGuaranteeMeasures()));//反担保措施
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述 dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型 dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
dgApplyAmountInfo.setCustomerType(businessApplication.getCustomerType());//客户类型
dgApplyAmountInfo.setBusinessCode(RandomUtil.getRandomNum(12)); dgApplyAmountInfo.setBusinessCode(RandomUtil.getRandomNum(12));
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo); dgApplyAmountInfoMapper.insert(dgApplyAmountInfo);
@ -197,11 +198,10 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
status.setBusinessId(dgApplyAmountInfo.getId()); status.setBusinessId(dgApplyAmountInfo.getId());
status.setBusinessStatus(StatusCode.YW_IN_PROGRESS);//业务状态设置为进行中 status.setBusinessStatus(StatusCode.YW_IN_PROGRESS);//业务状态设置为进行中
dgBusinessProcessStatusMapper.insert(status); dgBusinessProcessStatusMapper.insert(status);
}
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(dgApplyAmountInfo.getId(),account,"担保业务员","",1); AuditProcessUtil.save(dgApplyAmountInfo.getId(),account,"担保业务员","",1);
}
return 1; return 1;
} }
@ -324,6 +324,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(businessApplication.getEnGuaranteeMeasures()));//反担保措施 dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(businessApplication.getEnGuaranteeMeasures()));//反担保措施
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述 dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型 dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
dgApplyAmountInfo.setCustomerType(businessApplication.getCustomerType());//客户类型
//根据业务id修改申请贷款信息 //根据业务id修改申请贷款信息
this.baseMapper.updateById(dgApplyAmountInfo); this.baseMapper.updateById(dgApplyAmountInfo);
@ -546,12 +547,17 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgMessageInvestigation.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派 dgMessageInvestigation.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派
dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
dgMessageInvestigationMapper.insert(dgMessageInvestigation); dgMessageInvestigationMapper.insert(dgMessageInvestigation);
}
Integer type = dgApplyAmountList1.getType();
String deptName;
if(type==1){
deptName="担保部业务员";
}else{
deptName="担保部经理";
}
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(dgApplyAmountList1.getBusinessId(),account,"担保部经理",remark,1); AuditProcessUtil.save(dgApplyAmountList1.getBusinessId(),account,deptName,remark,1);
}
return 1; return 1;
} }

@ -18,6 +18,7 @@ import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CrmsCode; import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.*; import com.daqing.framework.domain.guarantee.*;
import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
@ -92,6 +93,27 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
@Transactional @Transactional
@Override @Override
public Boolean assignCorners(AssetsRequest assetsRequest) { public Boolean assignCorners(AssetsRequest assetsRequest) {
//判断即将被指派成A角的用户id以及B角的用户id是否在当前业务中已被指派
//查询empId在担保部调查中是否被指派
Integer count1 = dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", assetsRequest.getBusinessId())
.eq("type", 1).eq("emp_id", assetsRequest.getEmpId()));
Integer count = dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", assetsRequest.getBusinessId())
.eq("type", 2).eq("emp_id", assetsRequest.getEmpId()));
if(count1 >0 || count >0){//已被指派情况下直接返回
ExceptionCast.cast(HrmsCode.EMP_TO_BE_CHOOSE);
}
//查询empId在信息部调查中是否被指派
Integer count2 = dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>()
.eq("business_id", assetsRequest.getBusinessId())
.eq("type", 1).eq("emp_id", assetsRequest.getEmpId()));
if(count2 >0 ){//已被指派情况下直接返回
ExceptionCast.cast(HrmsCode.EMP_TO_BE_CHOOSE);
}
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id //根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId //获取当前登录用户userId
@ -355,11 +377,6 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.insert(assets); this.baseMapper.insert(assets);
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,"资产部经理",approvalAssetsRequest.getApplyContent(),3);
}else if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过 }else if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果担保部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 //如果担保部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
@ -386,11 +403,17 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派 compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派
dgComplianceInvestigationMapper.insert(compliance); dgComplianceInvestigationMapper.insert(compliance);
} }
}
Integer type = assetsInvestigation.getType();
String deptName;
if(type == 2){
deptName = "资产部经理";
}else{
deptName = "资产部分管领导";
}
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,"资产部分管领导",approvalAssetsRequest.getApplyContent(),3); AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,deptName,approvalAssetsRequest.getApplyContent(),3);
}
return 1; return 1;
} }

@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.feign.CrmsFeignService; import com.daqing.financial.guarantee.feign.CrmsFeignService;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.*; import com.daqing.financial.guarantee.mapper.*;
import com.daqing.financial.guarantee.model.request.ApprovalGuaranteeRequest; import com.daqing.financial.guarantee.model.request.ApprovalGuaranteeRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeRequest;
import com.daqing.financial.guarantee.model.request.InvestigateGuaranteeRequest; import com.daqing.financial.guarantee.model.request.InvestigateGuaranteeRequest;
import com.daqing.financial.guarantee.model.response.*; import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService; import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService;
@ -16,7 +18,9 @@ import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CrmsCode; import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.*; 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.guarantee.response.EmployeeMessageResponse;
import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
@ -70,6 +74,11 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
@Resource @Resource
private DgLoanCommitteeConsiderMapper dgLoanCommitteeConsiderMapper; private DgLoanCommitteeConsiderMapper dgLoanCommitteeConsiderMapper;
@Resource
private DgGuaranteeAssignUserMapper dgGuaranteeAssignUserMapper;
@Resource
private HrmsFeignService hrmsFeignService;
@Override @Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) { public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) {
@ -80,7 +89,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
if (size <= 0) { if (size <= 0) {
size = 10; size = 10;
} }
IPage<GuaranteeListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId,status); IPage<GuaranteeListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size), customerNumberOrName, roleIdlist, userId, status);
return new PageUtils(positionVO); return new PageUtils(positionVO);
} }
@ -92,29 +101,29 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//根据业务id查询业务申请详细信息 //根据业务id查询业务申请详细信息
DgApplyAmountInfoResponse dgApplyAmountInfo = dgApplyAmountInfoMapper.selectApplyAmountInfoById(guaranteeAssignUser.getBusinessId()); DgApplyAmountInfoResponse dgApplyAmountInfo = dgApplyAmountInfoMapper.selectApplyAmountInfoById(guaranteeAssignUser.getBusinessId());
String measures=dgApplyAmountInfo.getEnGuaranteeMeasures(); String measures = dgApplyAmountInfo.getEnGuaranteeMeasures();
if(measures.length()>0){ if (measures.length() > 0) {
String a = measures.substring(1,measures.length()-1); String a = measures.substring(1, measures.length() - 1);
String arry[]=a.split(","); String arry[] = a.split(",");
List<String> demoList = Arrays.asList(arry); List<String> demoList = Arrays.asList(arry);
dgApplyAmountInfo.setEnGuaranteeMeasure(demoList); dgApplyAmountInfo.setEnGuaranteeMeasure(demoList);
System.out.println("arry==============="+demoList); System.out.println("arry===============" + demoList);
} }
System.out.println("业务申请详细========="+dgApplyAmountInfo); System.out.println("业务申请详细=========" + dgApplyAmountInfo);
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
//根据企业id查询企业详情 //根据企业id查询企业详情
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo); ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap)result.getData(); LinkedHashMap linkedList = (LinkedHashMap) result.getData();
System.out.println("企业详细============"+linkedList); System.out.println("企业详细============" + linkedList);
//查询附件详细,附件关联业务主键id //查询附件详细,附件关联业务主键id
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(guaranteeAssignUser.getBusinessId()); DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(guaranteeAssignUser.getBusinessId());
List<String>list = new ArrayList<>(); List<String> list = new ArrayList<>();
list.add(dgEnclosureInfo.getAccountingFirm()); list.add(dgEnclosureInfo.getAccountingFirm());
list.add(dgEnclosureInfo.getAssessmentReport()); list.add(dgEnclosureInfo.getAssessmentReport());
list.add(dgEnclosureInfo.getBusinessLicense()); list.add(dgEnclosureInfo.getBusinessLicense());
@ -132,16 +141,16 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
List arr1List2 = new ArrayList<>(); List arr1List2 = new ArrayList<>();
for(int i=0;i<list.size();i++){ for (int i = 0; i < list.size(); i++) {
List<String> arr1List; List<String> arr1List;
if(list.get(i)!=null){ if (list.get(i) != null) {
String a1 = list.get(i).substring(1,list.get(i).length()-1); String a1 = list.get(i).substring(1, list.get(i).length() - 1);
String arr1[]=a1.split(","); String arr1[] = a1.split(",");
arr1List = Arrays.asList(arr1); arr1List = Arrays.asList(arr1);
arr1List2.add(i,arr1List); arr1List2.add(i, arr1List);
System.out.println("arr1LIst===="+arr1List); System.out.println("arr1LIst====" + arr1List);
}else{ } else {
arr1List2.add(i,null); arr1List2.add(i, null);
} }
} }
dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0)); dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0));
@ -159,12 +168,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12)); dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13)); dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
System.out.println("附件详细=============="+dgEnclosureInfo); System.out.println("附件详细==============" + dgEnclosureInfo);
//查询担保部经理审核的金额和期限 //查询担保部经理审核的金额和期限
DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>() DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3)); .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3));
GuaranteeDetailResponse guaranteeDetailResponse= new GuaranteeDetailResponse(); GuaranteeDetailResponse guaranteeDetailResponse = new GuaranteeDetailResponse();
guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo);
guaranteeDetailResponse.setLinkedHashMap(linkedList); guaranteeDetailResponse.setLinkedHashMap(linkedList);
@ -179,7 +188,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(investigateGuaranteeRequest.getId()); DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(investigateGuaranteeRequest.getId());
//如果是属于被驳回的数据,并且调查通过(同意) //如果是属于被驳回的数据,并且调查通过(同意)
if(guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT) && investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){ if (guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT) && investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {
//AB角调查,修改审核意见以及状态 //AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
@ -189,26 +198,26 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见 dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser); this.baseMapper.updateById(dgGuaranteeAssignUser);
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));
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type",2).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED)); .eq("type", 2).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED));
int sum = i+n; int sum = i + n;
//如果A或B调查通过,审批状态仍然是驳回,操作状态改为已处理 //如果A或B调查通过,审批状态仍然是驳回,操作状态改为已处理
if(sum == 1){ if (sum == 1) {
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setId(investigateGuaranteeRequest.getId());//主键id assignUser.setId(investigateGuaranteeRequest.getId());//主键id
assignUser.setStatus(StatusCode.SP_REJECT);//驳回 assignUser.setStatus(StatusCode.SP_REJECT);//驳回
this.baseMapper.updateById(assignUser); this.baseMapper.updateById(assignUser);
} }
//判断AB角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中 //判断AB角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中
if(sum == 2){ if (sum == 2) {
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setStatus(StatusCode.SP_IN_REVIEW);//审核中 user.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeAssignUser.getBusinessId())); .eq("business_id", guaranteeAssignUser.getBusinessId()));
} }
}else{ } else {
//AB角调查,修改审核意见以及状态 //AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
@ -218,81 +227,92 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
this.baseMapper.updateById(dgGuaranteeAssignUser); this.baseMapper.updateById(dgGuaranteeAssignUser);
} }
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况处理 if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)) {//驳回情况处理
//业务申请部分业务专员审批状态设置为驳回,操作状态设置为待处理 //业务申请部分业务专员审批状态设置为驳回,操作状态设置为待处理
DgApplyAmountList dgApplyAmountList= new DgApplyAmountList(); DgApplyAmountList dgApplyAmountList = new DgApplyAmountList();
dgApplyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回 dgApplyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 dgApplyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgApplyAmountListMapper.update(dgApplyAmountList,new QueryWrapper<DgApplyAmountList>() dgApplyAmountListMapper.update(dgApplyAmountList, new QueryWrapper<DgApplyAmountList>()
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",1)); .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 1));
//业务申请部分担保部经理审批状态设置为驳回,操作状态设置为已处理 //业务申请部分担保部经理审批状态设置为驳回,操作状态设置为已处理
DgApplyAmountList applyAmountList= new DgApplyAmountList(); DgApplyAmountList applyAmountList = new DgApplyAmountList();
applyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回 applyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回
applyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理 applyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper<DgApplyAmountList>() dgApplyAmountListMapper.update(applyAmountList, new QueryWrapper<DgApplyAmountList>()
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",2)); .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 2));
//修改担保部调查下该业务的所有审批状态为驳回 //修改担保部调查下该业务的所有审批状态为驳回
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REJECT);//驳回 assignUser.setStatus(StatusCode.SP_REJECT);//驳回
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeAssignUser.getBusinessId())); .eq("business_id", guaranteeAssignUser.getBusinessId()));
} }
//判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理 //判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理
int a = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) int a = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED)); .eq("type", 1).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED));
int b = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) int b = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type",2).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED)); .eq("type", 2).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED));
int sum2 = a+b; int sum2 = a + b;
if(sum2==2){ if (sum2 == 2) {
//如果合规调查C角状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为合规调查驳回情况处理 //如果合规调查C角状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为合规调查驳回情况处理
DgComplianceInvestigation investigation = dgComplianceInvestigationMapper.selectOne(new QueryWrapper<DgComplianceInvestigation>() DgComplianceInvestigation investigation = dgComplianceInvestigationMapper.selectOne(new QueryWrapper<DgComplianceInvestigation>()
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.FG_C_ID)); .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_C_ID));
//如果贷审会状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为贷审会驳回情况处理 //如果贷审会状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为贷审会驳回情况处理
DgLoanCommitteeConsider consider = dgLoanCommitteeConsiderMapper.selectOne(new QueryWrapper<DgLoanCommitteeConsider>() DgLoanCommitteeConsider consider = dgLoanCommitteeConsiderMapper.selectOne(new QueryWrapper<DgLoanCommitteeConsider>()
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID));
if(investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_REJECT) && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED) if (investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_REJECT) && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED)
&& guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)){//合规调查驳回情况处理 && guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)) {//合规调查驳回情况处理
//调查通过,修改法规经理操作状态为待处理,其他子业务为审核中 //调查通过,修改法规经理操作状态为待处理,其他子业务为审核中
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){//如果调查通过 if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {//如果调查通过
DgComplianceInvestigation dgCompliance = new DgComplianceInvestigation(); DgComplianceInvestigation dgCompliance = new DgComplianceInvestigation();
dgCompliance.setOperationStatus(StatusCode.CZ_ON_HAND);//待处理 dgCompliance.setOperationStatus(StatusCode.CZ_ON_HAND);//待处理
dgComplianceInvestigationMapper.update(dgCompliance,new QueryWrapper<DgComplianceInvestigation>() dgComplianceInvestigationMapper.update(dgCompliance, new QueryWrapper<DgComplianceInvestigation>()
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.FG_JL_ID)); .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_JL_ID));
DgComplianceInvestigation dgInvestigation = new DgComplianceInvestigation(); DgComplianceInvestigation dgInvestigation = new DgComplianceInvestigation();
dgInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中 dgInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中
dgComplianceInvestigationMapper.update(dgInvestigation,new QueryWrapper<DgComplianceInvestigation>() dgComplianceInvestigationMapper.update(dgInvestigation, new QueryWrapper<DgComplianceInvestigation>()
.eq("business_id",guaranteeAssignUser.getBusinessId())); .eq("business_id", guaranteeAssignUser.getBusinessId()));
//修改担保业务审批状态为已审核
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", guaranteeAssignUser.getBusinessId()));
} }
}else if(consider != null && consider.getStatus().equals(StatusCode.SP_REJECT) && consider.getOperatingStatus().equals(StatusCode.CZ_PROCESSED) } else if (consider != null && consider.getStatus().equals(StatusCode.SP_REJECT) && consider.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)
&& guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)){//贷审会业务流程驳回情况处理 && guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)) {//贷审会业务流程驳回情况处理
//调查通过,修改贷审会操作状态为待处理,其他子业务为审核中 //调查通过,修改贷审会操作状态为待处理,其他子业务为审核中
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){//如果调查通过 if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {//如果调查通过
DgLoanCommitteeConsider dgLoanCommittee = new DgLoanCommitteeConsider(); DgLoanCommitteeConsider dgLoanCommittee = new DgLoanCommitteeConsider();
dgLoanCommittee.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 dgLoanCommittee.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
dgLoanCommitteeConsiderMapper.update(dgLoanCommittee,new QueryWrapper<DgLoanCommitteeConsider>() dgLoanCommitteeConsiderMapper.update(dgLoanCommittee, new QueryWrapper<DgLoanCommitteeConsider>()
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.DSH_ID)); .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID));
DgLoanCommitteeConsider dgConsider = new DgLoanCommitteeConsider(); DgLoanCommitteeConsider dgConsider = new DgLoanCommitteeConsider();
dgConsider.setStatus(StatusCode.SP_IN_REVIEW);//审核中 dgConsider.setStatus(StatusCode.SP_IN_REVIEW);//审核中
dgLoanCommitteeConsiderMapper.update(dgConsider,new QueryWrapper<DgLoanCommitteeConsider>() dgLoanCommitteeConsiderMapper.update(dgConsider, new QueryWrapper<DgLoanCommitteeConsider>()
.eq("business_id",guaranteeAssignUser.getBusinessId())); .eq("business_id", guaranteeAssignUser.getBusinessId()));
}
}else{//正常情况处理 //修改担保业务审批状态为已审核
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", guaranteeAssignUser.getBusinessId()));
}
} else {//正常情况处理
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理 assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type",3)); .eq("type", 3));
} }
} }
@ -312,13 +332,20 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(investigateGuaranteeRequest.getInspectionPhotos())); dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(investigateGuaranteeRequest.getInspectionPhotos()));
//根据业务id删除对应的附件信息 //根据业务id删除对应的附件信息
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",guaranteeAssignUser.getBusinessId())); dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id", guaranteeAssignUser.getBusinessId()));
//附件新增 //附件新增
dgEnclosureInfoMapper.insert(dgEnclosureInfo); dgEnclosureInfoMapper.insert(dgEnclosureInfo);
Integer type = guaranteeAssignUser.getType();
String deptName;
if (type == 1) {
deptName = "担保部A角";
} else {
deptName = "担保部B角";
}
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部A/B角",investigateGuaranteeRequest.getApplyContent(),2); AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(), account, deptName, investigateGuaranteeRequest.getApplyContent(), 2);
return 1; return 1;
} }
@ -347,43 +374,43 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回 dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回
dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况 if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)) {//驳回情况
//修改担保部调查下该业务的所有审批状态为驳回 //修改担保部调查下该业务的所有审批状态为驳回
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REJECT);//驳回 assignUser.setStatus(StatusCode.SP_REJECT);//驳回
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId())); .eq("business_id", guaranteeUser.getBusinessId()));
} }
//如果是处理驳回数据,如果审核通过,则将担保部调查业务下所有审批状态设置为审核中,担保领导这条记录操作状态设置为待处理 //如果是处理驳回数据,如果审核通过,则将担保部调查业务下所有审批状态设置为审核中,担保领导这条记录操作状态设置为待处理
if(guaranteeUser.getStatus().equals(StatusCode.SP_REJECT) && approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && guaranteeUser.getType()==3){ if (guaranteeUser.getStatus().equals(StatusCode.SP_REJECT) && approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && guaranteeUser.getType() == 3) {
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中 assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId())); this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeUser.getBusinessId()));
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",4)); .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 4));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决 } else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)) {//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(guaranteeUser.getBusinessId()); processStatus.setBusinessId(guaranteeUser.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决 processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>() dgBusinessProcessStatusMapper.update(processStatus, new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId())); .eq("business_id", processStatus.getBusinessId()));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){ } else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType() == 3) {
//担保部经理驳回情况 //担保部经理驳回情况
//A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理 //A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(dgAssignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",1)); .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 1));
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(dgAssignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",2)); .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 2));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==4){ } else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType() == 4) {
//担保部领导驳回情况 //担保部领导驳回情况
//担保部经理审批状态设置为驳回,操作状态设置为待处理 //担保部经理审批状态设置为驳回,操作状态设置为待处理
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(dgAssignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",3)); .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 3));
}else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==3){//担保部经理审核通过 } else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 3) {//担保部经理审核通过
//如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
//根据主键id查询业务id //根据主键id查询业务id
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId()); DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId());
@ -396,30 +423,25 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.insert(assignUser); this.baseMapper.insert(assignUser);
} else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 4) {//担保部领导审核通过
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部经理",approvalGuaranteeRequest.getApplyContent(),2);
}else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==4) {//担保部领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setStatus(StatusCode.SP_REVIEWED);//已审核 user.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId())); this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeUser.getBusinessId()));
//查看信息部分管领导是否审核通过 //查看信息部分管领导是否审核通过
int a=dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>() int a = dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",guaranteeUser.getBusinessId()) .eq("business_id", guaranteeUser.getBusinessId())
.eq("type",3).eq("status",StatusCode.SP_REVIEWED).eq("operating_status",StatusCode.CZ_PROCESSED)); .eq("type", 3).eq("status", StatusCode.SP_REVIEWED).eq("operating_status", StatusCode.CZ_PROCESSED));
//查看资产部分管领导是否审核通过 //查看资产部分管领导是否审核通过
int b=dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>() int b = dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",guaranteeUser.getBusinessId()) .eq("business_id", guaranteeUser.getBusinessId())
.eq("type",3).eq("status",StatusCode.SP_REVIEWED).eq("operating_status",StatusCode.CZ_PROCESSED)); .eq("type", 3).eq("status", StatusCode.SP_REVIEWED).eq("operating_status", StatusCode.CZ_PROCESSED));
int sum = a+b; int sum = a + b;
if(sum==2){ if (sum == 2) {
//新增记录到合规调查 //新增记录到合规调查
DgComplianceInvestigation compliance =new DgComplianceInvestigation(); DgComplianceInvestigation compliance = new DgComplianceInvestigation();
compliance.setCompanyId(guaranteeUser.getCompanyId());//企业id compliance.setCompanyId(guaranteeUser.getCompanyId());//企业id
compliance.setRoleId(PromptSuccess.FG_JL_ID);//角色id compliance.setRoleId(PromptSuccess.FG_JL_ID);//角色id
compliance.setBusinessId(guaranteeUser.getBusinessId());//业务id compliance.setBusinessId(guaranteeUser.getBusinessId());//业务id
@ -427,20 +449,26 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派 compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派
dgComplianceInvestigationMapper.insert(compliance); dgComplianceInvestigationMapper.insert(compliance);
} }
}
Integer type = guaranteeUser.getType();
String deptName;
if (type == 3) {
deptName = "担保部经理";
} else {
deptName = "担保部分管领导";
}
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeUser.getBusinessId(),account,"担保部分管领导",approvalGuaranteeRequest.getApplyContent(),2); AuditProcessUtil.save(guaranteeUser.getBusinessId(), account, deptName, approvalGuaranteeRequest.getApplyContent(), 2);
}
return 1; return 1;
} }
@Override @Override
public Boolean excelExport(List<String> ids, HttpServletResponse response) { public Boolean excelExport(List<String> ids, HttpServletResponse response) {
//根据ids查询业务申请列表信息 //根据ids查询业务申请列表信息
List<GuaranteeListResponse>guaranteeList = this.baseMapper.selectListByIds(ids); List<GuaranteeListResponse> guaranteeList = this.baseMapper.selectListByIds(ids);
System.out.println("applyList==========================="+guaranteeList); System.out.println("applyList===========================" + guaranteeList);
try { try {
ExcelUtil.writeExcelWithSheets(response, guaranteeList, "担保调查一览表", "businessApplication", new GuaranteeListResponse()) ExcelUtil.writeExcelWithSheets(response, guaranteeList, "担保调查一览表", "businessApplication", new GuaranteeListResponse())
.finish(); .finish();
@ -451,5 +479,84 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
} }
} }
@Override
public ResponseResult assignCorners(GuaranteeRequest guaranteeRequest) {
//A,B角用户id不能选择同一个人
if (guaranteeRequest.getEmpAId().equals(guaranteeRequest.getEmpBId())) {
ExceptionCast.cast(HrmsCode.EMP_SAME);
}
//判断即将被指派成A角的用户id以及B角的用户id是否在当前业务中已被指派
//查询empAId,empBId在资产部调查中是否被指派
Integer count1 = dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id", guaranteeRequest.getBusinessId())
.eq("type", 1).eq("emp_id", guaranteeRequest.getEmpAId()));
Integer count = dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id", guaranteeRequest.getBusinessId())
.eq("type", 1).eq("emp_id", guaranteeRequest.getEmpBId()));
if(count1 >0 || count >0){//已被指派情况下直接返回
ExceptionCast.cast(HrmsCode.EMP_TO_BE_CHOOSE);
}
//查询empAId,empBId在信息部调查中是否被指派
Integer count2 = dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>()
.eq("business_id", guaranteeRequest.getBusinessId())
.eq("type", 1).eq("emp_id", guaranteeRequest.getEmpAId()));
Integer count3 = dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>()
.eq("business_id", guaranteeRequest.getBusinessId())
.eq("type", 1).eq("emp_id", guaranteeRequest.getEmpBId()));
if(count2 >0 || count3 >0){//已被指派情况下直接返回
ExceptionCast.cast(HrmsCode.EMP_TO_BE_CHOOSE);
}
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId();
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser();
guaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
guaranteeAssignUser.setEmpId(Integer.parseInt(userId));
guaranteeAssignUser.setId(guaranteeRequest.getId());
dgGuaranteeAssignUserMapper.updateById(guaranteeAssignUser);
//新增A角记录到担保部记录表
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setBusinessId(guaranteeRequest.getBusinessId());//业务id
dgGuaranteeAssignUser.setCompanyId(guaranteeRequest.getCompanyId());//企业id
dgGuaranteeAssignUser.setEmpId(guaranteeRequest.getEmpAId());//用户A角id
dgGuaranteeAssignUser.setRoleId(PromptSuccess.DB_A_ID);//角色设置为A角
dgGuaranteeAssignUser.setType(1);//A角操作
dgGuaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser);
//新增B角记录到担保部记录表
DgGuaranteeAssignUser dgGuaranteeAssignUser2 = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser2.setBusinessId(guaranteeRequest.getBusinessId());//业务id
dgGuaranteeAssignUser2.setCompanyId(guaranteeRequest.getCompanyId());//企业id
dgGuaranteeAssignUser2.setEmpId(guaranteeRequest.getEmpBId());//用户B角id
dgGuaranteeAssignUser2.setRoleId(PromptSuccess.DB_B_ID);//角色设置为B角
dgGuaranteeAssignUser2.setType(2);//B角操作
dgGuaranteeAssignUser2.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
dgGuaranteeAssignUser2.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser2);
List<DgGuaranteePO> list = new ArrayList();
DgGuaranteePO dgGuaranteePO1 = new DgGuaranteePO();
dgGuaranteePO1.setUserId(guaranteeRequest.getEmpAId().longValue());
dgGuaranteePO1.setRoleId(PromptSuccess.DB_A_ID.longValue());
DgGuaranteePO dgGuaranteePO2 = new DgGuaranteePO();
dgGuaranteePO2.setUserId(guaranteeRequest.getEmpBId().longValue());
dgGuaranteePO2.setRoleId(PromptSuccess.DB_B_ID.longValue());
list.add(dgGuaranteePO1);
list.add(dgGuaranteePO2);
//批量绑定角色关系
hrmsFeignService.insertUsrRole(list);
//hrmsFeignService.insertUserRole(guaranteeRequest.getEmpAId().longValue(),PromptSuccess.DB_A_ID.longValue());
//hrmsFeignService.insertUserRole(guaranteeRequest.getEmpBId().longValue(),PromptSuccess.DB_B_ID.longValue());
return new ResponseResult();
}
} }

@ -18,6 +18,7 @@ import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CrmsCode; import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.*; import com.daqing.framework.domain.guarantee.*;
import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
@ -88,6 +89,25 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
@Transactional @Transactional
@Override @Override
public Boolean assignCorners(MessageRequest messageRequest) { public Boolean assignCorners(MessageRequest messageRequest) {
//查询empId在担保部调查中是否被指派
Integer count1 = dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", messageRequest.getBusinessId())
.eq("type", 1).eq("emp_id", messageRequest.getEmpId()));
Integer count = dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", messageRequest.getBusinessId())
.eq("type", 2).eq("emp_id", messageRequest.getEmpId()));
if(count1 >0 || count >0){//已被指派情况下直接返回
ExceptionCast.cast(HrmsCode.EMP_TO_BE_CHOOSE);
}
//查询empId在资产部调查中是否被指派
Integer count2 = dgAssetsInvestigationMapper.selectCount(new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id", messageRequest.getBusinessId())
.eq("type", 1).eq("emp_id", messageRequest.getEmpId()));
if(count2 >0 ){//已被指派情况下直接返回
ExceptionCast.cast(HrmsCode.EMP_TO_BE_CHOOSE);
}
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id //根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId //获取当前登录用户userId
@ -140,6 +160,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
DgMessageInvestigation messageInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgMessageInvestigation>() DgMessageInvestigation messageInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgMessageInvestigation>()
.eq("business_id", dgMessageInvestigation.getBusinessId()) .eq("business_id", dgMessageInvestigation.getBusinessId())
.eq("type", 1)); .eq("type", 1));
if(messageInvestigation != null){
String files=messageInvestigation.getFile(); String files=messageInvestigation.getFile();
if(files!=null){ if(files!=null){
String a = files.substring(1,files.length()-1); String a = files.substring(1,files.length()-1);
@ -147,6 +168,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
List<String> demoList = Arrays.asList(arry); List<String> demoList = Arrays.asList(arry);
messageDetailResponse.setMessageFileList(demoList); messageDetailResponse.setMessageFileList(demoList);
} }
}
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
@ -252,7 +274,6 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,"信息部专员",investigateMessageRequest.getRemark(),4); AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,"信息部专员",investigateMessageRequest.getRemark(),4);
return 1; return 1;
} }
@ -325,11 +346,6 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
message.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 message.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
message.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 message.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.insert(message); this.baseMapper.insert(message);
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation2.getBusinessId(),account,"信息部经理",approvalMessageRequest.getRemark(),4);
}else if(approvalMessageRequest.getStatus()==StatusCode.SP_REVIEWED && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==3) {//信息部领导审核通过 }else if(approvalMessageRequest.getStatus()==StatusCode.SP_REVIEWED && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==3) {//信息部领导审核通过
//如果信息部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果信息部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
@ -356,12 +372,18 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派 compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派
dgComplianceInvestigationMapper.insert(compliance); dgComplianceInvestigationMapper.insert(compliance);
} }
}
Integer type = messageInvestigation.getType();
String deptName;
if(type == 2){
deptName = "信息部经理";
}else{
deptName = "信息部分管领导";
}
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,"信息部分管领导",approvalMessageRequest.getRemark(),4); AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,deptName,approvalMessageRequest.getRemark(),4);
}
return 1; return 1;
} }

@ -54,6 +54,10 @@ spring.servlet.multipart.max-file-size=10MB
#spring.cloud.nacos.config.ext-config[1].group=prod #spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true #spring.cloud.nacos.config.ext-config[1].refresh=true
# #
#spring.cloud.nacos.config.ext-config[2].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1 #spring.redis.host=127.0.0.1
#spring.redis.port=6379 #spring.redis.port=6379
#spring.redis.password=dq123456 #spring.redis.password=dq123456

@ -13,6 +13,7 @@
<result column="amount_wide" property="amountWide" /> <result column="amount_wide" property="amountWide" />
<result column="en_guarantee_measures" property="enGuaranteeMeasures" /> <result column="en_guarantee_measures" property="enGuaranteeMeasures" />
<result column="description" property="description" /> <result column="description" property="description" />
<result column="customer_type" property="customerType" />
<result column="business_type" property="businessType" /> <result column="business_type" property="businessType" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />

@ -76,7 +76,7 @@
</select> </select>
<delete id="deleteHrmsRoleByRoleId"> <delete id="deleteHrmsRoleByRoleId">
delete from hrms_role where id=#{roleId} update hrms_role set del_or_not = 1 where id=#{roleId}
</delete> </delete>
<select id="uniqueRoleName" parameterType="string" resultType="java.lang.Integer"> <select id="uniqueRoleName" parameterType="string" resultType="java.lang.Integer">

@ -210,7 +210,7 @@
<!-- 根据部门id获取该部门下面所有的员工 --> <!-- 根据部门id获取该部门下面所有的员工 -->
<select id="employeeListByDeptId" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.UserDeptVO"> <select id="employeeListByDeptId" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.UserDeptVO">
select * from ( /*select * from (*/
SELECT SELECT
u.id, u.id,
u.account , GROUP_CONCAT(er.role_id SEPARATOR ',') roleId u.account , GROUP_CONCAT(er.role_id SEPARATOR ',') roleId
@ -227,11 +227,11 @@
AND u.account LIKE CONCAT('%',#{account},'%') AND u.account LIKE CONCAT('%',#{account},'%')
</if> </if>
GROUP BY u.id GROUP BY u.id
)alias /* )alias
where where
(!FIND_IN_SET(59,roleId) AND !FIND_IN_SET(60,roleId) AND (!FIND_IN_SET(59,roleId) AND !FIND_IN_SET(60,roleId) AND
!FIND_IN_SET(63,roleId) AND !FIND_IN_SET(66,roleId) AND !FIND_IN_SET(63,roleId) AND !FIND_IN_SET(66,roleId) AND
!FIND_IN_SET(69,roleId)) or roleId is null !FIND_IN_SET(69,roleId)) or roleId is null*/
</select> </select>
<!-- 查询所有的员工姓名和id --> <!-- 查询所有的员工姓名和id -->

@ -78,6 +78,11 @@ public class DgApplyAmountInfo implements Serializable {
*/ */
private String enGuaranteeMeasures; private String enGuaranteeMeasures;
/**
* 客户类型
*/
private String customerType;
/** /**
* 业务类型 * 业务类型
*/ */

@ -75,7 +75,10 @@ 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, "该职位下已关联员工!"),
EMP_SAME(false, 51001, "A,B角不能选同一个人!"),
EMP_TO_BE_CHOOSE(false, 51002, "该用户已经被指派!");

Loading…
Cancel
Save