diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java index 18bfa20c..2b911495 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.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; diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java index d6eaba47..52a04b69 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java @@ -82,26 +82,33 @@ public class CustomerServiceImpl extends ServiceImpl 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 = (List) responseResult.getData(); - if (employeeTO != null){ - // 将客户信息和客户经理及部门信息拼装起来 - List customerTOS = this.jointCustomerEmployee(customers, employeeTO); - // 属性拷贝,将泛型为CustomerEntity类型的IPage的属性拷贝给泛型为CustomerTO类型的IPage,才能赋值给PageUtils - IPage iPage = new Page<>(); - BeanUtils.copyProperties(customerEntityIPage, iPage); - iPage.setRecords(customerTOS); - return new PageUtils(iPage); - }else { - return new PageUtils(customerEntityIPage); + 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 iPage = new Page<>(); + BeanUtils.copyProperties(customerEntityIPage, iPage); + List listResponse = new ArrayList<>(); + // 获取所有的客户经理名称和部门名称 + ResponseResult> responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds); + List 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); + } } + iPage.setRecords(listResponse); + return new PageUtils(iPage); } /** @@ -113,7 +120,7 @@ public class CustomerServiceImpl extends ServiceImpl().SUCCESS(customerPersonalDTO); - } else if (Objects.equals(customer.getType(),CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType())){ - // CompanyCustomerEntity companyCustomerEntity = companyCustomerDao.queryCompanyCustomerById(id); + } else if (Objects.equals(customer.getType(), CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType())) { + // CompanyCustomerEntity companyCustomerEntity = companyCustomerDao.queryCompanyCustomerById(id); CompanyCustomerEntity companyCustomerEntity = companyCustomerDao.selectOne(new QueryWrapper() - .eq("customer_id",id)); + .eq("customer_id", id)); // 封装企业类型客户信息 CustomerCompanyDTO customerCompanyDTO = this.setCompany(customer, companyCustomerEntity); return new ResponseResult().SUCCESS(customerCompanyDTO); - }else { + } else { return new ResponseResult(CommonCode.INEXISTENCE); } } @@ -144,7 +151,7 @@ public class CustomerServiceImpl extends ServiceImpl employee = hrmsFeignService.getEmployeeById(customer.getManager()); - if (employee.getData() != null){ + if (employee.getData() != null) { // 客户经理姓名 name = hrmsFeignService.getEmployeeById(customer.getManager()).getData().getName(); } @@ -166,12 +173,12 @@ public class CustomerServiceImpl extends ServiceImpl().SUCCESS(customerPersonalVO); - } else if (Objects.equals(customer.getType(),CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType())){ + } else if (Objects.equals(customer.getType(), CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType())) { CompanyCustomerEntity companyCustomerEntity = companyCustomerDao.queryCompanyCustomerById(id); // 封装企业类型客户信息 CustomerCompanyVO customerCompanyVO = this.setCompany(customer, name, companyCustomerEntity); return new ResponseResult().SUCCESS(customerCompanyVO); - }else { + } else { return new ResponseResult(CommonCode.INEXISTENCE); } } @@ -184,7 +191,7 @@ public class CustomerServiceImpl extends ServiceImpl updateCustomerById(Long[] ids) { - if (ids == null || ids.length == 0){ + if (ids == null || ids.length == 0) { return null; } //TODO 远程调用审批模块判断所选客户是否在审批,返回正在审批的客户的id集合Long[] idArray @@ -209,10 +216,10 @@ public class CustomerServiceImpl extends ServiceImpl companyList = new ArrayList<>(); List personalList = new ArrayList<>(); List longList = customerDao.listCustomerId(); - if (longList != null){ + if (longList != null) { for (Long id : longList) { ResponseResult responseResult = this.getCustomerById(id); - if ((responseResult.getData()).getClass() == CustomerCompanyVO.class){ + if ((responseResult.getData()).getClass() == CustomerCompanyVO.class) { companyList.add((CustomerCompanyVO) responseResult.getData()); - }else { + } else { personalList.add((CustomerPersonalVO) responseResult.getData()); } } } - ExcelUtil.writeExcelWithSheets(response,personalList,"客户资源信息一览表","个人类型",new CustomerPersonalVO()) - .write(companyList,"企业类型",new CustomerCompanyVO()) + ExcelUtil.writeExcelWithSheets(response, personalList, "客户资源信息一览表", "个人类型", new CustomerPersonalVO()) + .write(companyList, "企业类型", new CustomerCompanyVO()) .finish(); - }catch (Exception e){ + } catch (Exception e) { ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT); } } @@ -321,27 +329,28 @@ public class CustomerServiceImpl extends ServiceImpl companyTemplates = new ArrayList<>(); List personalTemplates = new ArrayList<>(); - ExcelUtil.writeExcelWithSheets(response,personalTemplates,"客户资源信息表模板","个人类型",new PersonalTemplate()) - .write(companyTemplates,"企业类型",new CompanyTemplate()) + ExcelUtil.writeExcelWithSheets(response, personalTemplates, "客户资源信息表模板", "个人类型", new PersonalTemplate()) + .write(companyTemplates, "企业类型", new CompanyTemplate()) .finish(); - }catch (Exception e){ + } catch (Exception e) { ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORTTEMPLATE_EXSIT); } } /** * 导入excel数据 + * * @param excel */ @Transactional @Override public ResponseResult excelImportCustomer(MultipartFile excel) { //TODO 导入excel数据到数据库,思路耗时太长,有待优化 - if (excel.isEmpty()){ + if (excel.isEmpty()) { ExceptionCast.cast(CrmsCode.NOT_NULL); } try { - List personalList = ExcelUtil.readExcel(excel,new PersonalTemplate(), 1); + List personalList = ExcelUtil.readExcel(excel, new PersonalTemplate(), 1); List companyList = ExcelUtil.readExcel(excel, new CompanyTemplate(), 2); List nameList = hrmsFeignService.listEmployeeName().getData(); CustomerPersonalTOI customerPersonalTOI; @@ -350,44 +359,44 @@ public class CustomerServiceImpl extends ServiceImpl().SUCCESS("导入数据失败,员工"+manager.getManager()+"不存在"); + if (customerPersonalTOI.getManager() == null) { + return new ResponseResult().SUCCESS("导入数据失败,员工" + manager.getManager() + "不存在"); } } this.saveCustomerPersonal(customerPersonalTOI); } // 企业类型 - for (Object company : companyList){ + for (Object company : companyList) { CustomerCompanyTOI customerCompanyTOI = new CustomerCompanyTOI(); manager = new ManagerName(); customerCompanyTOI.setType(1); - BeanUtils.copyProperties(company,customerCompanyTOI); - BeanUtils.copyProperties(company,manager); + BeanUtils.copyProperties(company, customerCompanyTOI); + BeanUtils.copyProperties(company, manager); // 根据客户经理名称找到对应的员工id - if (nameList != null && manager.getManager() != null){ - for (EmployeeVO employeeVO : nameList){ - if (Objects.equals(manager.getManager(),employeeVO.getName())){ + if (nameList != null && manager.getManager() != null) { + for (EmployeeVO employeeVO : nameList) { + if (Objects.equals(manager.getManager(), employeeVO.getName())) { customerCompanyTOI.setManager(employeeVO.getId()); } } - if (customerCompanyTOI.getManager() == null){ - return new ResponseResult().SUCCESS("导入数据失败,员工"+manager.getManager()+"不存在"); + if (customerCompanyTOI.getManager() == null) { + return new ResponseResult().SUCCESS("导入数据失败,员工" + manager.getManager() + "不存在"); } } this.saveCustomerCompany(customerCompanyTOI); } return ResponseResult.SUCCESS(); - }catch (Exception e){ + } catch (Exception e) { return new ResponseResult().SUCCESS("导入数据失败,请检查文件和数据格式或稍后再试"); } } @@ -410,7 +419,7 @@ public class CustomerServiceImpl extends ServiceImpl pageCheckout(Integer page, Integer size) { + private Page pageCheckout(Integer page, Integer size) { // 查询客户有效总条数 Integer count = this.count(new QueryWrapper().eq("del_or_not", CrmsConstant.NOT_DELETE)); if (size == null || size < 1) { @@ -467,24 +476,19 @@ public class CustomerServiceImpl extends ServiceImpl queryCompanyCodeAndName(int type) { - Listlist = customerDao.queryCompanyCodeAndName(type); + List list = customerDao.queryCompanyCodeAndName(type); return list; } @@ -555,10 +559,10 @@ public class CustomerServiceImpl extends ServiceImpl relatedList = new ArrayList<>(); List intList = companyCustomerReq.getRelatedId(); - for(int i=0;i0){ + if (customer == true && company > 0) { return true; } return false; @@ -592,34 +596,34 @@ public class CustomerServiceImpl extends ServiceImpl() - .eq("customer_id",companyCustomerEntity.getCustomerId())); + .eq("customer_id", companyCustomerEntity.getCustomerId())); //根据企业id删除关联关系 - crmsCustomerRelatedMapper.delete(new QueryWrapper().eq("customer_id",companyCustomerEntity.getId())); + crmsCustomerRelatedMapper.delete(new QueryWrapper().eq("customer_id", companyCustomerEntity.getId())); //绑定关联关系 List relatedList = new ArrayList<>(); List intList = companyCustomerReq.getRelatedId(); - for(int i=0;i0){ + if (relatedList.size() > 0) { crmsCustomerRelatedService.insertCustomerRelated(relatedList); } - if(customer==true && company>0){ + if (customer == true && company > 0) { return true; } return false; diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java index b8872bd2..21d1d9a1 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java @@ -62,40 +62,44 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl customerEntityIPage = this.getBaseMapper().queryList(new Page(page, size), cwr); List 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 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) { - // 远程调用查询客户对应的客户经理信息 - ResponseResult responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds); - List employeeTOs = (List) responseResult.getData(); - if (employeeTOs != null) { - customerWorkbenchListVOS = this.jointCustomerEmployee(customers, employeeTOs); + List listResponse = new ArrayList<>(); + // 远程调用查询客户对应的客户经理信息 + ResponseResult> responseResult = hrmsFeignService.getEmployeeAndDeptById(managerIds); + List employeeTOs = responseResult.getData(); + if (employeeTOs != null) { + 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 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 jointCustomerEmployee(List customers, List employeeTO) { - List customerWorkbenchListVOS = new ArrayList<>();// 用于拼装客户信息和员工及部门信息的集合 + List 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); - } + BeanUtils.copyProperties(customer, customerWorkbenchListVO); + listResponse.add(customerWorkbenchListVO); } - return customerWorkbenchListVOS; + return listResponse; } /** diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java index a6e3c492..6ff76db6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java @@ -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 processId = auditProcessService.getProcessId(businessId); return ResponseResult.SUCCESS(processId); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java index eacef93f..39c36fe4 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java @@ -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 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().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 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().SUCCESS(); + return dgGuaranteeAssignUserService.assignCorners(guaranteeRequest); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java index ffdea12b..0b944a9f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java @@ -20,5 +20,5 @@ public interface DgAuditProcessMapper extends BaseMapper { List selectAuditProcessList(@Param("businessId") String businessId,@Param("processId") String processId); - Integer selectProcessId(String businessId); + List selectProcessId(String businessId); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java index c28b2ff8..5db613b1 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java @@ -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 { List queryProcessList(String businessId,String processId); - Integer getProcessId(String businessId); + List getProcessId(String businessId); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java index c2e51508..606889df 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java @@ -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 ids, HttpServletResponse response); + + ResponseResult assignCorners(GuaranteeRequest guaranteeRequest); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index 968cc051..e3c9db5e 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -121,6 +121,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl() + .eq("business_id", assetsRequest.getBusinessId()) + .eq("type", 1).eq("emp_id", assetsRequest.getEmpId())); + + Integer count = dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper() + .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() + .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 getProcessId(String businessId) { return baseMapper.selectProcessId(businessId); } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java index a6b79835..f0da6f15 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java @@ -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 roleIdlist, String userId, Integer status) { @@ -80,7 +89,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId,status); + IPage positionVO = this.getBaseMapper().pageByCondition(new Page(page, size), customerNumberOrName, roleIdlist, userId, status); return new PageUtils(positionVO); } @@ -92,29 +101,29 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl0){ - String a = measures.substring(1,measures.length()-1); - String arry[]=a.split(","); + String measures = dgApplyAmountInfo.getEnGuaranteeMeasures(); + if (measures.length() > 0) { + String a = measures.substring(1, measures.length() - 1); + String arry[] = a.split(","); List demoList = Arrays.asList(arry); 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(); applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); //根据企业id查询企业详情 ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo); - LinkedHashMap linkedList = (LinkedHashMap)result.getData(); - System.out.println("企业详细============"+linkedList); + LinkedHashMap linkedList = (LinkedHashMap) result.getData(); + System.out.println("企业详细============" + linkedList); //查询附件详细,附件关联业务主键id DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(guaranteeAssignUser.getBusinessId()); - Listlist = new ArrayList<>(); + List list = new ArrayList<>(); list.add(dgEnclosureInfo.getAccountingFirm()); list.add(dgEnclosureInfo.getAssessmentReport()); list.add(dgEnclosureInfo.getBusinessLicense()); @@ -132,16 +141,16 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl(); - for(int i=0;i arr1List; - if(list.get(i)!=null){ - String a1 = list.get(i).substring(1,list.get(i).length()-1); - String arr1[]=a1.split(","); + if (list.get(i) != null) { + String a1 = list.get(i).substring(1, list.get(i).length() - 1); + String arr1[] = a1.split(","); arr1List = Arrays.asList(arr1); - arr1List2.add(i,arr1List); - System.out.println("arr1LIst===="+arr1List); - }else{ - arr1List2.add(i,null); + arr1List2.add(i, arr1List); + System.out.println("arr1LIst====" + arr1List); + } else { + arr1List2.add(i, null); } } dgEnclosureInfo.setAccountingFirmList((List) arr1List2.get(0)); @@ -159,12 +168,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl) arr1List2.get(12)); dgEnclosureInfo.setMarriageCopyList((List) arr1List2.get(13)); - System.out.println("附件详细=============="+dgEnclosureInfo); + System.out.println("附件详细==============" + dgEnclosureInfo); //查询担保部经理审核的金额和期限 DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper() .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3)); - GuaranteeDetailResponse guaranteeDetailResponse= new GuaranteeDetailResponse(); + GuaranteeDetailResponse guaranteeDetailResponse = new GuaranteeDetailResponse(); guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); guaranteeDetailResponse.setLinkedHashMap(linkedList); @@ -179,7 +188,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id",guaranteeAssignUser.getBusinessId()) - .eq("type",1).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED)); - int n = this.baseMapper.selectCount(new QueryWrapper().eq("business_id",guaranteeAssignUser.getBusinessId()) - .eq("type",2).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED)); - int sum = i+n; + int i = this.baseMapper.selectCount(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) + .eq("type", 1).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED)); + int n = this.baseMapper.selectCount(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) + .eq("type", 2).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED)); + int sum = i + n; //如果A或B调查通过,审批状态仍然是驳回,操作状态改为已处理 - if(sum == 1){ + if (sum == 1) { DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); assignUser.setId(investigateGuaranteeRequest.getId());//主键id assignUser.setStatus(StatusCode.SP_REJECT);//驳回 this.baseMapper.updateById(assignUser); } //判断AB角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中 - if(sum == 2){ + if (sum == 2) { DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); user.setStatus(StatusCode.SP_IN_REVIEW);//审核中 - this.baseMapper.update(user,new QueryWrapper() - .eq("business_id",guaranteeAssignUser.getBusinessId())); + this.baseMapper.update(user, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); } - }else{ + } else { //AB角调查,修改审核意见以及状态 DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id @@ -218,81 +227,92 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() - .eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",1)); + dgApplyAmountListMapper.update(dgApplyAmountList, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 1)); //业务申请部分担保部经理审批状态设置为驳回,操作状态设置为已处理 - DgApplyAmountList applyAmountList= new DgApplyAmountList(); + DgApplyAmountList applyAmountList = new DgApplyAmountList(); applyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回 applyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理 - dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper() - .eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",2)); + dgApplyAmountListMapper.update(applyAmountList, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 2)); //修改担保部调查下该业务的所有审批状态为驳回 DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); assignUser.setStatus(StatusCode.SP_REJECT);//驳回 - this.baseMapper.update(assignUser,new QueryWrapper() - .eq("business_id",guaranteeAssignUser.getBusinessId())); + this.baseMapper.update(assignUser, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); } //判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理 - int a = this.baseMapper.selectCount(new QueryWrapper().eq("business_id",guaranteeAssignUser.getBusinessId()) - .eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED)); - int b = this.baseMapper.selectCount(new QueryWrapper().eq("business_id",guaranteeAssignUser.getBusinessId()) - .eq("type",2).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED)); - int sum2 = a+b; - if(sum2==2){ + int a = this.baseMapper.selectCount(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) + .eq("type", 1).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); + int b = this.baseMapper.selectCount(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) + .eq("type", 2).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED)); + int sum2 = a + b; + if (sum2 == 2) { //如果合规调查C角状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为合规调查驳回情况处理 DgComplianceInvestigation investigation = dgComplianceInvestigationMapper.selectOne(new QueryWrapper() - .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() .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) - && guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)){//合规调查驳回情况处理 + if (investigation != null && investigation.getAuditStatus().equals(StatusCode.SP_REJECT) && investigation.getOperationStatus().equals(StatusCode.CZ_PROCESSED) + && 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(); dgCompliance.setOperationStatus(StatusCode.CZ_ON_HAND);//待处理 - dgComplianceInvestigationMapper.update(dgCompliance,new QueryWrapper() - .eq("business_id",guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.FG_JL_ID)); + dgComplianceInvestigationMapper.update(dgCompliance, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_JL_ID)); DgComplianceInvestigation dgInvestigation = new DgComplianceInvestigation(); dgInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);//审核中 - dgComplianceInvestigationMapper.update(dgInvestigation,new QueryWrapper() - .eq("business_id",guaranteeAssignUser.getBusinessId())); + dgComplianceInvestigationMapper.update(dgInvestigation, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); + + //修改担保业务审批状态为已审核 + DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); + assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核 + this.baseMapper.update(assignUser, new QueryWrapper() + .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)){//贷审会业务流程驳回情况处理 + } else if (consider != null && consider.getStatus().equals(StatusCode.SP_REJECT) && consider.getOperatingStatus().equals(StatusCode.CZ_PROCESSED) + && 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(); dgLoanCommittee.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 - dgLoanCommitteeConsiderMapper.update(dgLoanCommittee,new QueryWrapper() - .eq("business_id",guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.DSH_ID)); + dgLoanCommitteeConsiderMapper.update(dgLoanCommittee, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.DSH_ID)); DgLoanCommitteeConsider dgConsider = new DgLoanCommitteeConsider(); dgConsider.setStatus(StatusCode.SP_IN_REVIEW);//审核中 - dgLoanCommitteeConsiderMapper.update(dgConsider,new QueryWrapper() - .eq("business_id",guaranteeAssignUser.getBusinessId())); + dgLoanCommitteeConsiderMapper.update(dgConsider, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); + + //修改担保业务审批状态为已审核 + DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); + assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核 + this.baseMapper.update(assignUser, new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId())); } - - }else{//正常情况处理 + } else {//正常情况处理 DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理 assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 - this.baseMapper.update(assignUser,new QueryWrapper().eq("business_id",guaranteeAssignUser.getBusinessId()) - .eq("type",3)); + this.baseMapper.update(assignUser, new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId()) + .eq("type", 3)); } } @@ -312,13 +332,20 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id",guaranteeAssignUser.getBusinessId())); + dgEnclosureInfoMapper.delete(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId())); //附件新增 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; } @@ -347,43 +374,43 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() - .eq("business_id",guaranteeUser.getBusinessId())); + this.baseMapper.update(assignUser, new QueryWrapper() + .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(); assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中 - this.baseMapper.update(assignUser,new QueryWrapper().eq("business_id",guaranteeUser.getBusinessId())); + this.baseMapper.update(assignUser, new QueryWrapper().eq("business_id", guaranteeUser.getBusinessId())); DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 - this.baseMapper.update(user,new QueryWrapper() - .eq("business_id",guaranteeUser.getBusinessId()).eq("type",4)); - }else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决 + this.baseMapper.update(user, new QueryWrapper() + .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 4)); + } else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)) {//如果为拒绝,业务状态则为已否决 DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); processStatus.setBusinessId(guaranteeUser.getBusinessId()); processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决 - dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper() - .eq("business_id",processStatus.getBusinessId())); - }else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){ + dgBusinessProcessStatusMapper.update(processStatus, new QueryWrapper() + .eq("business_id", processStatus.getBusinessId())); + } else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType() == 3) { //担保部经理驳回情况 //A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理 - this.baseMapper.update(dgAssignUser,new QueryWrapper() - .eq("business_id",guaranteeUser.getBusinessId()).eq("type",1)); - this.baseMapper.update(dgAssignUser,new QueryWrapper() - .eq("business_id",guaranteeUser.getBusinessId()).eq("type",2)); - }else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==4){ + this.baseMapper.update(dgAssignUser, new QueryWrapper() + .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 1)); + this.baseMapper.update(dgAssignUser, new QueryWrapper() + .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 2)); + } else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType() == 4) { //担保部领导驳回情况 //担保部经理审批状态设置为驳回,操作状态设置为待处理 - this.baseMapper.update(dgAssignUser,new QueryWrapper() - .eq("business_id",guaranteeUser.getBusinessId()).eq("type",3)); - }else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==3){//担保部经理审核通过 + this.baseMapper.update(dgAssignUser, new QueryWrapper() + .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 3)); + } else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 3) {//担保部经理审核通过 //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 //根据主键id查询业务id DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId()); @@ -396,30 +423,25 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id",guaranteeUser.getBusinessId())); + this.baseMapper.update(user, new QueryWrapper().eq("business_id", guaranteeUser.getBusinessId())); //查看信息部分管领导是否审核通过 - int a=dgMessageInvestigationMapper.selectCount(new QueryWrapper() - .eq("business_id",guaranteeUser.getBusinessId()) - .eq("type",3).eq("status",StatusCode.SP_REVIEWED).eq("operating_status",StatusCode.CZ_PROCESSED)); + int a = dgMessageInvestigationMapper.selectCount(new QueryWrapper() + .eq("business_id", guaranteeUser.getBusinessId()) + .eq("type", 3).eq("status", StatusCode.SP_REVIEWED).eq("operating_status", StatusCode.CZ_PROCESSED)); //查看资产部分管领导是否审核通过 - int b=dgAssetsInvestigationMapper.selectCount(new QueryWrapper() - .eq("business_id",guaranteeUser.getBusinessId()) - .eq("type",3).eq("status",StatusCode.SP_REVIEWED).eq("operating_status",StatusCode.CZ_PROCESSED)); - int sum = a+b; - if(sum==2){ + int b = dgAssetsInvestigationMapper.selectCount(new QueryWrapper() + .eq("business_id", guaranteeUser.getBusinessId()) + .eq("type", 3).eq("status", StatusCode.SP_REVIEWED).eq("operating_status", StatusCode.CZ_PROCESSED)); + int sum = a + b; + if (sum == 2) { //新增记录到合规调查 - DgComplianceInvestigation compliance =new DgComplianceInvestigation(); + DgComplianceInvestigation compliance = new DgComplianceInvestigation(); compliance.setCompanyId(guaranteeUser.getCompanyId());//企业id compliance.setRoleId(PromptSuccess.FG_JL_ID);//角色id compliance.setBusinessId(guaranteeUser.getBusinessId());//业务id @@ -427,20 +449,26 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl ids, HttpServletResponse response) { //根据ids查询业务申请列表信息 - ListguaranteeList = this.baseMapper.selectListByIds(ids); - System.out.println("applyList==========================="+guaranteeList); + List guaranteeList = this.baseMapper.selectListByIds(ids); + System.out.println("applyList===========================" + guaranteeList); try { ExcelUtil.writeExcelWithSheets(response, guaranteeList, "担保调查一览表", "businessApplication", new GuaranteeListResponse()) .finish(); @@ -451,5 +479,84 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() + .eq("business_id", guaranteeRequest.getBusinessId()) + .eq("type", 1).eq("emp_id", guaranteeRequest.getEmpAId())); + + Integer count = dgAssetsInvestigationMapper.selectCount(new QueryWrapper() + .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() + .eq("business_id", guaranteeRequest.getBusinessId()) + .eq("type", 1).eq("emp_id", guaranteeRequest.getEmpAId())); + + Integer count3 = dgMessageInvestigationMapper.selectCount(new QueryWrapper() + .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 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(); + } + + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java index 71dfb0a5..9997e4ad 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java @@ -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() + .eq("business_id", messageRequest.getBusinessId()) + .eq("type", 1).eq("emp_id", messageRequest.getEmpId())); + + Integer count = dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper() + .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() + .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,12 +160,14 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() .eq("business_id", dgMessageInvestigation.getBusinessId()) .eq("type", 1)); - String files=messageInvestigation.getFile(); - if(files!=null){ - String a = files.substring(1,files.length()-1); - String arry[]=a.split(","); - List demoList = Arrays.asList(arry); - messageDetailResponse.setMessageFileList(demoList); + if(messageInvestigation != null){ + String files=messageInvestigation.getFile(); + if(files!=null){ + String a = files.substring(1,files.length()-1); + String arry[]=a.split(","); + List demoList = Arrays.asList(arry); + messageDetailResponse.setMessageFileList(demoList); + } } DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); @@ -252,7 +274,6 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl> responseResult = hrmsFeignService.listEmpNameByUserId(userIds); - System.out.println(responseResult.getData()); - List workConferenceResponses = new ArrayList<>(); + List 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 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 + diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml index 6d66a4ae..fd6ecda1 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml @@ -24,7 +24,7 @@ diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml index ec31926f..a67906cb 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml @@ -180,4 +180,17 @@ UPDATE dg_compliance_investigation SET user_id = #{userId} WHERE id = #{id} + + + diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml index 187ad266..b2f3e12d 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml @@ -139,7 +139,7 @@ - UPDATE dg_loan_committee_consider SET user_id = #{userId} WHERE id = #{id} + UPDATE dg_loan_committee_consider SET consider_id = #{userId} WHERE id = #{id} diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml index ed325ae5..428c44f4 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml @@ -104,7 +104,7 @@ diff --git a/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/RolePermissionMapper.xml b/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/RolePermissionMapper.xml index 0ecf4749..9c784c8f 100644 --- a/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/RolePermissionMapper.xml +++ b/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/RolePermissionMapper.xml @@ -76,7 +76,7 @@ - delete from hrms_role where id=#{roleId} + update hrms_role set del_or_not = 1 where id=#{roleId} - 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},'%') 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*/ @@ -625,4 +625,8 @@ + + \ No newline at end of file diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java index ced6ec01..723a419a 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java @@ -78,6 +78,11 @@ public class DgApplyAmountInfo implements Serializable { */ private String enGuaranteeMeasures; + /** + * 客户类型 + */ + private String customerType; + /** * 业务类型 */ diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java index 92bdd247..c371c84c 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java @@ -16,17 +16,18 @@ import lombok.ToString; 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_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,"当前登录用户角色信息不存在,无法查询!"), + ROLE_IS_NOT(false, 90001, "当前登录用户角色信息不存在,无法查询!"), - LOAN_MESSAGE_NOT_NULL(false,100001,"议定事项、附加事项、贷款金额、贷款期限、附件等不能为空!"), + LOAN_MESSAGE_NOT_NULL(false, 100001, "议定事项、附加事项、贷款金额、贷款期限、附件等不能为空!"), - WORK_JUDGE_NOT_NULL(false,110001,"参会评委不能为空,请重新选择!"), + WORK_JUDGE_NOT_NULL(false, 110001, "参会评委不能为空,请重新选择!"), - EXCEL_ID_NOT_NULL(false, 120001,"导出的数据不能为空,请选择要导出的数据!"); + EXCEL_ID_NOT_NULL(false, 120001, "导出的数据不能为空,请选择要导出的数据!"); /** * 操作是否成功 diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AttacheAndABUserIdPO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AttacheAndABUserIdPO.java new file mode 100644 index 00000000..4bc266df --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AttacheAndABUserIdPO.java @@ -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; +} diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java index c32b47c0..ad6ee94d 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java @@ -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, "该用户已经被指派!");