Browse Source

feat:

1. 流程配置左侧单位树修改;
tags/24111801
Wendy 1 month ago
parent
commit
1781d487f5
2 changed files with 4 additions and 3 deletions
  1. +2
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/MhUnitConst.java
  2. +2
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/user/manage/MhUnitManage.java

+ 2
- 0
hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/MhUnitConst.java View File

@@ -46,6 +46,8 @@ public class MhUnitConst {


public static final String CITY_SELF = "市级部门"; public static final String CITY_SELF = "市级部门";


public static final String CITY_SELF_ALIAS = "市本级";

public static final String COUNTY_SELF = "区县部门"; public static final String COUNTY_SELF = "区县部门";


public static final List<String> UNIT_SORT = Arrays.asList("市", "上城", "拱墅", "西湖", "滨江", "萧山", "余杭", "临平", "钱塘", "富阳", "临安", "桐庐", "淳安", "建德"); public static final List<String> UNIT_SORT = Arrays.asList("市", "上城", "拱墅", "西湖", "滨江", "萧山", "余杭", "临平", "钱塘", "富阳", "临安", "桐庐", "淳安", "建德");


+ 2
- 3
hz-pm-api/src/main/java/com/hz/pm/api/user/manage/MhUnitManage.java View File

@@ -2,9 +2,7 @@ package com.hz.pm.api.user.manage;


import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -107,7 +105,7 @@ public class MhUnitManage {
List<MhUnitTreeDTO> nodes = allUnits.stream() List<MhUnitTreeDTO> nodes = allUnits.stream()
.filter(w -> MhUnitTypeEnum.SASAC.equals(w.getType()) || .filter(w -> MhUnitTypeEnum.SASAC.equals(w.getType()) ||
((MhUnitTypeEnum.REGION.equals(w.getType()) || MhUnitTypeEnum.NODE.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)) .map(w -> BeanUtil.copyProperties(w, MhUnitTreeDTO.class))
.collect(Collectors.toList()); .collect(Collectors.toList());
mhUnitOptionSort(nodes); mhUnitOptionSort(nodes);
@@ -136,6 +134,7 @@ public class MhUnitManage {
((MhUnitTypeEnum.REGION.equals(w.getType()) || MhUnitTypeEnum.NODE.equals(w.getType())) ((MhUnitTypeEnum.REGION.equals(w.getType()) || MhUnitTypeEnum.NODE.equals(w.getType()))
&& (w.getName().endsWith(UNIT_XCB) && (w.getName().endsWith(UNIT_XCB)
|| CITY_SELF.equals(w.getName()) || CITY_SELF.equals(w.getName())
|| CITY_SELF_ALIAS.equals(w.getName())
|| UNIT_HZ.equals(w.getName()) || UNIT_HZ.equals(w.getName())
|| COUNTY_SELF.equals(w.getName())))) || COUNTY_SELF.equals(w.getName()))))
.map(w -> { .map(w -> {


Loading…
Cancel
Save