| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |