| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private CoreDeptService deptService; |
| | | |
| | | /** |
| | | * 监控概览 |
| | | * |
| | | * 库区安防页面 |
| | | * @param type 1.表示2.5D鸟瞰图页面预览;2.表示列表预览页面 |
| | | * @param view |
| | | * @return |
| | | */ |
| | | @RequestMapping("/aerial-video") |
| | | public String aerialVideo( |
| | | @RequestParam(value = "type", required = false) String type, |
| | | ModelMap view) { |
| | | @RequestMapping("/video-dept") |
| | | public String videoDept(@RequestParam(value = "type", required = false) String type, |
| | | ModelMap view) { |
| | | |
| | | if (StringUtils.isBlank(type)) { |
| | | type = "2"; |
| | | } |
| | | |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | view.put(Constant.MODEL_KEY_LOGIN_USER, user); |
| | | |
| | | String deptId = ContextUtil.subDeptId(user); |
| | | List<Camera> listCamera = secManager.listCamera(deptId, user.getCompanyId()); |
| | | |
| | | view.put("deptId", deptId); |
| | | |
| | | List<Camera> listCamera = secManager.listCamera(deptId, user.getCompanyId()); |
| | | view.put("listCamera", listCamera); |
| | | |
| | | //默认监控列表页面 |
| | | String viewUrl = prefix + "/video-list"; |
| | | String viewUrl = prefix + "/video-list-dept"; |
| | | |
| | | if (StringUtils.isNotBlank( type) && "1".equals(type)) { |
| | | if("1".equals(type)){ |
| | | viewUrl = prefix + "/video-aerial-dept"; |
| | | |
| | | //鸟瞰图 |
| | | Dept dept = deptService.getDeptById(deptId); |
| | | if (dept != null && StringUtils.isNotEmpty(dept.getImgPath())) { |
| | | view.put("backgroundImg", dept.getImgPath()); |
| | | viewUrl = prefix + "/video-aerial"; |
| | | } |
| | | |
| | | } |
| | | if("2".equals(type)){ |
| | | viewUrl = prefix + "/video-list-dept"; |
| | | } |
| | | |
| | | return viewUrl; |
| | | } |
| | | |
| | | /** |
| | | * 监管安防页面 |
| | | * @param type 1.表示2.5D鸟瞰图页面预览;2.表示列表预览页面 |
| | | * @param view |
| | | * @return |
| | | */ |
| | | @RequestMapping("/video-super") |
| | | public String videoSuper(@RequestParam(value = "type", required = false) String type, |
| | | ModelMap view) { |
| | | |
| | | if (StringUtils.isBlank(type)) { |
| | | type = "2"; |
| | | } |
| | | |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | view.put(Constant.MODEL_KEY_LOGIN_USER, user); |
| | | |
| | | String deptId = ContextUtil.subDeptId(user); |
| | | view.put("deptId", deptId); |
| | | |
| | | List<Camera> listCamera = secManager.listCamera(deptId, user.getCompanyId()); |
| | | view.put("listCamera", listCamera); |
| | | |
| | | //默认监控列表页面 |
| | | String viewUrl = prefix + "/video-list-dept"; |
| | | |
| | | if("1".equals(type)){ |
| | | viewUrl = prefix + "/video-aerial-dept"; |
| | | |
| | | //鸟瞰图 |
| | | Dept dept = deptService.getDeptById(deptId); |
| | | if (dept != null && StringUtils.isNotEmpty(dept.getImgPath())) { |
| | | view.put("backgroundImg", dept.getImgPath()); |
| | | } |
| | | } |
| | | if("2".equals(type)){ |
| | | viewUrl = prefix + "/video-list-dept"; |
| | | } |
| | | |
| | | return viewUrl; |
| | | } |
| | | |
| | | /** |
| | | * 鸟瞰图页面 -- 视频播放,通过播放参数不同跳转不同页面播放 |
| | |
| | | |
| | | String viewUrl = prefix + "/video-webrtc"; |
| | | |
| | | //WEB-RTC大华播放 |
| | | //WEB-RTC播放 |
| | | if (CameraPlayType.PLAY_TYPE_WEB_RTC.getCode().equals(playType)) { |
| | | viewUrl = prefix + "/video-webrtc"; |
| | | } |