This commit is contained in:
wuweida 2022-08-25 11:25:16 +08:00
parent 6d63adfe58
commit 44ceeb2934
3 changed files with 7 additions and 6 deletions

View File

@ -287,11 +287,12 @@ public class QidiController {
} }
//查询道路污染数据 //查询道路污染数据
//输入参考2022-05-10 00:00:00只能查询当前日期前一天及以前的 //查询道路污染数据,根据dt从表中最新时间的数据
@GetMapping(value="listRoadData") @GetMapping(value="listRoadData")
@ApiOperation("查询道路污染数据,根据dt从表中查询参考输入-2022-05-10 00:00:00只能查询当前日期前一天及以前的") @ApiOperation("查询道路污染数据,根据dt从表中最新时间的数据")
@ApiImplicitParam(name="dt",value = "时间",paramType = "query",required = true,dataType = "string") public Result listRoadData(){
public Result listRoadData(@RequestParam(value="dt") String dt){ RoadData byMaxId = roadDataMapper.getByMaxId();
String dt = byMaxId.getDt();
List<RoadData> roadData = roadDataService.listRoadData(dt); List<RoadData> roadData = roadDataService.listRoadData(dt);
roadData.forEach(roadData1 -> { roadData.forEach(roadData1 -> {
roadData1.setDt(roadData1.getDt().substring(0,10)); roadData1.setDt(roadData1.getDt().substring(0,10));

View File

@ -66,7 +66,7 @@ public class BuildingRecordsService {
return maps; return maps;
} }
@Scheduled(cron = "0 0 8/1 * * ?") //@Scheduled(cron = "0 0 8/1 * * ?")
public boolean getAndSaveRecords() { public boolean getAndSaveRecords() {
List<Map> maps = this.getRecords(); List<Map> maps = this.getRecords();
boolean result = false; boolean result = false;

View File

@ -306,7 +306,7 @@ public class MonitorService{
} }
} }
//@Scheduled(cron = "0 30 8 * * ?") @Scheduled(cron = "0 30 8 * * ?")
public void buildingImage() { public void buildingImage() {
try { try {
List<BuildingSite> buildingSites = buildingSiteMapper.selectByList(); List<BuildingSite> buildingSites = buildingSiteMapper.selectByList();