Browse Source

修改单位类型

tags/24082201
WendyYang 1 year ago
parent
commit
f347b749ea
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/user/helper/impl/MhUnitCacheImpl.java

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/user/helper/impl/MhUnitCacheImpl.java View File

@@ -69,7 +69,7 @@ public class MhUnitCacheImpl implements MhUnitCache, InitializingBean {
return null; return null;
} }
putToChildIdMap(unit.getId(), unit.getParentId()); putToChildIdMap(unit.getId(), unit.getParentId());
UnitDTO unitTmp = BeanUtil.copyProperties(unit, UnitDTO.class);
UnitDTO unitTmp = BeanUtil.copyProperties(unit, UnitDTO.class, "type");
unitTmp.setType(MhUnitTypeEnum.getByCode(unit.getType()).orElse(null)); unitTmp.setType(MhUnitTypeEnum.getByCode(unit.getType()).orElse(null));
return unitTmp; return unitTmp;
} }
@@ -89,7 +89,7 @@ public class MhUnitCacheImpl implements MhUnitCache, InitializingBean {
} }
return CollUtils.listToMap(allUnits, MhUnit::getId, w -> { return CollUtils.listToMap(allUnits, MhUnit::getId, w -> {
putToChildIdMap(w.getId(), w.getParentId()); putToChildIdMap(w.getId(), w.getParentId());
UnitDTO unit = BeanUtil.copyProperties(w, UnitDTO.class);
UnitDTO unit = BeanUtil.copyProperties(w, UnitDTO.class, "type");
unit.setType(MhUnitTypeEnum.getByCode(w.getType()).orElse(null)); unit.setType(MhUnitTypeEnum.getByCode(w.getType()).orElse(null));
return unit; return unit;
}); });


Loading…
Cancel
Save