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. 198
      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. 321
      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. 105
      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. 15
      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,27 +82,34 @@ 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);
}else {
return new PageUtils(customerEntityIPage);
}
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);
}
}
iPage.setRecords(listResponse);
return new PageUtils(iPage);
}
/**
* 根据id查询客户的信息
@ -113,7 +120,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
@Override
public ResponseResult queryCustomerById(Long id) {
if (id == null){
if (id == null) {
return new ResponseResult(CommonCode.INVALID_PARAM);
}
// 员工基本信息
@ -125,16 +132,16 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
if (Objects.equals(customer.getType(), CrmsConstant.CustomerType.PERSONAL_CUSTOMER.getType())) {
PersonalCustomerEntity personalCustomerEntity = personalCustomerDao.queryPersonalCustomerById(id);
// 封装个人类型客户信息
CustomerPersonalDTO customerPersonalDTO = this.setPersonal(customer,personalCustomerEntity);
CustomerPersonalDTO customerPersonalDTO = this.setPersonal(customer, personalCustomerEntity);
return new ResponseResult<CustomerPersonalDTO>().SUCCESS(customerPersonalDTO);
} 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);
CompanyCustomerEntity companyCustomerEntity = companyCustomerDao.selectOne(new QueryWrapper<CompanyCustomerEntity>()
.eq("customer_id",id));
.eq("customer_id", id));
// 封装企业类型客户信息
CustomerCompanyDTO customerCompanyDTO = this.setCompany(customer, companyCustomerEntity);
return new ResponseResult<CustomerCompanyDTO>().SUCCESS(customerCompanyDTO);
}else {
} else {
return new ResponseResult(CommonCode.INEXISTENCE);
}
}
@ -144,7 +151,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
*/
public ResponseResult getCustomerById(Long id) {
if (id == null){
if (id == null) {
return new ResponseResult(CommonCode.INVALID_PARAM);
}
// 员工基本信息
@ -153,9 +160,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
return new ResponseResult(CommonCode.INEXISTENCE);
}
String name = PromptSuccess.NOT_BEING;
if (customer.getManager() != null){
if (customer.getManager() != null) {
ResponseResult<EmployeeEntity> 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<CustomerDao, CustomerEntity
// 封装个人类型客户信息
CustomerPersonalVO customerPersonalVO = this.setPersonal(customer, name, personalCustomerEntity);
return new ResponseResult<CustomerPersonalVO>().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<CustomerCompanyVO>().SUCCESS(customerCompanyVO);
}else {
} else {
return new ResponseResult(CommonCode.INEXISTENCE);
}
}
@ -184,7 +191,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
*/
@Override
public List<String> 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<CustomerDao, CustomerEntity
public boolean saveCustomerPersonal(CustomerPersonalTOI customerPersonalTOI) {
CustomerEntity customerEntity = new CustomerEntity();
PersonalCustomerEntity personalCustomerEntity = new PersonalCustomerEntity();
BeanUtils.copyProperties(customerPersonalTOI,customerEntity);
BeanUtils.copyProperties(customerPersonalTOI,personalCustomerEntity);
BeanUtils.copyProperties(customerPersonalTOI, customerEntity);
BeanUtils.copyProperties(customerPersonalTOI, personalCustomerEntity);
//TODO 设置客户编号
customerEntity.setCode(((int)(Math.random()*100+1))+"");
customerEntity.setCode(((int) (Math.random() * 100 + 1)) + "");
customerEntity.setCreateTime(new Date());
customerEntity.setMotifyTime(new Date());
customerEntity.setType(CrmsConstant.CustomerType.PERSONAL_CUSTOMER.getType());
@ -232,10 +239,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
public boolean saveCustomerCompany(CustomerCompanyTOI customerCompanyTOI) {
CustomerEntity customerEntity = new CustomerEntity();
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity();
BeanUtils.copyProperties(customerCompanyTOI,customerEntity);
BeanUtils.copyProperties(customerCompanyTOI,companyCustomerEntity);
BeanUtils.copyProperties(customerCompanyTOI, customerEntity);
BeanUtils.copyProperties(customerCompanyTOI, companyCustomerEntity);
//TODO 设置客户编号
customerEntity.setCode(((int)(Math.random()*100+1))+"");
customerEntity.setCode(((int) (Math.random() * 100 + 1)) + "");
customerEntity.setCreateTime(new Date());
customerEntity.setMotifyTime(new Date());
customerEntity.setType(CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType());
@ -254,9 +261,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
public boolean updateCustomerPersonal(CustomerPersonalTOU customerPersonalTOU) {
CustomerEntity customerEntity = new CustomerEntity();
PersonalCustomerEntity personalCustomerEntity = new PersonalCustomerEntity();
BeanUtils.copyProperties(customerPersonalTOU,customerEntity);
BeanUtils.copyProperties(customerPersonalTOU,personalCustomerEntity);
if (customerEntity.getId() == null){
BeanUtils.copyProperties(customerPersonalTOU, customerEntity);
BeanUtils.copyProperties(customerPersonalTOU, personalCustomerEntity);
if (customerEntity.getId() == null) {
return false;
}
customerEntity.setMotifyTime(new Date());
@ -274,8 +281,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
public boolean updateCustomerCompany(CustomerCompanyTOU customerCompanyTOU) {
CustomerEntity customerEntity = new CustomerEntity();
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity();
BeanUtils.copyProperties(customerCompanyTOU,customerEntity);
BeanUtils.copyProperties(customerCompanyTOU,companyCustomerEntity);
BeanUtils.copyProperties(customerCompanyTOU, customerEntity);
BeanUtils.copyProperties(customerCompanyTOU, companyCustomerEntity);
customerEntity.setMotifyTime(new Date());
boolean customer = customerDao.updateCustomer(customerEntity);
companyCustomerEntity.setCustomerId(customerEntity.getId());
@ -285,30 +292,31 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
/**
* 导出数据到excel
*
* @param response 响应
*/
@Transactional
@Override
public void excelExportCustomer(HttpServletResponse response){
public void excelExportCustomer(HttpServletResponse response) {
//TODO 查询所有的客户详细信息,并按照类型封装,后续有待优化,消耗时间太长
try {
List<CustomerCompanyVO> companyList = new ArrayList<>();
List<CustomerPersonalVO> personalList = new ArrayList<>();
List<Long> 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<CustomerDao, CustomerEntity
try {
List<CompanyTemplate> companyTemplates = new ArrayList<>();
List<PersonalTemplate> 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<Object> personalList = ExcelUtil.readExcel(excel,new PersonalTemplate(), 1);
List<Object> personalList = ExcelUtil.readExcel(excel, new PersonalTemplate(), 1);
List<Object> companyList = ExcelUtil.readExcel(excel, new CompanyTemplate(), 2);
List<EmployeeVO> nameList = hrmsFeignService.listEmployeeName().getData();
CustomerPersonalTOI customerPersonalTOI;
@ -350,44 +359,44 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
for (Object personal : personalList) {
customerPersonalTOI = new CustomerPersonalTOI();
customerPersonalTOI.setType(0);
BeanUtils.copyProperties(personal,customerPersonalTOI);
BeanUtils.copyProperties(personal, customerPersonalTOI);
manager = new ManagerName();
BeanUtils.copyProperties(personal,manager);
BeanUtils.copyProperties(personal, 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())) {
customerPersonalTOI.setManager(employeeVO.getId());
}
}
if (customerPersonalTOI.getManager() == null){
return new ResponseResult<String>().SUCCESS("导入数据失败,员工"+manager.getManager()+"不存在");
if (customerPersonalTOI.getManager() == null) {
return new ResponseResult<String>().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<String>().SUCCESS("导入数据失败,员工"+manager.getManager()+"不存在");
if (customerCompanyTOI.getManager() == null) {
return new ResponseResult<String>().SUCCESS("导入数据失败,员工" + manager.getManager() + "不存在");
}
}
this.saveCustomerCompany(customerCompanyTOI);
}
return ResponseResult.SUCCESS();
}catch (Exception e){
} catch (Exception e) {
return new ResponseResult<String>().SUCCESS("导入数据失败,请检查文件和数据格式或稍后再试");
}
}
@ -410,7 +419,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
}
// 选择了自定义时间且选择了固定时间则固定时间无效
if (createTime != null && ((startTime != null && startTime.length() !=0) || (endTime != null && endTime.length() != 0))) {
if (createTime != null && ((startTime != null && startTime.length() != 0) || (endTime != null && endTime.length() != 0))) {
customerRequest.setCreateTime(null);
}
}
@ -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);
BeanUtils.copyProperties(customer, customerTO);
customerTOS.add(customerTO);
}
}
return customerTOS;
}
/**
* 封装个人类型的客户信息
*
@ -495,8 +499,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
private CustomerPersonalDTO setPersonal(CustomerEntity customer, PersonalCustomerEntity personal) {
//BeanUtils能批量封装相同字段名称和类型的属性的值
CustomerPersonalDTO personalDTO = new CustomerPersonalDTO();
BeanUtils.copyProperties(customer,personalDTO);
BeanUtils.copyProperties(personal,personalDTO);
BeanUtils.copyProperties(customer, personalDTO);
BeanUtils.copyProperties(personal, personalDTO);
return personalDTO;
}
@ -509,8 +513,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
*/
private CustomerCompanyDTO setCompany(CustomerEntity customer, CompanyCustomerEntity company) {
CustomerCompanyDTO companyDTO = new CustomerCompanyDTO();
BeanUtils.copyProperties(customer,companyDTO);
BeanUtils.copyProperties(company,companyDTO);
BeanUtils.copyProperties(customer, companyDTO);
BeanUtils.copyProperties(company, companyDTO);
return companyDTO;
}
@ -519,8 +523,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
*/
private CustomerCompanyVO setCompany(CustomerEntity customer, String name, CompanyCustomerEntity company) {
CustomerCompanyVO customerCompanyVO = new CustomerCompanyVO();
BeanUtils.copyProperties(customer,customerCompanyVO);
BeanUtils.copyProperties(company,customerCompanyVO);
BeanUtils.copyProperties(customer, customerCompanyVO);
BeanUtils.copyProperties(company, customerCompanyVO);
customerCompanyVO.setManager(name);
return customerCompanyVO;
}
@ -531,8 +535,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
private CustomerPersonalVO setPersonal(CustomerEntity customer, String name, PersonalCustomerEntity personal) {
//BeanUtils能批量封装相同字段名称和类型的属性的值
CustomerPersonalVO customerPersonalVO = new CustomerPersonalVO();
BeanUtils.copyProperties(customer,customerPersonalVO);
BeanUtils.copyProperties(personal,customerPersonalVO);
BeanUtils.copyProperties(customer, customerPersonalVO);
BeanUtils.copyProperties(personal, customerPersonalVO);
customerPersonalVO.setManager(name);
return customerPersonalVO;
}
@ -544,7 +548,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
public List<CustomerEntity> queryCompanyCodeAndName(int type) {
List<CustomerEntity>list = customerDao.queryCompanyCodeAndName(type);
List<CustomerEntity> list = customerDao.queryCompanyCodeAndName(type);
return list;
}
@ -555,10 +559,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
public boolean insertCompany(CompanyCustomerRequest companyCustomerReq) {
CustomerEntity customerEntity = new CustomerEntity();
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity();
BeanUtils.copyProperties(companyCustomerReq,customerEntity);
BeanUtils.copyProperties(companyCustomerReq,companyCustomerEntity);
BeanUtils.copyProperties(companyCustomerReq, customerEntity);
BeanUtils.copyProperties(companyCustomerReq, companyCustomerEntity);
//TODO 设置客户编号
customerEntity.setCode(((int)(Math.random()*100+1))+"");
customerEntity.setCode(((int) (Math.random() * 100 + 1)) + "");
customerEntity.setMotifyTime(new Date());
customerEntity.setCreateTime(new Date());
customerEntity.setManager(companyCustomerReq.getManager());
@ -570,7 +574,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId();
for(int i=0;i<intList.size();i++){
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
@ -579,7 +583,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
if(customer==true && company>0){
if (customer == true && company > 0) {
return true;
}
return false;
@ -592,34 +596,34 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
public boolean updateCompanyNew(CompanyCustomerRequest companyCustomerReq) {
CustomerEntity customerEntity = new CustomerEntity();
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity();
BeanUtils.copyProperties(companyCustomerReq,customerEntity);
BeanUtils.copyProperties(companyCustomerReq,companyCustomerEntity);
BeanUtils.copyProperties(companyCustomerReq, customerEntity);
BeanUtils.copyProperties(companyCustomerReq, companyCustomerEntity);
customerEntity.setMotifyTime(new Date());
customerEntity.setManager(companyCustomerReq.getManager());
boolean customer = customerDao.updateCustomer(customerEntity);
companyCustomerEntity.setCustomerId(customerEntity.getId());
int company = companyCustomerDao.update(companyCustomerEntity, new QueryWrapper<CompanyCustomerEntity>()
.eq("customer_id",companyCustomerEntity.getCustomerId()));
.eq("customer_id", companyCustomerEntity.getCustomerId()));
//根据企业id删除关联关系
crmsCustomerRelatedMapper.delete(new QueryWrapper<CrmsCustomerRelated>().eq("customer_id",companyCustomerEntity.getId()));
crmsCustomerRelatedMapper.delete(new QueryWrapper<CrmsCustomerRelated>().eq("customer_id", companyCustomerEntity.getId()));
//绑定关联关系
List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId();
for(int i=0;i<intList.size();i++){
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
if(relatedList.size()>0){
if (relatedList.size() > 0) {
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
if(customer==true && company>0){
if (customer == true && company > 0) {
return true;
}
return false;

@ -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) {
@ -80,7 +89,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
if (size <= 0) {
size = 10;
}
IPage<GuaranteeListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId,status);
IPage<GuaranteeListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size), customerNumberOrName, roleIdlist, userId, status);
return new PageUtils(positionVO);
}
@ -92,29 +101,29 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//根据业务id查询业务申请详细信息
DgApplyAmountInfoResponse dgApplyAmountInfo = dgApplyAmountInfoMapper.selectApplyAmountInfoById(guaranteeAssignUser.getBusinessId());
String measures=dgApplyAmountInfo.getEnGuaranteeMeasures();
if(measures.length()>0){
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<String> 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());
List<String>list = new ArrayList<>();
List<String> list = new ArrayList<>();
list.add(dgEnclosureInfo.getAccountingFirm());
list.add(dgEnclosureInfo.getAssessmentReport());
list.add(dgEnclosureInfo.getBusinessLicense());
@ -132,16 +141,16 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
List arr1List2 = new ArrayList<>();
for(int i=0;i<list.size();i++){
for (int i = 0; i < list.size(); i++) {
List<String> 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<String>) arr1List2.get(0));
@ -159,12 +168,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
System.out.println("附件详细=============="+dgEnclosureInfo);
System.out.println("附件详细==============" + dgEnclosureInfo);
//查询担保部经理审核的金额和期限
DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>()
.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<DgGuaranteeAss
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(investigateGuaranteeRequest.getId());
//如果是属于被驳回的数据,并且调查通过(同意)
if(guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT) && investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){
if (guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT) && investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)) {
//AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
@ -189,26 +198,26 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser);
int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",1).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED));
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",2).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED));
int sum = i+n;
int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type", 1).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED));
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type", 2).eq("status", StatusCode.SP_REJECT).eq("operating_status", StatusCode.CZ_PROCESSED));
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<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeAssignUser.getBusinessId()));
this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>()
.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<DgGuaranteeAss
this.baseMapper.updateById(dgGuaranteeAssignUser);
}
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况处理
if (investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)) {//驳回情况处理
//业务申请部分业务专员审批状态设置为驳回,操作状态设置为待处理
DgApplyAmountList dgApplyAmountList= new DgApplyAmountList();
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList();
dgApplyAmountList.setStatus(StatusCode.SP_REJECT);//状态设置为驳回
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgApplyAmountListMapper.update(dgApplyAmountList,new QueryWrapper<DgApplyAmountList>()
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",1));
dgApplyAmountListMapper.update(dgApplyAmountList, new QueryWrapper<DgApplyAmountList>()
.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<DgApplyAmountList>()
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",2));
dgApplyAmountListMapper.update(applyAmountList, new QueryWrapper<DgApplyAmountList>()
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 2));
//修改担保部调查下该业务的所有审批状态为驳回
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeAssignUser.getBusinessId()));
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", guaranteeAssignUser.getBusinessId()));
}
//判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理
int a = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int b = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",2).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int sum2 = a+b;
if(sum2==2){
int a = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type", 1).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED));
int b = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type", 2).eq("status", StatusCode.SP_IN_REVIEW).eq("operating_status", StatusCode.CZ_PROCESSED));
int sum2 = a + b;
if (sum2 == 2) {
//如果合规调查C角状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为合规调查驳回情况处理
DgComplianceInvestigation investigation = dgComplianceInvestigationMapper.selectOne(new QueryWrapper<DgComplianceInvestigation>()
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.FG_C_ID));
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("role_id", PromptSuccess.FG_C_ID));
//如果贷审会状态为驳回,并且操作状态为已处理,同时此条数据也是被驳回来的数据,则为贷审会驳回情况处理
DgLoanCommitteeConsider consider = dgLoanCommitteeConsiderMapper.selectOne(new QueryWrapper<DgLoanCommitteeConsider>()
.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<DgComplianceInvestigation>()
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.FG_JL_ID));
dgComplianceInvestigationMapper.update(dgCompliance, new QueryWrapper<DgComplianceInvestigation>()
.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<DgComplianceInvestigation>()
.eq("business_id",guaranteeAssignUser.getBusinessId()));
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)){//贷审会业务流程驳回情况处理
} 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<DgLoanCommitteeConsider>()
.eq("business_id",guaranteeAssignUser.getBusinessId()).eq("role_id",PromptSuccess.DSH_ID));
dgLoanCommitteeConsiderMapper.update(dgLoanCommittee, new QueryWrapper<DgLoanCommitteeConsider>()
.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<DgLoanCommitteeConsider>()
.eq("business_id",guaranteeAssignUser.getBusinessId()));
}
dgLoanCommitteeConsiderMapper.update(dgConsider, new QueryWrapper<DgLoanCommitteeConsider>()
.eq("business_id", guaranteeAssignUser.getBusinessId()));
}else{//正常情况处理
//修改担保业务审批状态为已审核
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", guaranteeAssignUser.getBusinessId()));
}
} else {//正常情况处理
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",3));
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeAssignUser.getBusinessId())
.eq("type", 3));
}
}
@ -312,13 +332,20 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(investigateGuaranteeRequest.getInspectionPhotos()));
//根据业务id删除对应的附件信息
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",guaranteeAssignUser.getBusinessId()));
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().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<DgGuaranteeAss
dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回
dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况
if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)) {//驳回情况
//修改担保部调查下该业务的所有审批状态为驳回
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()));
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.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<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId()));
this.baseMapper.update(assignUser, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeUser.getBusinessId()));
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",4));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>()
.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<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){
dgBusinessProcessStatusMapper.update(processStatus, new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id", processStatus.getBusinessId()));
} else if (approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType() == 3) {
//担保部经理驳回情况
//A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",1));
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.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<DgGuaranteeAssignUser>()
.eq("business_id", guaranteeUser.getBusinessId()).eq("type", 1));
this.baseMapper.update(dgAssignUser, new QueryWrapper<DgGuaranteeAssignUser>()
.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<DgGuaranteeAssignUser>()
.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<DgGuaranteeAssignUser>()
.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<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) {//担保部领导审核通过
} else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 4) {//担保部领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId()));
this.baseMapper.update(user, new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id", guaranteeUser.getBusinessId()));
//查看信息部分管领导是否审核通过
int a=dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>()
.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<DgMessageInvestigation>()
.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<DgAssetsInvestigation>()
.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<DgAssetsInvestigation>()
.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<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;
}
@Override
public Boolean excelExport(List<String> ids, HttpServletResponse response) {
//根据ids查询业务申请列表信息
List<GuaranteeListResponse>guaranteeList = this.baseMapper.selectListByIds(ids);
System.out.println("applyList==========================="+guaranteeList);
List<GuaranteeListResponse> 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<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);
}

@ -56,7 +56,7 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
@Override
public PageUtils queryPage(Integer page, Integer size, EmployeeRequest employeeRequest) {
//分页参数参数校验,后续优化为自定义选择每页条数和跳转到第几页
if (page == null || size == null){
if (page == null || size == null) {
page = 1;
size = 10;
}
@ -91,7 +91,7 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
@Transactional
@Override
public Boolean start(Long id) {
if (id == null){
if (id == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
Long userId = this.getBaseMapper().getUserId(id);
@ -108,25 +108,25 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
@Override
public Boolean stop(EmployeeDisableRequest employeeDisableRequest) {
UserEntity user = new UserEntity();
BeanUtils.copyProperties(employeeDisableRequest,user);
BeanUtils.copyProperties(employeeDisableRequest, user);
if (employeeDisableRequest.getEmployeeId() == null || user.getDisableStartTime() == null
|| user.getDisableEndTime() == null || user.getDisableCause() == null){
|| user.getDisableEndTime() == null || user.getDisableCause() == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
if (user.getDisableStartTime().getTime() >= user.getDisableEndTime().getTime()){
if (user.getDisableStartTime().getTime() >= user.getDisableEndTime().getTime()) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_DISABLE_TIME_ERROR);
}
Long userId = this.getBaseMapper().getUserId(employeeDisableRequest.getEmployeeId());
if (user.getDisableStartTime().getTime() <= (new Date()).getTime()
&& (new Date()).getTime() <= user.getDisableEndTime().getTime()){
&& (new Date()).getTime() <= user.getDisableEndTime().getTime()) {
user.setId(userId);
user.setStatus(PromptSuccess.STOP_STATUS);
return this.getBaseMapper().startOrStop(user);
}else if (user.getDisableStartTime().getTime() > (new Date()).getTime()){
} else if (user.getDisableStartTime().getTime() > (new Date()).getTime()) {
user.setId(userId);
user.setStatus(PromptSuccess.UPCOMING_STOP_STATUS);
return this.getBaseMapper().startOrStop(user);
}else {
} else {
return false;
}
}
@ -136,7 +136,7 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
*/
@Override
public UserEntity forbidInfo(Long id) {
if (id == null){
if (id == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
Long userId = this.getBaseMapper().getUserId(id);
@ -150,16 +150,16 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
@Override
public void disableDetection() {
List<UserEntity> users = this.getBaseMapper().listDisableTime();
if (users.size() != 0){
if (users.size() != 0) {
for (UserEntity user : users) {
if (user.getDisableStartTime().getTime() <= (new Date()).getTime()
&& (new Date()).getTime() <= user.getDisableEndTime().getTime()){
&& (new Date()).getTime() <= user.getDisableEndTime().getTime()) {
user.setStatus(PromptSuccess.STOP_STATUS);
this.getBaseMapper().startOrStop(user);
}else if ((new Date()).getTime() < user.getDisableStartTime().getTime()){
} else if ((new Date()).getTime() < user.getDisableStartTime().getTime()) {
user.setStatus(PromptSuccess.UPCOMING_STOP_STATUS);
this.getBaseMapper().startOrStop(user);
}else if ((new Date()).getTime() > user.getDisableEndTime().getTime()){
} else if ((new Date()).getTime() > user.getDisableEndTime().getTime()) {
user.setStatus(PromptSuccess.START_STATUS);
user.setDisableStartTime(null);
user.setDisableEndTime(null);
@ -206,9 +206,9 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
List<RolePermissionResponse> list = permissionDao.listPermissionByRoleIds(roleIds);
if (list.size() != 0) {
// 去重
Map<Long,RolePermissionResponse> map = new HashMap<>();
Map<Long, RolePermissionResponse> map = new HashMap<>();
for (RolePermissionResponse rolePermissionResponse : list) {
map.put(rolePermissionResponse.getPermissionId(),rolePermissionResponse);
map.put(rolePermissionResponse.getPermissionId(), rolePermissionResponse);
}
list.clear();
for (Long key : map.keySet()) {
@ -234,9 +234,9 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
List<RolePermissionResponse> list = permissionDao.listPermissionByRoleIds(ids);
if (list.size() != 0) {
// 去重
Map<Long,RolePermissionResponse> map = new HashMap<>();
Map<Long, RolePermissionResponse> map = new HashMap<>();
for (RolePermissionResponse rolePermissionResponse : list) {
map.put(rolePermissionResponse.getPermissionId(),rolePermissionResponse);
map.put(rolePermissionResponse.getPermissionId(), rolePermissionResponse);
}
list.clear();
for (Long key : map.keySet()) {
@ -267,43 +267,43 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
ExceptionCast.cast(HrmsCode.ROLE_NOT_NULL);
}
Long userId = this.getBaseMapper().getUserId(employeeInfoVO.getId());
if (userId == null){
if (userId == null) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_IS_NULL);
}
if (employeeInfoVO.getName().length() == 0
|| employeeInfoVO.getAccount().length() == 0
|| employeeInfoVO.getCompanyMail().length() == 0
|| employeeInfoVO.getJobNumber().length() == 0
|| employeeInfoVO.getPhone().length() == 0){
|| employeeInfoVO.getPhone().length() == 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_INFO_NOT_NULL);
}
// 工号判重,修改判重先要判断是否与原来相同
EmployeeRepetition employeeRepetition = this.getBaseMapper().getEmployeeRepetitionByEmpId(employeeInfoVO.getId());
if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getJobNumber(),employeeRepetition.getJobNumber())){
if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getJobNumber(), employeeRepetition.getJobNumber())) {
Integer numberCount = this.getBaseMapper().employeeJobNumberCount(employeeInfoVO.getJobNumber());
if (numberCount > 0){
if (numberCount > 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_EXIST);
}
}
// 账号判重
if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getAccount(),employeeRepetition.getAccount())){
if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getAccount(), employeeRepetition.getAccount())) {
Integer accountCount = this.getBaseMapper().userAccountCount(employeeInfoVO.getAccount());
if (accountCount > 0){
if (accountCount > 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_ACCOUNT_EXIST);
}
}
// 姓名判重,如果重复,自动在后面加字母"A、B、C、D、E"
if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getName(),employeeRepetition.getName())){
if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getName(), employeeRepetition.getName())) {
String name = employeeInfoVO.getName();
for (int i = 0;i < PromptSuccess.LETTERS.length;i++){
for (int i = 0; i < PromptSuccess.LETTERS.length; i++) {
Integer nameCount = this.getBaseMapper().employeeNameCount(name);
if (nameCount > 0){
if (nameCount > 0) {
name = employeeInfoVO.getName() + PromptSuccess.LETTERS[i];
}else {
} else {
employeeInfoVO.setName(name);
break;
}
if (i == PromptSuccess.LETTERS.length - 1){
if (i == PromptSuccess.LETTERS.length - 1) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_REPETITION_EXCEED);
}
}
@ -342,28 +342,28 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
|| employeeInfoVO.getAccount().length() == 0
|| employeeInfoVO.getCompanyMail().length() == 0
|| employeeInfoVO.getJobNumber().length() == 0
|| employeeInfoVO.getPhone().length() == 0){
|| employeeInfoVO.getPhone().length() == 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_INFO_NOT_NULL);
}
// 判重
Integer numberCount = this.getBaseMapper().employeeJobNumberCount(employeeInfoVO.getJobNumber());
if (numberCount > 0){
if (numberCount > 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_EXIST);
}
Integer accountCount = this.getBaseMapper().userAccountCount(employeeInfoVO.getAccount());
if (accountCount > 0){
if (accountCount > 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_ACCOUNT_EXIST);
}
String name = employeeInfoVO.getName();
for (int i = 0;i < PromptSuccess.LETTERS.length;i++){
for (int i = 0; i < PromptSuccess.LETTERS.length; i++) {
Integer nameCount = this.getBaseMapper().employeeNameCount(name);
if (nameCount > 0){
if (nameCount > 0) {
name = employeeInfoVO.getName() + PromptSuccess.LETTERS[i];
}else {
} else {
employeeInfoVO.setName(name);
break;
}
if (i == PromptSuccess.LETTERS.length - 1){
if (i == PromptSuccess.LETTERS.length - 1) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_REPETITION_EXCEED);
}
}
@ -430,7 +430,7 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
@Transactional
@Override
public Boolean excelImport(MultipartFile file) {
if (file == null || file.isEmpty()){
if (file == null || file.isEmpty()) {
ExceptionCast.cast(CrmsCode.NOT_NULL);
}
EmployeeExcelImport employeeExcelImport = new EmployeeExcelImport();
@ -461,23 +461,23 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
}
// 判重
Integer jobNumberCount = this.getBaseMapper().employeeJobNumberCount(employeeExcelImport.getJobNumber());
if (jobNumberCount > 0){
if (jobNumberCount > 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_EXIST);
}
Integer accountCount = this.getBaseMapper().userAccountCount(employeeExcelImport.getAccount());
if (accountCount > 0){
if (accountCount > 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_ACCOUNT_EXIST);
}
String name = employeeExcelImport.getName();
for (int i = 0;i < PromptSuccess.LETTERS.length;i++){
for (int i = 0; i < PromptSuccess.LETTERS.length; i++) {
Integer nameCount = this.getBaseMapper().employeeNameCount(name);
if (nameCount > 0){
if (nameCount > 0) {
name = employeeExcelImport.getName() + PromptSuccess.LETTERS[i];
}else {
} else {
employeeExcelImport.setName(name);
break;
}
if (i == PromptSuccess.LETTERS.length - 1){
if (i == PromptSuccess.LETTERS.length - 1) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_REPETITION_EXCEED);
}
}
@ -486,7 +486,7 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
user.setMotifyTime(new Date());
this.getBaseMapper().insertUser(user);
// 根据新增的user主键id新增初始密码
this.getBaseMapper().updatePassword(user.getId(),Md5Util.md5(PromptSuccess.RESET_PASSWORD+user.getId()));
this.getBaseMapper().updatePassword(user.getId(), Md5Util.md5(PromptSuccess.RESET_PASSWORD + user.getId()));
BeanUtils.copyProperties(e, employee);
employee.setUserId(user.getId());
// 此处员工姓名可能重复,所以要如下设置
@ -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
@ -599,11 +601,10 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
@Override
public boolean insertUserRole(Long userId, Long roleId) {
return this.getBaseMapper().insertUserRole(userId,roleId);
return this.getBaseMapper().insertUserRole(userId, roleId);
}
@Override
public boolean insertUsrRole(List<DgGuaranteePO> list) {
return this.getBaseMapper().insertUsrRole(list);
@ -614,14 +615,18 @@ 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;
/**
* 业务类型
*/

@ -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, "导出的数据不能为空,请选择要导出的数据!");
/**
* 操作是否成功

@ -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