Merge remote-tracking branch 'origin/master'

master
chen 4 years ago
commit f8560a8ca0
  1. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java
  2. 50
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  3. 54
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java
  4. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
  5. 68
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java
  6. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java
  7. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java
  8. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java
  9. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgApplyAmountInfoResponse.java
  10. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgEnclosureInfoResponse.java
  11. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java
  12. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java
  13. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  14. 39
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  15. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAuditProcessServiceImpl.java
  16. 35
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java
  17. 127
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  18. 40
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  19. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java
  20. 4
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  21. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
  22. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
  23. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  24. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml
  25. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml
  26. 2
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/RolePermissionMapper.xml
  27. 4
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java
  28. 17
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  29. 10
      dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
  30. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java
  31. 1
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java
  32. 24
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AttacheAndABUserIdPO.java
  33. 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;
@ApiModelProperty(value = "法人-性别 1、男,0、女")
private String legalGender;
private Integer legalGender;
@ApiModelProperty(value = "法人-身份证号")
private String legalIdNumber;

@ -82,26 +82,33 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
// 获取所有的客户基本信息
List<CustomerEntity> customers = customerEntityIPage.getRecords();
// 获取所有的客户经理id
Long[] managerIds = customers.stream().map(CustomerEntity::getManager).toArray(Long[]::new);
if (managerIds.length != 0) {
//TODO 远程调用查询客户经理信息的接口
ResponseResult responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds);
List<EmployeeTO> employeeTO = (List<EmployeeTO>) responseResult.getData();
if (employeeTO != null){
// 将客户信息和客户经理及部门信息拼装起来
List<CustomerTO> customerTOS = this.jointCustomerEmployee(customers, employeeTO);
Long[] managerIds = new Long[customers.size()];
for (int i = 0; i < customers.size(); i++) {
if (customers.get(i).getManager() != null) {
managerIds[i] = customers.get(i).getManager();
} else {
managerIds[i] = 0L;
}
}
// 属性拷贝,将泛型为CustomerEntity类型的IPage的属性拷贝给泛型为CustomerTO类型的IPage,才能赋值给PageUtils
IPage<CustomerTO> iPage = new Page<>();
BeanUtils.copyProperties(customerEntityIPage, iPage);
iPage.setRecords(customerTOS);
return new PageUtils(iPage);
List<CustomerTO> listResponse = new ArrayList<>();
// 获取所有的客户经理名称和部门名称
ResponseResult<List<EmployeeTO>> responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds);
List<EmployeeTO> employeeTO = responseResult.getData();
if (employeeTO != null) {
// 将客户信息和客户经理及部门信息拼装起来
listResponse = this.jointCustomerEmployee(customers, employeeTO);
} else {
return new PageUtils(customerEntityIPage);
for (CustomerEntity customer : customers) {
CustomerTO customerTO = new CustomerTO();
BeanUtils.copyProperties(customer, customerTO);
listResponse.add(customerTO);
}
} else {
return new PageUtils(customerEntityIPage);
}
iPage.setRecords(listResponse);
return new PageUtils(iPage);
}
/**
@ -285,6 +292,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
/**
* 导出数据到excel
*
* @param response 响应
*/
@Transactional
@ -331,6 +339,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
/**
* 导入excel数据
*
* @param excel
*/
@Transactional
@ -467,24 +476,19 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
for (CustomerEntity customer : customers) {
// 每一个客户对应一个不同的对象
customerTO = new CustomerTO();
for (EmployeeTO anEmployeeTO : employeeTO) {
if (Objects.equals(customer.getManager(), anEmployeeTO.getId())) {
BeanUtils.copyProperties(customer,customerTO);
customerTO.setManager(anEmployeeTO.getEmpName());
customerTO.setDepartments(anEmployeeTO.getDeptNames());
customerTOS.add(customerTO);
for (EmployeeTO employee : employeeTO) {
if (Objects.equals(customer.getManager(), employee.getId())) {
customerTO.setManager(employee.getEmpName());
customerTO.setDepartments(employee.getDeptNames());
}
}
if (!Objects.equals(customerTO.getId(), customer.getId())) {
BeanUtils.copyProperties(customer, customerTO);
customerTOS.add(customerTO);
}
}
return customerTOS;
}
/**
* 封装个人类型的客户信息
*

@ -62,40 +62,44 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
IPage<CustomerEntityResponse> customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr);
List<CustomerEntityResponse> customers = customerEntityIPage.getRecords();
// 获取所有的客户经理id
Long[] managerIds = customers.stream().map(CustomerEntityResponse::getManager).toArray(Long[]::new);
Long[] managerIds = new Long[customers.size()];
for (int i = 0; i < customers.size(); i++) {
if (customers.get(i).getManager() != null) {
managerIds[i] = customers.get(i).getManager();
} else {
managerIds[i] = 0L;
}
}
// 获取所有的客户id
Long[] customerIds = customers.stream().map(CustomerEntityResponse::getId).toArray(Long[]::new);
// 返回列表实体类集合
List<CustomerWorkbenchListVO> customerWorkbenchListVOS = new ArrayList<>();
for (int i = 0; i < customers.size(); i++) {
CustomerWorkbenchListVO customerWorkbenchListVO = new CustomerWorkbenchListVO();
BeanUtils.copyProperties(customers.get(i), customerWorkbenchListVO);
customerWorkbenchListVOS.add(customerWorkbenchListVO);
}
System.out.println(customerWorkbenchListVOS);
if (managerIds.length != 0) {
List<CustomerWorkbenchListVO> listResponse = new ArrayList<>();
// 远程调用查询客户对应的客户经理信息
ResponseResult responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds);
List<EmployeeTO> employeeTOs = (List<EmployeeTO>) responseResult.getData();
ResponseResult<List<EmployeeTO>> responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds);
List<EmployeeTO> employeeTOs = responseResult.getData();
if (employeeTOs != null) {
customerWorkbenchListVOS = this.jointCustomerEmployee(customers, employeeTOs);
listResponse = this.jointCustomerEmployee(customers, employeeTOs);
} else {
for (CustomerEntityResponse customer : customers) {
CustomerWorkbenchListVO workbenchListVO = new CustomerWorkbenchListVO();
BeanUtils.copyProperties(customer, workbenchListVO);
listResponse.add(workbenchListVO);
}
}
if (customerIds.length != 0) {
// TODO:远程调用担保服务查询每个客户的审批状态
for (CustomerWorkbenchListVO customerWorkbenchListVO : customerWorkbenchListVOS) {
for (CustomerWorkbenchListVO customerWorkbenchListVO : listResponse) {
customerWorkbenchListVO.setStatus(2);
}
if (cwr.getStatus() != null && (cwr.getStatus() == 0 || cwr.getStatus() == 1 || cwr.getStatus() == 2)) {
// 筛选状态
customerWorkbenchListVOS.removeIf(customerWorkbenchListVO -> !Objects.equals(customerWorkbenchListVO.getStatus(), cwr.getStatus()));
listResponse.removeIf(customerWorkbenchListVO -> !Objects.equals(customerWorkbenchListVO.getStatus(), cwr.getStatus()));
}
}
System.out.println(customerWorkbenchListVOS);
// 属性拷贝,将泛型为CustomerEntity类型的IPage的属性拷贝给泛型为CustomerTO类型的IPage,才能赋值给PageUtils
IPage<CustomerWorkbenchListVO> iPage = new Page<>();
BeanUtils.copyProperties(customerEntityIPage, iPage);
iPage.setRecords(customerWorkbenchListVOS);
iPage.setRecords(listResponse);
return new PageUtils(iPage);
}
@ -252,26 +256,22 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
* 拼接客户及其对应的客户经理及部门信息
*/
private List<CustomerWorkbenchListVO> jointCustomerEmployee(List<CustomerEntityResponse> customers, List<EmployeeTO> employeeTO) {
List<CustomerWorkbenchListVO> customerWorkbenchListVOS = new ArrayList<>();// 用于拼装客户信息和员工及部门信息的集合
List<CustomerWorkbenchListVO> listResponse = new ArrayList<>();// 用于拼装客户信息和员工及部门信息的集合
CustomerWorkbenchListVO customerWorkbenchListVO;
// 将客户信息和客户经理及部门信息拼装起来
for (CustomerEntityResponse customer : customers) {
// 每一个客户对应一个不同的对象
customerWorkbenchListVO = new CustomerWorkbenchListVO();
for (EmployeeTO anEmployeeTO : employeeTO) {
if (Objects.equals(customer.getManager(), anEmployeeTO.getId())) {
BeanUtils.copyProperties(customer, customerWorkbenchListVO);
customerWorkbenchListVO.setManager(anEmployeeTO.getEmpName());
customerWorkbenchListVO.setDepartments(anEmployeeTO.getDeptNames());
customerWorkbenchListVOS.add(customerWorkbenchListVO);
for (int i = 0; i < employeeTO.size(); i++) {
if (customer.getManager() != null && customer.getManager().equals(employeeTO.get(i).getId())) {
customerWorkbenchListVO.setManager(employeeTO.get(i).getEmpName());
customerWorkbenchListVO.setDepartments(employeeTO.get(i).getDeptNames());
}
}
if (!Objects.equals(customerWorkbenchListVO.getId(), customer.getId())) {
BeanUtils.copyProperties(customer, customerWorkbenchListVO);
customerWorkbenchListVOS.add(customerWorkbenchListVO);
}
listResponse.add(customerWorkbenchListVO);
}
return customerWorkbenchListVOS;
return listResponse;
}
/**

@ -49,7 +49,7 @@ public class DgAuditProcessController {
public ResponseResult getProcessId(
@ApiParam(name = "businessId", value = "业务id", required = true)
@RequestParam String businessId){
Integer processId = auditProcessService.getProcessId(businessId);
List<Integer> processId = auditProcessService.getProcessId(businessId);
return ResponseResult.SUCCESS(processId);
}

@ -10,6 +10,8 @@ import com.daqing.financial.guarantee.model.response.GuaranteeDetailResponse;
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
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.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
@ -46,12 +48,6 @@ public class DgGuaranteeAssignUserController {
@Autowired
private IDgGuaranteeAssignUserService dgGuaranteeAssignUserService;
@Resource
private DgGuaranteeAssignUserMapper dgGuaranteeAssignUserMapper;
@Resource
private HrmsFeignService hrmsFeignService;
/**
* 担保部调查列表
* @param
@ -69,22 +65,9 @@ public class DgGuaranteeAssignUserController {
PageUtils data = null;
if(roleIds != null) {
String[] ids = roleIds.split(",");
List<String> roleIdlist = Arrays.asList(ids);
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);
@ -112,52 +95,7 @@ public class DgGuaranteeAssignUserController {
@Transactional
public ResponseResult assignCorners(@RequestBody GuaranteeRequest guaranteeRequest){
//根据主键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<PageUtils>().SUCCESS();
return dgGuaranteeAssignUserService.assignCorners(guaranteeRequest);
}

@ -20,5 +20,5 @@ public interface DgAuditProcessMapper extends BaseMapper<DgAuditProcess> {
List<DgAuditProcess> selectAuditProcessList(@Param("businessId") String businessId,@Param("processId") String processId);
Integer selectProcessId(String businessId);
List<Integer> selectProcessId(String businessId);
}

@ -7,6 +7,7 @@ import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationReq
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -76,4 +77,6 @@ public interface DgComplianceInvestigationMapper extends BaseMapper<DgCompliance
String getAuditProcessLatestNameByBusinessId(@Param("businessId") Integer businessId);
Boolean updateDgComplianceInvestigationUserIdById(@Param("id") Integer id, @Param("userId") Integer userId);
AttacheAndABUserIdPO getAttacheAndABByBusinessId(Integer businessId);
}

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

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

@ -135,4 +135,8 @@ public class DgEnclosureInfoResponse implements Serializable {
private String inspectionPhotos;
/**
* 其他
*/
private String otherFile;
}

@ -17,5 +17,5 @@ public interface IDgAuditProcessService extends IService<DgAuditProcess> {
List<DgAuditProcess> queryProcessList(String businessId,String processId);
Integer getProcessId(String businessId);
List<Integer> getProcessId(String businessId);
}

@ -2,9 +2,11 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
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.response.GuaranteeDetailResponse;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
@ -29,4 +31,6 @@ public interface IDgGuaranteeAssignUserService extends IService<DgGuaranteeAssig
int approvalGuarantee(ApprovalGuaranteeRequest approvalGuaranteeRequest);
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.setDescription(businessApplication.getDescription());//反担保措施描述
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
dgApplyAmountInfo.setCustomerType(businessApplication.getCustomerType());//客户类型
dgApplyAmountInfo.setBusinessCode(RandomUtil.getRandomNum(12));
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo);
@ -197,11 +198,10 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
status.setBusinessId(dgApplyAmountInfo.getId());
status.setBusinessStatus(StatusCode.YW_IN_PROGRESS);//业务状态设置为进行中
dgBusinessProcessStatusMapper.insert(status);
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(dgApplyAmountInfo.getId(),account,"担保业务员","",1);
}
return 1;
}
@ -324,6 +324,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(businessApplication.getEnGuaranteeMeasures()));//反担保措施
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
dgApplyAmountInfo.setCustomerType(businessApplication.getCustomerType());//客户类型
//根据业务id修改申请贷款信息
this.baseMapper.updateById(dgApplyAmountInfo);
@ -546,12 +547,17 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgMessageInvestigation.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派
dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
dgMessageInvestigationMapper.insert(dgMessageInvestigation);
}
Integer type = dgApplyAmountList1.getType();
String deptName;
if(type==1){
deptName="担保部业务员";
}else{
deptName="担保部经理";
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(dgApplyAmountList1.getBusinessId(),account,"担保部经理",remark,1);
}
AuditProcessUtil.save(dgApplyAmountList1.getBusinessId(),account,deptName,remark,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.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.PromptSuccess;
@ -92,6 +93,27 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
@Transactional
@Override
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
//获取当前登录用户userId
@ -355,11 +377,6 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
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) {//资产部分管领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果担保部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
@ -386,11 +403,17 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派
dgComplianceInvestigationMapper.insert(compliance);
}
}
Integer type = assetsInvestigation.getType();
String deptName;
if(type == 2){
deptName = "资产部经理";
}else{
deptName = "资产部分管领导";
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,"资产部分管领导",approvalAssetsRequest.getApplyContent(),3);
}
AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,deptName,approvalAssetsRequest.getApplyContent(),3);
return 1;
}

@ -26,7 +26,7 @@ public class DgAuditProcessServiceImpl extends ServiceImpl<DgAuditProcessMapper,
}
@Override
public Integer getProcessId(String businessId) {
public List<Integer> getProcessId(String businessId) {
return baseMapper.selectProcessId(businessId);
}
}

@ -20,6 +20,7 @@ import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.domain.guarantee.GuaranteeCode;
import com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode;
@ -104,6 +105,16 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (userId == null) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_USER_NOT_NULL);
}
// 判断当前用户是否已被指派为信息专员、资产专员、AB角
AttacheAndABUserIdPO userIdPO = this.getBaseMapper().getAttacheAndABByBusinessId(this.getComplianceInvestigation(iid).getBusinessId());
if (userIdPO != null) {
if (userId.equals(userIdPO.getAUserId())
|| userId.equals(userIdPO.getBUserId())
|| userId.equals(userIdPO.getAssetUserId())
|| userId.equals(userIdPO.getMessageUserId())) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_USER_IS_EXIST);
}
}
// 指派
DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid);
complianceInvestigation.setUserId(userId);
@ -284,10 +295,11 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
// 1.2.若最新操作人为C角或法规部领导,表示C角调查通过后发送过来的数据或者法规部领导驳回的数据
// 同意
if (status == 1) {
Integer auditStatus = this.getBaseMapper().getAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
PromptSuccess.FG_JL_ID);
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(),
StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED, Integer.parseInt(userId));
if (result) {
Integer auditStatus = this.getBaseMapper().getAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(), PromptSuccess.FG_JL_ID);
Boolean result1;
if (StatusCode.SP_REJECT.equals(auditStatus)) {
// 表示为法规部领导驳回的数据,先更新审批状态为审核中
@ -422,7 +434,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (result1) {
// 最后改变法规部经理的这条数据的操作状态为待处理
Boolean result2 = this.getBaseMapper().updateToAudit(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.CZ_ON_HAND, PromptSuccess.FG_LD_ID);
StatusCode.CZ_ON_HAND, PromptSuccess.FG_JL_ID);
if (result2) {
// 在业务流程表中插入一条法规领导驳回的数据
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(),
@ -470,16 +482,21 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
public DgComplianceInvestigationInfoResponse query(Integer iid) {
DgComplianceInvestigationInfoResponse dgComplianceInvestigationInfoResponse = new DgComplianceInvestigationInfoResponse();
// 担保领导的数据id
Integer guaranteeId = this.getBaseMapper().getGuaranteeId(this.getComplianceInvestigation(iid).getBusinessId(),
PromptSuccess.DB_LD_ID);
Integer guaranteeId = this.getBaseMapper().getGuaranteeId(this.getComplianceInvestigation(iid).getBusinessId(), PromptSuccess.DB_LD_ID);
if (guaranteeId != null) {
// 担保详情
GuaranteeDetailResponse guaranteeDetailResponse = guaranteeAssignUserService.guaranteeDetail(guaranteeId);
dgComplianceInvestigationInfoResponse.setGuaranteeDetailResponse(guaranteeDetailResponse);
}
// 资产领导的数据id
Integer dgAssetsInvestigationId = this.getBaseMapper().getDgAssetsInvestigationId(this.getComplianceInvestigation(iid).getBusinessId(),
PromptSuccess.ZC_LD_ID);
// 担保详情
GuaranteeDetailResponse guaranteeDetailResponse = guaranteeAssignUserService.guaranteeDetail(guaranteeId);
if (dgAssetsInvestigationId != null) {
// 资产详情
AssetsDetailResponse assetsDetailResponse = dgAssetsInvestigationService.assetsDetail(dgAssetsInvestigationId);
// 合规附件和意见
dgComplianceInvestigationInfoResponse.setAssetsResponse(assetsDetailResponse.getAssetsResponse());
}
// 合规调查附件和意见
DgComplianceInvestigation dgComplianceInvestigation = this.getBaseMapper().queryDgComplianceInvestigation(iid);
if (dgComplianceInvestigation != null) {
if (dgComplianceInvestigation.getFileUrl() != null && dgComplianceInvestigation.getFileUrl().length() != 0) {
@ -490,10 +507,6 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
dgComplianceInvestigationInfoResponse.setOpinion(dgComplianceInvestigation.getOpinion());
}
}
// 统一返回
dgComplianceInvestigationInfoResponse.setGuaranteeDetailResponse(guaranteeDetailResponse);
dgComplianceInvestigationInfoResponse.setAssetsResponse(assetsDetailResponse.getAssetsResponse());
return dgComplianceInvestigationInfoResponse;
}

@ -5,8 +5,10 @@ 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.*;
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.response.*;
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.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.PromptSuccess;
@ -70,6 +74,11 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
@Resource
private DgLoanCommitteeConsiderMapper dgLoanCommitteeConsiderMapper;
@Resource
private DgGuaranteeAssignUserMapper dgGuaranteeAssignUserMapper;
@Resource
private HrmsFeignService hrmsFeignService;
@Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) {
@ -269,6 +278,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中
dgComplianceInvestigationMapper.update(dgInvestigation, new QueryWrapper<DgComplianceInvestigation>()
.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)
&& guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)) {//贷审会业务流程驳回情况处理
@ -284,8 +299,13 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgConsider.setStatus(StatusCode.SP_IN_REVIEW);//审核中
dgLoanCommitteeConsiderMapper.update(dgConsider, new QueryWrapper<DgLoanCommitteeConsider>()
.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 {//正常情况处理
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
@ -316,9 +336,16 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//附件新增
dgEnclosureInfoMapper.insert(dgEnclosureInfo);
Integer type = guaranteeAssignUser.getType();
String deptName;
if (type == 1) {
deptName = "担保部A角";
} else {
deptName = "担保部B角";
}
//同时往审核流程进程表新增一条记录
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;
}
@ -396,11 +423,6 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.insert(assignUser);
//同时往审核流程进程表新增一条记录
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) {//担保部领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
@ -427,12 +449,18 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派
dgComplianceInvestigationMapper.insert(compliance);
}
}
Integer type = guaranteeUser.getType();
String deptName;
if (type == 3) {
deptName = "担保部经理";
} else {
deptName = "担保部分管领导";
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeUser.getBusinessId(),account,"担保部分管领导",approvalGuaranteeRequest.getApplyContent(),2);
AuditProcessUtil.save(guaranteeUser.getBusinessId(), account, deptName, approvalGuaranteeRequest.getApplyContent(), 2);
}
return 1;
}
@ -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.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.PromptSuccess;
@ -88,6 +89,25 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
@Transactional
@Override
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
//获取当前登录用户userId
@ -140,6 +160,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
DgMessageInvestigation messageInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgMessageInvestigation>()
.eq("business_id", dgMessageInvestigation.getBusinessId())
.eq("type", 1));
if(messageInvestigation != null){
String files=messageInvestigation.getFile();
if(files!=null){
String a = files.substring(1,files.length()-1);
@ -147,6 +168,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
List<String> demoList = Arrays.asList(arry);
messageDetailResponse.setMessageFileList(demoList);
}
}
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
@ -252,7 +274,6 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,"信息部专员",investigateMessageRequest.getRemark(),4);
return 1;
}
@ -325,11 +346,6 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
message.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
message.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
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) {//信息部领导审核通过
//如果信息部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
@ -356,12 +372,18 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
compliance.setAuditStatus(StatusCode.SP_TO_BE_ASSIGNED);//审核状态设置为待指派
dgComplianceInvestigationMapper.insert(compliance);
}
}
Integer type = messageInvestigation.getType();
String deptName;
if(type == 2){
deptName = "信息部经理";
}else{
deptName = "信息部分管领导";
}
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,"信息部分管领导",approvalMessageRequest.getRemark(),4);
AuditProcessUtil.save(messageInvestigation.getBusinessId(),account,deptName,approvalMessageRequest.getRemark(),4);
}
return 1;
}

@ -106,21 +106,21 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
}
// 根据userId获取对应的员工姓名
ResponseResult<List<EmployeeVO>> responseResult = hrmsFeignService.listEmpNameByUserId(userIds);
System.out.println(responseResult.getData());
List<DgWorkConferenceResponse> workConferenceResponses = new ArrayList<>();
List<DgWorkConferenceResponse> listResponse = new ArrayList<>();
if (responseResult.getData() != null) {
// 将对应的userId转换为name
workConferenceResponses = this.transitionUserName(dgWorkConferencePOS, responseResult.getData());
listResponse = this.transitionUserName(dgWorkConferencePOS, responseResult.getData());
} else {
for (int i = 0; i < dgWorkConferencePOS.size(); i++) {
DgWorkConferenceResponse workConferenceResponse = new DgWorkConferenceResponse();
BeanUtils.copyProperties(dgWorkConferencePOS.get(i), workConferenceResponse);
workConferenceResponses.add(workConferenceResponse);
for (DgWorkConferencePO workConferencePO : dgWorkConferencePOS) {
DgWorkConferenceResponse workConference = new DgWorkConferenceResponse();
BeanUtils.copyProperties(workConferencePO, workConference);
listResponse.add(workConference);
}
}
// 分页属性复制并返回
IPage<DgWorkConferenceResponse> iPage = new Page<>();
BeanUtils.copyProperties(list, iPage);
iPage.setRecords(workConferenceResponses);
iPage.setRecords(listResponse);
return new PageUtils(iPage);
}
@ -270,7 +270,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
}
/**
* 查询AB角资产部调查信息部调查法规部调查的审核意见审核人姓名及时间
* 查询业务申请详情AB角资产部调查信息部调查法规部调查的审核意见审核人姓名及时间
*/
@Override
public AuditOpinionResponse getAuditOpinion(Integer businessId) {
@ -311,9 +311,11 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
BeanUtils.copyProperties(auditOpinion, auditOpinionResponse);
// 获取担保信息
Integer guaranteeId = dgComplianceInvestigationMapper.getGuaranteeId(businessId, PromptSuccess.DB_LD_ID);
if (guaranteeId != null) {
GuaranteeDetailResponse guaranteeDetailResponse = guaranteeAssignUserService.guaranteeDetail(guaranteeId);
auditOpinionResponse.setDgApplyAmountInfo(guaranteeDetailResponse.getDgApplyAmountInfo());
auditOpinionResponse.setLinkedHashMap(guaranteeDetailResponse.getLinkedHashMap());
}
return auditOpinionResponse;
}

@ -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].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.port=6379
#spring.redis.password=dq123456

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

@ -24,7 +24,7 @@
</select>
<select id="selectProcessId" resultType="java.lang.Integer">
SELECT max(process_id) FROM dg_audit_process WHERE business_id = #{businessId}
SELECT process_id FROM dg_audit_process WHERE business_id = #{businessId} group by process_id order by process_id asc
</select>
</mapper>

@ -180,4 +180,17 @@
UPDATE dg_compliance_investigation SET user_id = #{userId} WHERE id = #{id}
</update>
<!-- 根据业务id获取当前业务的信息专员、资产专员以及AB角的用户id -->
<select id="getAttacheAndABByBusinessId" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO">
SELECT (SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 59) AS a_user_id,
(SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 60) AS b_user_id,
a.id,m.id
FROM dg_assets_investigation AS a
LEFT JOIN dg_message_investigation AS m
ON a.business_id = m.business_id
WHERE a.role_id = 63
AND m.role_id = 66
AND a.business_id = #{businessId}
</select>
</mapper>

@ -139,7 +139,7 @@
<!-- 根据id绑定用户id -->
<update id="updateLoanCommitteeConsiderUserIdById">
UPDATE dg_loan_committee_consider SET user_id = #{userId} WHERE id = #{id}
UPDATE dg_loan_committee_consider SET consider_id = #{userId} WHERE id = #{id}
</update>
</mapper>

@ -104,7 +104,7 @@
</insert>
<select id="query" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgWorkConferenceConsider">
SELECT opinion,join_judge FROM dg_work_conference_consider WHERE id = #{id}
SELECT opinion AS remark,join_judge FROM dg_work_conference_consider WHERE id = #{id}
</select>
<!-- 改变所有业务id相同的审核状态,用于拒绝或者驳回 -->

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

@ -104,9 +104,11 @@ public interface EmployeeDao extends BaseMapper<EmployeeEntity> {
boolean insertUsrRole(@Param("list") List<DgGuaranteePO> list);
int saveUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);
Boolean saveUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);
List<EmployeeVO> listEmpNameByUserId(@Param("userIds") List<Long> userIds);
List<UserDeptVO> getListEmployeeTrees(@Param("id")Long id, @Param("account")String account);
Integer countUserIdAndRoleId(@Param("userId") Long userId, @Param("roleId") Long roleId);
}

@ -580,11 +580,13 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
*/
@Override
public List<EmployeeTO> getEmployeeAndDeptById(List<Long> ids) {
return this.getBaseMapper().getEmployeeAndDeptById(ids);
}
/**
* 根据userId查询员工的头像
*
* @return
*/
@Override
@ -603,7 +605,6 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
}
@Override
public boolean insertUsrRole(List<DgGuaranteePO> list) {
return this.getBaseMapper().insertUsrRole(list);
@ -614,13 +615,17 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
*/
@Override
public Boolean saveUserRole(Long userId, Long roleId) {
int i = this.getBaseMapper().saveUserRole(userId, roleId);
if (i > 0){
return true;
if (userId == null || roleId == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
return false;
// 先判断该条数据是否存在
Integer count = this.getBaseMapper().countUserIdAndRoleId(userId, roleId);
if (count < 1) {
return this.getBaseMapper().saveUserRole(userId, roleId);
}
return true;
}
/**
* 根据用户id获取对应的员工姓名

@ -210,7 +210,7 @@
<!-- 根据部门id获取该部门下面所有的员工 -->
<select id="employeeListByDeptId" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.UserDeptVO">
select * from (
/*select * from (*/
SELECT
u.id,
u.account , GROUP_CONCAT(er.role_id SEPARATOR ',') roleId
@ -227,11 +227,11 @@
AND u.account LIKE CONCAT('%',#{account},'%')
</if>
GROUP BY u.id
)alias
/* )alias
where
(!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(69,roleId)) or roleId is null
!FIND_IN_SET(69,roleId)) or roleId is null*/
</select>
<!-- 查询所有的员工姓名和id -->
@ -625,4 +625,8 @@
</if>
</select>
<select id="countUserIdAndRoleId" resultType="integer">
SELECT COUNT(id) FROM hrms_employee_role WHERE user_id = #{userId} AND role_id = #{roleId}
</select>
</mapper>

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

@ -19,6 +19,7 @@ public enum GuaranteeCode implements ResultCode {
COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL(false, 80001, "意见不能为空,请输入拒绝/驳回意见!"),
COMPLIANCE_UPLOAD_NOT_NULL(false, 80002, "附件不能为空,请上传附件!"),
COMPLIANCE_USER_NOT_NULL(false, 80003, "指派调查员不能为空,请选择指派员!"),
COMPLIANCE_USER_IS_EXIST(false, 80004, "当前用户在该业务中已被指派为A角、B角、信息部专员或资产部专员中的一个,请选择其他用户!"),
ROLE_IS_NOT(false, 90001, "当前登录用户角色信息不存在,无法查询!"),

@ -0,0 +1,24 @@
package com.daqing.framework.domain.guarantee.po;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* 信息专员资产专员AB角的用户id
* @auther River
* @date 2020/12/14 10:17
*/
@Data
@ToString
public class AttacheAndABUserIdPO implements Serializable {
private Integer aUserId;
private Integer bUserId;
private Integer messageUserId;
private Integer assetUserId;
}

@ -75,7 +75,10 @@ public enum HrmsCode implements ResultCode {
ROLE_EMP_EXIST(false,44001,"该角色有用户关联,不能删除!"),
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