Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
yitonglei 2022-07-01 09:31:29 +08:00
commit 7c1988cde5
2 changed files with 17 additions and 6 deletions

View File

@ -144,19 +144,22 @@ public class AbilityCenterControllerV2 {
List<TAbilityApplicationDTO> dtoList = temp.get(deptId);
Boolean basic_facilities =
dtoList.stream().map(index -> {
Optional<ResourceDTO> resourceDTOOptional =
Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId())));
return !resourceDTOOptional.isPresent() || !"基础设施".equals(resourceDTOOptional.get().getType());
}
Optional<ResourceDTO> 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<Long> 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();

View File

@ -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;
}