道路污染事件时间显示去掉时分秒
This commit is contained in:
parent
0e958c92ea
commit
793fdaec52
|
@ -273,8 +273,11 @@ public class QidiController {
|
||||||
@ApiOperation("查询道路污染数据,根据dt从表中查询,参考输入-2022-05-10 00:00:00,只能查询当前日期前一天及以前的")
|
@ApiOperation("查询道路污染数据,根据dt从表中查询,参考输入-2022-05-10 00:00:00,只能查询当前日期前一天及以前的")
|
||||||
@ApiImplicitParam(name="dt",value = "时间",paramType = "query",required = true,dataType = "string")
|
@ApiImplicitParam(name="dt",value = "时间",paramType = "query",required = true,dataType = "string")
|
||||||
public Result listRoadData(@RequestParam(value="dt") String dt){
|
public Result listRoadData(@RequestParam(value="dt") String dt){
|
||||||
List<RoadData> list = roadDataService.listRoadData(dt);
|
List<RoadData> roadData = roadDataService.listRoadData(dt);
|
||||||
return Result.success(list);
|
roadData.forEach(roadData1 -> {
|
||||||
|
roadData1.setDt(roadData1.getDt().substring(0,10));
|
||||||
|
});
|
||||||
|
return Result.success(roadData);
|
||||||
}
|
}
|
||||||
//根据输入的日期间隔查询道路污染数据(例如:2022-05-10 00:00:00至2022-05-11 00:00:00)
|
//根据输入的日期间隔查询道路污染数据(例如:2022-05-10 00:00:00至2022-05-11 00:00:00)
|
||||||
@GetMapping(value="listRoadDataByTimeRegion")
|
@GetMapping(value="listRoadDataByTimeRegion")
|
||||||
|
@ -287,8 +290,11 @@ public class QidiController {
|
||||||
@RequestParam(value="start") String start,
|
@RequestParam(value="start") String start,
|
||||||
@RequestParam(value="end") String end
|
@RequestParam(value="end") String end
|
||||||
){
|
){
|
||||||
List<RoadData> list = roadDataService.listRoadDataByTimeRegion(start,end);
|
List<RoadData> roadData = roadDataService.listRoadDataByTimeRegion(start,end);
|
||||||
return Result.success(list);
|
roadData.forEach(roadData1 -> {
|
||||||
|
roadData1.setDt(roadData1.getDt().substring(0,10));
|
||||||
|
});
|
||||||
|
return Result.success(roadData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue