Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
1ee3c5390d
2 changed files with 7 additions and 9 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/SectionController.java
  2. +6
    -8
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/SectionController.java View File

* @param roadId * @param roadId
* @return * @return
*/ */
@GetMapping("/list/by/road/{roadId}/{deptId}")
@GetMapping("/list/by/road/dept/{roadId}/{deptId}")
public JsonResult getListByRoadIdAndDeptId(@PathVariable("roadId") String roadId, @PathVariable("deptId") String deptId) { public JsonResult getListByRoadIdAndDeptId(@PathVariable("roadId") String roadId, @PathVariable("deptId") String deptId) {
return sectionService.getListByRoadIdAndDeptId(roadId, deptId); return sectionService.getListByRoadIdAndDeptId(roadId, deptId);
} }

+ 6
- 8
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java View File

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;
} }


/** /**

Loading…
Cancel
Save