添加工地场景视频感知事件
This commit is contained in:
parent
43d36fff08
commit
6eff04bf7d
|
@ -2,7 +2,9 @@ package com.hisense.monitormanage.controller;
|
||||||
|
|
||||||
import com.hisense.monitormanage.dto.BuildingRecordsDto;
|
import com.hisense.monitormanage.dto.BuildingRecordsDto;
|
||||||
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
||||||
|
import com.hisense.monitormanage.dto.EventDto;
|
||||||
import com.hisense.monitormanage.entity.BuildingRecords;
|
import com.hisense.monitormanage.entity.BuildingRecords;
|
||||||
|
import com.hisense.monitormanage.entity.Event;
|
||||||
import com.hisense.monitormanage.entity.Result;
|
import com.hisense.monitormanage.entity.Result;
|
||||||
import com.hisense.monitormanage.entity.RoadData;
|
import com.hisense.monitormanage.entity.RoadData;
|
||||||
import com.hisense.monitormanage.mapper.BuildingRecordsMapper;
|
import com.hisense.monitormanage.mapper.BuildingRecordsMapper;
|
||||||
|
@ -161,6 +163,29 @@ public class BuildingController {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工地视频感知事件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectByAllEvent")
|
||||||
|
@ApiOperation("查询工地视频感知事件")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "page", value = "页码", required = true, dataType = "Integer"),
|
||||||
|
@ApiImplicitParam(name = "pageSize", value = "页码大小", required = true, dataType = "Integer")
|
||||||
|
})
|
||||||
|
public Result selectByAllEvent(Integer page,Integer pageSize){
|
||||||
|
List<EventDto> eventDtos = buildingRecordsMapper.selectByAllEvent(page, pageSize);
|
||||||
|
eventDtos.forEach(eventDto -> {
|
||||||
|
eventDto.setEventNewName(eventDto.getEventCnName());
|
||||||
|
});
|
||||||
|
Integer integer = buildingRecordsMapper.selectCountEvent();
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("sum",integer);
|
||||||
|
map.put("data",eventDtos);
|
||||||
|
Result success = Result.success(map);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据工地名称搜索工地
|
* 根据工地名称搜索工地
|
||||||
* @param projectName
|
* @param projectName
|
||||||
|
@ -196,6 +221,24 @@ public class BuildingController {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当天工地视频感知事件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectByEvent")
|
||||||
|
@ApiOperation("查询当天工地视频感知事件")
|
||||||
|
public Result selectByEvent(){
|
||||||
|
List<EventDto> events = buildingRecordsMapper.selectByEvent();
|
||||||
|
events.forEach(eventDto -> {
|
||||||
|
eventDto.setEventNewName(eventDto.getEventCnName());
|
||||||
|
});
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("sum",events.size());
|
||||||
|
map.put("data",events);
|
||||||
|
Result success = Result.success(map);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询当天扬尘事件
|
* 查询当天扬尘事件
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -3,7 +3,9 @@ package com.hisense.monitormanage.mapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.hisense.monitormanage.dto.BuildingRecordsDto;
|
import com.hisense.monitormanage.dto.BuildingRecordsDto;
|
||||||
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
import com.hisense.monitormanage.dto.BuildingRecordsDtos;
|
||||||
|
import com.hisense.monitormanage.dto.EventDto;
|
||||||
import com.hisense.monitormanage.entity.BuildingRecords;
|
import com.hisense.monitormanage.entity.BuildingRecords;
|
||||||
|
import com.hisense.monitormanage.entity.Event;
|
||||||
import com.hisense.monitormanage.entity.RoadData;
|
import com.hisense.monitormanage.entity.RoadData;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
@ -38,6 +40,11 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
||||||
|
|
||||||
List<BuildingRecordsDto> selectNoiceEvent(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
List<BuildingRecordsDto> selectNoiceEvent(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||||
|
|
||||||
|
List<EventDto> selectByAllEvent(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||||
|
|
||||||
|
@Select("select COUNT(*) from t_event WHERE camera_name IN ('博海建设南昌路127号现场','青城建设蚌埠路以北宁乡路以西门') AND track_event = 'START'")
|
||||||
|
Integer selectCountEvent();
|
||||||
|
|
||||||
@Select("select COUNT(*) from (select br.pm10 from t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc where br.pm10 > 80) a ")
|
@Select("select COUNT(*) from (select br.pm10 from t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc where br.pm10 > 80) a ")
|
||||||
Integer selectCountRaise();
|
Integer selectCountRaise();
|
||||||
|
|
||||||
|
@ -63,4 +70,8 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
||||||
|
|
||||||
@Select("select * from t_road_data where pm10 > 150 AND dt = #{dt}")
|
@Select("select * from t_road_data where pm10 > 150 AND dt = #{dt}")
|
||||||
List<RoadData> selectByDayRoadData(String dt);
|
List<RoadData> selectByDayRoadData(String dt);
|
||||||
|
|
||||||
|
@Select("select * from t_event WHERE camera_name IN ('博海建设南昌路127号现场','青城建设蚌埠路以北宁乡路以西门') AND track_event = 'START' AND TO_DAYS(capture_time) = TO_DAYS(NOW())")
|
||||||
|
List<EventDto> selectByEvent();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,14 @@
|
||||||
limit #{page},#{pageSize}
|
limit #{page},#{pageSize}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByAllEvent" resultType="com.hisense.monitormanage.dto.EventDto">
|
||||||
|
select * from t_event
|
||||||
|
WHERE camera_name IN ('博海建设南昌路127号现场','青城建设蚌埠路以北宁乡路以西门')
|
||||||
|
AND track_event = 'START'
|
||||||
|
<bind name="page" value="(page-1)*pageSize"/>
|
||||||
|
limit #{page},#{pageSize}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectWeekPmAndNoice" resultType="com.hisense.monitormanage.dto.BuildingRecordsDtos">
|
<select id="selectWeekPmAndNoice" resultType="com.hisense.monitormanage.dto.BuildingRecordsDtos">
|
||||||
select a.pushTime,b.pm10,b.noice
|
select a.pushTime,b.pm10,b.noice
|
||||||
from (
|
from (
|
||||||
|
|
Loading…
Reference in New Issue