Browse Source

流程:按钮控制

4.0
郑根木 2 years ago
parent
commit
2024829f86
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java

+ 4
- 3
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java View File

@@ -258,7 +258,6 @@ public class FlowInstance {
//获取当前单据活动任务列表及当前任务 //获取当前单据活动任务列表及当前任务
// act_inst = null; // act_inst = null;
List<Task> list = provider.findCurTask(procInst.getId()); List<Task> list = provider.findCurTask(procInst.getId());
listTask.addAll(list);
//当前登录用户 //当前登录用户
String sqlIn = ""; String sqlIn = "";
for (Task act : list) { for (Task act : list) {
@@ -304,6 +303,8 @@ public class FlowInstance {
actInst = provider.findTask(procInst.getTaskId()); actInst = provider.findTask(procInst.getTaskId());
} }


listTask.addAll(list);

return listTask; return listTask;
} }


@@ -401,7 +402,7 @@ public class FlowInstance {


private SwMap createButton(AbstractEnum.StrEnumBean type, boolean valid) { private SwMap createButton(AbstractEnum.StrEnumBean type, boolean valid) {
SwMap button = new SwMap(); SwMap button = new SwMap();
button.put("type", type);
button.put("type", type.value);
button.put("label", type.name); button.put("label", type.name);
button.put("valid", valid); button.put("valid", valid);
return button; return button;
@@ -434,7 +435,7 @@ public class FlowInstance {
buttons.add(createButton(FlowConst.Button.SUBMIT, canSubmit)); buttons.add(createButton(FlowConst.Button.SUBMIT, canSubmit));


boolean canReject = !isFinish && !actInst.isMake() && actInst.getStatu() < FlowConst.ActivityStatu.SUBMIT.value && actInst.getHandler() == user_id; boolean canReject = !isFinish && !actInst.isMake() && actInst.getStatu() < FlowConst.ActivityStatu.SUBMIT.value && actInst.getHandler() == user_id;
buttons.add(createButton(FlowConst.Button.SUBMIT, canReject));
buttons.add(createButton(FlowConst.Button.REJECT, canReject));
buttons.add(createButton(FlowConst.Button.INTERRUPT, canReject)); buttons.add(createButton(FlowConst.Button.INTERRUPT, canReject));


//我已提交的任务,取回(前面已经过滤掉不能取回的任务:下一任务已办理) //我已提交的任务,取回(前面已经过滤掉不能取回的任务:下一任务已办理)


Loading…
Cancel
Save