提交 cdf6ec50 编写于 作者: JEECG低代码平台's avatar JEECG低代码平台

解决oracle下,部门展示不出的问题

上级 1e4bde02
package org.jeecg.modules.system.util;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.model.DepartIdModel;
import org.jeecg.modules.system.model.SysDepartTreeModel;
......@@ -31,7 +32,7 @@ public class FindsDepartsChildrenUtil {
List<SysDepartTreeModel> records = new ArrayList<>();
for (int i = 0; i < recordList.size(); i++) {
SysDepart depart = recordList.get(i);
records.add(new SysDepartTreeModel(recordList.get(i)));
records.add(new SysDepartTreeModel(depart));
}
List<SysDepartTreeModel> tree = findChildren(records, idList);
setEmptyChildrenAsNull(tree);
......@@ -52,7 +53,7 @@ public class FindsDepartsChildrenUtil {
List<SysDepartTreeModel> treeList = new ArrayList<>();
for (int i = 0; i < recordList.size(); i++) {
SysDepartTreeModel branch = recordList.get(i);
if ("".equals(branch.getParentId())) {
if (oConvertUtils.isEmpty(branch.getParentId())) {
treeList.add(branch);
DepartIdModel departIdModel = new DepartIdModel().convert(branch);
idList.add(departIdModel);
......@@ -73,7 +74,7 @@ public class FindsDepartsChildrenUtil {
DepartIdModel idModel = idList.get(i);
for (int i1 = 0; i1 < recordList.size(); i1++) {
SysDepartTreeModel m = recordList.get(i1);
if (m.getParentId().equals(model.getId())) {
if (m.getParentId()!=null && m.getParentId().equals(model.getId())) {
model.getChildren().add(m);
DepartIdModel dim = new DepartIdModel().convert(m);
idModel.getChildren().add(dim);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册