|
|
@ -191,13 +191,20 @@ public class StaffServiceImpl implements StaffService { |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param tokenDto TokenDto tokenDto, |
|
|
|
* @param fromDTO |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Result editStaff(TokenDto tokenDto, StaffSubmitFromDTO fromDTO) { |
|
|
|
public Result editStaff(StaffSubmitFromDTO fromDTO) { |
|
|
|
if(StringUtils.isBlank(fromDTO.getCustomerId())){ |
|
|
|
CustomerAgencyEntity customerAgencyEntity = customerAgencyService.selectById(fromDTO.getAgencyId()); |
|
|
|
fromDTO.setCustomerId(customerAgencyEntity.getCustomerId()); |
|
|
|
|
|
|
|
fromDTO.setApp(tokenDto.getApp()); |
|
|
|
fromDTO.setClient(tokenDto.getClient()); |
|
|
|
} |
|
|
|
// fromDTO.setApp(tokenDto.getApp());
|
|
|
|
// fromDTO.setClient(tokenDto.getClient());
|
|
|
|
Result result = epmetUserFeignClient.editStaff(fromDTO); |
|
|
|
if (!result.success()) { |
|
|
|
if (result.getCode() != EpmetErrorCode.SERVER_ERROR.getCode()) { |
|
|
@ -205,12 +212,14 @@ public class StaffServiceImpl implements StaffService { |
|
|
|
} |
|
|
|
return new Result().error(EpmetErrorCode.STAFF_EDIT_FAILED.getCode(), EpmetErrorCode.STAFF_EDIT_FAILED.getMsg()); |
|
|
|
} |
|
|
|
if (tokenDto.getClient().equals("web")){ |
|
|
|
// if (tokenDto.getClient().equals("web")){
|
|
|
|
if(CollectionUtils.isNotEmpty(fromDTO.getNewRoles())){ |
|
|
|
Result roleUserAccess = govAccessFeignClient.roleUser(new RoleUserFormDTO(fromDTO.getNewRoles(), fromDTO.getStaffId(),fromDTO.getCustomerId())); |
|
|
|
if (!roleUserAccess.success()){ |
|
|
|
throw new EpmetException("save data to gov-role-user failure"); |
|
|
|
} |
|
|
|
} |
|
|
|
// }
|
|
|
|
//2021.8.24 sun 人员信息编辑时删除工作人员的缓存信息
|
|
|
|
CustomerStaffRedis.delStaffInfoFormCache(fromDTO.getCustomerId(), fromDTO.getStaffId()); |
|
|
|
return result; |
|
|
|