diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java index 7920ffa4..48ff3869 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java @@ -159,27 +159,41 @@ public class TAbilityApplicationController { return new Result().ok(null); } TAbilityApplicationV2DTO tAbilityApplicationV2DTO = ConvertUtils.sourceToTarget(applicationDTOS.get(0), TAbilityApplicationV2DTO.class); + applicationDTOS.stream().limit(1l).forEach(dto -> { + if (StringUtils.isNotEmpty(dto.getCameraList())) { + if (applicationDTOS.size() > 1) { + tAbilityApplicationV2DTO.setSystem("视频资源申请:(" + dto.getSystem() + " 等" + applicationDTOS.size() + "个摄像头)"); + } else { + tAbilityApplicationV2DTO.setSystem("视频资源申请:" + dto.getSystem()); + } + } + }); Map>> re = result.keySet().stream().map(index -> { final List tAbilityApplicationDTOList = result.get(index); + if (tAbilityApplicationDTOList.isEmpty()) { + return null; + } List resourceDTOS = tAbilityApplicationDTOList.stream().filter(tAbilityApplicationDTO -> StringUtils.isEmpty(tAbilityApplicationDTO.getCameraList())) // 过滤非摄像头申请 .map(tAbilityApplicationDTO -> resourceService.get(Long.valueOf(tAbilityApplicationDTO.getResourceId()))).collect(Collectors.toList()); List taskHandleDetailInfo = activitiService.getTaskHandleDetailInfo(tAbilityApplicationDTOList.get(0).getInstanceId()); List camera; ArrayList cameraList = new ArrayList(); - System.err.println(tAbilityApplicationDTOList.get(0).getInstanceId()); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("instance_id", tAbilityApplicationDTOList.get(0).getInstanceId()); List applicationEntities = tAbilityApplicationDao.selectList(queryWrapper); applicationEntities.forEach(index_ -> { + if (StringUtils.isEmpty(index_.getCameraList())) { + return; + } List channelDto1s = cameraChannelMapper.selectByChannelCode(index_.getCameraList().replaceAll("\"", "")); if (!channelDto1s.isEmpty()) { cameraList.add(channelDto1s.get(0)); } }); - System.err.println(JSON.toJSONString(cameraList)); camera = cameraList; + List finalCamera = camera; Map resourceApplication = new HashMap() { { @@ -193,7 +207,7 @@ public class TAbilityApplicationController { } }; return resourceApplication; - }).collect(Collectors.groupingBy(t -> { + }).filter(index -> index != null).collect(Collectors.groupingBy(t -> { SysDeptDTO sysDeptDTO = (SysDeptDTO) t.get("resourceOwnerDept"); if (sysDeptDTO == null) { return "未知部门"; // 无部门信息 diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationV2DTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationV2DTO.java index e782c151..6c6a1601 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationV2DTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationV2DTO.java @@ -51,6 +51,9 @@ public class TAbilityApplicationV2DTO implements Serializable { @ApiModelProperty(value = "申请单标识(同一次的申请标识)") private String applyFlag; + @ApiModelProperty(value = "审核状态:审核中,通过,不通过") + private String approveStatus; + // 以上为申请时公共信息 @ApiModelProperty(value = "资源申请情况(包含资源信息和流程流转)")