瀏覽代碼

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
wanjing 1 年之前
父節點
當前提交
54d552d9ca
共有 1 個檔案被更改,包括 22 行新增1 行删除
  1. +22
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/query/QuerySectionListByRoadIdAndDeptIdService.java

+ 22
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/query/QuerySectionListByRoadIdAndDeptIdService.java 查看文件

@@ -3,6 +3,7 @@ package com.tuoheng.admin.service.section.query;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.constant.SystemConstant;
import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.RoadInformation;
import com.tuoheng.admin.entity.Section;
@@ -55,7 +56,12 @@ public class QuerySectionListByRoadIdAndDeptIdService {
return result;
}
// 获取该部门公路下路段列表
List<Section> sectionList = this.getSectionList(tenantId, roadId, deptId);
List<Section> sectionList;
if (SystemConstant.ROOT_DEPT_PID.equals(deptId)) {
sectionList = this.getSectionList(tenantId, roadId);
} else {
sectionList = this.getSectionList(tenantId, roadId, deptId);
}
if (CollectionUtil.isEmpty(sectionList)) {
log.info("根据公路id获取该公路下路段信息列表业务:路段信息为空");
return JsonResult.error(QuerySectionListByRoadIdCodeEnum.SECTION_LIST_IS_NULL.getCode(), QuerySectionListByRoadIdCodeEnum.SECTION_LIST_IS_NULL.getMsg());
@@ -101,6 +107,21 @@ public class QuerySectionListByRoadIdAndDeptIdService {
*
* @param tenantId
* @param roadId
* @return
*/
private List<Section> getSectionList(String tenantId, String roadId) {
List<Section> sectionList = sectionMapper.selectList(new LambdaQueryWrapper<Section>()
.eq(Section::getTenantId, tenantId)
.eq(Section::getRoadId, roadId)
.eq(Section::getMark, 1));
return sectionList;
}

/**
* 查询该部门公路下路段信息列表
*
* @param tenantId
* @param roadId
* @param deptId
* @return
*/

Loading…
取消
儲存