소스 검색

master
郑根木 2 년 전
부모
커밋
d52ea874fc
6개의 변경된 파일12개의 추가작업 그리고 8개의 파일을 삭제
  1. +0
    -1
      smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlNamedPara.java
  2. +1
    -0
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageHelper.java
  3. +2
    -2
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java
  4. +5
    -3
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java
  5. +2
    -2
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java
  6. +2
    -0
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynRetBean.java

+ 0
- 1
smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/mvc/service/SqlNamedPara.java 파일 보기

@@ -7,7 +7,6 @@ import java.util.Map;

//一个sql及其参数,具名参数
public class SqlNamedPara extends SqlPara {
public String sql = "";
public SwMap mapParas = new SwMap();
//字段别名
public Map<String, String> mapFieldAlias = new HashMap<>();


+ 1
- 0
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageHelper.java 파일 보기

@@ -159,6 +159,7 @@ public class DynPageHelper {
*/
private static String buildDynCondSql(PageDataset dataSet, PageDatasetDynCond dynCond, Map<String, Object> params, SwMap args, Set<String> setFixedFilter) {
if (dynCond.isCondOpt()) {//是and/or
if (dynCond.children == null || dynCond.children.isEmpty()) return "";
StringBuilder sql = new StringBuilder(256);
boolean b = false;
//递归调用


+ 2
- 2
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageListHandler.java 파일 보기

@@ -52,9 +52,9 @@ public class DynPageListHandler extends AbstractListHandler {
List<SwMap> list;
SqlNamedPara sp = (SqlNamedPara)sqlPara;
if (sqlPara.page > 0 && sqlPara.rows > 0) {
list = DbEngine.getInstance().pagedQueryN(sqlPara.sql, SwMap.class, (sqlPara.page - 1) * sqlPara.rows, sqlPara.rows, sp.mapParas);
list = DbEngine.getInstance().pagedQueryN(sql, SwMap.class, (sqlPara.page - 1) * sqlPara.rows, sqlPara.rows, sp.mapParas);
} else {
list = DbEngine.getInstance().queryN(sqlPara.sql, sp.mapParas, SwMap.class);
list = DbEngine.getInstance().queryN(sql, sp.mapParas, SwMap.class);
}
ModelTable masterTable = ModelTableCache.getInstance().get(pageDataSet.masterTable);
EntityHelper.loadBeanLink(masterTable.getName(), list, sp.mapFieldAlias);


+ 5
- 3
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java 파일 보기

@@ -30,7 +30,9 @@ public class DynPageLoadHandler extends AbstractDynPageHandler {

//列表工具类
public DynPageListHandler getListWorker(SwMap filter, PageDataset pageDataSet) {
return new DynPageListHandler(pageId, filter, pageDataSet);
DynPageListHandler listHandler = new DynPageListHandler(pageId, filter, pageDataSet);
listHandler.init(params, us);
return listHandler;
}

//新增操作,初始化定义的数据集
@@ -71,7 +73,7 @@ public class DynPageLoadHandler extends AbstractDynPageHandler {

public R loadOne() {
//过滤条件
SwMap filter = (SwMap) params.get("filter");
SwMap filter = params.readMap("filter");
//对应的数据集定义
PageDataset pageDataSet = readParamDs();

@@ -96,7 +98,7 @@ public class DynPageLoadHandler extends AbstractDynPageHandler {
//数据集
PageDataset pageDataSet = readParamDs();
//过滤条件
SwMap filter = (SwMap) params.get("filter");
SwMap filter = params.readMap("filter");

return getListWorker(filter, pageDataSet).getTotal();
}


+ 2
- 2
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java 파일 보기

@@ -36,7 +36,7 @@ public class DynPageSaveHandler extends AbstractDynPageHandler {
public R saveOne() {
//数据集
String dbName = params.readString("dataset");
SwMap filter = (SwMap) params.get("filter");
SwMap filter = params.readMap("filter");
//待保存数据
SwMap data = params.readMap("data");
if (data == null) throw new SwException("没有收到待保存的的数据:" + dbName + "!");
@@ -77,7 +77,7 @@ public class DynPageSaveHandler extends AbstractDynPageHandler {
public R saveAll() {
SwMap data = params.readMap("data");
if (data == null) throw new SwException("没有收到待保存的的数据!");
SwMap filter = (SwMap) params.get("filter");
SwMap filter = params.readMap("filter");

Map<String, DefaultEntity> map = new LinkedHashMap<>();
for (PageDataset pageDataSet : datasets.list) {


+ 2
- 0
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynRetBean.java 파일 보기

@@ -2,11 +2,13 @@ package cc.smtweb.system.bpm.web.engine.dynPage;

import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.mvc.service.SwListData;
import lombok.Data;

/**
* Created by Akmm at 2022/4/21 19:26
* 动态页面加载
*/
@Data
public class DynRetBean {
//单个表单
private SwMap form = null;


불러오는 중...
취소
저장