Merge branch 'master' of http://47.115.223.229:8888/yangjun/hldy_yunwei_java
This commit is contained in:
commit
7bfbf0dea9
|
|
@ -1,6 +1,7 @@
|
|||
package com.nu.modules.nuBaseInfo.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.dto.NuBaseInfoMQDto;
|
||||
import com.nu.modules.nuBaseInfo.entity.NuBaseInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -27,4 +28,8 @@ public interface INuBaseInfoService extends IService<NuBaseInfo> {
|
|||
List<NuBaseInfo> getBaseWlsbList(NuBaseInfo nuBaseInfo);
|
||||
|
||||
int addNuIot(NuBaseInfo nuBaseInfo);
|
||||
|
||||
void addBase(NuBaseInfoMQDto dto);
|
||||
|
||||
void updateBase(NuBaseInfoMQDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@ package com.nu.modules.nuBaseInfo.service.impl;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.dto.NuBaseInfoMQDto;
|
||||
import com.nu.modules.nuBaseInfo.entity.NuBaseBatchAddDto;
|
||||
import com.nu.modules.nuBaseInfo.entity.NuBaseInfo;
|
||||
import com.nu.modules.nuBaseInfo.mapper.NuBaseInfoMapper;
|
||||
import com.nu.modules.nuBaseInfo.service.INuBaseInfoService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -131,4 +133,19 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBase(NuBaseInfoMQDto dto) {
|
||||
NuBaseInfo nuBaseInfo = new NuBaseInfo();
|
||||
BeanUtils.copyProperties(dto,nuBaseInfo);
|
||||
baseMapper.insert(nuBaseInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBase(NuBaseInfoMQDto dto) {
|
||||
NuBaseInfo nuBaseInfo = new NuBaseInfo();
|
||||
BeanUtils.copyProperties(dto,nuBaseInfo);
|
||||
baseMapper.updateById(nuBaseInfo);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.nu.mq.nubaseinfo.listener;
|
|||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.nu.dto.NuBaseInfoMQDto;
|
||||
import com.nu.dto.StatusMQDto;
|
||||
import com.nu.enums.MQStatus;
|
||||
import com.nu.modules.async.entity.AsyncStatus;
|
||||
|
|
@ -53,4 +54,30 @@ public class NuBaseInfoMQListener {
|
|||
asyncStatusService.updateById(asyncStatus);
|
||||
}
|
||||
|
||||
|
||||
@RabbitListener(
|
||||
bindings = @QueueBinding(
|
||||
value = @Queue(name = "hldy.async.addBase"),
|
||||
exchange = @Exchange(name = "hldy.hldy", type = ExchangeTypes.DIRECT),
|
||||
key = "hldy.async.addBase"
|
||||
),
|
||||
errorHandler = "nuBaseInfoMQErrorHandler"
|
||||
)
|
||||
public void addBase(NuBaseInfoMQDto dto) {
|
||||
baseInfoService.addBase(dto);
|
||||
}
|
||||
|
||||
|
||||
@RabbitListener(
|
||||
bindings = @QueueBinding(
|
||||
value = @Queue(name = "hldy.async.updateBase"),
|
||||
exchange = @Exchange(name = "hldy.hldy", type = ExchangeTypes.DIRECT),
|
||||
key = "hldy.async.updateBase"
|
||||
),
|
||||
errorHandler = "nuBaseInfoMQErrorHandler"
|
||||
)
|
||||
public void updateBase(NuBaseInfoMQDto dto) {
|
||||
baseInfoService.updateBase(dto);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,6 +188,18 @@ public class CameraInfoController extends JeecgController<CameraInfo, ICameraInf
|
|||
return service.getIpcCapability(cameraInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备详情信息
|
||||
*
|
||||
* @param cameraInfo
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getDeviceDetails")
|
||||
public Result<JSONObject> getDeviceDetails(CameraInfo cameraInfo) {
|
||||
return service.getDeviceDetails(cameraInfo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取画面基本信息
|
||||
*
|
||||
|
|
@ -210,6 +222,28 @@ public class CameraInfoController extends JeecgController<CameraInfo, ICameraInf
|
|||
return service.setImageCommon(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取画面操作信息
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/getImageSwitch")
|
||||
public Result<JSONObject> getImageSwitch(@RequestBody Map<String,Object> map) {
|
||||
return service.getImageSwitch(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置画面操作信息
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/setImageSwitch")
|
||||
public Result setImageSwitch(@RequestBody Map<String,Object> map) {
|
||||
return service.setImageSwitch(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取OSD能力集
|
||||
*
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ public class CameraInfo implements Serializable {
|
|||
private String remarks;//备注
|
||||
private String izAllocate;//是否分配
|
||||
private String dimension;//设备维度
|
||||
private String channel;//通道号
|
||||
|
||||
@TableField(exist = false)
|
||||
private String routeType;//camera监控设备 network网络设备
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
a.maintain_status,
|
||||
a.remarks,
|
||||
a.iz_allocate,
|
||||
a.dimension
|
||||
a.dimension,
|
||||
a.channel
|
||||
from nu_iot_tplink_camera a left join nu_base_info b on a.nu_id = b.nu_id
|
||||
left join nu_iot_tplink_camera_capability c on a.device_index = c.device_index
|
||||
<where>
|
||||
|
|
@ -126,7 +127,8 @@
|
|||
a.ftp_uploadpath as ftpUploadpath,
|
||||
a.remarks,
|
||||
a.iz_allocate,
|
||||
a.dimension
|
||||
a.dimension,
|
||||
a.channel
|
||||
from nu_iot_tplink_camera a left join nu_base_info b on a.nu_id = b.nu_id
|
||||
<where>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
|
|
@ -173,7 +175,8 @@
|
|||
ftp_uploadpath as ftpUploadpath,
|
||||
a.remarks,
|
||||
a.iz_allocate,
|
||||
a.dimension
|
||||
a.dimension,
|
||||
a.channel
|
||||
from nu_iot_tplink_camera a
|
||||
<where>
|
||||
<if test="deviceType != null and deviceType != ''">
|
||||
|
|
@ -229,7 +232,8 @@
|
|||
a.ftp_uploadpath as ftpUploadpath,
|
||||
a.remarks,
|
||||
a.iz_allocate,
|
||||
a.dimension
|
||||
a.dimension,
|
||||
a.channel
|
||||
from nu_iot_tplink_camera a left join nu_base_info b on a.nu_id = b.id
|
||||
where device_index = #{deviceIndex}
|
||||
</select>
|
||||
|
|
@ -325,7 +329,10 @@
|
|||
|
||||
<update id="updateDeviceStatusByDevId">
|
||||
UPDATE nu_iot_tplink_camera
|
||||
SET device_status = #{deviceStatus}
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceStatus != null">device_status = #{deviceStatus},</if>
|
||||
<if test="channel != null">channel = #{channel},</if>
|
||||
</trim>
|
||||
where device_index = #{deviceIndex}
|
||||
</update>
|
||||
|
||||
|
|
@ -376,7 +383,8 @@
|
|||
a.ftp_uploadpath as ftpUploadpath,
|
||||
a.remarks,
|
||||
a.iz_allocate,
|
||||
a.dimension
|
||||
a.dimension,
|
||||
a.channel
|
||||
from nu_iot_tplink_camera a
|
||||
where device_index = #{deviceIndex}
|
||||
</select>
|
||||
|
|
@ -439,7 +447,8 @@
|
|||
c.area_flag as areaFlag,
|
||||
a.remarks,
|
||||
a.iz_allocate,
|
||||
a.dimension
|
||||
a.dimension,
|
||||
a.channel
|
||||
from nu_iot_tplink_camera a
|
||||
left join nu_base_info c on a.nu_id = c.nu_id
|
||||
<where>
|
||||
|
|
@ -545,7 +554,8 @@
|
|||
c.area_flag as areaFlag,
|
||||
a.remarks,
|
||||
a.iz_allocate,
|
||||
a.dimension
|
||||
a.dimension,
|
||||
a.channel
|
||||
from nu_iot_tplink_camera a
|
||||
left join nu_base_info c on a.nu_id = c.nu_id
|
||||
where a.depart_server_url = #{params.departServerUrl}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,11 @@ public interface ICameraInfoService extends IService<CameraInfo> {
|
|||
Result<String> syncDevicesStatus(CameraInfo cameraInfo);
|
||||
Result<String> syncProjectIpcDevice(CameraInfo cameraInfo);
|
||||
Result<JSONObject> getIpcCapability(CameraInfo cameraInfo);
|
||||
Result<JSONObject> getDeviceDetails(CameraInfo cameraInfo);
|
||||
Result<JSONObject> getImageCommon(Map<String,Object> map);
|
||||
Result setImageCommon(Map<String,Object> map);
|
||||
Result<JSONObject> getImageSwitch(Map<String,Object> map);
|
||||
Result setImageSwitch(Map<String,Object> map);
|
||||
Result<JSONObject> getOsdCapability(Map<String,Object> map);
|
||||
Result<JSONObject> getOsd(Map<String,Object> map);
|
||||
Result<String> setOsd(Map<String,Object> map);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -41,6 +41,7 @@ public enum ApiEnum {
|
|||
QUERY_ALARM_LOG("/tums/logManager/v2/queryAlarmLog","查询告警日志列表"),
|
||||
QUERY_UNREAD_ALARM_MSG("/tums/logManager/v2/queryUnreadAlarmMsg","查询未读告警日志列表"),
|
||||
IPC_GET_IPC_CAPABILITY("/tums/deviceManager/v1/getIpcCapability","获取ipc能力集"),
|
||||
GET_DEVICE_DETAILS("/tums/deviceManager/v2/getDeviceDetails","获取设备详情信息"),
|
||||
IPC_PASSTHROUGH("/tums/devConfig/v1/passthrough","设备配置信息"),
|
||||
|
||||
IPC_ADD_PREVIEW_CHN("/tums/preview/v1/addPreviewChn","添加预览通道"),
|
||||
|
|
|
|||
|
|
@ -333,6 +333,20 @@ public class TumsApi {
|
|||
return jsonResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备详情信息
|
||||
* @param jsonRequest
|
||||
* @return
|
||||
*/
|
||||
public String getDeviceDetails(String jsonRequest){
|
||||
this.createTumsClient();
|
||||
log.info("getDeviceDetails:request:{}",jsonRequest);
|
||||
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.GET_DEVICE_DETAILS.getValue());
|
||||
log.info("getDeviceDetails:response:{}",jsonResponse);
|
||||
return jsonResponse;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设备配置信息
|
||||
* @param jsonRequest
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ spring:
|
|||
password:
|
||||
#rabbitmq 配置
|
||||
rabbitmq:
|
||||
host: localhost
|
||||
host: 192.168.2.199
|
||||
prot: 5672
|
||||
username: hldy
|
||||
password: hldy
|
||||
|
|
|
|||
Loading…
Reference in New Issue