|
@@ -94,13 +94,13 @@ public class DynPageHelper { |
|
|
sqlNamedPara.sql = sql.toString() + " from (" + sqlNamedPara.sql + ") xxxxa"; |
|
|
sqlNamedPara.sql = sql.toString() + " from (" + sqlNamedPara.sql + ") xxxxa"; |
|
|
return sqlNamedPara; |
|
|
return sqlNamedPara; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static String buildSelFieldsSql(PageDataset dataSet, SqlNamedPara sqlNamedPara) { |
|
|
private static String buildSelFieldsSql(PageDataset dataSet, SqlNamedPara sqlNamedPara) { |
|
|
StringBuilder sql = new StringBuilder(512); |
|
|
StringBuilder sql = new StringBuilder(512); |
|
|
//主表 |
|
|
//主表 |
|
|
ModelTable masterTable = ModelTableCache.getInstance().get(dataSet.masterTable); |
|
|
ModelTable masterTable = ModelTableCache.getInstance().get(dataSet.masterTable); |
|
|
//非查询列表,或sql为空,则自己组装select sql |
|
|
//非查询列表,或sql为空,则自己组装select sql |
|
|
if (!SwEnum.DatasetType.LIST.equals(dataSet.type) || StringUtils.isEmpty(dataSet.sql)) { |
|
|
|
|
|
|
|
|
if (!SwEnum.DatasetType.LIST.value.equals(dataSet.type) || StringUtils.isEmpty(dataSet.sql)) { |
|
|
sql.append("select "); |
|
|
sql.append("select "); |
|
|
for (PageDatasetField field : dataSet.fields) { |
|
|
for (PageDatasetField field : dataSet.fields) { |
|
|
if (field.fieldIsCalc()) continue; |
|
|
if (field.fieldIsCalc()) continue; |
|
|