| package com.moral.api.pojo.vo.cityAQI; | 
|   | 
| import com.alibaba.fastjson.annotation.JSONField; | 
| import com.fasterxml.jackson.annotation.JsonProperty; | 
| import com.fasterxml.jackson.annotation.JsonPropertyOrder; | 
| import com.moral.api.pojo.dto.cityAQI.ComplianceDaysDTO; | 
| import lombok.Data; | 
|   | 
| import java.util.ArrayList; | 
| import java.util.List; | 
|   | 
| /** | 
|  * @ClassName | 
|  * @Description TODO | 
|  * @Author 陈凯裕 | 
|  * @Date 2022/2/25 15:14 | 
|  * @Version TODO | 
|  **/ | 
| @JsonPropertyOrder(value={"month","aqiComplianceDays","comAqiComplianceDays","aqiCompliancePer","comAqiCompliancePer", "PM2_5Days","PM10Days","SO2Days","NO2Days","CODays","O3Days", "PM2_5FirstDays","PM10FirstDays","SO2FirstDays","NO2FirstDays","COFirstDays","O3FirstDays"}) | 
| public class ComplianceDaysVO { | 
|   | 
|     //月份 | 
|     String month; | 
|   | 
|     //aqi达标天数 | 
|     String aqiComplianceDays; | 
|   | 
|     //同期aqi达标天数 | 
|     String comAqiComplianceDays; | 
|   | 
|     //aqi达标率 | 
|     String aqiCompliancePer; | 
|   | 
|     //同期aqi达标率 | 
|     String comAqiCompliancePer; | 
|   | 
|     //PM2.5污染超标天数 | 
|     String PM2_5Days; | 
|   | 
|     String PM10Days; | 
|   | 
|     String SO2Days; | 
|   | 
|     String NO2Days; | 
|   | 
|     String CODays; | 
|   | 
|     String O3Days; | 
|   | 
|     //PM2.5首要污染天数 | 
|     String PM2_5FirstDays; | 
|   | 
|     String PM10FirstDays; | 
|   | 
|     String SO2FirstDays; | 
|   | 
|     String NO2FirstDays; | 
|   | 
|     String COFirstDays; | 
|   | 
|     String O3FirstDays; | 
|   | 
|     public static List<ComplianceDaysVO> convert(List<ComplianceDaysDTO> dtos){ | 
|         List<ComplianceDaysVO> vos = new ArrayList<>(); | 
|         for (ComplianceDaysDTO dto : dtos) { | 
|             ComplianceDaysVO vo = new ComplianceDaysVO(); | 
|   | 
|             int month = dto.getMonth(); | 
|             if(month<10) | 
|                 vo.setMonth("0"+month+"月"); | 
|             else | 
|                 vo.setMonth(month+"月"); | 
|   | 
|             vo.setAqiComplianceDays(dto.getAqiComplianceDays()+" 天"); | 
|             vo.setComAqiComplianceDays(dto.getComAqiComplianceDays()+" 天"); | 
|             vo.setAqiCompliancePer(dto.getAqiCompliancePer()+"%"); | 
|             vo.setComAqiCompliancePer(dto.getComAqiCompliancePer()+"%"); | 
|             vo.setPM2_5Days(dto.getPM2_5Days()+" 天"); | 
|             vo.setPM10Days(dto.getPM10Days()+" 天"); | 
|             vo.setNO2Days(dto.getNO2Days()+" 天"); | 
|             vo.setSO2Days(dto.getSO2Days()+" 天"); | 
|             vo.setCODays(dto.getCODays()+" 天"); | 
|             vo.setO3Days(dto.getO3Days()+" 天"); | 
|   | 
|             vo.setPM2_5FirstDays(dto.getPM2_5FirstDays()+" 天"); | 
|             vo.setPM10FirstDays(dto.getPM10FirstDays()+" 天"); | 
|             vo.setNO2FirstDays(dto.getNO2FirstDays()+" 天"); | 
|             vo.setSO2FirstDays(dto.getSO2FirstDays()+" 天"); | 
|             vo.setCOFirstDays(dto.getCOFirstDays()+" 天"); | 
|             vo.setO3FirstDays(dto.getO3FirstDays()+" 天"); | 
|             vos.add(vo); | 
|         } | 
|         return vos; | 
|     } | 
|   | 
|     public String getMonth() { | 
|         return month; | 
|     } | 
|   | 
|     public void setMonth(String month) { | 
|         this.month = month; | 
|     } | 
|   | 
|     public String getAqiComplianceDays() { | 
|         return aqiComplianceDays; | 
|     } | 
|   | 
|     public void setAqiComplianceDays(String aqiComplianceDays) { | 
|         this.aqiComplianceDays = aqiComplianceDays; | 
|     } | 
|   | 
|     public String getComAqiComplianceDays() { | 
|         return comAqiComplianceDays; | 
|     } | 
|   | 
|     public void setComAqiComplianceDays(String comAqiComplianceDays) { | 
|         this.comAqiComplianceDays = comAqiComplianceDays; | 
|     } | 
|   | 
|     public String getAqiCompliancePer() { | 
|         return aqiCompliancePer; | 
|     } | 
|   | 
|     public void setAqiCompliancePer(String aqiCompliancePer) { | 
|         this.aqiCompliancePer = aqiCompliancePer; | 
|     } | 
|   | 
|     public String getComAqiCompliancePer() { | 
|         return comAqiCompliancePer; | 
|     } | 
|   | 
|     public void setComAqiCompliancePer(String comAqiCompliancePer) { | 
|         this.comAqiCompliancePer = comAqiCompliancePer; | 
|     } | 
|   | 
|     @JsonProperty("PM2_5Days") | 
|     public String getPM2_5Days() { | 
|         return PM2_5Days; | 
|     } | 
|   | 
|     public void setPM2_5Days(String PM2_5Days) { | 
|         this.PM2_5Days = PM2_5Days; | 
|     } | 
|   | 
|     @JsonProperty("PM10Days") | 
|     public String getPM10Days() { | 
|         return PM10Days; | 
|     } | 
|   | 
|     public void setPM10Days(String PM10Days) { | 
|         this.PM10Days = PM10Days; | 
|     } | 
|   | 
|     @JsonProperty("SO2Days") | 
|     public String getSO2Days() { | 
|         return SO2Days; | 
|     } | 
|   | 
|     public void setSO2Days(String SO2Days) { | 
|         this.SO2Days = SO2Days; | 
|     } | 
|   | 
|     @JsonProperty("NO2Days") | 
|     public String getNO2Days() { | 
|         return NO2Days; | 
|     } | 
|   | 
|     public void setNO2Days(String NO2Days) { | 
|         this.NO2Days = NO2Days; | 
|     } | 
|   | 
|     @JsonProperty("CODays") | 
|     public String getCODays() { | 
|         return CODays; | 
|     } | 
|   | 
|     public void setCODays(String CODays) { | 
|         this.CODays = CODays; | 
|     } | 
|   | 
|     @JsonProperty("O3Days") | 
|     public String getO3Days() { | 
|         return O3Days; | 
|     } | 
|   | 
|     public void setO3Days(String o3Days) { | 
|         O3Days = o3Days; | 
|     } | 
|   | 
|     @JsonProperty("PM2_5FirstDays") | 
|     public String getPM2_5FirstDays() { | 
|         return PM2_5FirstDays; | 
|     } | 
|   | 
|     public void setPM2_5FirstDays(String PM2_5FirstDays) { | 
|         this.PM2_5FirstDays = PM2_5FirstDays; | 
|     } | 
|   | 
|     @JsonProperty("PM10FirstDays") | 
|     public String getPM10FirstDays() { | 
|         return PM10FirstDays; | 
|     } | 
|   | 
|     public void setPM10FirstDays(String PM10FirstDays) { | 
|         this.PM10FirstDays = PM10FirstDays; | 
|     } | 
|   | 
|     @JsonProperty("SO2FirstDays") | 
|     public String getSO2FirstDays() { | 
|         return SO2FirstDays; | 
|     } | 
|   | 
|     public void setSO2FirstDays(String SO2FirstDays) { | 
|         this.SO2FirstDays = SO2FirstDays; | 
|     } | 
|   | 
|     @JsonProperty("NO2FirstDays") | 
|     public String getNO2FirstDays() { | 
|         return NO2FirstDays; | 
|     } | 
|   | 
|     public void setNO2FirstDays(String NO2FirstDays) { | 
|         this.NO2FirstDays = NO2FirstDays; | 
|     } | 
|   | 
|     @JsonProperty("COFirstDays") | 
|     public String getCOFirstDays() { | 
|         return COFirstDays; | 
|     } | 
|   | 
|     public void setCOFirstDays(String COFirstDays) { | 
|         this.COFirstDays = COFirstDays; | 
|     } | 
|   | 
|     @JsonProperty("O3FirstDays") | 
|     public String getO3FirstDays() { | 
|         return O3FirstDays; | 
|     } | 
|   | 
|     public void setO3FirstDays(String o3FirstDays) { | 
|         O3FirstDays = o3FirstDays; | 
|     } | 
|   | 
|     public ComplianceDaysVO() { | 
|     } | 
| } |