fix -- 修复我的流程跳转后表单内容为空,优化流程详情页面显示布局。
This commit is contained in:
@@ -11,8 +11,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工作流流程实例管理
|
||||
*
|
||||
@@ -26,29 +24,20 @@ import java.util.Map;
|
||||
@RequestMapping("/workflow/instance")
|
||||
public class WfInstanceController {
|
||||
|
||||
private final IWfInstanceService flowInstanceService;
|
||||
|
||||
@ApiOperation(value = "根据流程定义id启动流程实例")
|
||||
@PostMapping("/startBy/{procDefId}")
|
||||
public R startById(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
|
||||
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
|
||||
flowInstanceService.startProcessInstanceById(procDefId, variables);
|
||||
return R.ok("流程启动成功");
|
||||
}
|
||||
|
||||
private final IWfInstanceService instanceService;
|
||||
|
||||
@ApiOperation(value = "激活或挂起流程实例")
|
||||
@PostMapping(value = "/updateState")
|
||||
public R updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
|
||||
@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId) {
|
||||
flowInstanceService.updateState(state, instanceId);
|
||||
instanceService.updateState(state, instanceId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("结束流程实例")
|
||||
@PostMapping(value = "/stopProcessInstance")
|
||||
public R stopProcessInstance(@RequestBody WfTaskBo bo) {
|
||||
flowInstanceService.stopProcessInstance(bo);
|
||||
instanceService.stopProcessInstance(bo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@@ -56,7 +45,13 @@ public class WfInstanceController {
|
||||
@DeleteMapping(value = "/delete")
|
||||
public R delete(@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId,
|
||||
@ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) {
|
||||
flowInstanceService.delete(instanceId, deleteReason);
|
||||
instanceService.delete(instanceId, deleteReason);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询流程实例详情信息")
|
||||
@GetMapping("/detail")
|
||||
public R detail(String procInsId, String deployId) {
|
||||
return R.ok(instanceService.queryDetailProcess(procInsId, deployId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.workflow.domain.vo.WfDefinitionVo;
|
||||
import com.ruoyi.workflow.domain.vo.WfTaskVo;
|
||||
import com.ruoyi.workflow.service.IWfProcessService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -47,4 +48,10 @@ public class WfProcessController extends BaseController {
|
||||
return R.ok("流程启动成功");
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "我拥有的流程", response = WfTaskVo.class)
|
||||
@GetMapping(value = "/own")
|
||||
public TableDataInfo<WfTaskVo> ownProcess(PageQuery pageQuery) {
|
||||
return processService.queryPageOwnProcessList(pageQuery);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public class WfTaskController {
|
||||
|
||||
private final IWfTaskService flowTaskService;
|
||||
|
||||
@Deprecated
|
||||
@ApiOperation(value = "我发起的流程", response = WfTaskVo.class)
|
||||
@GetMapping(value = "/myProcess")
|
||||
public TableDataInfo<WfTaskVo> myProcess(PageQuery pageQuery) {
|
||||
@@ -62,6 +63,7 @@ public class WfTaskController {
|
||||
return flowTaskService.todoList(pageQuery);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@ApiOperation(value = "获取已办任务", response = WfTaskVo.class)
|
||||
@GetMapping(value = "/finishedList")
|
||||
public TableDataInfo<WfTaskVo> finishedList(PageQuery pageQuery) {
|
||||
|
||||
Reference in New Issue
Block a user