Przeglądaj źródła

流程:增加selTaskId

4.0
郑根木 2 lat temu
rodzic
commit
be57d46d8d
6 zmienionych plików z 21 dodań i 5 usunięć
  1. +7
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcService.java
  2. +1
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java
  3. +7
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/entity/ProcInst.java
  4. +3
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleLoadHandler.java
  5. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleSaveHandler.java
  6. +2
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowTransHandler.java

+ 7
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/flow/ModelProcService.java Wyświetl plik

@@ -62,7 +62,13 @@ public class ModelProcService extends AbstractCompService {
ModelFormHelper.buildFieldInfo(table, field, col);
ret.add(col);
}

SwMap col = new SwMap();
col.put("name", "selTaskId");
col.put("dataType", SwEnum.DataType.ID.value);
col.put("title", "选中的任务id");
col.put("table", table.getId());
col.put("table_text", table.getTitle());
ret.add(col);
return R.success(ret);
}



+ 1
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java Wyświetl plik

@@ -318,6 +318,7 @@ public class FlowInstance {
* 返回页面前的设置
*/
public void setPageRetExtra(SwMap ret) {
procInst.setSelTaskId(actInst.getId());
SwMap extra = ret.computeMapIfAbsent("extra", k -> new SwMap());

List<Task> listTask = adjustTasks();


+ 7
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/entity/ProcInst.java Wyświetl plik

@@ -232,4 +232,11 @@ public class ProcInst extends DefaultEntity {
public void setUrl(String pri_url) {
put("pri_url", pri_url);
}

/**
* 当前选择的任务
*/
public void setSelTaskId(long selTaskId) {
put("selTaskId", selTaskId);
}
}

+ 3
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleLoadHandler.java Wyświetl plik

@@ -28,9 +28,10 @@ public class FlowSingleLoadHandler<T extends DefaultEntity> extends LCSingleLoad
bean.setEntityId(flowInstance.getProcInst().getId());

ret.put(cardDataset.name, DynRetBean.createBean(bean));

flowInstance.setPageRetExtra(ret);
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY));
flowInstance.setPageRetExtra(ret);
}

@Override
@@ -47,9 +48,9 @@ public class FlowSingleLoadHandler<T extends DefaultEntity> extends LCSingleLoad
//加载流程信息
flowInstance = FlowInstance.createById(us, this, id, taskId);

flowInstance.setPageRetExtra(ret);
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.create(flowInstance.loadComment(), 0)));
flowInstance.setPageRetExtra(ret);
afterLoad(ret, bean);
return R.success(ret);
}


+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleSaveHandler.java Wyświetl plik

@@ -55,9 +55,9 @@ public class FlowSingleSaveHandler<T extends DefaultEntity> extends LCSingleSave
@Override
protected void afterSave(SwMap ret, T bean) {
super.afterSave(ret, bean);
flowInstance.setPageRetExtra(ret);
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY));
flowInstance.setPageRetExtra(ret);
}

//单据编号,新增保存时调用


+ 2
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowTransHandler.java Wyświetl plik

@@ -34,9 +34,10 @@ public class FlowTransHandler<T extends DefaultEntity> extends AbstractDynPageHa
private SwMap buildRetData() {
SwMap ret = new SwMap();
ret.put(LCSingleHelper.DATASET_NAME_CARD, DynRetBean.createBean(bean));
flowInstance.setPageRetExtra(ret);
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY));
flowInstance.setPageRetExtra(ret);
return ret;
}



Ładowanie…
Anuluj
Zapisz