Commit fd593700 by 宋祥

1.配件制造图默认不显示问题修复

parent be1b826f
...@@ -338,15 +338,15 @@ public class ServiceHGWD001D extends TreeService { ...@@ -338,15 +338,15 @@ public class ServiceHGWD001D extends TreeService {
return; return;
} }
List<String> labels = ObjectUtils.listKey(nodes, "label"); List<String> labels = ObjectUtils.listKey(nodes, "label");
Map<String, Integer> resultMap = null; Map<String, Integer> resultMap = HGWDTools.HgWd001.countByParent(labels);
if (isType) {
resultMap = HGWDTools.HgWd001.countBySource(labels);
} else {
resultMap = HGWDTools.HgWd001.countByParent(labels);
}
for (Map node : nodes) { for (Map node : nodes) {
Integer cnt = resultMap == null ? null : resultMap.get(node.get("label")); if (isType) {
node.put("leaf", cnt == null || cnt == 0 ? 1 : 0); node.put("leaf", 0);
} else {
String label = MapUtils.getString(node, "label");
Integer cnt = resultMap == null ? null : resultMap.get(label);
node.put("leaf", cnt == null || cnt == 0 ? 1 : 0);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment