| | |
| | | import com.ruoyi.alarm.globalAlarm.domain.GlobalAlarmData; |
| | | import com.ruoyi.alarm.globalAlarm.service.IGlobalAlarmService; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import static com.ruoyi.common.utils.PageUtils.startPage; |
| | | |
| | | /** |
| | | * @ClassName: globalAlarmController |
| | | * @Description: |
| | |
| | | @Api(tags = "报警数据汇总接口") |
| | | @ApiSupport(author = "刘苏义") |
| | | @Anonymous |
| | | public class GlobalAlarmController { |
| | | public class GlobalAlarmController extends BaseController { |
| | | |
| | | @Resource |
| | | IGlobalAlarmService globalAlarmService; |
| | |
| | | } |
| | | @GetMapping("/List") |
| | | @ApiOperation(value = "历史报警聚合接口",notes = "通过command和时间查询历史数据") |
| | | @ApiOperationSupport(includeParameters = {"command","beginTime","endTime"},order = 4) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name="command",value="报警标识",dataType="integer",paramType="query",example="1001",required=true), |
| | | @ApiImplicitParam(name="beginTime",value="开始时间",dataType="string",paramType="query",example="2023-06-15 00:00:00",required=true), |
| | | @ApiImplicitParam(name="endTime",value="结束时间",dataType="string",paramType="query",example="2023-06-15 14:18:23",required=true), |
| | | @ApiImplicitParam(name="pageNum",value="页码",dataType="integer",paramType="query",example="1",required=true), |
| | | @ApiImplicitParam(name="pageSize",value="页数量",dataType="integer",paramType="query",example="10",required=true) |
| | | }) |
| | | public AjaxResult selectAlarmList(Integer command, String beginTime,String endTime) { |
| | | Object alarmList = globalAlarmService.selectAlarmList(command,beginTime,endTime); |
| | | return AjaxResult.success(alarmList); |
| | | public TableDataInfo selectAlarmList(Integer command, String beginTime, String endTime,Integer pageNum,Integer pageSize) { |
| | | startPage(); |
| | | Object alarmList = globalAlarmService.selectAlarmList(command,beginTime,endTime, pageNum, pageSize); |
| | | return getDataTable((List)alarmList); |
| | | } |
| | | } |
| | |
| | | Object updateAlarmViewTime(GlobalAlarmCondition condition); |
| | | public void receiveAlarm(String topic,String message); |
| | | public Map<String,Integer> selectAlarmLogsCount(); |
| | | Object selectAlarmList(Integer command, String beginTime, String endTime); |
| | | Object selectAlarmList(Integer command, String beginTime, String endTime,Integer pageNum,Integer pageSize); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Object selectAlarmList(Integer command, String beginTime, String endTime) { |
| | | public Object selectAlarmList(Integer command, String beginTime, String endTime,Integer pageNum,Integer pageSize) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("beginTime", beginTime); |
| | | params.put("endTime", endTime); |
| | |
| | | case 1001: |
| | | ArdAlarmStealelec aas = new ArdAlarmStealelec(); |
| | | aas.setParams(params); |
| | | aas.setPageNum(pageNum); |
| | | aas.setPageSize(pageSize); |
| | | List<ArdAlarmStealelec> ardAlarmStealelecs = ardAlarmStealelecMapper.selectArdAlarmStealelecList(aas); |
| | | return ardAlarmStealelecs; |
| | | case 1002: |
| | | ArdAlarmCamera aac = new ArdAlarmCamera(); |
| | | aac.setParams(params); |
| | | aac.setPageNum(pageNum); |
| | | aac.setPageSize(pageSize); |
| | | List<ArdAlarmCamera> ardAlarmCameras = ardAlarmCameraMapper.selectArdAlarmCameraList(aac); |
| | | return ardAlarmCameras; |
| | | case 1014: |
| | | ArdAlarmTube aat = new ArdAlarmTube(); |
| | | aat.setParams(params); |
| | | aat.setPageNum(pageNum); |
| | | aat.setPageSize(pageSize); |
| | | List<ArdAlarmTube> ardAlarmTubes = ardAlarmTubeMapper.selectArdAlarmTubeList(aat); |
| | | return ardAlarmTubes; |
| | | } |
| | |
| | | import com.ruoyi.device.camera.domain.CameraCmd; |
| | | import com.ruoyi.device.camera.service.IArdCamerasService; |
| | | import com.ruoyi.device.hiksdk.service.impl.HikClientServiceImpl; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import com.ruoyi.inspect.service.IArdVideoInspectTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiOperation(value = "获取聚焦模式", notes = "1手动2自动") |
| | | @PostMapping("/getFocusMode") |
| | | public @ResponseBody AjaxResult getFocusMode(@RequestBody CameraCmd cmd) { |
| | | public @ResponseBody |
| | | AjaxResult getFocusMode(@RequestBody CameraCmd cmd) { |
| | | String focusMode = sdk.getFocusMode(cmd); |
| | | return AjaxResult.success(focusMode); |
| | | } |
| | |
| | | <if test="userId != null and userId != ''"> and user_id = #{userId}</if> |
| | | <if test="deptId != null "> and dept_id = #{deptId}</if> |
| | | </where> |
| | | order by alarm_time desc |
| | | </select> |
| | | |
| | | <select id="selectArdAlarmCameraById" parameterType="String" resultMap="ArdAlarmCameraResult"> |
| | |
| | | AND start_time <= to_timestamp(#{params.endTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | </where> |
| | | order by start_time desc |
| | | </select> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| | | select |
| | |
| | | <if test="recordUrl != null and recordUrl != ''">and record_url = #{recordUrl}</if> |
| | | <if test="viewTime != null ">and view_time = #{viewTime}</if> |
| | | </where> |
| | | order by alarm_time desc |
| | | </select> |
| | | |
| | | <select id="selectArdAlarmTubeById" parameterType="String" resultMap="ArdAlarmTubeResult"> |