Przeglądaj źródła

Merge branch 'master' into fix/t120-slash-device-code

Kazerin 2 tygodni temu
rodzic
commit
4b512c1f35

+ 7 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/video/CockpitVideoService.java

@@ -41,6 +41,13 @@ public class CockpitVideoService {
         data.put("deviceName", device.getEquipmentName());
         data.put("typeCode", device.getEquipmentTypeId() == null ? null : device.getEquipmentTypeId().toString());
         data.put("bound", bound);
+        // Video-specific fields the panel shows. All come from the existing binding; no new source.
+        data.put("businessCode", binding != null && binding.getDeviceCode() != null ? binding.getDeviceCode() : device.getEquipmentCode());
+        data.put("sourceType", binding == null ? null : binding.getSourceType());
+        data.put("gbDeviceId", binding == null ? null : binding.getGbDeviceId());
+        data.put("gbChannelId", binding == null ? null : binding.getGbChannelId());
+        data.put("manufacturer", device.getManufacturer());
+        data.put("location", device.getEquipmentLocation());
         // playbackControl stays false until a real device confirms pause/speed/seek support.
         data.put("capabilities", Map.of("live", live, "records", records, "playback", records,
                 "playbackControl", false, "ptz", false, "ptzStopGuaranteed", false));