Browse Source

fix:告警添加查询绑定视频列表接口

zhongwei
haungxing 7 months ago
parent
commit
39ebdc0021
  1. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmVideoClient.java
  2. 3
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java

2
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmVideoClient.java

@ -29,7 +29,7 @@ public class EmVideoClient implements IEmVideoClient{
@Override
@GetMapping(GET_EM_BANDING_VIDEOS)
public R<List<EmVideoBandingEntity>> getEmBandingVideos(@RequestParam String emCodes) {
LambdaQueryWrapper<EmVideoBandingEntity> wrapper = Wrappers.<EmVideoBandingEntity>lambdaQuery().in(EmVideoBandingEntity::getEmCode, Func.toLongList(",",emCodes));
LambdaQueryWrapper<EmVideoBandingEntity> wrapper = Wrappers.<EmVideoBandingEntity>lambdaQuery().in(EmVideoBandingEntity::getEmCode, Func.toStrList(",",emCodes));
return R.data(emVideoBandingService.list(wrapper));
}

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

@ -248,6 +248,9 @@ public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity>
.filter(em -> this.isRealIdBanding(realId, em.getNumber()))
.map(EmInfoEntity::getNumber)
.collect(Collectors.joining(","));
Assert.isTrue(StringUtil.isNotBlank(emCodes) && Func.isNotEmpty(emCodes), () -> {
throw new ServiceException("未获取到设备!");
});
R<List<EmVideoBandingEntity>> videoListR = emVideoClient.getEmBandingVideos(emCodes);
Assert.isTrue(videoListR.isSuccess(), () -> {
throw new ServiceException("获取设备绑定视频列表失败!");

Loading…
Cancel
Save