组织架构监听

This commit is contained in:
zhangchenbiao
2023-06-16 18:13:23 +08:00
parent 901815d714
commit 16a4256b5a
6 changed files with 94 additions and 1 deletions

View File

@@ -250,4 +250,24 @@ public class SysDepartmentDTO {
}
return region;
}
public static RegionDO convertRegionDO(SysDepartmentDTO dept, Multimap<String, String> leaderDeptMap){
RegionDO region = new RegionDO();
region.setRegionId(dept.getId());
region.setName(dept.getName());
region.setParentId(dept.getParentId());
region.setUnclassifiedFlag(CommonConstants.ZERO);
region.setLeaderUserId(dept.getLeaderUserId());
region.setOrderNum(dept.getDepartOrder());
region.setThirdDeptId(dept.getId());
region.setCreateTime(System.currentTimeMillis());
region.setUpdateTime(System.currentTimeMillis());
region.setDeleted(Boolean.FALSE);
if(CollectionUtils.isNotEmpty(dept.getDeptManagerUseridList())){
for (String leader : dept.getDeptManagerUseridList()) {
leaderDeptMap.put(leader, dept.getId());
}
}
return region;
}
}