..
This commit is contained in:
@@ -80,7 +80,17 @@ public class FlowCommonController {
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("已办任务")
|
||||
public Result doneTasks(Long instanceId) {
|
||||
public Result doneTasks(Long instanceId, String bizId) {
|
||||
if (instanceId == null && StrUtil.isBlank(bizId)) {
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
if (instanceId == null) {
|
||||
ProcessInstance instance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", bizId));
|
||||
if (instance == null) {
|
||||
return Result.success(Collections.emptyList());
|
||||
}
|
||||
instanceId = instance.getId();
|
||||
}
|
||||
List<ProcessTaskVO> doneTaskVos = new ArrayList<>();
|
||||
List<ProcessTask> doneTaskList = flowEngine.processTaskService().getDoneTaskList(instanceId, null);
|
||||
for (ProcessTask doneTask : doneTaskList) {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.budwk.app.flow.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.entity.ProcessDefine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.service.ProcessDefineService;
|
||||
import com.budwk.app.flow.vo.ProcessDefineVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
@@ -45,6 +45,15 @@ public class FlowDefineController {
|
||||
public void preview(HttpServletRequest request) {
|
||||
request.setAttribute("defineId", request.getParameter("defineId"));
|
||||
request.setAttribute("instanceId", request.getParameter("instanceId"));
|
||||
|
||||
String defineKey = request.getParameter("defineKey");
|
||||
if (StrUtil.isNotBlank(defineKey)) {
|
||||
ProcessDefine define = dao.fetch(ProcessDefine.class, Cnd.where(ProcessDefine::getName, "=", defineKey).desc(ProcessDefine::getVersion));
|
||||
if (define != null) {
|
||||
request.setAttribute("defineId", define.getId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user