工地接口优化

This commit is contained in:
wuweida 2022-06-09 09:15:55 +08:00
parent 1fb6d19218
commit ce3f9b8350
2 changed files with 12 additions and 12 deletions

View File

@ -100,11 +100,11 @@ public class BuildingController {
}
/**
* 查询近一月工地扬尘并排序
* 查询近30天工地扬尘并排序
* @return
*/
@GetMapping("selectMonthPm10")
@ApiOperation("查询近一月工地扬尘并排序")
@ApiOperation("查询近30天工地扬尘并排序")
public Result selectMonthPm10(){
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectMonthPm10();
Result success = Result.success(recordsDtos);
@ -136,11 +136,11 @@ public class BuildingController {
}
/**
* 查询近一月工地噪声并排序
* 查询近30天工地噪声并排序
* @return
*/
@GetMapping("selectMonthNoice")
@ApiOperation("查询近一月工地噪声并排序")
@ApiOperation("查询近30天工地噪声并排序")
public Result selectMonthNoice(){
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectMonthNoice();
Result success = Result.success(recordsDtos);
@ -172,11 +172,11 @@ public class BuildingController {
}
/**
* 根据工地名称查询近一月工地噪声和扬尘的信息
* 根据工地名称查询近30天工地噪声和扬尘的信息
* @return
*/
@GetMapping("selectMonthAll")
@ApiOperation("根据工地名称查询近一月工地噪声和扬尘的信息")
@ApiOperation("根据工地名称查询近30天工地噪声和扬尘的信息")
public Result selectMonthAll(String projectName){
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectMonthAll(projectName);
Result success = Result.success(recordsDtos);

View File

@ -31,11 +31,11 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
List<BuildingRecordsDto> selectDayPm10();
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(br.push_time) order by br.pm10 desc")
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) < date(br.push_time) order by br.pm10 desc")
List<BuildingRecordsDto> selectWeekPm10();
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(br.push_time) order by br.pm10 desc")
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) < date(br.push_time) order by br.pm10 desc")
List<BuildingRecordsDto> selectMonthPm10();
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc " +
@ -43,11 +43,11 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
List<BuildingRecordsDto> selectDayNoice();
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(br.push_time) order by br.noice desc")
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) < date(br.push_time) order by br.noice desc")
List<BuildingRecordsDto> selectWeekNoice();
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(br.push_time) order by br.noice desc")
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) < date(br.push_time) order by br.noice desc")
List<BuildingRecordsDto> selectMonthNoice();
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
@ -55,11 +55,11 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
List<BuildingRecordsDto> selectDayAll(String projectName);
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(br.push_time) and br.project_name like concat('%',#{projectName},'%')")
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) < date(br.push_time) and br.project_name like concat('%',#{projectName},'%')")
List<BuildingRecordsDto> selectWeekAll(String projectName);
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(br.push_time) and br.project_name like concat('%',#{projectName},'%')")
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) < date(br.push_time) and br.project_name like concat('%',#{projectName},'%')")
List<BuildingRecordsDto> selectMonthAll(String projectName);
@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" +