From 080830b1bcf5339aac9013d279cacd2d08bbda80 Mon Sep 17 00:00:00 2001 From: chen_xi <276999030@qq.com> Date: Mon, 14 Nov 2022 17:20:23 +0800 Subject: [PATCH] 剔除小时数据中时间重复的数据 --- screen-api/src/main/java/com/moral/api/controller/AqiController.java | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/controller/AqiController.java b/screen-api/src/main/java/com/moral/api/controller/AqiController.java index 9ae3583..3f6071e 100644 --- a/screen-api/src/main/java/com/moral/api/controller/AqiController.java +++ b/screen-api/src/main/java/com/moral/api/controller/AqiController.java @@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Required; +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -315,4 +316,38 @@ return ResultMessage.ok(result); } + /** + * @Description: ������������������������������ ������7 + * @Param: [regionCode, time] + * @return: com.moral.constant.ResultMessage + * @Author: ��������� + * @Date: 2022/3/16 + */ + @GetMapping("cityAreaRange") + public ResultMessage cityAreaRange(Integer regionCode,@DateTimeFormat(pattern = "yyyy-MM-dd") Date time){ + if(regionCode==null || time==null){ + return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), + ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); + } + List<CityAreaRangeVO> vos = cityAqiDailyService.cityAreaRange(regionCode,time); + return ResultMessage.ok(vos); + } + + /** + *@Description: ��������������� + *@Param: [regionCode] + *@return: com.moral.constant.ResultMessage + *@Author: lizijie + *@Date: 2022/3/16 16:54 + **/ + @GetMapping("countyData") + public ResultMessage countyData(Integer regionCode){ + if(regionCode==null){ + return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), + ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); + } + Map<String, Object> resultMap = cityAqiService.countyData(regionCode); + return ResultMessage.ok(resultMap); + } + } -- Gitblit v1.8.0