Browse Source

Pull request #4567: REPORT-53806【组件复用】组件生成时,数据集查询的数据集变成了内置数据集,而不是保留查询

Merge in DESIGN/design from ~KERRY/design_10.0:feature/10.0 to feature/10.0

* commit 'aa59c0a9bc6883c8b48b858dad55f211eaa982a1':
  REPORT-53806【组件复用】组件生成时,数据集查询的数据集变成了内置数据集,而不是保留查询
feature/10.0
kerry 4 years ago
parent
commit
fbbd2ca3d5
  1. 16
      designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java

16
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; 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.ExtendSharableAttrMark;
import com.fr.base.iofile.attr.SharableAttrMark; import com.fr.base.iofile.attr.SharableAttrMark;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -21,6 +22,7 @@ import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.Map; import java.util.Map;
/** /**
@ -91,10 +93,16 @@ public class ComponentCreator extends AbstractComponentCreatorProcessor {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
// //内置数据集 //内置数据集
ShareEmbeddedConverter embeddedConverter = WorkContext.getCurrent().get(ShareEmbeddedConverter.class); if (tpl != null) {
embeddedConverter.convertToEmbeddedTableData(tpl, paraMap); ShareEmbeddedConverter embeddedConverter = WorkContext.getCurrent().get(ShareEmbeddedConverter.class);
Map<String, TableData> map = embeddedConverter.convertToEmbeddedTableData(tpl, paraMap);
Iterator<Map.Entry<String, TableData>> iterator = map.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<String, TableData> entry = iterator.next();
tpl.putTableData(entry.getKey(), entry.getValue());
}
}
return tpl; return tpl;
} }

Loading…
Cancel
Save