|
|
@ -706,6 +706,10 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us |
|
|
|
} |
|
|
|
result.setEpmetUserId(baseInfo.getId()); |
|
|
|
// 新增网格关系 先查询有没有网格关系
|
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(formDTO.getGridId()); |
|
|
|
if (null == gridInfo) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取网格失败", "获取网格失败"); |
|
|
|
} |
|
|
|
LambdaQueryWrapper<RegisterRelationEntity> registerWrapper = new LambdaQueryWrapper<>(); |
|
|
|
registerWrapper.eq(RegisterRelationEntity::getCustomerId, formDTO.getCustomerId()); |
|
|
|
registerWrapper.eq(RegisterRelationEntity::getUserId, baseInfo.getUserId()); |
|
|
@ -717,10 +721,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us |
|
|
|
registerRelation.setCustomerId(formDTO.getCustomerId()); |
|
|
|
registerRelation.setGridId(formDTO.getGridId()); |
|
|
|
//表中新增字段 为其赋值
|
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(formDTO.getGridId()); |
|
|
|
if (null == gridInfo) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取网格缓存失败", "获取网格缓存失败"); |
|
|
|
} |
|
|
|
|
|
|
|
registerRelation.setAgencyId(gridInfo.getPid()); |
|
|
|
registerRelation.setAgencyIdPath(gridInfo.getPids()); |
|
|
|
registerRelation.setUserId(baseInfo.getUserId()); |
|
|
|