|
@@ -7,13 +7,16 @@ import com.welampiot.common.BaseResult;
|
|
|
import com.welampiot.common.Constant;
|
|
|
import com.welampiot.common.InterfaceResultEnum;
|
|
|
import com.welampiot.dto.VideoMonitorDTO;
|
|
|
+import com.welampiot.dto.VideoPointInfoDTO;
|
|
|
import com.welampiot.service.SystemConfigService;
|
|
|
import com.welampiot.service.VideoMonitorService;
|
|
|
+import com.welampiot.service.VideoPointInfoService;
|
|
|
import com.welampiot.utils.ToolUtils;
|
|
|
import com.welampiot.utils.VideoUtil;
|
|
|
import com.welampiot.utils.WebUtils;
|
|
|
import com.welampiot.vo.VideoMonitorDetailVO;
|
|
|
import com.welampiot.vo.VideoMonitorVO;
|
|
|
+import com.welampiot.vo.VideoPointInfoVO;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -42,6 +45,10 @@ public class VideoController {
|
|
|
|
|
|
@Autowired
|
|
|
private SystemConfigService systemConfigService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private VideoPointInfoService videoPointInfoService;
|
|
|
+
|
|
|
/**
|
|
|
* 设置AI开关状态
|
|
|
* @param request
|
|
@@ -344,4 +351,61 @@ public class VideoController {
|
|
|
}
|
|
|
return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取视屏监控点位信息
|
|
|
+ * @param vo id
|
|
|
+ * @return 获取视屏监控点位信息
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/getPointInfo", method = RequestMethod.POST)
|
|
|
+ public BaseResult<?> getPointInfo(VideoPointInfoVO vo) {
|
|
|
+ if (vo.getVersion() == null) vo.setVersion(0);
|
|
|
+ Integer version = vo.getVersion();
|
|
|
+ Integer id = vo.getId();
|
|
|
+ if (id == null || id == 0) return toolUtils.response(InterfaceResultEnum.LACK_PARAM_ERROR,version);
|
|
|
+ List<VideoPointInfoDTO> videoPointList = videoPointInfoService.getVideoPointListByVideoId(id);
|
|
|
+ VideoPointInfoVO videoPointInfoVO = new VideoPointInfoVO();
|
|
|
+ videoPointInfoVO.setList(videoPointList);
|
|
|
+ return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,videoPointInfoVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置点位信息
|
|
|
+ * @param vo 点位属性
|
|
|
+ * @return 设置点位信息
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/setPointInfo", method = RequestMethod.POST)
|
|
|
+ public BaseResult<?> setPointInfo(VideoPointInfoVO vo) {
|
|
|
+ if (vo.getVersion() == null) vo.setVersion(0);
|
|
|
+ Integer version = vo.getVersion();
|
|
|
+ Integer point = vo.getPoint();
|
|
|
+ Integer time = vo.getTime();
|
|
|
+ Integer videoId = vo.getVideoId();
|
|
|
+ if (point == null || time == null || videoId == null)
|
|
|
+ return toolUtils.response(InterfaceResultEnum.LACK_PARAM_ERROR,version);
|
|
|
+ VideoPointInfoDTO videoPointInfoDTO = new VideoPointInfoDTO();
|
|
|
+ BeanUtils.copyProperties(vo,videoPointInfoDTO);
|
|
|
+ videoPointInfoService.addVideoPointData(videoPointInfoDTO);
|
|
|
+ return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置点位状态
|
|
|
+ * @param vo 点位属性
|
|
|
+ * @return 设置点位状态
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/setPointStatus", method = RequestMethod.POST)
|
|
|
+ public BaseResult<?> setPointStatus(VideoPointInfoVO vo) {
|
|
|
+ if (vo.getVersion() == null) vo.setVersion(0);
|
|
|
+ Integer version = vo.getVersion();
|
|
|
+ Integer point = vo.getPoint();
|
|
|
+ Integer status = vo.getStatus();
|
|
|
+ Integer videoId = vo.getVideoId();
|
|
|
+ if (point == null || status == null || videoId == null)
|
|
|
+ return toolUtils.response(InterfaceResultEnum.LACK_PARAM_ERROR,version);
|
|
|
+ VideoPointInfoDTO videoPointInfoDTO = new VideoPointInfoDTO();
|
|
|
+ BeanUtils.copyProperties(vo,videoPointInfoDTO);
|
|
|
+ videoPointInfoService.updateVideoPointStatus(videoPointInfoDTO);
|
|
|
+ return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version);
|
|
|
+ }
|
|
|
}
|