添加了火点的实体类和参数类

This commit is contained in:
DESKTOP-4U0TDEF\20371 2021-07-12 16:09:30 +08:00
parent 07498b55ad
commit 38ba7d3183
3 changed files with 379 additions and 0 deletions

View File

@ -0,0 +1,214 @@
package com.xkrs.model.entity;
import javax.persistence.*;
import java.io.Serializable;
/**
* @author XinYi Song
*/
@Entity
@Table(name="fire_point")
public class FirePointEntity implements Serializable {
/**
* 指定主键建立自增序列主键值取自序列
*/
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sys_user_seq_gen")
@SequenceGenerator(name = "sys_user_seq_gen", sequenceName = "sys_user_id_seq",allocationSize = 1)
private Integer id;
/**
* 火点编码
*/
@Column( length = 32,unique = true,columnDefinition = "varchar(32)")
private String fireCode;
/**
* 经度
*/
private double longitude;
/**
* 纬度
*/
private double latitude;
/**
* 省市区的编码
*/
@Column(length = 32, columnDefinition = "varchar(32)")
private String countyCode;
/**
* 省市区的名称
*/
@Column( columnDefinition = "varchar(64)")
private String countyName;
/**
* 卫星监测的时间
*/
private String satelliteTime;
/**
* 卫星的类型
*/
@Column( columnDefinition = "varchar(64)")
private String satelliteType;
/**
* 植被类型
*/
@Column( columnDefinition = "varchar(64)")
private String landType;
/**
* 添加的时间
*/
private String addTime;
/**
* 置信度
*/
@Column(length = 32, columnDefinition = "varchar(32)")
private String confidence;
/**
* 火点状态 0 发现 1预警 2核查 -1,3结案
*/
@Column(length = 32, columnDefinition = "varchar(32)")
private String fireType;
public FirePointEntity() {
}
public FirePointEntity(Integer id, String fireCode, double longitude, double latitude, String countyCode, String countyName, String satelliteTime, String satelliteType, String landType, String addTime, String confidence, String fireType) {
this.id = id;
this.fireCode = fireCode;
this.longitude = longitude;
this.latitude = latitude;
this.countyCode = countyCode;
this.countyName = countyName;
this.satelliteTime = satelliteTime;
this.satelliteType = satelliteType;
this.landType = landType;
this.addTime = addTime;
this.confidence = confidence;
this.fireType = fireType;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getFireCode() {
return fireCode;
}
public void setFireCode(String fireCode) {
this.fireCode = fireCode;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public String getCountyCode() {
return countyCode;
}
public void setCountyCode(String countyCode) {
this.countyCode = countyCode;
}
public String getCountyName() {
return countyName;
}
public void setCountyName(String countyName) {
this.countyName = countyName;
}
public String getSatelliteTime() {
return satelliteTime;
}
public void setSatelliteTime(String satelliteTime) {
this.satelliteTime = satelliteTime;
}
public String getSatelliteType() {
return satelliteType;
}
public void setSatelliteType(String satelliteType) {
this.satelliteType = satelliteType;
}
public String getLandType() {
return landType;
}
public void setLandType(String landType) {
this.landType = landType;
}
public String getAddTime() {
return addTime;
}
public void setAddTime(String addTime) {
this.addTime = addTime;
}
public String getConfidence() {
return confidence;
}
public void setConfidence(String confidence) {
this.confidence = confidence;
}
public String getFireType() {
return fireType;
}
public void setFireType(String fireType) {
this.fireType = fireType;
}
@Override
public String toString() {
return "FirePointEntity{" +
"id=" + id +
", fireCode='" + fireCode + '\'' +
", longitude=" + longitude +
", latitude=" + latitude +
", countyCode='" + countyCode + '\'' +
", countyName='" + countyName + '\'' +
", satelliteTime='" + satelliteTime + '\'' +
", satelliteType='" + satelliteType + '\'' +
", landType='" + landType + '\'' +
", addTime='" + addTime + '\'' +
", confidence='" + confidence + '\'' +
", fireType='" + fireType + '\'' +
'}';
}
}

View File

@ -0,0 +1,155 @@
package com.xkrs.model.qo;
/**
* @author XinYi Song
* 火点参数类
*/
public class FirePointQo {
/**
* 火点编码
*/
private String fireCode;
/**
* 省市区的编码
*/
private String countyCode;
/**
* 省市区的名称
*/
private String countyName;
/**
* 卫星监测的时间戳
*/
private Long satelliteTimeTs;
/**
* 经度
*/
private Double longitude;
/**
* 纬度
*/
private Double latitude;
/**
* 卫星类型
*/
private String satelliteType;
/**
* 植被类型
*/
private String landType;
/**
* 置信度
*/
private String confidence;
public FirePointQo() {
}
public FirePointQo(String fireCode, String countyCode, String countyName, Long satelliteTimeTs, Double longitude, Double latitude, String satelliteType, String landType, String confidence) {
this.fireCode = fireCode;
this.countyCode = countyCode;
this.countyName = countyName;
this.satelliteTimeTs = satelliteTimeTs;
this.longitude = longitude;
this.latitude = latitude;
this.satelliteType = satelliteType;
this.landType = landType;
this.confidence = confidence;
}
public String getFireCode() {
return fireCode;
}
public void setFireCode(String fireCode) {
this.fireCode = fireCode;
}
public String getCountyCode() {
return countyCode;
}
public void setCountyCode(String countyCode) {
this.countyCode = countyCode;
}
public String getCountyName() {
return countyName;
}
public void setCountyName(String countyName) {
this.countyName = countyName;
}
public Long getSatelliteTimeTs() {
return satelliteTimeTs;
}
public void setSatelliteTimeTs(Long satelliteTimeTs) {
this.satelliteTimeTs = satelliteTimeTs;
}
public Double getLongitude() {
return longitude;
}
public void setLongitude(Double longitude) {
this.longitude = longitude;
}
public Double getLatitude() {
return latitude;
}
public void setLatitude(Double latitude) {
this.latitude = latitude;
}
public String getSatelliteType() {
return satelliteType;
}
public void setSatelliteType(String satelliteType) {
this.satelliteType = satelliteType;
}
public String getLandType() {
return landType;
}
public void setLandType(String landType) {
this.landType = landType;
}
public String getConfidence() {
return confidence;
}
public void setConfidence(String confidence) {
this.confidence = confidence;
}
@Override
public String toString() {
return "FirePointQo{" +
"fireCode='" + fireCode + '\'' +
", countyCode='" + countyCode + '\'' +
", countyName='" + countyName + '\'' +
", satelliteTimeTs=" + satelliteTimeTs +
", longitude=" + longitude +
", latitude=" + latitude +
", satelliteType='" + satelliteType + '\'' +
", landType='" + landType + '\'' +
", confidence='" + confidence + '\'' +
'}';
}
}

View File

@ -133,6 +133,16 @@ public class DateTimeUtil {
return dateTime; return dateTime;
} }
/**
* 时间戳转时间再转字符串
* @param timeMillis
* @return
*/
public static String timeMillisToString(long timeMillis){
LocalDateTime dateTime =LocalDateTime.ofEpochSecond(timeMillis,0, DEFAULT_ZONE_OFFSET);
return COMMON_FORMATTER_DATETIME.format(dateTime);
}
/** /**
* 获取当前时间 hh:mm:ss:nnn * 获取当前时间 hh:mm:ss:nnn
* @return * @return