| | |
| | | import com.fzzy.igds.service.CoreDeptService; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.SystemUtil; |
| | | import com.fzzy.sys.manager.common.CommonManager; |
| | | import com.fzzy.sys.manager.security.SecManager; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | @Resource |
| | | private SecManager secManager; |
| | | @Resource |
| | | private CommonManager commonManager; |
| | | @Resource |
| | | private CoreDeptService deptService; |
| | | |
| | | /** |
| | | * 库区安防页面 |
| | | * @param type 1.表示2.5D鸟瞰图页面预览;2.表示列表预览页面 |
| | | * @param type 1.表示2.5D鸟瞰图页面预览;2.表示列表预览页面 |
| | | * @param deptId |
| | | * @param view |
| | | * @return |
| | | */ |
| | | @RequestMapping("/video-dept") |
| | | public String videoDept(@RequestParam(value = "type", required = false) String type, |
| | | ModelMap view) { |
| | | @RequestParam(value = "deptId", required = false) String deptId, |
| | | 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); |
| | | if(StringUtils.isBlank(deptId)){ |
| | | deptId = ContextUtil.subDeptId(user); |
| | | } |
| | | view.put("deptId", deptId); |
| | | |
| | | List<Camera> listCamera = secManager.listCamera(deptId, user.getCompanyId()); |
| | | view.put("listCamera", listCamera); |
| | | |
| | | SysDept sysDept = commonManager.getDeptById(deptId); |
| | | view.put("dept", sysDept); |
| | | view.put("type", type); |
| | | |
| | | //判断是否显示库区选择弹窗 |
| | | String showDeptList = "Y"; |
| | | if (Constant.USER_TYPE_30.equals(user.getUserType())) { |
| | | showDeptList = "N"; |
| | | } |
| | | view.put("showDeptList", showDeptList); |
| | | |
| | | //默认监控列表页面 |
| | | 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; |
| | | } |
| | | |
| | | /** |
| | | * 监管安防页面 |
| | | * @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()); |
| | | } |
| | | view.put("backgroundImg", commonManager.getDeptImg(deptId)); |
| | | } |
| | | if("2".equals(type)){ |
| | | viewUrl = prefix + "/video-list-dept"; |