Browse Source

注释无用代码

zhongwei
Jone 2 years ago
parent
commit
13cd28695c
  1. 57
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmVideoServiceImpl.java

57
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmVideoServiceImpl.java

@ -50,34 +50,35 @@ public class EmVideoServiceImpl implements IEmVideoService {
String analyseCodes = rAnalyseCode.getData().stream().collect(Collectors.joining(",")); String analyseCodes = rAnalyseCode.getData().stream().collect(Collectors.joining(","));
existModelEmEntityList = emInfoEntityList.stream().filter(emInfoEntity -> analyseCodes.contains(emInfoEntity.getNumber())).collect(Collectors.toList()); existModelEmEntityList = emInfoEntityList.stream().filter(emInfoEntity -> analyseCodes.contains(emInfoEntity.getNumber())).collect(Collectors.toList());
//获取设备对应视频列表 //获取设备对应视频列表
R<List<VideoConfig>> listR = iAnalyseInstanceClient.getVideoConfigByAnalyseCode(rAnalyseCode.getData()); //2023.04.06(wxq) 平台组反馈已不维护设备视频配置信息,将接口已删除。项目中也未找到接口的使用地方,将以下代码注释
if(listR.isSuccess()){ // R<List<VideoConfig>> listR = iAnalyseInstanceClient.getVideoConfigByAnalyseCode(rAnalyseCode.getData());
List<VideoConfig> videoConfigList = listR.getData(); // if(listR.isSuccess()){
Map<String,List<VideoConfig>> emCodeVideoConfig = videoConfigList.stream().collect(Collectors.groupingBy(VideoConfig::getAnalyzeCode)); // List<VideoConfig> videoConfigList = listR.getData();
List<EmVideoVO> emVideoVOList = new ArrayList<>(); // Map<String,List<VideoConfig>> emCodeVideoConfig = videoConfigList.stream().collect(Collectors.groupingBy(VideoConfig::getAnalyzeCode));
existModelEmEntityList.forEach(emInfoEntity -> { // List<EmVideoVO> emVideoVOList = new ArrayList<>();
EmVideoVO emVideoVO = BeanUtil.copy(emInfoEntity,EmVideoVO.class); // existModelEmEntityList.forEach(emInfoEntity -> {
emVideoVO.setChildren(Optional.ofNullable(emCodeVideoConfig).map(o -> { // EmVideoVO emVideoVO = BeanUtil.copy(emInfoEntity,EmVideoVO.class);
return o.get(emInfoEntity.getNumber()); // emVideoVO.setChildren(Optional.ofNullable(emCodeVideoConfig).map(o -> {
}).orElse(null)); // return o.get(emInfoEntity.getNumber());
emVideoVOList.add(emVideoVO); // }).orElse(null));
}); // emVideoVOList.add(emVideoVO);
Map<Long,List<EmVideoVO>> deptEmVideoMap = emVideoVOList.stream().collect(Collectors.groupingBy(EmVideoVO::getCreateDept)); // });
deptEmVideoMap.forEach((k,v) -> { // Map<Long,List<EmVideoVO>> deptEmVideoMap = emVideoVOList.stream().collect(Collectors.groupingBy(EmVideoVO::getCreateDept));
StationEmVideoVO stationEmVideoVO = new StationEmVideoVO(); // deptEmVideoMap.forEach((k,v) -> {
Dept dept = sysClient.getDept(k).getData(); // StationEmVideoVO stationEmVideoVO = new StationEmVideoVO();
if(ObjectUtil.isNotEmpty(dept) && ObjectUtil.isNotEmpty(dept.getStationId())){ // Dept dept = sysClient.getDept(k).getData();
List<StationVideoTypeEntity> stationVideoTypeEntityList = stationVideoTypeClient.listByStationId(Optional.ofNullable(dept).map(Dept::getStationId).orElse(null)); // if(ObjectUtil.isNotEmpty(dept) && ObjectUtil.isNotEmpty(dept.getStationId())){
if(CollectionUtil.isNotEmpty(stationVideoTypeEntityList)){ // List<StationVideoTypeEntity> stationVideoTypeEntityList = stationVideoTypeClient.listByStationId(Optional.ofNullable(dept).map(Dept::getStationId).orElse(null));
stationEmVideoVO.setIsHikvideo(stationVideoTypeEntityList.get(0).getIsHikvideo()); // if(CollectionUtil.isNotEmpty(stationVideoTypeEntityList)){
} // stationEmVideoVO.setIsHikvideo(stationVideoTypeEntityList.get(0).getIsHikvideo());
stationEmVideoVO.setStationId(Optional.ofNullable(dept).map(Dept::getStationId).orElse(null)); // }
stationEmVideoVO.setStationName(Optional.ofNullable(dept).map(Dept::getDeptName).orElse(null)); // stationEmVideoVO.setStationId(Optional.ofNullable(dept).map(Dept::getStationId).orElse(null));
stationEmVideoVO.setChildren(v); // stationEmVideoVO.setStationName(Optional.ofNullable(dept).map(Dept::getDeptName).orElse(null));
result.add(stationEmVideoVO); // stationEmVideoVO.setChildren(v);
} // result.add(stationEmVideoVO);
}); // }
} // });
// }
} }
} }
return result; return result;

Loading…
Cancel
Save