From 76719337e975f99620aafd16d886f3556a056f76 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Wed, 16 Mar 2022 13:28:06 +0800
Subject: [PATCH] screen-api            增加市内所有县排名mock数据

---
 screen-api/src/main/java/com/moral/api/pojo/vo/cityAQI/CityAreaRangeVO.java          |  132 +++++++++++++++++++++++++++++++++
 screen-api/src/main/java/com/moral/api/pojo/dto/cityAQI/ConcentrationAndPercent.java |    7 +
 screen-api/src/main/java/com/moral/api/controller/AqiController.java                 |   43 ++++++++++
 3 files changed, 182 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..04b984c 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,46 @@
         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());
+        }
+        CityAreaRangeVO vo = new CityAreaRangeVO();
+
+        ConcentrationAndPercent cap = new ConcentrationAndPercent();
+        cap.setConcentration("������/������/������");
+        cap.setPercent("������");
+        cap.setCompareConcentration("������������");
+        ConcentrationAndPercent cap2 = new ConcentrationAndPercent();
+        cap2.setConcentration("������/������/������");
+        cap2.setPercent("������");
+
+        vo.setCityName("xxx");
+        vo.setRange(0);
+        vo.setCompositeIndex(cap);
+        vo.setCO(cap);
+        vo.setNO2(cap);
+        vo.setSO2(cap);
+        vo.setPM10(cap);
+        vo.setPM25(cap);
+        vo.setO3(cap);
+        vo.setServerDays(cap2);
+        vo.setFineDays(cap2);
+
+        List<CityAreaRangeVO> vos = new ArrayList<>();
+        vos.add(vo);
+        vos.add(vo);
+
+        return ResultMessage.ok(vos);
+    }
+
 }
diff --git a/screen-api/src/main/java/com/moral/api/pojo/dto/cityAQI/ConcentrationAndPercent.java b/screen-api/src/main/java/com/moral/api/pojo/dto/cityAQI/ConcentrationAndPercent.java
index ea01fca..3f3dbff 100644
--- a/screen-api/src/main/java/com/moral/api/pojo/dto/cityAQI/ConcentrationAndPercent.java
+++ b/screen-api/src/main/java/com/moral/api/pojo/dto/cityAQI/ConcentrationAndPercent.java
@@ -1,5 +1,6 @@
 package com.moral.api.pojo.dto.cityAQI;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
 import lombok.Data;
 
 /**
@@ -10,6 +11,7 @@
  * @Version TODO
  **/
 @Data
+@JsonInclude(value = JsonInclude.Include.NON_NULL)
 public class ConcentrationAndPercent {
 
     /*
@@ -18,6 +20,11 @@
     private String concentration;
 
     /*
+     * ���������������
+     * */
+    private String compareConcentration;
+
+    /*
     * ������/������
     * */
     private String percent;
diff --git a/screen-api/src/main/java/com/moral/api/pojo/vo/cityAQI/CityAreaRangeVO.java b/screen-api/src/main/java/com/moral/api/pojo/vo/cityAQI/CityAreaRangeVO.java
new file mode 100644
index 0000000..94cb8bf
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/vo/cityAQI/CityAreaRangeVO.java
@@ -0,0 +1,132 @@
+package com.moral.api.pojo.vo.cityAQI;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.moral.api.pojo.dto.cityAQI.ConcentrationAndPercent;
+
+/**
+ * @ClassName CityAreaRangeVO
+ * @Description ���������������������VO
+ * @Author ���������
+ * @Date 2022/3/16 13:15
+ * @Version TODO
+ **/
+public class CityAreaRangeVO {
+    public CityAreaRangeVO() {
+    }
+
+    private String cityName;
+
+    private int range;
+
+    private ConcentrationAndPercent compositeIndex;
+
+    private ConcentrationAndPercent PM25;
+
+    private ConcentrationAndPercent PM10;
+
+    private ConcentrationAndPercent SO2;
+
+    private ConcentrationAndPercent NO2;
+
+    private ConcentrationAndPercent CO;
+
+    private ConcentrationAndPercent O3;
+
+    private ConcentrationAndPercent fineDays;
+
+    private ConcentrationAndPercent serverDays;
+
+
+
+
+
+    public String getCityName() {
+        return cityName;
+    }
+
+    public ConcentrationAndPercent getCompositeIndex() {
+        return compositeIndex;
+    }
+    @JsonProperty("PM2_5")
+    public ConcentrationAndPercent getPM25() {
+        return PM25;
+    }
+    @JsonProperty("PM10")
+    public ConcentrationAndPercent getPM10() {
+        return PM10;
+    }
+    @JsonProperty("SO2")
+    public ConcentrationAndPercent getSO2() {
+        return SO2;
+    }
+    @JsonProperty("NO2")
+    public ConcentrationAndPercent getNO2() {
+        return NO2;
+    }
+    @JsonProperty("CO")
+    public ConcentrationAndPercent getCO() {
+        return CO;
+    }
+    @JsonProperty("O3_8H")
+    public ConcentrationAndPercent getO3() {
+        return O3;
+    }
+
+    public ConcentrationAndPercent getFineDays() {
+        return fineDays;
+    }
+
+    public ConcentrationAndPercent getServerDays() {
+        return serverDays;
+    }
+
+
+
+    public void setCityName(String cityName) {
+        this.cityName = cityName;
+    }
+
+    public void setCompositeIndex(ConcentrationAndPercent compositeIndex) {
+        this.compositeIndex = compositeIndex;
+    }
+
+    public void setPM25(ConcentrationAndPercent PM25) {
+        this.PM25 = PM25;
+    }
+
+    public void setPM10(ConcentrationAndPercent PM10) {
+        this.PM10 = PM10;
+    }
+
+    public void setSO2(ConcentrationAndPercent SO2) {
+        this.SO2 = SO2;
+    }
+
+    public void setNO2(ConcentrationAndPercent NO2) {
+        this.NO2 = NO2;
+    }
+
+    public void setCO(ConcentrationAndPercent CO) {
+        this.CO = CO;
+    }
+
+    public void setO3(ConcentrationAndPercent o3) {
+        O3 = o3;
+    }
+
+    public void setFineDays(ConcentrationAndPercent fineDays) {
+        this.fineDays = fineDays;
+    }
+
+    public void setServerDays(ConcentrationAndPercent serverDays) {
+        this.serverDays = serverDays;
+    }
+
+    public int getRange() {
+        return range;
+    }
+
+    public void setRange(int range) {
+        this.range = range;
+    }
+}

--
Gitblit v1.8.0