liusuyi
2026-05-12 59b5859e049628aaeb1b971057a7a0427f92eb16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
package com.ard.qs.service;
 
import com.ard.qs.api.domain.QsDevice;
import com.ard.qs.api.domain.QsGroup;
import com.ard.qs.api.domain.QsRegion;
import com.ard.qs.domain.*;
 
import java.util.List;
import java.util.Set;
 
/**
 * 视频监控设备Service接口
 *
 * @author fengcheng
 * @date 2026-03-27
 */
public interface IQsDeviceService {
    /**
     * 查询视频监控设备
     *
     * @param id 视频监控设备主键
     * @return 视频监控设备
     */
    public QsDevice selectQsDeviceById(Long id);
 
    /**
     * 查询视频监控设备列表
     *
     * @param qsDevice 视频监控设备
     * @return 视频监控设备集合
     */
    public List<QsDevice> selectQsDeviceList(QsDevice qsDevice);
 
    /**
     * 新增视频监控设备
     *
     * @param qsDevice 视频监控设备
     * @return 结果
     */
    public int insertQsDevice(QsDevice qsDevice);
 
    /**
     * 修改视频监控设备
     *
     * @param qsDevice 视频监控设备
     * @return 结果
     */
    public int updateQsDevice(QsDevice qsDevice);
 
    /**
     * 批量删除视频监控设备
     *
     * @param ids 需要删除的视频监控设备主键集合
     * @return 结果
     */
    public int deleteQsDeviceByIds(Long[] ids);
 
    /**
     * 删除视频监控设备信息
     *
     * @param id 视频监控设备主键
     * @return 结果
     */
    public int deleteQsDeviceById(Long id);
 
    /**
     * 状态修改
     *
     * @param qsDevice 视频监控设备
     * @return
     */
    int updateQsDeviceStatus(QsDevice qsDevice);
 
    /**
     * 更新设备在线状态
     *
     * @param onlineDeviceSet 在线设备集合
     * @param deviceStatus    设备状态
     * @return
     */
    Boolean updateQsDeviceStatusList(Set<Long> onlineDeviceSet, String deviceStatus);
 
    /**
     * 修改视频监控设备
     *
     * @param qsDevice 视频监控设备
     * @return
     */
    int editQsDevice(QsDevice qsDevice);
 
    /**
     * 更具流id获取视频监控设备
     *
     * @param stream 流id
     * @return
     */
    QsDevice getQsDeviceStream(String stream);
 
    /**
     * 修改所有设备播状态离线和设备状态离线
     */
    void updateAllQsDevicesToOffline();
 
    /**
     * 获取所有视频监控设备流地址
     *
     * @return
     */
    List<QsDevice> fetchAllQsDeviceStreamUrls();
 
    /**
     * 更新所有视频监控设备流地址
     *
     * @param newQsDeviceList
     */
    void updateAllQsDeviceStreamUrls(List<QsDevice> newQsDeviceList);
 
    /**
     * 任务
     */
    void task();
 
    /**
     * 获取计划记录对应的视频监控设备
     *
     * @param qsDevice 视频监控设备
     * @return
     */
    List<QsDevice> listPlanRecordQsDevice(QsDevice qsDevice);
 
    /**
     * 录制计划关联所有设备
     *
     * @param planId
     */
    void linkAll(Long planId);
 
    /**
     * 录制计划取消关联所有设备
     *
     * @param planId
     */
    void cleanAll(Long planId);
 
    /**
     * 设备关联录制计划
     *
     * @param deviceIds
     * @param planId
     */
    void link(List<Long> deviceIds, Long planId);
 
    /**
     * 清理设备计划id
     *
     * @param planId 设备id
     */
    void cleanRecordPlanId(Long planId);
 
    /**
     * 根据设备id集合查询设备信息
     *
     * @param startDeviceIdList 设备id集合
     * @return
     */
    List<QsDevice> queryByIds(List<Long> startDeviceIdList);
 
    /**
     * 根据计划id查询设备数量
     *
     * @param planId 设备id
     * @return
     */
    Integer countRecordPlanDevice(Long planId);
 
    /**
     * 根据行政区划编码更新设备行政区划编码
     *
     * @param oldCivilCode 旧的行政区划编码
     * @param newCivilCode 新的行政区划编码
     */
    void updateCivilCode(String oldCivilCode, String newCivilCode);
 
    /**
     * 根据行政区划编码删除设备
     *
     * @param allChildren 所有子节点
     */
    void removeCivilCode(List<QsRegion> allChildren);
 
    /**
     * 根据设备id查询设备关联的行政区划树
     *
     * @param deviceId 区域国标编号
     * @return
     */
    List<QsRegionTree> queryForRegionTreeByCivilCode(String deviceId);
 
    /**
     * 根据业务分组更新设备业务分组
     *
     * @param oldBusinessGroup
     * @param newBusinessGroup
     */
    void updateBusinessGroup(String oldBusinessGroup, String newBusinessGroup);
 
    /**
     * 根据业务分组更新设备
     *
     * @param oldParentId
     * @param newParentId
     */
    void updateParentIdGroup(String oldParentId, String newParentId);
 
    /**
     * 根据业务分组删除设备
     *
     * @param businessGroup
     */
    void removeParentIdByBusinessGroup(String businessGroup);
 
    /**
     * 根据业务分组删除设备
     *
     * @param groupList
     */
    void removeParentIdByGroupList(List<QsGroup> groupList);
 
    /**
     * 根据业务分组查询设备关联的业务分组树
     *
     * @param query
     * @param parent
     * @return
     */
    List<QsGroupTree> queryForGroupTreeByParentId(String query, String parent);
 
    /**
     * 根据行政区域获取视频监控设备列表
     *
     * @param qsDevice
     * @return
     */
    List<QsDevice> queryListByCivilCode(QsDevice qsDevice);
 
    /**
     * 根据行政区划编码添加设备
     *
     * @param civilCode
     * @param deviceIds
     */
    void addDeviceToRegion(String civilCode, List<Long> deviceIds);
 
    /**
     * 设备删除行政区划
     *
     * @param civilCode
     * @param deviceIds
     */
    void deleteDeviceToRegion(String civilCode, List<Long> deviceIds);
 
    /**
     * 存在行政区划但无法挂载的通道列表
     *
     * @param qsDevice
     * @return
     */
    List<QsDevice> queryListByCivilCodeForUnusual(QsDevice qsDevice);
 
    /**
     * 清除存在行政区划但无法挂载的设备列表
     *
     * @param all
     * @param deviceIds
     */
    void clearDeviceCivilCode(Boolean all, List<Long> deviceIds);
 
    /**
     * 获取编码列表
     *
     * @return
     */
    List<NetworkIdentificationType> getNetworkIdentificationTypeList();
 
    /**
     * 获取编码列表
     *
     * @return
     */
    List<DeviceType> getDeviceTypeList();
 
    /**
     * 获取行业编码列表
     *
     * @return
     */
    List<IndustryCodeType> getIndustryCodeList();
 
    /**
     * 获取关联业务分组通道列表
     *
     * @param qsDevice
     * @return
     */
    List<QsDevice> queryListByParentId(QsDevice qsDevice);
 
    /**
     * 设备设置业务分组
     *
     * @param parentId
     * @param businessGroup
     * @param deviceIds
     */
    void addChannelToGroup(String parentId, String businessGroup, List<Long> deviceIds);
 
    /**
     * 删除业务分组设备
     *
     * @param parentId
     * @param businessGroup
     * @param deviceIds
     */
    void deleteDeviceToGroup(String parentId, String businessGroup, List<Long> deviceIds);
 
    /**
     * 存在父节点编号但无法挂载的设备列表
     *
     * @param qsDevice
     * @return
     */
    List<QsDevice> queryListByParentForUnusual(QsDevice qsDevice);
 
    /**
     * 清除存在分组节点但无法挂载的设备列表
     *
     * @param all
     * @param deviceIds
     */
    void clearDeviceParent(Boolean all, List<Long> deviceIds);
 
    /**
     * 获取设备统计信息
     *
     * @return
     */
    DeviceStats getDeviceStatistics();
 
    /**
     * 新增视频监控设备
     *
     * @param qsDevice
     * @return
     */
    int addQsDevice(QsDevice qsDevice);
 
    /**
     * 根据 gbDeviceId 更新设备在线状态
     *
     * @param gbDeviceId   国标设备编号
     * @param deviceStatus 设备状态
     * @return
     */
    Boolean updateDeviceStatusByGbDeviceId(String gbDeviceId, String deviceStatus);
 
    /**
     * 根据 jtMobileNo 更新设备在线状态
     *
     * @param jtMobileNo   设备手机号
     * @param deviceStatus 设备状态
     * @return
     */
    Boolean updateDeviceStatusByJtMobileNo(String jtMobileNo, String deviceStatus);
 
    /**
     * 开始云台控制
     *
     * @param id        设备id
     * @param direction 方向
     * @param controlSpeed 控制速度
     */
    void startPtz(Long id, String direction, Integer controlSpeed);
 
    /**
     * 结束云台控制
     *
     * @param id        设备id
     * @param direction 方向
     * @param controlSpeed 控制速度
     */
    void endPtz(Long id, String direction, Integer controlSpeed);
 
    /**
     * 获取预置点列表
     *
     * @param id         设备id
     * @param channelId  通道id
     * @return 预置点列表
     */
    List<Preset> getPresetList(Long id, Integer channelId);
 
    /**
     * 设置预置点
     *
     * @param id         设备id
     * @param channelId  通道id
     * @param presetIndex 预置点索引
     * @param presetName 预置点名称
     */
    void setPreset(Long id, Integer channelId, Integer presetIndex, String presetName);
 
    /**
     * 调用预置点
     *
     * @param id         设备id
     * @param channelId  通道id
     * @param presetIndex 预置点索引
     * @param speed      速度
     */
    void gotoPreset(Long id, Integer channelId, Integer presetIndex, Integer speed);
 
    /**
     * 删除预置点
     *
     * @param id         设备id
     * @param channelId  通道id
     * @param presetIndex 预置点索引
     */
    void deletePreset(Long id, Integer channelId, Integer presetIndex);
 
 
    void getVideoSnapshot(Long id);
}