|
@@ -148,6 +148,14 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept>
|
|
|
if (!ObjectUtils.isEmpty(dept)) {
|
|
if (!ObjectUtils.isEmpty(dept)) {
|
|
|
throw new SystemException("机构编号为:" + dept.getId() + " " + dept.getName() + "已被占用");
|
|
throw new SystemException("机构编号为:" + dept.getId() + " " + dept.getName() + "已被占用");
|
|
|
}
|
|
}
|
|
|
|
|
+ SysDept parentDept = baseMapper.selectById(sysDept.getParentId());
|
|
|
|
|
+
|
|
|
|
|
+ if (parentDept.getComlevel().equals("5")){
|
|
|
|
|
+ sysDept.setManagementSource(parentDept.getManagementSource());
|
|
|
|
|
+ sysDept.setComattribute(parentDept.getComattribute());
|
|
|
|
|
+ sysDept.setComtype(parentDept.getComtype());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
boolean b = save(sysDept);
|
|
boolean b = save(sysDept);
|
|
|
AssertionUtils.isSucceed(b, "删除失败");
|
|
AssertionUtils.isSucceed(b, "删除失败");
|
|
|
}
|
|
}
|