diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java b/designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java index f93e28426b..62570e5132 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.share.generate.task; +import com.fr.base.TableData; import com.fr.base.iofile.attr.ExtendSharableAttrMark; import com.fr.base.iofile.attr.SharableAttrMark; import com.fr.design.i18n.Toolkit; @@ -21,6 +22,7 @@ import com.fr.workspace.WorkContext; import org.jetbrains.annotations.NotNull; import java.util.HashMap; +import java.util.Iterator; import java.util.Map; /** @@ -91,10 +93,16 @@ public class ComponentCreator extends AbstractComponentCreatorProcessor { FineLoggerFactory.getLogger().error(e.getMessage(), e); } -// //内置数据集 - ShareEmbeddedConverter embeddedConverter = WorkContext.getCurrent().get(ShareEmbeddedConverter.class); - embeddedConverter.convertToEmbeddedTableData(tpl, paraMap); - + //内置数据集 + if (tpl != null) { + ShareEmbeddedConverter embeddedConverter = WorkContext.getCurrent().get(ShareEmbeddedConverter.class); + Map map = embeddedConverter.convertToEmbeddedTableData(tpl, paraMap); + Iterator> iterator = map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = iterator.next(); + tpl.putTableData(entry.getKey(), entry.getValue()); + } + } return tpl; }