From 273e33550020c77172826ee43db3cadf12577da6 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Tue, 6 Feb 2024 13:57:21 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E8=A7=86=E9=A2=91=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/station/service/impl/StationVideoTypeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java index 3d9dc25..858bbf7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java @@ -260,7 +260,7 @@ public class StationVideoTypeServiceImpl extends BaseServiceImpl devIndexCodes = cameras.stream().map(obj -> obj.get("encodeDevIndexCode")).map(String::valueOf).distinct().collect(Collectors.toList()); Map deviceMap = new HashMap<>(); devIndexCodes.forEach(devIndexCode -> { - String deviceName = Optional.ofNullable(hikVideoService.getDeviceSingle(devIndexCode)).map(o -> o.getString("name")).orElse(null); + String deviceName = Optional.ofNullable(hikVideoService.getDeviceSingle(devIndexCode)).map(o -> Optional.ofNullable(o.getString("name")).orElse("其他")).orElse(null); deviceMap.put(devIndexCode,deviceName); }); return cameras.stream().collect(Collectors.groupingBy(c -> deviceMap.get(c.getString("encodeDevIndexCode"))));