Commit e3bec2fa3be24156b5714222272c1d0d9555b937
1 parent
2c429263
【缺陷修复】BPM:流程重新发起时,禁用业务表单的情况,避免报错
Showing
2 changed files
with
4 additions
and
4 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java
| ... | ... | @@ -77,7 +77,6 @@ public class BpmProcessDefinitionController { |
| 77 | 77 | @GetMapping ("/list") |
| 78 | 78 | @Operation(summary = "获得流程定义列表") |
| 79 | 79 | @Parameter(name = "suspensionState", description = "挂起状态", required = true, example = "1") // 参见 Flowable SuspensionState 枚举 |
| 80 | - @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") | |
| 81 | 80 | public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList( |
| 82 | 81 | @RequestParam("suspensionState") Integer suspensionState) { |
| 83 | 82 | List<ProcessDefinition> list = processDefinitionService.getProcessDefinitionListBySuspensionState(suspensionState); |
| ... | ... | @@ -96,7 +95,6 @@ public class BpmProcessDefinitionController { |
| 96 | 95 | @Operation(summary = "获得流程定义") |
| 97 | 96 | @Parameter(name = "id", description = "流程编号", required = true, example = "1024") |
| 98 | 97 | @Parameter(name = "key", description = "流程定义标识", required = true, example = "1024") |
| 99 | - @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") | |
| 100 | 98 | public CommonResult<BpmProcessDefinitionRespVO> getProcessDefinition( |
| 101 | 99 | @RequestParam(value = "id", required = false) String id, |
| 102 | 100 | @RequestParam(value = "key", required = false) String key) { |
| ... | ... | @@ -105,10 +103,11 @@ public class BpmProcessDefinitionController { |
| 105 | 103 | if (processDefinition == null) { |
| 106 | 104 | return success(null); |
| 107 | 105 | } |
| 106 | + BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo(processDefinition.getId()); | |
| 108 | 107 | BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(processDefinition.getId()); |
| 109 | 108 | List<UserTask> userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); |
| 110 | 109 | return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinition( |
| 111 | - processDefinition, null, null, null, null, bpmnModel, userTaskList)); | |
| 110 | + processDefinition, null, processDefinitionInfo, null, null, bpmnModel, userTaskList)); | |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 | } | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java
| ... | ... | @@ -47,7 +47,8 @@ public interface BpmProcessInstanceConvert { |
| 47 | 47 | BpmProcessInstanceRespVO respVO = vpPageResult.getList().get(i); |
| 48 | 48 | respVO.setStatus(FlowableUtils.getProcessInstanceStatus(pageResult.getList().get(i))); |
| 49 | 49 | MapUtils.findAndThen(processDefinitionMap, respVO.getProcessDefinitionId(), |
| 50 | - processDefinition -> respVO.setCategory(processDefinition.getCategory())); | |
| 50 | + processDefinition -> respVO.setCategory(processDefinition.getCategory()) | |
| 51 | + .setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class))); | |
| 51 | 52 | MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName())); |
| 52 | 53 | respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstanceRespVO.Task.class)); |
| 53 | 54 | // user | ... | ... |