From 3cb9e083ed994fc692674a3fd7329dbb30f13fd5 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 1 Jul 2022 08:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=BE=85=E5=8A=9E=20?= =?UTF-8?q?=E6=89=80=E6=9C=89=E7=B1=BB=E5=9E=8B=E9=83=BD=E4=B8=BA=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E6=97=B6=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AbilityCenterControllerV2.java | 15 +++++++++------ .../modules/activiti/service/ActTaskService.java | 8 ++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java index 6457b011..36170043 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java @@ -144,19 +144,22 @@ public class AbilityCenterControllerV2 { List dtoList = temp.get(deptId); Boolean basic_facilities = dtoList.stream().map(index -> { - Optional resourceDTOOptional = - Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId()))); - return !resourceDTOOptional.isPresent() || !"基础设施".equals(resourceDTOOptional.get().getType()); - } + Optional resourceDTOOptional = + Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId()))); // + return !resourceDTOOptional.isPresent() || !"基础设施".equals(resourceDTOOptional.get().getType()); + } - ) + ) .filter(index -> !index).findAny().orElse(Boolean.TRUE); logger.error("--------------------是否全是基础设施{}----------------------------------------------", basic_facilities); final List ids = dtoList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()); // 发起申请的表单id // 仿照请求接口 /act/running/startOfBusinessKey ProcessStartDTO processStartDTO = new ProcessStartDTO(); processStartDTO.setBusinessKey(basic_facilities ? - tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())).map(TAbilityApplicationDTO::getResourceId).findFirst().orElse(null) + tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())) + .map(TAbilityApplicationDTO::getResourceId) + .findFirst() + .orElse(null) : JSON.toJSONString(ids)); // 申请的id列表 json字符 做businesskey processStartDTO.setProcessDefinitionKey(key); //限定 AuditingBaseDTO auditingBaseDTO = new AuditingBaseDTO(); diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java index bb557e18..9a4ada39 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java @@ -246,6 +246,14 @@ public class ActTaskService extends BaseServiceImpl { listDto.add(dto); continue; } + + /** + * 所有类型都没获取到 + */ + processVariable.putAll(task.getProcessVariables()); + dto.setParams(processVariable); + listDto.add(dto); + } return listDto; }