|
|
@@ -66,12 +66,14 @@ public class StructureServiceImpl extends BaseServiceImpl<StructureMapper, Struc |
|
|
|
} |
|
|
|
//租户id |
|
|
|
String tenantId = user.getTenantId(); |
|
|
|
query.setTenantId(tenantId); |
|
|
|
//获取用户角色 |
|
|
|
Integer roleId = user.getRoleId(); |
|
|
|
IPage<Structure> page = new Page<>(query.getPage(),query.getLimit()); |
|
|
|
IPage<StructureInfoVo> pageData = null; |
|
|
|
//如果是超级管理员,查看所有构造物 |
|
|
|
if(RoleEnum.SUPER_ADMIN.getCode() == roleId){ |
|
|
|
//query.setTenantId(tenantId); |
|
|
|
//数据分页 |
|
|
|
pageData = structureMapper.queryPage(page,query); |
|
|
|
List<StructureInfoVo> list = pageData.getRecords().stream().map((item) -> { |
|
|
@@ -117,7 +119,7 @@ public class StructureServiceImpl extends BaseServiceImpl<StructureMapper, Struc |
|
|
|
return JsonResult.error(SectionEnum.DEPT_SECTION_IS_NOT_EXIST.getCode(),SectionEnum.DEPT_SECTION_IS_NOT_EXIST.getMsg()); |
|
|
|
} |
|
|
|
//查询对应的路段列表 |
|
|
|
List<String> sectionIdList = sectionDeptList.stream().map(t -> t.getSectionId()).collect(Collectors.toList()); |
|
|
|
List<String> sectionIdList = sectionDeptList.stream().map(t -> t.getSectionId()).distinct().collect(Collectors.toList()); |
|
|
|
if (StringUtils.isEmpty(sectionIdList)) { |
|
|
|
return JsonResult.error(SectionEnum.SECTION_ID_IS_NULL.getCode(), SectionEnum.SECTION_ID_IS_NULL.getMsg()); |
|
|
|
} |