要求将B实体集合list循环最少次数转存成A集合实体list
A集合实体类 , 其中数据更新时间和站点code为主键
@Data
@TableName("moni_local_site_hour")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="moni_local_site_hour对象", description="本地站点小时数据")
public class MoniLocalSiteHour implements Serializable {
private static final long serialVersionUID = 1L;
/**数据更新时间*/
@Excel(name = "数据更新时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "数据更新时间")
private Date datatime;
/**站点Code*/
@Excel(name = "站点Code", width = 15)
@ApiModelProperty(value = "站点Code")
private String stationcode;
/**站点名称*/
@Excel(name = "站点名称", width = 15)
@ApiModelProperty(value = "站点名称")
private String stationname;
/**二氧化硫浓度值*/
@Excel(name = "二氧化硫浓度值", width = 15)
@ApiModelProperty(value = "二氧化硫浓度值")
private Integer so2;
/**二氧化氮浓度值*/
@Excel(name = "二氧化氮浓度值", width = 15)
@ApiModelProperty(value = "二氧化氮浓度值")
private Integer no2;
/**细颗粒物浓度值*/
@Excel(name = "细颗粒物浓度值", width = 15)
@ApiModelProperty(value = "细颗粒物浓度值")
private Integer pm25;
/**可吸入颗粒物浓度值*/
@Excel(name = "可吸入颗粒物浓度值", width = 15)
@ApiModelProperty(value = "可吸入颗粒物浓度值")
private Integer pm10;
/**一氧化碳浓度值*/
@Excel(name = "一氧化碳浓度值", width = 15)
@ApiModelProperty(value = "一氧化碳浓度值")
private BigDecimal co;
/**臭氧浓度值*/
@Excel(name = "臭氧浓度值", width = 15)
@ApiModelProperty(value = "臭氧浓度值")
private Integer o3;
/**PM2.5分指数*/
@Excel(name = "PM2.5分指数", width = 15)
@ApiModelProperty(value = "PM2.5分指数")
private Integer pm25iaqi;
/**二氧化硫分指数*/
@Excel(name = "二氧化硫分指数", width = 15)
@ApiModelProperty(value = "二氧化硫分指数")
private Integer so2iaqi;
/**二氧化氮分指数*/
@Excel(name = "二氧化氮分指数", width = 15)
@ApiModelProperty(value = "二氧化氮分指数")
private Integer no2iaqi;
/**PM10分指数*/
@Excel(name = "PM10分指数", width = 15)
@ApiModelProperty(value = "PM10分指数")
private Integer pm10iaqi;
/**一氧化碳分指数*/
@Excel(name = "一氧化碳分指数", width = 15)
@ApiModelProperty(value = "一氧化碳分指数")
private Integer coiaqi;
/**臭氧分指数*/
@Excel(name = "臭氧分指数", width = 15)
@ApiModelProperty(value = "臭氧分指数")
private Integer o3iaqi;
/**空气质量指数*/
@Excel(name = "空气质量指数", width = 15)
@ApiModelProperty(value = "空气质量指数")
private Integer aqi;
/**首要污染物*/
@Excel(name = "首要污染物", width = 15)
@ApiModelProperty(value = "首要污染物")
private String primarypol;
/**AQI等级*/
@Excel(name = "AQI等级", width = 15)
@ApiModelProperty(value = "AQI等级")
private String aqilevel;
/**臭氧8小时浓度值*/
@Excel(name = "臭氧8小时浓度值", width = 15)
@ApiModelProperty(value = "臭氧8小时浓度值")
@TableField("o3_8h")
private Integer o38h;
/**臭氧8小时分指数*/
@Excel(name = "臭氧8小时分指数", width = 15)
@ApiModelProperty(value = "臭氧8小时分指数")
@TableField("o3_8hiaqi")
private Integer o38hiaqi;
/**综合指数*/
@Excel(name = "综合指数", width = 15)
@ApiModelProperty(value = "综合指数")
private BigDecimal countindex;
/**flag*/
@Excel(name = "flag", width = 15)
@ApiModelProperty(value = "flag")
private Integer flag;
/**
* 数据类型0:原始实况,1:审核实况,2:原始标况,3:审核标况
*/
private Integer dataType;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "修改时间")
private Date updateTime;
/**温度*/
@Excel(name = "温度", width = 15)
@ApiModelProperty(value = "温度")
private BigDecimal temp;
/**相对湿度*/
@Excel(name = "相对湿度", width = 15)
@ApiModelProperty(value = "相对湿度")
private BigDecimal rh;
/**气压*/
@Excel(name = "气压", width = 15)
@ApiModelProperty(value = "气压")
private BigDecimal pres;
/**风速*/
@Excel(name = "风速", width = 15)
@ApiModelProperty(value = "风速")
private BigDecimal speed;
/**风向*/
@Excel(name = "风向", width = 15)
@ApiModelProperty(value = "风向")
private BigDecimal wind;
}
B集合实体
```java
@Data
public class StationHourOrDayData {
/**
* 时间
*/
@Excel(name = "时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "时间")
private Date collectDatetime;
/**
* 是否异常(0:异常 1:正常)
*/
private Integer isNormal;
/**
* 污染等级
*/
private String level;
/**
* 污染物浓度值
*/
private Integer pollutantValue;
/**
* 污染物ID
*/
@TableField(exist = false)
private String pollutantId;
/**
* 站点code
*/
@TableField(exist = false)
private String stationId;
/**
* 站点名称
*/
@TableField(exist = false)
private String address;
/**
* 具体污染物(so2 / no2 / pm25 / pm10 / co / o3 / aqi )
*/
@TableField(exist = false)
private String pollutantType;
}
```