| | |
| | | package com.fzzy.security; |
| | | |
| | | import com.fzzy.common.manager.CommonManager; |
| | | import com.fzzy.igds.camera.data.ApiCameraData; |
| | | import com.fzzy.igds.camera.data.ApiCameraResp; |
| | | import com.fzzy.igds.constant.CameraPlayType; |
| | |
| | | import com.fzzy.igds.response.BaseResponse; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.SystemUtil; |
| | | import com.fzzy.common.manager.CommonManager; |
| | | import com.fzzy.security.manager.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; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | 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 javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | |
| | | showDeptList = "N"; |
| | | } |
| | | view.put("showDeptList", showDeptList); |
| | | |
| | | //库区网关信息 |
| | | GatewaySer gatewaySer = commonManager.getGatewaySerByDeptId(deptId); |
| | | view.put("gatewaySer", gatewaySer); |
| | | |
| | | //默认监控列表页面 |
| | | String viewUrl = prefix + "/video-list-dept"; |
| | |
| | | List<QuantityConf> listCamera = secManager.getQuantityConfByDeptId(deptId); |
| | | view.put("listCamera", listCamera); |
| | | |
| | | //库区网关信息 |
| | | GatewaySer gatewaySer = commonManager.getGatewaySerByDeptId(deptId); |
| | | view.put("gatewaySer", gatewaySer); |
| | | |
| | | return prefix + "/quantity"; |
| | | } |
| | | |
| | |
| | | return secManager.checkStop(param); |
| | | } |
| | | |
| | | /*------------------料位计页面------------------*/ |
| | | /** |
| | | * 料位总览 |
| | | * |
| | | * @param deptId |
| | | * @return |
| | | */ |
| | | @RequestMapping("/height-all") |
| | | public String oilAll(@RequestParam(value = "deptId", required = false) String deptId, |
| | | ModelMap view) { |
| | | |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | view.put(Constant.MODEL_KEY_LOGIN_USER, user); |
| | | |
| | | // 获取当前用户所在的分库名称 |
| | | if(StringUtils.isBlank(deptId)){ |
| | | deptId = ContextUtil.subDeptId(user); |
| | | } |
| | | view.put("deptId", deptId); |
| | | |
| | | // 获取当前部门下所有油罐列表信息 |
| | | List<Quantity> heightList = secManager.getHeightList(ContextUtil.subDeptId(user)); |
| | | view.put(Constant.MODEL_KEY_DEPOT_LIST, heightList); |
| | | |
| | | view.put("bizType", "quantity"); |
| | | |
| | | return prefix + "/height-all"; |
| | | } |
| | | |
| | | /*------------------巡更轨迹页面------------------*/ |
| | | /** |
| | | * 获取巡更记录页面 |
| | |
| | | */ |
| | | @RequestMapping("/patrol-record") |
| | | public String getPatrolRecordById(@RequestParam(value = "patrolId", required = true) String patrolId, |
| | | @RequestParam(value = "userId", required = true) String userId, |
| | | @RequestParam(value = "confId", required = true) String confId, |
| | | ModelMap view) { |
| | | IgdsBaseParam param = new IgdsBaseParam(); |
| | | param.setKey(patrolId); |
| | | List<PatrolRecord> trackPoints = secManager.getRecordByPatrolId(patrolId); |
| | | |
| | | List<PatrolRecord> trackPoints = secManager.getRecordByPatrolId(patrolId, userId, confId); |
| | | view.put("patrolRecordList", trackPoints); |
| | | |
| | | return prefix + "/patrol-record"; |