소스 검색

流程:增加selTaskId

4.0
郑根木 2 년 전
부모
커밋
be57d46d8d
6개의 변경된 파일21개의 추가작업 그리고 5개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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;
}



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