|
@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
@ -78,6 +79,8 @@ public class StaffServiceImpl implements StaffService { |
|
|
private CustomerStaffRedis customerStaffRedis; |
|
|
private CustomerStaffRedis customerStaffRedis; |
|
|
@Resource |
|
|
@Resource |
|
|
private StaffOrgRelationDao staffOrgRelationDao; |
|
|
private StaffOrgRelationDao staffOrgRelationDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private GovAccessFeignClient govAccessFeignClient; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Result<StaffsInAgencyResultDTO> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { |
|
|
public Result<StaffsInAgencyResultDTO> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { |
|
@ -190,6 +193,12 @@ public class StaffServiceImpl implements StaffService { |
|
|
} |
|
|
} |
|
|
return new Result().error(EpmetErrorCode.STAFF_EDIT_FAILED.getCode(), EpmetErrorCode.STAFF_EDIT_FAILED.getMsg()); |
|
|
return new Result().error(EpmetErrorCode.STAFF_EDIT_FAILED.getCode(), EpmetErrorCode.STAFF_EDIT_FAILED.getMsg()); |
|
|
} |
|
|
} |
|
|
|
|
|
if (CollectionUtils.isNotEmpty(fromDTO.getNewRoles())){ |
|
|
|
|
|
Result roleUserAccess = govAccessFeignClient.roleUser(new RoleUserFormDTO(fromDTO.getNewRoles(), fromDTO.getStaffId())); |
|
|
|
|
|
if (!roleUserAccess.success()){ |
|
|
|
|
|
throw new EpmetException("save data to gov-role-user failure"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
//2021.8.24 sun 人员信息编辑时删除工作人员的缓存信息
|
|
|
//2021.8.24 sun 人员信息编辑时删除工作人员的缓存信息
|
|
|
CustomerStaffRedis.delStaffInfoFormCache(fromDTO.getCustomerId(), fromDTO.getStaffId()); |
|
|
CustomerStaffRedis.delStaffInfoFormCache(fromDTO.getCustomerId(), fromDTO.getStaffId()); |
|
|
return result; |
|
|
return result; |
|
@ -578,6 +587,13 @@ public class StaffServiceImpl implements StaffService { |
|
|
staffOrgRelationEntity.setOrgType(fromDTO.getOrgType()); |
|
|
staffOrgRelationEntity.setOrgType(fromDTO.getOrgType()); |
|
|
staffOrgRelationService.insert(staffOrgRelationEntity); |
|
|
staffOrgRelationService.insert(staffOrgRelationEntity); |
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(fromDTO.getNewRoles())){ |
|
|
|
|
|
Result roleUserAccess = govAccessFeignClient.roleUser(new RoleUserFormDTO(fromDTO.getNewRoles(), customerStaffAgencyEntity.getUserId())); |
|
|
|
|
|
if (!roleUserAccess.success()){ |
|
|
|
|
|
throw new EpmetException("save data to gov-role-user failure"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return new Result(); |
|
|
return new Result(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|