diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/MhUnitConst.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/MhUnitConst.java index 006b741..6680a66 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/MhUnitConst.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/MhUnitConst.java @@ -46,6 +46,8 @@ public class MhUnitConst { public static final String CITY_SELF = "市级部门"; + public static final String CITY_SELF_ALIAS = "市本级"; + public static final String COUNTY_SELF = "区县部门"; public static final List UNIT_SORT = Arrays.asList("市", "上城", "拱墅", "西湖", "滨江", "萧山", "余杭", "临平", "钱塘", "富阳", "临安", "桐庐", "淳安", "建德"); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/MhUnitManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/MhUnitManage.java index 93f214d..cc51b6b 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/MhUnitManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/MhUnitManage.java @@ -2,9 +2,7 @@ package com.hz.pm.api.user.manage; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.collection.ListUtil; import cn.hutool.core.text.CharSequenceUtil; -import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -107,7 +105,7 @@ public class MhUnitManage { List nodes = allUnits.stream() .filter(w -> MhUnitTypeEnum.SASAC.equals(w.getType()) || ((MhUnitTypeEnum.REGION.equals(w.getType()) || MhUnitTypeEnum.NODE.equals(w.getType())) - && w.getName().endsWith(MhUnitConst.UNIT_XCB))) + && (w.getName().endsWith(MhUnitConst.UNIT_XCB) || UNIT_HZ.equals(w.getName())))) .map(w -> BeanUtil.copyProperties(w, MhUnitTreeDTO.class)) .collect(Collectors.toList()); mhUnitOptionSort(nodes); @@ -136,6 +134,7 @@ public class MhUnitManage { ((MhUnitTypeEnum.REGION.equals(w.getType()) || MhUnitTypeEnum.NODE.equals(w.getType())) && (w.getName().endsWith(UNIT_XCB) || CITY_SELF.equals(w.getName()) + || CITY_SELF_ALIAS.equals(w.getName()) || UNIT_HZ.equals(w.getName()) || COUNTY_SELF.equals(w.getName())))) .map(w -> {