Browse Source

/org/staffdetailv2人员详情修改返回数字社区角色名称列表。

master
yinzuomei 3 years ago
parent
commit
eb891e052e
  1. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java
  2. 16
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

4
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java

@ -42,5 +42,9 @@ public class StaffDetailV2FormDTO implements Serializable {
private String orgType = ""; private String orgType = "";
//职责名称列表 //职责名称列表
private List<String> roles; private List<String> roles;
/**
* 数字社区里的角色名称
*/
private List<String> szsqRoles;
} }

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

@ -11,6 +11,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.BadgeConstant; import com.epmet.constant.BadgeConstant;
import com.epmet.constant.OrgInfoConstant; import com.epmet.constant.OrgInfoConstant;
import com.epmet.dataaggre.constant.DataSourceConstant; import com.epmet.dataaggre.constant.DataSourceConstant;
@ -42,7 +43,10 @@ import com.epmet.dataaggre.service.govproject.GovProjectService;
import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService; import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService;
import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.UserBaseInfoDTO; import com.epmet.dto.UserBaseInfoDTO;
import com.epmet.dto.form.GetStaffExistRoleFormDTO;
import com.epmet.dto.result.NewUserRoleResultDTO;
import com.epmet.dto.result.StaffRoleResultDTO; import com.epmet.dto.result.StaffRoleResultDTO;
import com.epmet.feign.GovAccessFeignClient;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -98,6 +102,8 @@ public class EpmetUserServiceImpl implements EpmetUserService {
private IcPointVaccinesInoculationDao pointVaccinesInoculationDao; private IcPointVaccinesInoculationDao pointVaccinesInoculationDao;
@Resource @Resource
private IcPointNucleicMonitoringDao pointNucleicMonitoringDao; private IcPointNucleicMonitoringDao pointNucleicMonitoringDao;
@Autowired
private GovAccessFeignClient govAccessFeignClient;
/** /**
* @Description 根据UserIds查询 * @Description 根据UserIds查询
@ -724,7 +730,15 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setName(dto.getRealName()); result.setName(dto.getRealName());
result.setGender(dto.getGender().toString()); result.setGender(dto.getGender().toString());
result.setRoles(list); result.setRoles(list);
// 获取数字社区里的新角色
GetStaffExistRoleFormDTO getStaffExistRoleFormDTO = new GetStaffExistRoleFormDTO();
getStaffExistRoleFormDTO.setStaffId(staffId);
getStaffExistRoleFormDTO.setCustomerId(dto.getCustomerId());
Result<List<NewUserRoleResultDTO>> staffExistRole = govAccessFeignClient.getStaffExistRole(getStaffExistRoleFormDTO);
if (staffExistRole.success()&&CollectionUtils.isNotEmpty(staffExistRole.getData())){
List<String> szsqRoles=staffExistRole.getData().stream().map(m -> m.getRoleName()).distinct().collect(Collectors.toList());
result.setSzsqRoles(szsqRoles);
}
return result; return result;
} }

Loading…
Cancel
Save