|
|
|
|
|
|
|
|
String deptId = user.getDeptId(); |
|
|
String deptId = user.getDeptId(); |
|
|
//获取公路列表 |
|
|
//获取公路列表 |
|
|
List<RoadInformation> roadInformationList = new ArrayList<>(); |
|
|
List<RoadInformation> roadInformationList = new ArrayList<>(); |
|
|
if(null == deptId){ |
|
|
|
|
|
//超级管理员 |
|
|
|
|
|
if(RoleEnum.SUPER_ADMIN.getCode()== user.getRoleId()){ |
|
|
|
|
|
roadInformationList = this.getAllRoadInformationList(tenantId); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//超级管理员 |
|
|
|
|
|
if(RoleEnum.SUPER_ADMIN.getCode()== user.getRoleId()){ |
|
|
|
|
|
roadInformationList = this.getAllRoadInformationList(tenantId); |
|
|
} |
|
|
} |
|
|
//部门管理员 |
|
|
//部门管理员 |
|
|
if(RoleEnum.ADMIN.getCode() == user.getRoleId()){ |
|
|
if(RoleEnum.ADMIN.getCode() == user.getRoleId()){ |
|
|
|
|
|
|
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
private List<RoadInformation> getAllRoadInformationList(String tenantId) { |
|
|
private List<RoadInformation> getAllRoadInformationList(String tenantId) { |
|
|
List<RoadInformation> roadList = roadInformationMapper.selectList(new LambdaQueryWrapper<RoadInformation>() |
|
|
|
|
|
|
|
|
List<RoadInformation> roadInformationList = roadInformationMapper.selectList(new LambdaQueryWrapper<RoadInformation>() |
|
|
.eq(RoadInformation::getTenantId, tenantId) |
|
|
.eq(RoadInformation::getTenantId, tenantId) |
|
|
.eq(RoadInformation::getMark, 1)); |
|
|
.eq(RoadInformation::getMark, 1)); |
|
|
if (CollectionUtil.isEmpty(roadList)) { |
|
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(roadInformationList)) { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
return roadList; |
|
|
|
|
|
|
|
|
return roadInformationList; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |