From 206f47f42ac9c679da1a4154b58d37441360f068 Mon Sep 17 00:00:00 2001
From: shizy@yisa.com <shizy@yisa.com>
Date: 星期三, 29 十二月 2021 17:53:05 +0800
Subject: [PATCH] 修复获取设备信息信令Catalog不标准问题 PTZType,级联的Longitude、Latitude、PTZType等

---
 src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java b/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
index 8d1f0c3..2e96fbe 100644
--- a/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
+++ b/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
@@ -110,14 +110,14 @@
             return result;
         }
         List<DeviceChannel> deviceChannels;
+        List<DeviceChannel> allDeviceChannelList = storager.queryChannelsByDeviceId(serial);
         if (start == null || limit ==null) {
-            deviceChannels = storager.queryChannelsByDeviceId(serial);
+            deviceChannels = allDeviceChannelList;
             result.put("ChannelCount", deviceChannels.size());
         }else {
-            start ++;
-            PageInfo pageResult = storager.queryChannelsByDeviceId(serial, null, null, null,start, limit);
-            result.put("ChannelCount", pageResult.getList().size());
-            deviceChannels = pageResult.getList();
+            deviceChannels = storager.queryChannelsByDeviceIdWithStartAndLimit(serial, null, null, null,start, limit);
+            int total = allDeviceChannelList.size();
+            result.put("ChannelCount", total);
         }
 
         JSONArray channleJSONList = new JSONArray();

--
Gitblit v1.8.0