Browse Source

Pull request #14914: REPORT-135341 【fr-fbp回归】树数据集构造失败 & REPORT-135830 【fr-fbp回归】新建关联数据集,直接预览空白,保存再编辑可正常预览

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp/release to fbp/release

* commit 'e82960f9a3470b2f44c869c9c739957083920c90':
  REPORT-135341 【fr-fbp回归】树数据集构造失败 & REPORT-135830 【fr-fbp回归】新建关联数据集,直接预览空白,保存再编辑可正常预览
  REPORT-135341 【fr-fbp回归】树数据集构造失败 & REPORT-135830 【fr-fbp回归】新建关联数据集,直接预览空白,保存再编辑可正常预览
fbp/merge
Destiny.Lin-林锦龙 3 months ago
parent
commit
a3df134232
  1. 17
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

17
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -9,8 +9,10 @@ import com.fr.data.MultiResultTableData;
import com.fr.data.TableDataSource;
import com.fr.data.TableDataSourceTailor;
import com.fr.data.core.DataCoreXmlUtils;
import com.fr.data.impl.ConditionTableData;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.data.impl.NameDataModel;
import com.fr.data.impl.RecursionTableData;
import com.fr.data.impl.storeproc.ProcedureDataModel;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.data.impl.storeproc.StoreProcedureConstants;
@ -589,7 +591,7 @@ public abstract class DesignTableDataManager {
bean.setStart(rowCount);
bean.setEnd(-1);
bean.updateConvertMap(parameterMap);
if (checkBean(bean)) {
if (checkBean(bean, tabledata)) {
return (EmbeddedTableData) TableDataRepository.getInstance().previewTableData(bean).getTableData();
} else {
PreviewDataBean dataBean = new PreviewDataBean();
@ -624,9 +626,16 @@ public abstract class DesignTableDataManager {
}
}
private static boolean checkBean(PreviewSourceBean bean) {
// dataName为空说明是新建的,得用tabledata传
return !bean.getDataName().isEmpty();
private static boolean checkBean(PreviewSourceBean bean, TableData tableData) {
if (bean.getDataName().isEmpty()) {
if (tableData instanceof ConditionTableData || tableData instanceof RecursionTableData) {
bean.getDataSource().putTableData(StringUtils.EMPTY, tableData);
return true;
}
// dataName为空并且不为特殊的数据集说明是新建的,得用tabledata传
return false;
}
return true;
}
private static boolean needInputParams(boolean mustInputParameters, ParameterProvider[] parameters) {

Loading…
Cancel
Save