添加道路污染事件,工地扬尘,工地噪声事件总数
This commit is contained in:
parent
1ae322e435
commit
ed468c85c0
|
@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -109,7 +110,11 @@ public class BuildingController {
|
||||||
@ApiOperation("查询工地扬尘事件")
|
@ApiOperation("查询工地扬尘事件")
|
||||||
public Result selectRaise(Integer page,Integer pageSize){
|
public Result selectRaise(Integer page,Integer pageSize){
|
||||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectRaise(page,pageSize);
|
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectRaise(page,pageSize);
|
||||||
Result success = Result.success(recordsDtos);
|
Integer integer = buildingRecordsMapper.selectCountRaise();
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("sum",integer);
|
||||||
|
map.put("data",recordsDtos);
|
||||||
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +126,11 @@ public class BuildingController {
|
||||||
@ApiOperation("查询工地噪声事件")
|
@ApiOperation("查询工地噪声事件")
|
||||||
public Result selectNoiceEvent(Integer page,Integer pageSize){
|
public Result selectNoiceEvent(Integer page,Integer pageSize){
|
||||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectNoiceEvent(page,pageSize);
|
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectNoiceEvent(page,pageSize);
|
||||||
Result success = Result.success(recordsDtos);
|
Integer integer = buildingRecordsMapper.selectCountNoice();
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("sum",integer);
|
||||||
|
map.put("data",recordsDtos);
|
||||||
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -300,9 +300,8 @@ public class QidiController {
|
||||||
public Result selectRoadData(Integer page,Integer pageSize){
|
public Result selectRoadData(Integer page,Integer pageSize){
|
||||||
List<RoadData> roadData = roadDataMapper.selectRoadData(page,pageSize);
|
List<RoadData> roadData = roadDataMapper.selectRoadData(page,pageSize);
|
||||||
Integer integer = roadDataMapper.selectCountRoadData();
|
Integer integer = roadDataMapper.selectCountRoadData();
|
||||||
page = integer/pageSize + 1;
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
map.put("page",page);
|
map.put("sum",integer);
|
||||||
map.put("roadData",roadData);
|
map.put("roadData",roadData);
|
||||||
Result success = Result.success(map);
|
Result success = Result.success(map);
|
||||||
return success;
|
return success;
|
||||||
|
|
|
@ -38,6 +38,13 @@ 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);
|
||||||
|
|
||||||
|
@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();
|
||||||
|
|
||||||
|
@Select("SELECT COUNT(*) FROM (SELECT br.noice,br.push_time FROM t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc WHERE (hour(br.push_time)>=22 or 6 > hour(br.push_time)) AND br.noice > 55 " +
|
||||||
|
"UNION SELECT br.noice,br.push_time FROM t_building_records br JOIN t_building_new_site bs ON br.project_name = bs.gdmc WHERE DATE_FORMAT(br.push_time,'%H')>=6 AND DATE_FORMAT(br.push_time,'%H')<=22 AND br.noice > 70) a")
|
||||||
|
Integer selectCountNoice();
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq,bs.yjsg from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq,bs.yjsg from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
" where br.project_name like concat('%',#{projectName},'%')")
|
" where br.project_name like concat('%',#{projectName},'%')")
|
||||||
List<BuildingRecordsDto> selectByProjectName(String projectName);
|
List<BuildingRecordsDto> selectByProjectName(String projectName);
|
||||||
|
|
Loading…
Reference in New Issue