|
@@ -61,6 +61,8 @@ public class NewLampPoleController {
|
|
|
private LampPoleAlarmLogService lampPoleAlarmLogService;
|
|
|
@Autowired
|
|
|
private LampInfoLogNewService lampInfoLogNewService;
|
|
|
+ @Autowired
|
|
|
+ private VideoMonitorService videoMonitorService;
|
|
|
|
|
|
@RequestMapping(value = "/info",method = RequestMethod.POST)
|
|
|
public BaseResult info(HttpServletRequest request){
|
|
@@ -830,4 +832,68 @@ public class NewLampPoleController {
|
|
|
lampDataVO.setConDayEle(formatConDayEle);
|
|
|
return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,lampDataVO);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 摄像头列表
|
|
|
+ * @param request sectionList、areaId、sectionId
|
|
|
+ * @return 摄像头列表
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/videoInfoList", method = RequestMethod.POST)
|
|
|
+ public BaseResult<?> videoInfoList(HttpServletRequest request) {
|
|
|
+ Integer version = (Integer) toolUtils.getRequestContent(request, "version", 1);
|
|
|
+ Integer areaId = (Integer) toolUtils.getRequestContent(request, "areaId", 1);
|
|
|
+ Integer sectionId = (Integer) toolUtils.getRequestContent(request, "sectionId", 1);
|
|
|
+ int page = request.getParameter("page") == null ? 1 : Integer.parseInt(request.getParameter("page"));
|
|
|
+ int count = request.getParameter("count") == null ? 16 : Integer.parseInt(request.getParameter("count"));
|
|
|
+
|
|
|
+ VideoMonitorVO videoMonitorVO = new VideoMonitorVO();
|
|
|
+ videoMonitorVO.setLimit(count * (page - 1));
|
|
|
+ videoMonitorVO.setOffset(count);
|
|
|
+ videoMonitorVO.setAreaId(areaId);
|
|
|
+ videoMonitorVO.setSectionId(sectionId);
|
|
|
+ videoMonitorVO.setSectionList(toolUtils.getSectionList(request));
|
|
|
+ List<VideoMonitorDTO> videoInfoList = videoMonitorService.getVideoInfoList(videoMonitorVO);
|
|
|
+ List<VideoMonitorDTO> list = new ArrayList<>();
|
|
|
+ videoInfoList.forEach(dto -> {
|
|
|
+ if (dto.getLampPoleName() == null) {
|
|
|
+ dto.setLampPoleName("");
|
|
|
+ }
|
|
|
+ dto.setToken("");
|
|
|
+ dto.setEzOpen("");
|
|
|
+ dto.setEzOpenHd("");
|
|
|
+ dto.setIsMse(0);
|
|
|
+ dto.setMseUrl("");
|
|
|
+ dto.setUuid("");
|
|
|
+ list.add(dto);
|
|
|
+ });
|
|
|
+ Integer videoTotal = videoMonitorService.getVideoTotal(videoMonitorVO);
|
|
|
+ VideoMonitorVO vo = new VideoMonitorVO();
|
|
|
+ vo.setList(list);
|
|
|
+ vo.setTotal(videoTotal);
|
|
|
+ return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,vo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 摄像头数据概览
|
|
|
+ * @param request sectionList、areaId、sectionId
|
|
|
+ * @return 摄像头数据概览
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/videoInfo", method = RequestMethod.POST)
|
|
|
+ public BaseResult<?> videoInfo(HttpServletRequest request) {
|
|
|
+ Integer version = (Integer) toolUtils.getRequestContent(request, "version", 1);
|
|
|
+ Integer areaId = (Integer) toolUtils.getRequestContent(request, "areaId", 1);
|
|
|
+ Integer sectionId = (Integer) toolUtils.getRequestContent(request, "sectionId", 1);
|
|
|
+ VideoMonitorVO videoMonitorVO = new VideoMonitorVO();
|
|
|
+ videoMonitorVO.setAreaId(areaId);
|
|
|
+ videoMonitorVO.setSectionId(sectionId);
|
|
|
+ videoMonitorVO.setSectionList(toolUtils.getSectionList(request));
|
|
|
+ Integer videoTotal = videoMonitorService.getVideoTotal(videoMonitorVO);
|
|
|
+ Integer videoUsableTotal = videoMonitorService.getVideoUsableTotal(videoMonitorVO);
|
|
|
+ Integer videoOnlineTotal = videoMonitorService.getVideoOnlineTotal(videoMonitorVO);
|
|
|
+ VideoMonitorVO vo = new VideoMonitorVO();
|
|
|
+ vo.setTotal(videoTotal);
|
|
|
+ vo.setOnlineCount(videoOnlineTotal);
|
|
|
+ vo.setUseCount(videoUsableTotal);
|
|
|
+ return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,vo);
|
|
|
+ }
|
|
|
}
|