From 07fe1bb1ef9bf716567c3287ecd7c4859b6ccb1d Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期日, 18 六月 2023 21:07:53 +0800
Subject: [PATCH] 1

---
 src/main/java/com/yssh/entity/Report.java |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/yssh/entity/Report.java b/src/main/java/com/yssh/entity/Report.java
index 0208e3b..a567a72 100644
--- a/src/main/java/com/yssh/entity/Report.java
+++ b/src/main/java/com/yssh/entity/Report.java
@@ -22,7 +22,7 @@
     private double val;
 
     @ApiModelProperty(value = "鍘诲勾鏁板��")
-    private double lastVal;
+    private Double lastVal;
 
     @ApiModelProperty(value = "鏃堕棿")
     private String time;
@@ -48,12 +48,11 @@
     public Report() {
     }
 
-    public Report(String name, double lon, double lat, double val, double lastVal, String time, double speed, String dir, double maxVal, double dis, String maxDir, int isSame) {
+    public Report(String name, double lon, double lat, double val, String time, double speed, String dir, double maxVal, double dis, String maxDir, int isSame) {
         this.name = name;
         this.lon = lon;
         this.lat = lat;
         this.val = val;
-        this.lastVal = lastVal;
         this.time = time;
         this.speed = speed;
         this.dir = dir;
@@ -85,9 +84,9 @@
         double speed2 = CalculateUtils.getWindSpeed(suMax.getV(), suMax.getU());
         double direction2 = CalculateUtils.getWindDirection(suMax.getV(), suMax.getU());
         String maxDir = CalculateUtils.getDir(angle);
-        int isSame = (Math.abs(direction1 - direction2) < 30 && Math.abs(speed1 - speed2) < 0.5) ? 1 : 0;
+        int isSame = (Math.abs(direction1 - direction2) <= 45 && Math.abs(speed1 - speed2) <= 0.5) ? 1 : 0;
 
-        return new Report(wd.getLocationName(), c1.getX(), c1.getY(), wd.getValue(), lastVal, time,
+        return new Report(wd.getLocationName(), c1.getX(), c1.getY(), wd.getValue(), time,
                 speed1, dir, maxVal, dis1, maxDir, isSame);
     }
 
@@ -123,11 +122,11 @@
         this.val = val;
     }
 
-    public double getLastVal() {
+    public Double getLastVal() {
         return lastVal;
     }
 
-    public void setLastVal(double lastVal) {
+    public void setLastVal(Double lastVal) {
         this.lastVal = lastVal;
     }
 

--
Gitblit v1.9.3