diff --git a/src/main/java/generator/mapper/radi_chn_mul_horMapper.java b/src/main/java/com/cuit/solarenergy/mapper/radi_chn_mul_horMapper.java similarity index 91% rename from src/main/java/generator/mapper/radi_chn_mul_horMapper.java rename to src/main/java/com/cuit/solarenergy/mapper/radi_chn_mul_horMapper.java index 359a015..eccbad8 100644 --- a/src/main/java/generator/mapper/radi_chn_mul_horMapper.java +++ b/src/main/java/com/cuit/solarenergy/mapper/radi_chn_mul_horMapper.java @@ -1,4 +1,4 @@ -package generator.mapper; +package com.cuit.solarenergy.mapper; import generator.domain.radi_chn_mul_hor; import com.baomidou.mybatisplus.core.mapper.BaseMapper; diff --git a/src/main/java/generator/service/impl/radi_chn_mul_horServiceImpl.java b/src/main/java/com/cuit/solarenergy/service/impl/radi_chn_mul_horServiceImpl.java similarity index 73% rename from src/main/java/generator/service/impl/radi_chn_mul_horServiceImpl.java rename to src/main/java/com/cuit/solarenergy/service/impl/radi_chn_mul_horServiceImpl.java index ea792a3..94a6b78 100644 --- a/src/main/java/generator/service/impl/radi_chn_mul_horServiceImpl.java +++ b/src/main/java/com/cuit/solarenergy/service/impl/radi_chn_mul_horServiceImpl.java @@ -1,9 +1,9 @@ -package generator.service.impl; +package com.cuit.solarenergy.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import generator.domain.radi_chn_mul_hor; -import generator.service.radi_chn_mul_horService; -import generator.mapper.radi_chn_mul_horMapper; +import com.cuit.solarenergy.service.radi_chn_mul_horService; +import com.cuit.solarenergy.mapper.radi_chn_mul_horMapper; import org.springframework.stereotype.Service; /** diff --git a/src/main/java/generator/service/radi_chn_mul_horService.java b/src/main/java/com/cuit/solarenergy/service/radi_chn_mul_horService.java similarity index 89% rename from src/main/java/generator/service/radi_chn_mul_horService.java rename to src/main/java/com/cuit/solarenergy/service/radi_chn_mul_horService.java index 8ec63e1..d8609c7 100644 --- a/src/main/java/generator/service/radi_chn_mul_horService.java +++ b/src/main/java/com/cuit/solarenergy/service/radi_chn_mul_horService.java @@ -1,4 +1,4 @@ -package generator.service; +package com.cuit.solarenergy.service; import generator.domain.radi_chn_mul_hor; import com.baomidou.mybatisplus.extension.service.IService; diff --git a/src/main/java/generator/domain/radi_chn_mul_hor.java b/src/main/java/generator/domain/radi_chn_mul_hor.java deleted file mode 100644 index dcdcc6c..0000000 --- a/src/main/java/generator/domain/radi_chn_mul_hor.java +++ /dev/null @@ -1,532 +0,0 @@ -package generator.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import java.io.Serializable; -import lombok.Data; - -/** - * - * @TableName radi_chn_mul_hor - */ -@TableName(value ="radi_chn_mul_hor") -@Data -public class radi_chn_mul_hor implements Serializable { - /** - * 主键 - */ - @TableId(type = IdType.AUTO) - private Integer id; - - /** - * 区站号 - */ - private String station_Id_C; - - /** - * 测站级别标识/代码表 - */ - private String station_levl; - - /** - * 纬度 ° - */ - private String lat; - - /** - * 经度 ° - */ - private String lon; - - /** - * 测站高度 m - */ - private String alti; - - /** - * 行政编码标识/代码表 - */ - private String admin_Code_CHN; - - /** - * 行政编码2 - */ - private String v_ACODE_4SEARCH; - - /** - * 镇编码 - */ - private String town_code; - - /** - * 地市名 - */ - private String city; - - /** - * 站名 - */ - private String station_Name; - - /** - * 区县名 - */ - private String cnty; - - /** - * 国家代码 - */ - private String COUNTRYCODE; - - /** - * 国家名称 - */ - private String country; - - /** - * 站网代码 - */ - private String netCode; - - /** - * 省名 - */ - private String province; - - /** - * 区域代码 - */ - private String REGIONCODE; - - /** - * 乡镇名 - */ - private String town; - - /** - * 记录标识 - */ - private String d_RETAIN_ID; - - /** - * 数据来源 - */ - private String d_SOURCE_ID; - - /** - * 资料标识 - */ - private String DATA_ID; - - /** - * 入库时间 - */ - private String IYMDHM; - - /** - * 收到时间 - */ - private String RYMDHM; - - /** - * 更新时间 - */ - private String UPDATE_TIME; - - /** - * 资料时间 - */ - private String datetime; - - /** - * 更正报标志 - */ - private String REP_CORR_ID; - - /** - * 区站号/观测平台标识(数字) - */ - private String station_Id_d; - - /** - * 年 - */ - private String year; - - /** - * 月 - */ - private String mon; - - /** - * 日 - */ - private String day; - - /** - * 时 - */ - private String hour; - - /** - * 分 - */ - private String min; - - /** - * 总辐射辐照度 W.m-2 - */ - private String v14311; - - /** - * 净辐射辐照度 W.m-2 - */ - private String v14312; - - /** - * 直接辐射辐照度 W.m-2 - */ - private String v14313; - - /** - * 散射辐射辐照度 W.m-2 - */ - private String v14314; - - /** - * 反射辐射辐照度 W.m-2 - */ - private String v14315; - - /** - * 紫外辐射辐照度 W.m-2 - */ - private String v14316; - - /** - * 总辐射曝辐量 MJ·m-2 - */ - private String v14320; - - /** - * 总辐射辐照度最大值 W.m-2 - */ - private String QRA_Max; - - /** - * 总辐射辐照度最大出现时间 - */ - private String QRA_Max_OTime; - - /** - * 净辐射曝辐量 MJ·m-2 - */ - private String v14308; - - /** - * 净辐射辐照度最大值 W.m-2 - */ - private String NRA_Max; - - /** - * 净辐射辐照度最大出现时间 - */ - private String NRA_Max_OTime; - - /** - * 净辐射辐照度最小值 W.m-2 - */ - private String NRA_Min; - - /** - * 净辐射辐照度最小出现时间 - */ - private String NRA_Min_OTime; - - /** - * 直接辐射曝辐量 MJ·m-2 - */ - private String v14322; - - /** - * 直接辐射辐照度最大值 W.m-2 - */ - private String DRA_Max; - - /** - * 直接辐射辐照度最大出现时间 - */ - private String DRA_Max_OTime; - - /** - * 散射辐射曝辐量 MJ·m-2 - */ - private String v14309; - - /** - * 散射辐射辐照度最大值 W.m-2 - */ - private String SRA_Max; - - /** - * 散射辐射辐照度最大出现时间 - */ - private String SRA_Max_OTime; - - /** - * 反射辐射曝辐量 MJ·m-2 - */ - private String v14306; - - /** - * 反射辐射辐照度最大值 W.m-2 - */ - private String RRA_Max; - - /** - * 反射辐射辐照度最大出现时间 - */ - private String RRA_Max_OTime; - - /** - * 紫外辐射曝辐量 MJ·m-2 - */ - private String v14307; - - /** - * 紫外辐射辐照度最大值 W.m-2 - */ - private String v14316_05; - - /** - * 紫外辐射辐照度最大出现时间 - */ - private String UV_Max_OTime; - - /** - * 日照时数(直接辐射计算值) h - */ - private String SSH; - - /** - * 大气浑浊度 - */ - private String API; - - @TableField(exist = false) - private static final long serialVersionUID = 1L; - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - radi_chn_mul_hor other = (radi_chn_mul_hor) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getStation_Id_C() == null ? other.getStation_Id_C() == null : this.getStation_Id_C().equals(other.getStation_Id_C())) - && (this.getStation_levl() == null ? other.getStation_levl() == null : this.getStation_levl().equals(other.getStation_levl())) - && (this.getLat() == null ? other.getLat() == null : this.getLat().equals(other.getLat())) - && (this.getLon() == null ? other.getLon() == null : this.getLon().equals(other.getLon())) - && (this.getAlti() == null ? other.getAlti() == null : this.getAlti().equals(other.getAlti())) - && (this.getAdmin_Code_CHN() == null ? other.getAdmin_Code_CHN() == null : this.getAdmin_Code_CHN().equals(other.getAdmin_Code_CHN())) - && (this.getV_ACODE_4SEARCH() == null ? other.getV_ACODE_4SEARCH() == null : this.getV_ACODE_4SEARCH().equals(other.getV_ACODE_4SEARCH())) - && (this.getTown_code() == null ? other.getTown_code() == null : this.getTown_code().equals(other.getTown_code())) - && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity())) - && (this.getStation_Name() == null ? other.getStation_Name() == null : this.getStation_Name().equals(other.getStation_Name())) - && (this.getCnty() == null ? other.getCnty() == null : this.getCnty().equals(other.getCnty())) - && (this.getCOUNTRYCODE() == null ? other.getCOUNTRYCODE() == null : this.getCOUNTRYCODE().equals(other.getCOUNTRYCODE())) - && (this.getCountry() == null ? other.getCountry() == null : this.getCountry().equals(other.getCountry())) - && (this.getNetCode() == null ? other.getNetCode() == null : this.getNetCode().equals(other.getNetCode())) - && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince())) - && (this.getREGIONCODE() == null ? other.getREGIONCODE() == null : this.getREGIONCODE().equals(other.getREGIONCODE())) - && (this.getTown() == null ? other.getTown() == null : this.getTown().equals(other.getTown())) - && (this.getD_RETAIN_ID() == null ? other.getD_RETAIN_ID() == null : this.getD_RETAIN_ID().equals(other.getD_RETAIN_ID())) - && (this.getD_SOURCE_ID() == null ? other.getD_SOURCE_ID() == null : this.getD_SOURCE_ID().equals(other.getD_SOURCE_ID())) - && (this.getDATA_ID() == null ? other.getDATA_ID() == null : this.getDATA_ID().equals(other.getDATA_ID())) - && (this.getIYMDHM() == null ? other.getIYMDHM() == null : this.getIYMDHM().equals(other.getIYMDHM())) - && (this.getRYMDHM() == null ? other.getRYMDHM() == null : this.getRYMDHM().equals(other.getRYMDHM())) - && (this.getUPDATE_TIME() == null ? other.getUPDATE_TIME() == null : this.getUPDATE_TIME().equals(other.getUPDATE_TIME())) - && (this.getDatetime() == null ? other.getDatetime() == null : this.getDatetime().equals(other.getDatetime())) - && (this.getREP_CORR_ID() == null ? other.getREP_CORR_ID() == null : this.getREP_CORR_ID().equals(other.getREP_CORR_ID())) - && (this.getStation_Id_d() == null ? other.getStation_Id_d() == null : this.getStation_Id_d().equals(other.getStation_Id_d())) - && (this.getYear() == null ? other.getYear() == null : this.getYear().equals(other.getYear())) - && (this.getMon() == null ? other.getMon() == null : this.getMon().equals(other.getMon())) - && (this.getDay() == null ? other.getDay() == null : this.getDay().equals(other.getDay())) - && (this.getHour() == null ? other.getHour() == null : this.getHour().equals(other.getHour())) - && (this.getMin() == null ? other.getMin() == null : this.getMin().equals(other.getMin())) - && (this.getV14311() == null ? other.getV14311() == null : this.getV14311().equals(other.getV14311())) - && (this.getV14312() == null ? other.getV14312() == null : this.getV14312().equals(other.getV14312())) - && (this.getV14313() == null ? other.getV14313() == null : this.getV14313().equals(other.getV14313())) - && (this.getV14314() == null ? other.getV14314() == null : this.getV14314().equals(other.getV14314())) - && (this.getV14315() == null ? other.getV14315() == null : this.getV14315().equals(other.getV14315())) - && (this.getV14316() == null ? other.getV14316() == null : this.getV14316().equals(other.getV14316())) - && (this.getV14320() == null ? other.getV14320() == null : this.getV14320().equals(other.getV14320())) - && (this.getQRA_Max() == null ? other.getQRA_Max() == null : this.getQRA_Max().equals(other.getQRA_Max())) - && (this.getQRA_Max_OTime() == null ? other.getQRA_Max_OTime() == null : this.getQRA_Max_OTime().equals(other.getQRA_Max_OTime())) - && (this.getV14308() == null ? other.getV14308() == null : this.getV14308().equals(other.getV14308())) - && (this.getNRA_Max() == null ? other.getNRA_Max() == null : this.getNRA_Max().equals(other.getNRA_Max())) - && (this.getNRA_Max_OTime() == null ? other.getNRA_Max_OTime() == null : this.getNRA_Max_OTime().equals(other.getNRA_Max_OTime())) - && (this.getNRA_Min() == null ? other.getNRA_Min() == null : this.getNRA_Min().equals(other.getNRA_Min())) - && (this.getNRA_Min_OTime() == null ? other.getNRA_Min_OTime() == null : this.getNRA_Min_OTime().equals(other.getNRA_Min_OTime())) - && (this.getV14322() == null ? other.getV14322() == null : this.getV14322().equals(other.getV14322())) - && (this.getDRA_Max() == null ? other.getDRA_Max() == null : this.getDRA_Max().equals(other.getDRA_Max())) - && (this.getDRA_Max_OTime() == null ? other.getDRA_Max_OTime() == null : this.getDRA_Max_OTime().equals(other.getDRA_Max_OTime())) - && (this.getV14309() == null ? other.getV14309() == null : this.getV14309().equals(other.getV14309())) - && (this.getSRA_Max() == null ? other.getSRA_Max() == null : this.getSRA_Max().equals(other.getSRA_Max())) - && (this.getSRA_Max_OTime() == null ? other.getSRA_Max_OTime() == null : this.getSRA_Max_OTime().equals(other.getSRA_Max_OTime())) - && (this.getV14306() == null ? other.getV14306() == null : this.getV14306().equals(other.getV14306())) - && (this.getRRA_Max() == null ? other.getRRA_Max() == null : this.getRRA_Max().equals(other.getRRA_Max())) - && (this.getRRA_Max_OTime() == null ? other.getRRA_Max_OTime() == null : this.getRRA_Max_OTime().equals(other.getRRA_Max_OTime())) - && (this.getV14307() == null ? other.getV14307() == null : this.getV14307().equals(other.getV14307())) - && (this.getV14316_05() == null ? other.getV14316_05() == null : this.getV14316_05().equals(other.getV14316_05())) - && (this.getUV_Max_OTime() == null ? other.getUV_Max_OTime() == null : this.getUV_Max_OTime().equals(other.getUV_Max_OTime())) - && (this.getSSH() == null ? other.getSSH() == null : this.getSSH().equals(other.getSSH())) - && (this.getAPI() == null ? other.getAPI() == null : this.getAPI().equals(other.getAPI())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getStation_Id_C() == null) ? 0 : getStation_Id_C().hashCode()); - result = prime * result + ((getStation_levl() == null) ? 0 : getStation_levl().hashCode()); - result = prime * result + ((getLat() == null) ? 0 : getLat().hashCode()); - result = prime * result + ((getLon() == null) ? 0 : getLon().hashCode()); - result = prime * result + ((getAlti() == null) ? 0 : getAlti().hashCode()); - result = prime * result + ((getAdmin_Code_CHN() == null) ? 0 : getAdmin_Code_CHN().hashCode()); - result = prime * result + ((getV_ACODE_4SEARCH() == null) ? 0 : getV_ACODE_4SEARCH().hashCode()); - result = prime * result + ((getTown_code() == null) ? 0 : getTown_code().hashCode()); - result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode()); - result = prime * result + ((getStation_Name() == null) ? 0 : getStation_Name().hashCode()); - result = prime * result + ((getCnty() == null) ? 0 : getCnty().hashCode()); - result = prime * result + ((getCOUNTRYCODE() == null) ? 0 : getCOUNTRYCODE().hashCode()); - result = prime * result + ((getCountry() == null) ? 0 : getCountry().hashCode()); - result = prime * result + ((getNetCode() == null) ? 0 : getNetCode().hashCode()); - result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode()); - result = prime * result + ((getREGIONCODE() == null) ? 0 : getREGIONCODE().hashCode()); - result = prime * result + ((getTown() == null) ? 0 : getTown().hashCode()); - result = prime * result + ((getD_RETAIN_ID() == null) ? 0 : getD_RETAIN_ID().hashCode()); - result = prime * result + ((getD_SOURCE_ID() == null) ? 0 : getD_SOURCE_ID().hashCode()); - result = prime * result + ((getDATA_ID() == null) ? 0 : getDATA_ID().hashCode()); - result = prime * result + ((getIYMDHM() == null) ? 0 : getIYMDHM().hashCode()); - result = prime * result + ((getRYMDHM() == null) ? 0 : getRYMDHM().hashCode()); - result = prime * result + ((getUPDATE_TIME() == null) ? 0 : getUPDATE_TIME().hashCode()); - result = prime * result + ((getDatetime() == null) ? 0 : getDatetime().hashCode()); - result = prime * result + ((getREP_CORR_ID() == null) ? 0 : getREP_CORR_ID().hashCode()); - result = prime * result + ((getStation_Id_d() == null) ? 0 : getStation_Id_d().hashCode()); - result = prime * result + ((getYear() == null) ? 0 : getYear().hashCode()); - result = prime * result + ((getMon() == null) ? 0 : getMon().hashCode()); - result = prime * result + ((getDay() == null) ? 0 : getDay().hashCode()); - result = prime * result + ((getHour() == null) ? 0 : getHour().hashCode()); - result = prime * result + ((getMin() == null) ? 0 : getMin().hashCode()); - result = prime * result + ((getV14311() == null) ? 0 : getV14311().hashCode()); - result = prime * result + ((getV14312() == null) ? 0 : getV14312().hashCode()); - result = prime * result + ((getV14313() == null) ? 0 : getV14313().hashCode()); - result = prime * result + ((getV14314() == null) ? 0 : getV14314().hashCode()); - result = prime * result + ((getV14315() == null) ? 0 : getV14315().hashCode()); - result = prime * result + ((getV14316() == null) ? 0 : getV14316().hashCode()); - result = prime * result + ((getV14320() == null) ? 0 : getV14320().hashCode()); - result = prime * result + ((getQRA_Max() == null) ? 0 : getQRA_Max().hashCode()); - result = prime * result + ((getQRA_Max_OTime() == null) ? 0 : getQRA_Max_OTime().hashCode()); - result = prime * result + ((getV14308() == null) ? 0 : getV14308().hashCode()); - result = prime * result + ((getNRA_Max() == null) ? 0 : getNRA_Max().hashCode()); - result = prime * result + ((getNRA_Max_OTime() == null) ? 0 : getNRA_Max_OTime().hashCode()); - result = prime * result + ((getNRA_Min() == null) ? 0 : getNRA_Min().hashCode()); - result = prime * result + ((getNRA_Min_OTime() == null) ? 0 : getNRA_Min_OTime().hashCode()); - result = prime * result + ((getV14322() == null) ? 0 : getV14322().hashCode()); - result = prime * result + ((getDRA_Max() == null) ? 0 : getDRA_Max().hashCode()); - result = prime * result + ((getDRA_Max_OTime() == null) ? 0 : getDRA_Max_OTime().hashCode()); - result = prime * result + ((getV14309() == null) ? 0 : getV14309().hashCode()); - result = prime * result + ((getSRA_Max() == null) ? 0 : getSRA_Max().hashCode()); - result = prime * result + ((getSRA_Max_OTime() == null) ? 0 : getSRA_Max_OTime().hashCode()); - result = prime * result + ((getV14306() == null) ? 0 : getV14306().hashCode()); - result = prime * result + ((getRRA_Max() == null) ? 0 : getRRA_Max().hashCode()); - result = prime * result + ((getRRA_Max_OTime() == null) ? 0 : getRRA_Max_OTime().hashCode()); - result = prime * result + ((getV14307() == null) ? 0 : getV14307().hashCode()); - result = prime * result + ((getV14316_05() == null) ? 0 : getV14316_05().hashCode()); - result = prime * result + ((getUV_Max_OTime() == null) ? 0 : getUV_Max_OTime().hashCode()); - result = prime * result + ((getSSH() == null) ? 0 : getSSH().hashCode()); - result = prime * result + ((getAPI() == null) ? 0 : getAPI().hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", station_Id_C=").append(station_Id_C); - sb.append(", station_levl=").append(station_levl); - sb.append(", lat=").append(lat); - sb.append(", lon=").append(lon); - sb.append(", alti=").append(alti); - sb.append(", admin_Code_CHN=").append(admin_Code_CHN); - sb.append(", v_ACODE_4SEARCH=").append(v_ACODE_4SEARCH); - sb.append(", town_code=").append(town_code); - sb.append(", city=").append(city); - sb.append(", station_Name=").append(station_Name); - sb.append(", cnty=").append(cnty); - sb.append(", COUNTRYCODE=").append(COUNTRYCODE); - sb.append(", country=").append(country); - sb.append(", netCode=").append(netCode); - sb.append(", province=").append(province); - sb.append(", REGIONCODE=").append(REGIONCODE); - sb.append(", town=").append(town); - sb.append(", d_RETAIN_ID=").append(d_RETAIN_ID); - sb.append(", d_SOURCE_ID=").append(d_SOURCE_ID); - sb.append(", DATA_ID=").append(DATA_ID); - sb.append(", IYMDHM=").append(IYMDHM); - sb.append(", RYMDHM=").append(RYMDHM); - sb.append(", UPDATE_TIME=").append(UPDATE_TIME); - sb.append(", datetime=").append(datetime); - sb.append(", REP_CORR_ID=").append(REP_CORR_ID); - sb.append(", station_Id_d=").append(station_Id_d); - sb.append(", year=").append(year); - sb.append(", mon=").append(mon); - sb.append(", day=").append(day); - sb.append(", hour=").append(hour); - sb.append(", min=").append(min); - sb.append(", v14311=").append(v14311); - sb.append(", v14312=").append(v14312); - sb.append(", v14313=").append(v14313); - sb.append(", v14314=").append(v14314); - sb.append(", v14315=").append(v14315); - sb.append(", v14316=").append(v14316); - sb.append(", v14320=").append(v14320); - sb.append(", QRA_Max=").append(QRA_Max); - sb.append(", QRA_Max_OTime=").append(QRA_Max_OTime); - sb.append(", v14308=").append(v14308); - sb.append(", NRA_Max=").append(NRA_Max); - sb.append(", NRA_Max_OTime=").append(NRA_Max_OTime); - sb.append(", NRA_Min=").append(NRA_Min); - sb.append(", NRA_Min_OTime=").append(NRA_Min_OTime); - sb.append(", v14322=").append(v14322); - sb.append(", DRA_Max=").append(DRA_Max); - sb.append(", DRA_Max_OTime=").append(DRA_Max_OTime); - sb.append(", v14309=").append(v14309); - sb.append(", SRA_Max=").append(SRA_Max); - sb.append(", SRA_Max_OTime=").append(SRA_Max_OTime); - sb.append(", v14306=").append(v14306); - sb.append(", RRA_Max=").append(RRA_Max); - sb.append(", RRA_Max_OTime=").append(RRA_Max_OTime); - sb.append(", v14307=").append(v14307); - sb.append(", v14316_05=").append(v14316_05); - sb.append(", UV_Max_OTime=").append(UV_Max_OTime); - sb.append(", SSH=").append(SSH); - sb.append(", API=").append(API); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/resources/mapper/radi_chn_mul_horMapper.xml b/src/main/resources/mapper/radi_chn_mul_horMapper.xml index 19fc55c..f29007b 100644 --- a/src/main/resources/mapper/radi_chn_mul_horMapper.xml +++ b/src/main/resources/mapper/radi_chn_mul_horMapper.xml @@ -2,7 +2,7 @@ - + diff --git a/src/test/java/com/cuit/solarenergy/SolarenergyApplicationTests.java b/src/test/java/com/cuit/solarenergy/SolarenergyApplicationTests.java index b68b3ee..a6b0794 100644 --- a/src/test/java/com/cuit/solarenergy/SolarenergyApplicationTests.java +++ b/src/test/java/com/cuit/solarenergy/SolarenergyApplicationTests.java @@ -1,6 +1,9 @@ package com.cuit.solarenergy; +import com.cuit.solarenergy.service.radi_chn_mul_horService; import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.cuit.gis.analysis.solarradiation.RasterSolarRadiationOperation; import com.cuit.mete.musicutil.MusicQueryParameters; @@ -16,6 +19,8 @@ import org.springframework.boot.test.context.SpringBootTest; import java.io.FileNotFoundException; import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.*; @SpringBootTest @@ -24,6 +29,8 @@ class SolarenergyApplicationTests { @Autowired SolarenergyService solarenergyService; + @Autowired + radi_chn_mul_horService radiChnMulHorService; @Test void contextLoads() { } @@ -62,64 +69,64 @@ class SolarenergyApplicationTests { // objects.add("SSH"); objects.add("Station_Id_C"); - objects.add("Station_levl"); - objects.add("Lat"); - objects.add("Lon"); - objects.add("Alti"); - objects.add("Admin_Code_CHN"); - objects.add("V_ACODE_4SEARCH"); - objects.add("Town_code"); - objects.add("City"); - objects.add("Station_Name"); - objects.add("Cnty"); - objects.add("COUNTRYCODE"); - objects.add("Country"); - objects.add("NetCode"); - objects.add("Province"); - objects.add("REGIONCODE"); - objects.add("Town"); - objects.add("D_RETAIN_ID"); - objects.add("D_SOURCE_ID"); - objects.add("DATA_ID"); - objects.add("IYMDHM"); - objects.add("RYMDHM"); - objects.add("UPDATE_TIME"); - objects.add("Datetime"); - objects.add("REP_CORR_ID"); - objects.add("Station_Id_d"); - objects.add("Year"); - objects.add("Mon"); - objects.add("Day"); - objects.add("Hour"); - objects.add("Min"); - objects.add("V14311"); - objects.add("V14312"); - objects.add("V14313"); - objects.add("V14314"); - objects.add("V14315"); - objects.add("V14316"); - objects.add("V14320"); - objects.add("QRA_Max"); - objects.add("QRA_Max_OTime"); - objects.add("V14308"); - objects.add("NRA_Max"); - objects.add("NRA_Max_OTime"); - objects.add("NRA_Min"); - objects.add("NRA_Min_OTime"); - objects.add("V14322"); - objects.add("DRA_Max"); - objects.add("DRA_Max_OTime"); - objects.add("V14309"); - objects.add("SRA_Max"); - objects.add("SRA_Max_OTime"); - objects.add("V14306"); - objects.add("RRA_Max"); - objects.add("RRA_Max_OTime"); - objects.add("V14307"); - objects.add("V14316_05"); - objects.add("UV_Max_OTime"); - objects.add("SSH"); - objects.add("API"); +// objects.add("Station_levl"); +// objects.add("Lat"); +// objects.add("Lon"); +// objects.add("Alti"); +// objects.add("Admin_Code_CHN"); +// objects.add("V_ACODE_4SEARCH"); +// objects.add("Town_code"); +// objects.add("City"); +// objects.add("Station_Name"); +// objects.add("Cnty"); +// objects.add("COUNTRYCODE"); +// objects.add("Country"); +// objects.add("NetCode"); +// objects.add("Province"); +// objects.add("REGIONCODE"); +// objects.add("Town"); +// objects.add("D_RETAIN_ID"); +// objects.add("D_SOURCE_ID"); +// objects.add("DATA_ID"); +// objects.add("IYMDHM"); +// objects.add("RYMDHM"); +// objects.add("UPDATE_TIME"); +// objects.add("Datetime"); +// objects.add("REP_CORR_ID"); +// objects.add("Station_Id_d"); +// objects.add("Year"); +// objects.add("Mon"); +// objects.add("Day"); +// objects.add("Hour"); +// objects.add("Min"); +// objects.add("V14311"); +// objects.add("V14312"); +// objects.add("V14313"); +// objects.add("V14314"); +// objects.add("V14315"); +// objects.add("V14316"); +// objects.add("V14320"); +// objects.add("QRA_Max"); +// objects.add("QRA_Max_OTime"); +// objects.add("V14308"); +// objects.add("NRA_Max"); +// objects.add("NRA_Max_OTime"); +// objects.add("NRA_Min"); +// objects.add("NRA_Min_OTime"); +// objects.add("V14322"); +// objects.add("DRA_Max"); +// objects.add("DRA_Max_OTime"); +// objects.add("V14309"); +// objects.add("SRA_Max"); +// objects.add("SRA_Max_OTime"); +// objects.add("V14306"); +// objects.add("RRA_Max"); +// objects.add("RRA_Max_OTime"); +// objects.add("V14307"); +// objects.add("V14316_05"); +// objects.add("UV_Max_OTime"); +// objects.add("SSH"); +// objects.add("API"); musicQueryParameters.setElements(objects); @@ -171,10 +178,13 @@ class SolarenergyApplicationTests { ObjectMapper objectMapper = new ObjectMapper(); try { // 将JSON字符串解析为Map - List dataList = objectMapper.readValue(dataByMusic, new TypeReference<>() { - }); - System.out.println("Parsed data size: " + dataList.size()); - return dataList.size(); + // 解析整个JSON对象,然后获取DS数组部分 + Map resultMap = objectMapper.readValue(dataByMusic, new TypeReference>() {}); + + //将resultMap中DS对应的值转换为List + List list = (List) resultMap.get("DS"); + boolean b = radiChnMulHorService.saveBatch(list); + System.out.println(b); // Print or process each item as needed } catch (IOException e) { e.printStackTrace(); } @@ -182,6 +192,18 @@ class SolarenergyApplicationTests { return -1; } + @Test + public void test222() { + String filePath = "D:/Users/田俊彪/毕业/太阳能/solarenergy/data/txt/data.txt"; // 替换为你的文件路径 + try { + String content = new String(Files.readAllBytes(Paths.get(filePath))); + System.out.println(content); + int count = addDataBase(content); + } catch (IOException e) { + e.printStackTrace(); + } + } + }