|
@@ -59,7 +59,12 @@ public class IndicatorTemplateService {
|
|
TreeNode t = new TreeNode(templateName, String.valueOf(id), new ArrayList<>());
|
|
TreeNode t = new TreeNode(templateName, String.valueOf(id), new ArrayList<>());
|
|
allTree.getChildren().add(t);
|
|
allTree.getChildren().add(t);
|
|
List<IndicatorTemplateItemBo> bos = map.get(id);
|
|
List<IndicatorTemplateItemBo> bos = map.get(id);
|
|
- bos.forEach(b -> t.getChildren().add(new TreeNode(b.getIndicatorCn(), String.valueOf(b.getIndicatorId()))));
|
|
|
|
|
|
+ if (bos == null) {
|
|
|
|
+ bos = new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ bos.forEach(b -> {
|
|
|
|
+ t.getChildren().add(new TreeNode(b.getIndicatorCn(), String.valueOf(b.getIndicatorId())));
|
|
|
|
+ });
|
|
});
|
|
});
|
|
return R.ok(res);
|
|
return R.ok(res);
|
|
}
|
|
}
|