摄像头申请 我的申请名字特殊处理

This commit is contained in:
wangliwen 2022-07-01 09:28:40 +08:00
parent 3cb9e083ed
commit 357ed71dbe
2 changed files with 16 additions and 11 deletions

View File

@ -145,10 +145,9 @@ public class AbilityCenterControllerV2 {
Boolean basic_facilities = Boolean basic_facilities =
dtoList.stream().map(index -> { dtoList.stream().map(index -> {
Optional<ResourceDTO> resourceDTOOptional = Optional<ResourceDTO> resourceDTOOptional =
Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId()))); // Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId()))); // 从本库内查不到 视为其它平台的基础设施资源
return !resourceDTOOptional.isPresent() || !"基础设施".equals(resourceDTOOptional.get().getType()); return !resourceDTOOptional.isPresent() || !"基础设施".equals(resourceDTOOptional.get().getType());
} }
) )
.filter(index -> !index).findAny().orElse(Boolean.TRUE); .filter(index -> !index).findAny().orElse(Boolean.TRUE);
logger.error("--------------------是否全是基础设施{}----------------------------------------------", basic_facilities); logger.error("--------------------是否全是基础设施{}----------------------------------------------", basic_facilities);
@ -156,7 +155,8 @@ public class AbilityCenterControllerV2 {
// 仿照请求接口 /act/running/startOfBusinessKey // 仿照请求接口 /act/running/startOfBusinessKey
ProcessStartDTO processStartDTO = new ProcessStartDTO(); ProcessStartDTO processStartDTO = new ProcessStartDTO();
processStartDTO.setBusinessKey(basic_facilities ? processStartDTO.setBusinessKey(basic_facilities ?
tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())) tAbilityApplicationDTOList.stream()
.filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
.map(TAbilityApplicationDTO::getResourceId) .map(TAbilityApplicationDTO::getResourceId)
.findFirst() .findFirst()
.orElse(null) .orElse(null)

View File

@ -262,14 +262,19 @@ public class ActHistoryService {
for (ProcessInstanceDTO dto : list) { for (ProcessInstanceDTO dto : list) {
List<TAbilityApplicationDTO> abilityApplicationDTO = tAbilityApplicationService.getByInstanceId(dto.getProcessInstanceId()); // 获取申请表单 List<TAbilityApplicationDTO> abilityApplicationDTO = tAbilityApplicationService.getByInstanceId(dto.getProcessInstanceId()); // 获取申请表单
if (abilityApplicationDTO != null && !abilityApplicationDTO.isEmpty()) { if (abilityApplicationDTO != null && !abilityApplicationDTO.isEmpty()) {
StringBuffer stringBuffer = new StringBuffer(); if (abilityApplicationDTO.stream().filter(index -> StringUtils.isNotEmpty(index.getCameraList())).findAny().isPresent()) { // 存在摄像头
abilityApplicationDTO.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> { dto.setName("申请摄像头列表");
stringBuffer.append(index); dto.setResourceId(null);
stringBuffer.append(","); } else {
}); StringBuffer stringBuffer = new StringBuffer();
stringBuffer.deleteCharAt(stringBuffer.length() - 1); abilityApplicationDTO.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> {
dto.setName(stringBuffer.toString()); stringBuffer.append(index);
dto.setResourceId(null); stringBuffer.append(",");
});
stringBuffer.deleteCharAt(stringBuffer.length() - 1);
dto.setName(stringBuffer.toString());
dto.setResourceId(null);
}
} else { } else {
TAbilityApplicationDTO abilityApplicationDTO1 = tAbilityApplicationService.getByBusinessKey(dto.getBusinessKey()); TAbilityApplicationDTO abilityApplicationDTO1 = tAbilityApplicationService.getByBusinessKey(dto.getBusinessKey());
if (abilityApplicationDTO1 != null) { if (abilityApplicationDTO1 != null) {