Browse Source

feat(video): 驾驶舱视频设备接口补充监控详情字段

按维护者要求,/video/device 增补 businessCode、accessType、gbDeviceId、
gbChannelId、manufacturer、location,供监控面板展示设备名称、业务设备编码、
接入方式、国标设备/通道、安装位置与厂商。字段全部取自既有绑定与设备档案,
不新增数据源,不改鉴权与其它接口。

zksy-system 编译通过;按 AGENTS.md 跳过构建/服务验证。
Kazerin 2 weeks ago
parent
commit
1fd151abfc

+ 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("deviceName", device.getEquipmentName());
         data.put("typeCode", device.getEquipmentTypeId() == null ? null : device.getEquipmentTypeId().toString());
         data.put("typeCode", device.getEquipmentTypeId() == null ? null : device.getEquipmentTypeId().toString());
         data.put("bound", bound);
         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("accessType", 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.
         // playbackControl stays false until a real device confirms pause/speed/seek support.
         data.put("capabilities", Map.of("live", live, "records", records, "playback", records,
         data.put("capabilities", Map.of("live", live, "records", records, "playback", records,
                 "playbackControl", false, "ptz", false, "ptzStopGuaranteed", false));
                 "playbackControl", false, "ptz", false, "ptzStopGuaranteed", false));