Ver código fonte

流程引擎-保存

4.0
郑根木 2 anos atrás
pai
commit
acfb4a1af5
3 arquivos alterados com 20 adições e 3 exclusões
  1. +2
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java
  2. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleLoadHandler.java
  3. +17
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleSaveHandler.java

+ 2
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java Ver arquivo

@@ -135,6 +135,7 @@ public class FlowInstance {
actInst.setId(procInst.getEntityId());
actInst.setPrcId(procDef.getEntityId());
actInst.setActId(start.getId());
actInst.setActName(start.getLabel());
actInst.setHandler(us.getUserId());
actInst.setStartTime(DateUtil.nowDateTimeLong());
actInst.setStatu(FlowConst.ActivityStatu.HANDLE.value);
@@ -643,6 +644,7 @@ public class FlowInstance {
task.setPriId(procInst.getId());
task.setPriId(procDef.getId());
task.setActId(act.getId());
task.setActName(act.getLabel());
task.setStartTime(DateUtil.nowDateTimeLong());
task.setStatu(FlowConst.ActivityStatu.WAIT.value);
task.setMake(false);


+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleLoadHandler.java Ver arquivo

@@ -57,7 +57,7 @@ public class FlowSingleLoadHandler extends LCSingleLoadHandler implements FlowLi
ret.put(cardDataset.name, data);

//加载流程信息
FlowInstance flowInstance = new FlowInstance(this, us);
flowInstance = new FlowInstance(this, us);
flowInstance.load(id, taskId);

ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));


+ 17
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleSaveHandler.java Ver arquivo

@@ -35,14 +35,14 @@ public class FlowSingleSaveHandler<T extends DefaultEntity> extends LCSingleSave
data = data.readMap("form");
if (data == null) throw new BizException("没有找到待保存的流程数据!");

FlowInstance flowInstance = new FlowInstance(this, us);
flowInstance = new FlowInstance(this, us);
if (bean.isNew()) {
flowInstance.create(form.getBillType());
} else {
flowInstance.load(id, taskId);
}
flowInstance.readFromPage(data);
flowInstance.setBillInfo(getBillCode(), getBillInfo(), getBillUrl());
return bean;
}

@@ -51,4 +51,19 @@ public class FlowSingleSaveHandler<T extends DefaultEntity> extends LCSingleSave
super.saveBean(bean);
flowInstance.save();
}

//单据编号
protected String getBillCode() {
return "";
}

//单据信息,在待办中显示
protected String getBillInfo() {
return "";
}

//单据url,待办中跳链
protected String getBillUrl() {
return "";
}
}

Carregando…
Cancelar
Salvar