Browse Source

#智能预警告警查询

zhongwei
yang_shj 7 months ago
parent
commit
4cf2644b02
  1. 6
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/controller/ShowAlarmController.java
  2. 5
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java

6
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/controller/ShowAlarmController.java

@ -58,9 +58,9 @@ public class ShowAlarmController extends BladeController {
@GetMapping("/alarmVideos")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "站点")
public R<List<AlarmVideoVo>> alarmVideos(@ApiParam("站点编号") @RequestParam String stationCode,
@ApiParam("设备编号") @RequestParam String deviceCode,
@ApiParam("监测点ID") @RequestParam String realId) {
public R<List<AlarmVideoVo>> alarmVideos(@ApiParam("站点编号") @RequestParam(required = false) String stationCode,
@ApiParam("设备编号") @RequestParam(required = false) String deviceCode,
@ApiParam("监测点ID") @RequestParam(required = false) String realId) {
return R.data(alarmService.alarmVideos(stationCode,deviceCode,realId));
}

5
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java

@ -458,6 +458,9 @@ public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity>
return alarmVideo;
}).collect(Collectors.toList());
}
}else{
// FIXME 查询FDP设备编号
}
}
}
@ -466,7 +469,7 @@ public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity>
if(StringUtil.isNotBlank(deviceCode)){
// 查询设备绑定视频点位
R<List<EmVideoBandingEntity>> videos = emVideoClient.getEmBandingVideos(deviceCode);
if(videos.isSuccess() && CollectionUtil.isEmpty(videos.getData())){
if(videos.isSuccess() && CollectionUtil.isNotEmpty(videos.getData())){
return videos.getData().stream().distinct().map(video->{
AlarmVideoVo alarmVideo = new AlarmVideoVo();
alarmVideo.setVideoHost(video.getVideoHost());

Loading…
Cancel
Save