Browse Source

工作人员缓存增加pid,orgIdPath

dev
yinzuomei 2 years ago
parent
commit
208d516403
  1. 9
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/CustomerStaffInfoCacheResult.java
  2. 9
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/CustomerStaffInfoCache.java
  3. 9
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/CustomerStaffResultDTO.java
  4. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
  5. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

9
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/CustomerStaffInfoCacheResult.java

@ -22,6 +22,15 @@ public class CustomerStaffInfoCacheResult implements Serializable {
*/ */
private String agencyId; private String agencyId;
/**
* agencyId的上级
*/
private String pid;
/**
* 工作人员所属组织的org_id_path
*/
private String orgIdPath;
/** /**
* 工作人员所属组织ID的pids * 工作人员所属组织ID的pids
*/ */

9
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/CustomerStaffInfoCache.java

@ -21,7 +21,14 @@ public class CustomerStaffInfoCache implements Serializable {
* 工作人员所属组织ID * 工作人员所属组织ID
*/ */
private String agencyId; private String agencyId;
/**
* agencyId的上级
*/
private String pid;
/**
* 工作人员所属组织的org_id_path
*/
private String orgIdPath;
/** /**
* 工作人员所属组织ID的pids * 工作人员所属组织ID的pids
*/ */

9
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/CustomerStaffResultDTO.java

@ -20,7 +20,14 @@ public class CustomerStaffResultDTO implements Serializable {
* 工作人员所属组织ID * 工作人员所属组织ID
*/ */
private String agencyId; private String agencyId;
/**
* agencyId的上级
*/
private String pid;
/**
* 工作人员所属组织的org_id_path
*/
private String orgIdPath;
/** /**
* 工作人员所属组织ID的pids * 工作人员所属组织ID的pids
*/ */

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java

@ -268,7 +268,7 @@ public class EpmetUserController {
* remark: * remark:
*/ */
@PostMapping("getStaffInfo/{staffId}") @PostMapping("getStaffInfo/{staffId}")
public Result getStaffInfo(@PathVariable(name = "staffId") String staffId){ public Result<CustomerStaffResultDTO> getStaffInfo(@PathVariable(name = "staffId") String staffId){
return new Result<CustomerStaffResultDTO>().ok(epmetUserService.getStaffInfo(staffId)); return new Result<CustomerStaffResultDTO>().ok(epmetUserService.getStaffInfo(staffId));
} }

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -18,10 +18,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; import com.epmet.commons.tools.redis.common.bean.HouseInfoCache;
import com.epmet.commons.tools.redis.common.bean.IcResiUserInfoCache; import com.epmet.commons.tools.redis.common.bean.IcResiUserInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.IpUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.BadgeConstant; import com.epmet.constant.BadgeConstant;
import com.epmet.constant.NeighborhoodConstant; import com.epmet.constant.NeighborhoodConstant;
import com.epmet.constant.OrgInfoConstant; import com.epmet.constant.OrgInfoConstant;
@ -650,6 +647,9 @@ public class EpmetUserServiceImpl implements EpmetUserService {
} }
result.setStaffId(staffEntity.getUserId()); result.setStaffId(staffEntity.getUserId());
result.setAgencyId(agencyDTO.getId()); result.setAgencyId(agencyDTO.getId());
//新增pid,orgIdPath
result.setPid(agencyDTO.getPid());
result.setOrgIdPath(PidUtils.convertPid2OrgIdPath(agencyDTO.getId(),agencyDTO.getPids()));
result.setAgencyName(agencyDTO.getOrganizationName()); result.setAgencyName(agencyDTO.getOrganizationName());
result.setAgencyPIds(agencyDTO.getPids()); result.setAgencyPIds(agencyDTO.getPids());
result.setLevel(agencyDTO.getLevel()); result.setLevel(agencyDTO.getLevel());

Loading…
Cancel
Save