diff --git a/src/main/java/com/xkrs/model/entity/FirePointEntity.java b/src/main/java/com/xkrs/model/entity/FirePointEntity.java index fe79a01..f5f8fd7 100644 --- a/src/main/java/com/xkrs/model/entity/FirePointEntity.java +++ b/src/main/java/com/xkrs/model/entity/FirePointEntity.java @@ -85,10 +85,22 @@ public class FirePointEntity implements Serializable { @Column(length = 32, columnDefinition = "varchar(32)") private String fireType; + /** + * 当前火点的图片 + */ + private String fireImage; + + /** + * 卫星影像图片 + */ + private String satelliteImage; + + + 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 firePointAddress, String fireType) { + 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 firePointAddress, String fireType, String fireImage, String satelliteImage) { this.id = id; this.fireCode = fireCode; this.longitude = longitude; @@ -102,6 +114,8 @@ public class FirePointEntity implements Serializable { this.confidence = confidence; this.firePointAddress = firePointAddress; this.fireType = fireType; + this.fireImage = fireImage; + this.satelliteImage = satelliteImage; } public Integer getId() { @@ -208,6 +222,22 @@ public class FirePointEntity implements Serializable { this.fireType = fireType; } + public String getFireImage() { + return fireImage; + } + + public void setFireImage(String fireImage) { + this.fireImage = fireImage; + } + + public String getSatelliteImage() { + return satelliteImage; + } + + public void setSatelliteImage(String satelliteImage) { + this.satelliteImage = satelliteImage; + } + @Override public String toString() { return "FirePointEntity{" + @@ -224,6 +254,8 @@ public class FirePointEntity implements Serializable { ", confidence='" + confidence + '\'' + ", firePointAddress='" + firePointAddress + '\'' + ", fireType='" + fireType + '\'' + + ", fireImage='" + fireImage + '\'' + + ", satelliteImage='" + satelliteImage + '\'' + '}'; } } diff --git a/src/main/java/com/xkrs/model/qo/FirePointQo.java b/src/main/java/com/xkrs/model/qo/FirePointQo.java index 3160315..0117900 100644 --- a/src/main/java/com/xkrs/model/qo/FirePointQo.java +++ b/src/main/java/com/xkrs/model/qo/FirePointQo.java @@ -51,10 +51,20 @@ public class FirePointQo { */ private String confidence; + /** + * 当前火点的图片 + */ + private String fireImage; + + /** + * 卫星影像图片 + */ + private String satelliteImage; + public FirePointQo() { } - public FirePointQo(String fireCode, Integer countyCode, String countyName, Integer satelliteTimeTs, Double longitude, Double latitude, String satelliteType, String landtype, String confidence) { + public FirePointQo(String fireCode, Integer countyCode, String countyName, Integer satelliteTimeTs, Double longitude, Double latitude, String satelliteType, String landtype, String confidence, String fireImage, String satelliteImage) { this.fireCode = fireCode; this.countyCode = countyCode; this.countyName = countyName; @@ -64,6 +74,8 @@ public class FirePointQo { this.satelliteType = satelliteType; this.landtype = landtype; this.confidence = confidence; + this.fireImage = fireImage; + this.satelliteImage = satelliteImage; } public String getFireCode() { @@ -138,18 +150,36 @@ public class FirePointQo { this.confidence = confidence; } + public String getFireImage() { + return fireImage; + } + + public void setFireImage(String fireImage) { + this.fireImage = fireImage; + } + + public String getSatelliteImage() { + return satelliteImage; + } + + public void setSatelliteImage(String satelliteImage) { + this.satelliteImage = satelliteImage; + } + @Override public String toString() { return "FirePointQo{" + "fireCode='" + fireCode + '\'' + - ", countyCode='" + countyCode + '\'' + + ", countyCode=" + countyCode + ", countyName='" + countyName + '\'' + ", satelliteTimeTs=" + satelliteTimeTs + ", longitude=" + longitude + ", latitude=" + latitude + ", satelliteType='" + satelliteType + '\'' + - ", landType='" + landtype + '\'' + + ", landtype='" + landtype + '\'' + ", confidence='" + confidence + '\'' + + ", fireImage='" + fireImage + '\'' + + ", satelliteImage='" + satelliteImage + '\'' + '}'; } } diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index 887e7cf..b1c47c5 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -86,6 +86,8 @@ public class FirePointServiceImpl implements FirePointService { firePointEntity.setConfidence(firePointQo.getConfidence()); firePointEntity.setAddTime(DateTimeUtil.dateTimeToString(LocalDateTime.now())); firePointEntity.setFireType("0"); + firePointEntity.setFireImage(firePointQo.getFireImage()); + firePointEntity.setSatelliteImage(firePointQo.getSatelliteImage()); log.info("-------发现新火点"); /*log.info("---------------开始进行实时通讯,将检测到的火点传给前端"); Map map = new HashMap(3); diff --git a/src/main/java/com/xkrs/utils/FileUtil.java b/src/main/java/com/xkrs/utils/FileUtil.java index ac0a3bd..6a2d201 100644 --- a/src/main/java/com/xkrs/utils/FileUtil.java +++ b/src/main/java/com/xkrs/utils/FileUtil.java @@ -227,7 +227,6 @@ public class FileUtil { } public static boolean checkFileSize(Long len, int size, String unit) { -// long len = file.length(); double fileSize = 0; if ("B".equals(unit.toUpperCase())) { fileSize = (double) len;