|
@@ -4,20 +4,14 @@ import cc.smtweb.framework.core.common.SwConsts; |
|
|
import cc.smtweb.framework.core.common.SwEnum; |
|
|
import cc.smtweb.framework.core.common.SwEnum; |
|
|
import cc.smtweb.framework.core.common.SwMap; |
|
|
import cc.smtweb.framework.core.common.SwMap; |
|
|
import cc.smtweb.framework.core.db.DbEngine; |
|
|
import cc.smtweb.framework.core.db.DbEngine; |
|
|
import cc.smtweb.framework.core.db.EntityDao; |
|
|
|
|
|
import cc.smtweb.framework.core.db.cache.ModelTableCache; |
|
|
import cc.smtweb.framework.core.db.cache.ModelTableCache; |
|
|
import cc.smtweb.framework.core.db.impl.DefaultEntity; |
|
|
|
|
|
import cc.smtweb.framework.core.db.vo.ModelCatalog; |
|
|
|
|
|
import cc.smtweb.framework.core.db.vo.ModelField; |
|
|
import cc.smtweb.framework.core.db.vo.ModelField; |
|
|
import cc.smtweb.framework.core.db.vo.ModelTable; |
|
|
import cc.smtweb.framework.core.db.vo.ModelTable; |
|
|
import cc.smtweb.framework.core.exception.BizException; |
|
|
import cc.smtweb.framework.core.exception.BizException; |
|
|
import cc.smtweb.framework.core.mvc.service.AbstractTreeHandler; |
|
|
import cc.smtweb.framework.core.mvc.service.AbstractTreeHandler; |
|
|
import cc.smtweb.framework.core.mvc.service.SqlNamedPara; |
|
|
import cc.smtweb.framework.core.mvc.service.SqlNamedPara; |
|
|
import cc.smtweb.framework.core.mvc.service.SqlPara; |
|
|
|
|
|
import cc.smtweb.system.bpm.web.design.form.ModelForm; |
|
|
|
|
|
import cc.smtweb.system.bpm.web.design.form.define.PageDataset; |
|
|
import cc.smtweb.system.bpm.web.design.form.define.PageDataset; |
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -42,7 +36,7 @@ public class DynPageTreeHandler extends AbstractTreeHandler<SwMap> { |
|
|
ModelTable table = ModelTableCache.getInstance().get(pageDataSet.masterTable); |
|
|
ModelTable table = ModelTableCache.getInstance().get(pageDataSet.masterTable); |
|
|
if (table == null) throw new BizException("未找到数据集表定义:" + pageDataSet.masterTable); |
|
|
if (table == null) throw new BizException("未找到数据集表定义:" + pageDataSet.masterTable); |
|
|
|
|
|
|
|
|
String text = "%" + params.readString("text") + "%"; |
|
|
|
|
|
|
|
|
String text = "%" + filter.readString("text") + "%"; |
|
|
SqlNamedPara sqlPara = buildFilterSqlPara(text); |
|
|
SqlNamedPara sqlPara = buildFilterSqlPara(text); |
|
|
|
|
|
|
|
|
return DbEngine.getInstance().queryN(sqlPara.sql, sqlPara.mapParas, SwMap.class); |
|
|
return DbEngine.getInstance().queryN(sqlPara.sql, sqlPara.mapParas, SwMap.class); |
|
@@ -67,6 +61,8 @@ public class DynPageTreeHandler extends AbstractTreeHandler<SwMap> { |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
protected SqlNamedPara buildFilterSqlPara(String text) { |
|
|
protected SqlNamedPara buildFilterSqlPara(String text) { |
|
|
|
|
|
// |
|
|
|
|
|
filter.remove("parent_id"); |
|
|
return DynPageHelper.buildFilterSelectSql(pageDataSet, filter, text); |
|
|
return DynPageHelper.buildFilterSelectSql(pageDataSet, filter, text); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|