| | |
| | | "SELECT " + |
| | | "dc.*, " + |
| | | "de.name as device_name, " + |
| | | "de.online as device_online " + |
| | | "de.on_line as device_online " + |
| | | "from " + |
| | | "wvp_device_channel dc " + |
| | | "LEFT JOIN wvp_device de ON dc.device_id = de.device_id " + |
| | | "WHERE 1=1" + |
| | | " <if test='device_id != null'> AND dc.device_id = #{deviceId} </if> " + |
| | | " <if test='deviceId != null'> AND dc.device_id = #{deviceId} </if> " + |
| | | " <if test='query != null'> AND (dc.channel_id LIKE '%${query}%' OR dc.name LIKE '%${query}%' OR dc.name LIKE '%${query}%')</if> " + |
| | | " <if test='parentChannelId != null'> AND dc.parent_id=#{parentChannelId} </if> " + |
| | | " <if test='online == true' > AND dc.status=true</if>" + |
| | |
| | | "SELECT " + |
| | | "dc.*, " + |
| | | "de.name as device_name, " + |
| | | "de.online as device_online " + |
| | | "de.on_line as device_online " + |
| | | "from " + |
| | | "wvp_device_channel dc " + |
| | | "LEFT JOIN wvp_device de ON dc.device_id = de.device_id " + |
| | |
| | | deviceJOSNChannel.put("ID", deviceChannelExtend.getChannelId()); |
| | | deviceJOSNChannel.put("DeviceID", deviceChannelExtend.getDeviceId()); |
| | | deviceJOSNChannel.put("DeviceName", deviceChannelExtend.getDeviceName()); |
| | | deviceJOSNChannel.put("DeviceOnline", deviceChannelExtend.getDeviceOnline() == 1); |
| | | deviceJOSNChannel.put("DeviceOnline", deviceChannelExtend.isDeviceOnline()); |
| | | deviceJOSNChannel.put("Channel", 0); // TODO 自定义序号 |
| | | deviceJOSNChannel.put("Name", deviceChannelExtend.getName()); |
| | | deviceJOSNChannel.put("Custom", false); |
| | |
| | | // 1-IETF RFC3261, |
| | | // 2-基于口令的双向认证, |
| | | // 3-基于数字证书的双向认证 |
| | | deviceJOSNChannel.put("Status", deviceChannelExtend.getStatus() == 1 ? "ON":"OFF"); |
| | | deviceJOSNChannel.put("Status", deviceChannelExtend.isStatus() ? "ON":"OFF"); |
| | | deviceJOSNChannel.put("Longitude", deviceChannelExtend.getLongitude()); |
| | | deviceJOSNChannel.put("Latitude", deviceChannelExtend.getLatitude()); |
| | | deviceJOSNChannel.put("PTZType ", deviceChannelExtend.getPTZType()); // 云台类型, 0 - 未知, 1 - 球机, 2 - 半球, |
| | |
| | | |
| | | private String deviceName; |
| | | |
| | | private int deviceOnline; |
| | | private boolean deviceOnline; |
| | | |
| | | /** |
| | | * 生产厂商 |
| | |
| | | * <Status>OFF</Status> |
| | | * 遇到过NVR下的IPC下发信令可以推流, 但是 Status 响应 OFF |
| | | */ |
| | | private int status; |
| | | private boolean status; |
| | | |
| | | /** |
| | | * 经度 |
| | |
| | | this.PTZTypeText = PTZTypeText; |
| | | } |
| | | |
| | | public int getStatus() { |
| | | public boolean isStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(int status) { |
| | | public void setStatus(boolean status) { |
| | | this.status = status; |
| | | } |
| | | |
| | |
| | | this.deviceName = deviceName; |
| | | } |
| | | |
| | | public int getDeviceOnline() { |
| | | public boolean isDeviceOnline() { |
| | | return deviceOnline; |
| | | } |
| | | |
| | | public void setDeviceOnline(int deviceOnline) { |
| | | public void setDeviceOnline(boolean deviceOnline) { |
| | | this.deviceOnline = deviceOnline; |
| | | } |
| | | } |