工地接口优化
This commit is contained in:
parent
62d1e930b3
commit
da7839b9f6
|
@ -148,37 +148,37 @@ public class BuildingController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询近一天工地噪声和扬尘的信息
|
||||
* 根据工地名称查询近一天工地噪声和扬尘的信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("selectDayAll")
|
||||
@ApiOperation("查询近一天工地噪声和扬尘的信息")
|
||||
public Result selectDayAll(){
|
||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectDayAll();
|
||||
@ApiOperation("根据工地名称查询近一天工地噪声和扬尘的信息")
|
||||
public Result selectDayAll(String projectName){
|
||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectDayAll(projectName);
|
||||
Result success = Result.success(recordsDtos);
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询近一周工地噪声和扬尘的信息
|
||||
* 根据工地名称查询近一周工地噪声和扬尘的信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("selectWeekAll")
|
||||
@ApiOperation("查询近一周工地噪声和扬尘的信息")
|
||||
public Result selectWeekAll(){
|
||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectWeekAll();
|
||||
@ApiOperation("根据工地名称查询近一周工地噪声和扬尘的信息")
|
||||
public Result selectWeekAll(String projectName){
|
||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectWeekAll(projectName);
|
||||
Result success = Result.success(recordsDtos);
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询近一月工地噪声和扬尘的信息
|
||||
* 根据工地名称查询近一月工地噪声和扬尘的信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("selectMonthAll")
|
||||
@ApiOperation("查询近一月工地噪声和扬尘的信息")
|
||||
public Result selectMonthAll(){
|
||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectMonthAll();
|
||||
@ApiOperation("根据工地名称查询近一月工地噪声和扬尘的信息")
|
||||
public Result selectMonthAll(String projectName){
|
||||
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectMonthAll(projectName);
|
||||
Result success = Result.success(recordsDtos);
|
||||
return success;
|
||||
}
|
||||
|
|
|
@ -51,16 +51,16 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
|||
List<BuildingRecordsDto> selectMonthNoice();
|
||||
|
||||
@Select("select * from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc " +
|
||||
" where to_days(br.push_time) = to_days(now())")
|
||||
List<BuildingRecordsDto> selectDayAll();
|
||||
" where to_days(br.push_time) = to_days(now()) and br.project_name like concat('%',#{projectName},'%')")
|
||||
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)")
|
||||
List<BuildingRecordsDto> selectWeekAll();
|
||||
" 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)")
|
||||
List<BuildingRecordsDto> selectMonthAll();
|
||||
" 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 from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||
" where br.project_name like concat('%',#{projectName},'%')")
|
||||
|
|
Loading…
Reference in New Issue