Browse Source

修改单位类型

tags/24080901
WendyYang 9 months 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;
}
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));
return unitTmp;
}
@@ -89,7 +89,7 @@ public class MhUnitCacheImpl implements MhUnitCache, InitializingBean {
}
return CollUtils.listToMap(allUnits, MhUnit::getId, w -> {
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));
return unit;
});


Loading…
Cancel
Save