|
|
|
@ -278,6 +278,19 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn |
|
|
|
throw new RenException("没有查询到客户根级组织,无法设置管理员:".concat(getRoleResult.toString())); |
|
|
|
} |
|
|
|
|
|
|
|
StaffRoleFormDTO staffRoleFormDTO = new StaffRoleFormDTO(); |
|
|
|
staffRoleFormDTO.setOrgId(customerRootAgencyResult.getData().getId()); |
|
|
|
staffRoleFormDTO.setRoleKey(RoleKeyConstants.ROLE_KEY_ROOT_MANAGER); |
|
|
|
Result<List<GovStaffRoleResultDTO>> managersResult = epmetUserFeignClient.getStaffsInRole(staffRoleFormDTO); |
|
|
|
if(!managersResult.success()) { |
|
|
|
log.error("查询客户根级组织的管理员失败".concat(getRoleResult.toString())); |
|
|
|
throw new RenException("查询客户根级组织的管理员失败".concat(getRoleResult.toString())); |
|
|
|
} |
|
|
|
if(null != managersResult.getData() && managersResult.getData().size() > NumConstant.ZERO) { |
|
|
|
log.error("客户已存在管理员".concat(getRoleResult.toString())); |
|
|
|
throw new RenException("客户已存在管理员".concat(getRoleResult.toString())); |
|
|
|
} |
|
|
|
|
|
|
|
StaffSubmitFromDTO staffSubmitFrom = new StaffSubmitFromDTO(); |
|
|
|
staffSubmitFrom.setCustomerId(form.getCustomerId()); |
|
|
|
staffSubmitFrom.setAgencyId(customerRootAgencyResult.getData().getId()); |
|
|
|
|