liusuyi
2026-05-30 f4f4fc53260eb67483dce406a963628273786a61
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
package com.ard.work.device.camera.service;
 
import com.ard.common.core.web.domain.AjaxResult;
import com.ard.common.security.utils.SecurityUtils;
import com.ard.work.api.domian.ArdCamera;
import com.ard.work.api.domian.ArdChannel;
import com.ard.work.api.domian.CameraCmd;
import com.ard.work.device.camera.domain.CameraFilterDTO;
import com.ard.work.device.camera.domain.GeoDTO;
 
import java.util.*;
import java.util.stream.Collectors;
 
/**
 * 相机设备Service接口
 *
 * @author 刘苏义
 * @date 2023-02-11
 */
public interface IArdCameraService {
 
    /**
     * 查询相机设备
     *
     * @param id 相机设备主键
     * @return 相机设备
     */
    public ArdCamera selectArdCameraById(String id);
 
    /**
     * 查询相机设备
     *
     * @param name 相机设备名称
     * @return 相机设备
     */
    public ArdCamera selectArdCameraByName(String name);
 
    /**
     * 查询相机设备列表
     *
     * @param ardCamera 相机设备
     * @return 相机设备集合
     */
    public List<ArdCamera> selectArdCameraList(ArdCamera ardCamera);
 
    /**
     * 查询所有相机
     *
     * @param ardCamera 相机设备
     * @return 相机设备集合
     */
    public List<ArdCamera> selectArdCameraListAll(ArdCamera ardCamera);
 
    /**
     * 新增相机设备
     *
     * @param ardCamera 相机设备
     * @return 结果
     */
    public int insertArdCamera(ArdCamera ardCamera);
 
    /**
     * 修改相机设备
     *
     * @param ardCamera 相机设备
     * @return 结果
     */
    public int updateArdCamera(ArdCamera ardCamera);
 
    /**
     * 更新相机状态
     *
     * @param cameraId 相机主键
     * @param state    状态
     * @return 结果
     */
    public int updateCameraState(String cameraId, String state);
 
    void updateAlarmGuideEnable(ArdCamera ardCamera);
 
    /**
     * 修改相机设备位置和朝向
     *
     * @param cameraId  相机id
     * @param longitude 经度
     * @param latitude  纬度
     * @param altitude  高度
     * @param baseYaw   朝向
     * @return 结果
     */
    public int updateCameraLocationAndYaw(String cameraId, Double longitude, Double latitude, Double altitude,
                                          Float baseYaw);
 
    /**
     * 批量删除相机设备
     *
     * @param ids 需要删除的相机设备主键集合
     * @return 结果
     */
    public int deleteArdCameraByIds(String[] ids);
 
    /**
     * 删除相机设备信息
     *
     * @param id 相机设备主键
     * @return 结果
     */
    public int deleteArdCameraById(String id);
 
    /**
     * 导入相机设备信息
     *
     * @param ardCameraList   相机设备数据列表
     * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
     * @param operName        操作用户
     * @return 结果
     */
    public String importCamera(List<ArdCamera> ardCameraList, Boolean isUpdateSupport, String operName);
 
    /**
     * 校验用户是否有数据权限
     *
     * @param userId 用户id
     */
    public void checkCameraDataScope(Long userId);
 
    /**
     * 校验相机是否唯一
     *
     * @param camera 相机
     * @return 结果
     */
    public String checkCameraIpAndPortUnique(ArdCamera camera);
 
 
    /**
     * 同步通道
     *
     * @param oldArrayList 旧通道列表(库中)
     * @param newArrayList 新通道列表(sdk)
     * @return
     * @author 刘苏义
     * @date 2024/8/23 16:28
     */
    public void asyncChannel(List<ArdChannel> oldArrayList, List<ArdChannel> newArrayList);
 
 
    /**
     * 操控锁定 0-解锁 1-锁定
     *
     * @param cmd 相机指令
     * @author 刘苏义
     * @date 2024/8/23 15:16
     */
    public AjaxResult controlLock(CameraCmd cmd);
 
    /**
     * 操控解锁
     *
     * @param cmd 相机指令
     * @author 刘苏义
     * @date 2024/8/23 15:16
     */
    public AjaxResult controlUnLock(CameraCmd cmd);
 
    /**
     * 通过坐标,获取附近的相机
     *
     * @param cmd 相机指令
     * @author XiaJiJian
     * @date 2024-09-13
     */
    public TreeMap<Double, ArdCamera> getNearbyCameras(CameraCmd cmd);
 
    /**
     * 获取圆内所有相机
     *
     * @param geoDto 几何实体
     * @author 刘苏义
     * @date 2024-09-13
     */
    public List<ArdCamera> getCircularCameras(GeoDTO geoDto);
 
    /**
     * 获取多边形内所有相机
     *
     * @param geoDto 几何实体
     * @author 刘苏义
     * @date 2024-09-13
     */
    public List<ArdCamera> getPolygonCameras(GeoDTO geoDto);
 
    /**
     * 获取雷达所在塔上的大光电
     *
     * @param radarId 雷达id
     * @author wmm
     * @date 2024-10
     */
    public ArdCamera getCameraByRadar(String radarId);
 
    /**
     * 获取可视范围内的摄像头
     *
     * @param cameraFilterDTO 过滤实体
     * @author 刘苏义
     * @date 2024-11-4
     */
    public List<ArdCamera> getCamerasInVisibleRange(CameraFilterDTO cameraFilterDTO);
 
    public Map<String, Object> selectArdCameraAllInfoById(String id);
 
    public List<Map<String, Object>> selectArdCameraAllInfoByUserId(Long userId);
 
    public List<Map<String, Object>> getCameraAllInfoByPosition(Long userId, Map<String, Number> para);
}