From 357ed71dbe1c4f9d5fb222b06ed17e5f0fe3c8bd Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 1 Jul 2022 09:28:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=20=E6=88=91=E7=9A=84=E7=94=B3=E8=AF=B7=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AbilityCenterControllerV2.java | 6 +++--- .../activiti/service/ActHistoryService.java | 21 ++++++++++++------- 2 files changed, 16 insertions(+), 11 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 36170043..487ae938 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 @@ -145,10 +145,9 @@ public class AbilityCenterControllerV2 { Boolean basic_facilities = dtoList.stream().map(index -> { Optional resourceDTOOptional = - Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId()))); // + 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); @@ -156,7 +155,8 @@ public class AbilityCenterControllerV2 { // 仿照请求接口 /act/running/startOfBusinessKey ProcessStartDTO processStartDTO = new ProcessStartDTO(); processStartDTO.setBusinessKey(basic_facilities ? - tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())) + tAbilityApplicationDTOList.stream() + .filter(index -> StringUtils.isNotEmpty(index.getResourceId())) .map(TAbilityApplicationDTO::getResourceId) .findFirst() .orElse(null) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java index c92f638f..7a4adf75 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java @@ -262,14 +262,19 @@ public class ActHistoryService { for (ProcessInstanceDTO dto : list) { List abilityApplicationDTO = tAbilityApplicationService.getByInstanceId(dto.getProcessInstanceId()); // 获取申请表单 if (abilityApplicationDTO != null && !abilityApplicationDTO.isEmpty()) { - StringBuffer stringBuffer = new StringBuffer(); - abilityApplicationDTO.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> { - stringBuffer.append(index); - stringBuffer.append(","); - }); - stringBuffer.deleteCharAt(stringBuffer.length() - 1); - dto.setName(stringBuffer.toString()); - dto.setResourceId(null); + if (abilityApplicationDTO.stream().filter(index -> StringUtils.isNotEmpty(index.getCameraList())).findAny().isPresent()) { // 存在摄像头 + dto.setName("申请摄像头列表"); + dto.setResourceId(null); + } else { + StringBuffer stringBuffer = new StringBuffer(); + abilityApplicationDTO.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> { + stringBuffer.append(index); + stringBuffer.append(","); + }); + stringBuffer.deleteCharAt(stringBuffer.length() - 1); + dto.setName(stringBuffer.toString()); + dto.setResourceId(null); + } } else { TAbilityApplicationDTO abilityApplicationDTO1 = tAbilityApplicationService.getByBusinessKey(dto.getBusinessKey()); if (abilityApplicationDTO1 != null) {