摄像头申请 我的申请名字特殊处理
This commit is contained in:
parent
3cb9e083ed
commit
357ed71dbe
|
@ -145,10 +145,9 @@ public class AbilityCenterControllerV2 {
|
|||
Boolean basic_facilities =
|
||||
dtoList.stream().map(index -> {
|
||||
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());
|
||||
}
|
||||
|
||||
)
|
||||
.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)
|
||||
|
|
|
@ -262,14 +262,19 @@ public class ActHistoryService {
|
|||
for (ProcessInstanceDTO dto : list) {
|
||||
List<TAbilityApplicationDTO> 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) {
|
||||
|
|
Loading…
Reference in New Issue