瀏覽代碼

Merged

master
郑根木 2 年之前
父節點
當前提交
214ddf1259
共有 2 個文件被更改,包括 7 次插入4 次删除
  1. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageHelper.java
  2. +5
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java

+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageHelper.java 查看文件

@@ -94,13 +94,13 @@ public class DynPageHelper {
sqlNamedPara.sql = sql.toString() + " from (" + sqlNamedPara.sql + ") xxxxa";
return sqlNamedPara;
}
private static String buildSelFieldsSql(PageDataset dataSet, SqlNamedPara sqlNamedPara) {
StringBuilder sql = new StringBuilder(512);
//主表
ModelTable masterTable = ModelTableCache.getInstance().get(dataSet.masterTable);
//非查询列表,或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 ");
for (PageDatasetField field : dataSet.fields) {
if (field.fieldIsCalc()) continue;


+ 5
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java 查看文件

@@ -57,8 +57,11 @@ public class DynPageListHandler extends AbstractListHandler {
} else {
list = DbEngine.getInstance().queryN(sql, sp.mapParas, SwMap.class);
}
ModelTable masterTable = ModelTableCache.getInstance().get(pageDataSet.masterTable);
EntityHelper.loadBeanLink(masterTable.getName(), list, sp.mapFieldAlias);
if(pageDataSet.masterTable != 0 && pageDataSet.masterTable != -1){
ModelTable masterTable = ModelTableCache.getInstance().get(pageDataSet.masterTable);
EntityHelper.loadBeanLink(masterTable.getName(), list, sp.mapFieldAlias);
}

for (SwMap map: list) {
DynPageHelper.setCalcFields(map, pageDataSet);
}


Loading…
取消
儲存