This commit is contained in:
parent
17c3663174
commit
dc9a7b0099
|
@ -432,11 +432,12 @@ public class BuildingController {
|
|||
@GetMapping("selectRoadDataCountEvent")
|
||||
@ApiOperation("查询走航监测top5全部道路污染事件")
|
||||
public Result selectRoadDataCountEvent(){
|
||||
|
||||
List<RoadDataDto> roadDataDtos = buildingRecordsMapper.selectRoadDataCountEvent();
|
||||
|
||||
Result success = Result.success(roadDataDtos);
|
||||
|
||||
Integer integer = roadDataMapper.selectCountRoadData();
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("sum",integer);
|
||||
map.put("roadDataDtos",roadDataDtos);
|
||||
Result success = Result.success(map);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -447,11 +448,12 @@ public class BuildingController {
|
|||
@GetMapping("selectRoadDataWeekEvent")
|
||||
@ApiOperation("查询走航监测top5近7天道路污染事件")
|
||||
public Result selectRoadDataWeekEvent(){
|
||||
|
||||
List<RoadDataDto> roadDataDtos = buildingRecordsMapper.selectRoadDataWeekEvent();
|
||||
|
||||
Result success = Result.success(roadDataDtos);
|
||||
|
||||
Integer integer = roadDataMapper.selectCountWeekRoadData();
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("sum",integer);
|
||||
map.put("roadDataDtos",roadDataDtos);
|
||||
Result success = Result.success(map);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -462,11 +464,12 @@ public class BuildingController {
|
|||
@GetMapping("selectRoadDataMonthEvent")
|
||||
@ApiOperation("查询走航监测top5近30天道路污染事件")
|
||||
public Result selectRoadDataMonthEvent(){
|
||||
|
||||
List<RoadDataDto> roadDataDtos = buildingRecordsMapper.selectRoadDataMonthEvent();
|
||||
|
||||
Result success = Result.success(roadDataDtos);
|
||||
|
||||
Integer integer = roadDataMapper.selectCountMonthRoadData();
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("sum",integer);
|
||||
map.put("roadDataDtos",roadDataDtos);
|
||||
Result success = Result.success(map);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,13 +91,13 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
|||
|
||||
List<BuildingRecordsDtos> selectMonthCurrentByEvent();
|
||||
|
||||
@Select("select rd.road_name,rd.`start`,rd.`end`,COUNT(*) number from t_road_data rd where pm10 > 150 GROUP BY rd.road_name,rd.`start`,rd.`end` ORDER BY number DESC limit 5")
|
||||
@Select("select rd.road_name,rd.`start`,rd.`end`,COUNT(*) number from t_road_data rd where pm10 > 150 GROUP BY rd.road_name,rd.`start`,rd.`end` ORDER BY number DESC")
|
||||
List<RoadDataDto> selectRoadDataCountEvent();
|
||||
|
||||
@Select("select rd.road_name,rd.`start`,rd.`end`,COUNT(*) number from t_road_data rd where pm10 > 150 AND DATE_SUB(CURDATE(), INTERVAL 7 DAY) < DATE(rd.dt) GROUP BY rd.road_name,rd.`start`,rd.`end` ORDER BY number DESC limit 5")
|
||||
@Select("select rd.road_name,rd.`start`,rd.`end`,COUNT(*) number from t_road_data rd where pm10 > 150 AND DATE_SUB(CURDATE(), INTERVAL 7 DAY) < DATE(rd.dt) GROUP BY rd.road_name,rd.`start`,rd.`end` ORDER BY number DESC")
|
||||
List<RoadDataDto> selectRoadDataWeekEvent();
|
||||
|
||||
@Select("select rd.road_name,rd.`start`,rd.`end`,COUNT(*) number from t_road_data rd where pm10 > 150 AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) < DATE(rd.dt) GROUP BY rd.road_name,rd.`start`,rd.`end` ORDER BY number DESC limit 5")
|
||||
@Select("select rd.road_name,rd.`start`,rd.`end`,COUNT(*) number from t_road_data rd where pm10 > 150 AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) < DATE(rd.dt) GROUP BY rd.road_name,rd.`start`,rd.`end` ORDER BY number DESC")
|
||||
List<RoadDataDto> selectRoadDataMonthEvent();
|
||||
|
||||
List<BuildingRecordsDtos> selectMonthCurrentByRoadData();
|
||||
|
|
|
@ -27,5 +27,11 @@ public interface RoadDataMapper extends BaseMapper<RoadData> {
|
|||
@Select("select count(*) from t_road_data where pm10 > 150")
|
||||
Integer selectCountRoadData();
|
||||
|
||||
@Select("select count(*) from t_road_data where pm10 > 150 and DATE_SUB(CURDATE(), INTERVAL 7 DAY) < DATE(dt)")
|
||||
Integer selectCountWeekRoadData();
|
||||
|
||||
@Select("select count(*) from t_road_data where pm10 > 150 and DATE_SUB(CURDATE(), INTERVAL 30 DAY) < DATE(dt)")
|
||||
Integer selectCountMonthRoadData();
|
||||
|
||||
RoadData getByMaxId();
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<select id="selectByAllEvent" resultType="com.hisense.monitormanage.dto.EventDto">
|
||||
SELECT * FROM t_event te
|
||||
JOIN t_scene_event tse ON te.camera_name = tse.channel_name
|
||||
WHERE te.track_event = 'START'
|
||||
WHERE te.track_event = 'START' AND tse.scene_id = 1
|
||||
ORDER BY te.capture_time DESC
|
||||
<if test="page!=null and '' != page and pageSize != null and '' != pageSize">
|
||||
<bind name="page" value="(page-1)*pageSize"/>
|
||||
|
|
Loading…
Reference in New Issue