Commit 8d1e9cf9885a29202838edd7765aff4d5b35f2a8
Merge remote-tracking branch 'origin/feature/bpm' into feature/bpm
Showing
1 changed file
with
9 additions
and
13 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/definition/BpmModelConvert.java
| ... | ... | @@ -48,11 +48,9 @@ public interface BpmModelConvert { |
| 48 | 48 | BpmFormDO form = metaInfo != null ? formMap.get(metaInfo.getFormId()) : null; |
| 49 | 49 | BpmCategoryDO category = categoryMap.get(model.getCategory()); |
| 50 | 50 | Deployment deployment = model.getDeploymentId() != null ? deploymentMap.get(model.getDeploymentId()) : null; |
| 51 | - ProcessDefinition processDefinition = model.getDeploymentId() != null | |
| 52 | - ? processDefinitionMap.get(model.getDeploymentId()) | |
| 53 | - : null; | |
| 54 | - List<AdminUserRespDTO> startUsers = metaInfo != null ? convertList(metaInfo.getStartUserIds(), userMap::get) | |
| 55 | - : null; | |
| 51 | + ProcessDefinition processDefinition = model.getDeploymentId() != null ? | |
| 52 | + processDefinitionMap.get(model.getDeploymentId()) : null; | |
| 53 | + List<AdminUserRespDTO> startUsers = metaInfo != null ? convertList(metaInfo.getStartUserIds(), userMap::get) : null; | |
| 56 | 54 | return buildModel0(model, metaInfo, form, category, deployment, processDefinition, startUsers); |
| 57 | 55 | }); |
| 58 | 56 | // 排序 |
| ... | ... | @@ -60,8 +58,7 @@ public interface BpmModelConvert { |
| 60 | 58 | return result; |
| 61 | 59 | } |
| 62 | 60 | |
| 63 | - default BpmModelRespVO buildModel(Model model, | |
| 64 | - byte[] bpmnBytes) { | |
| 61 | + default BpmModelRespVO buildModel(Model model, byte[] bpmnBytes) { | |
| 65 | 62 | BpmModelMetaInfoVO metaInfo = parseMetaInfo(model); |
| 66 | 63 | BpmModelRespVO modelVO = buildModel0(model, metaInfo, null, null, null, null, null); |
| 67 | 64 | if (ArrayUtil.isNotEmpty(bpmnBytes)) { |
| ... | ... | @@ -71,9 +68,9 @@ public interface BpmModelConvert { |
| 71 | 68 | } |
| 72 | 69 | |
| 73 | 70 | default BpmModelRespVO buildModel0(Model model, |
| 74 | - BpmModelMetaInfoVO metaInfo, BpmFormDO form, BpmCategoryDO category, | |
| 75 | - Deployment deployment, ProcessDefinition processDefinition, | |
| 76 | - List<AdminUserRespDTO> startUsers) { | |
| 71 | + BpmModelMetaInfoVO metaInfo, BpmFormDO form, BpmCategoryDO category, | |
| 72 | + Deployment deployment, ProcessDefinition processDefinition, | |
| 73 | + List<AdminUserRespDTO> startUsers) { | |
| 77 | 74 | BpmModelRespVO modelRespVO = new BpmModelRespVO().setId(model.getId()).setName(model.getName()) |
| 78 | 75 | .setKey(model.getKey()).setCategory(model.getCategory()) |
| 79 | 76 | .setCreateTime(DateUtils.of(model.getCreateTime())); |
| ... | ... | @@ -89,9 +86,8 @@ public interface BpmModelConvert { |
| 89 | 86 | // ProcessDefinition |
| 90 | 87 | if (processDefinition != null) { |
| 91 | 88 | modelRespVO.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class)); |
| 92 | - modelRespVO.getProcessDefinition() | |
| 93 | - .setSuspensionState(processDefinition.isSuspended() ? SuspensionState.SUSPENDED.getStateCode() | |
| 94 | - : SuspensionState.ACTIVE.getStateCode()); | |
| 89 | + modelRespVO.getProcessDefinition().setSuspensionState(processDefinition.isSuspended() ? | |
| 90 | + SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode()); | |
| 95 | 91 | if (deployment != null) { |
| 96 | 92 | modelRespVO.getProcessDefinition().setDeploymentTime(DateUtils.of(deployment.getDeploymentTime())); |
| 97 | 93 | } | ... | ... |