src/main/java/com/moral/entity/DeviceAndWind.java | ●●●●● patch | view | raw | blame | history | |
src/main/java/com/moral/service/impl/DeviceServiceImpl.java | ●●●●● patch | view | raw | blame | history | |
src/main/resources/mapper/DeviceMapper.xml | ●●●●● patch | view | raw | blame | history |
src/main/java/com/moral/entity/DeviceAndWind.java
@@ -1,6 +1,11 @@ package com.moral.entity; import lombok.Data; import javax.persistence.Transient; @Data public class DeviceAndWind { private Double longitude; private Double latitude; @@ -11,54 +16,6 @@ private Double tVoc; public Double gettVoc() { return tVoc; } public void settVoc(Double tVoc) { this.tVoc = tVoc; } 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 Double getWindDir() { return windDir; } public void setWindDir(Double windDir) { this.windDir = windDir; } public Double getWindSpeed() { return windSpeed; } public void setWindSpeed(Double windSpeed) { this.windSpeed = windSpeed; } @Override public String toString() { return "DeviceAndWind{" + "longitude=" + longitude + ", latitude=" + latitude + ", windDir=" + windDir + ", windSpeed=" + windSpeed + ", tVoc=" + tVoc + '}'; } @Transient private JwtTokenVersion jwtTokenVersion; } src/main/java/com/moral/service/impl/DeviceServiceImpl.java
@@ -725,10 +725,7 @@ List laList=new ArrayList(); Double U=0.0; Double V=0.0; log.info("id="+id); log.info("time="+time); log.info("tab="+tab); log.info("deviceAndWinds="+deviceAndWinds); log.info("deviceAndWinds="+deviceAndWinds.size()); for (DeviceAndWind andWind : deviceAndWinds) { Double lo=andWind.getLongitude(); Double la=andWind.getLatitude(); @@ -817,7 +814,7 @@ windDir=0.0; windSpeed=0.0; } Double tvoc=deviceAndWinds.get(j).gettVoc(); Double tvoc=deviceAndWinds.get(j).getTVoc(); List list= LatLngTransformation.Convert_BD09_To_GCJ02(deviceAndWinds.get(j).getLatitude(),deviceAndWinds.get(j).getLongitude()); Double transLo=(Double) list.get(0); src/main/resources/mapper/DeviceMapper.xml
@@ -385,9 +385,9 @@ case when h.json->"$.e18[0]"=0 then 0.1 else h.json->"$.e18[0]" end as windSpeed, h.json->"$.e23[0]" as windDir, h.json->"$.e17[0]" as tVoc from ${table} h ,`device` as d from ${table} as h ,`device` as d where d.mac=h.mac and h.time=#{time} and d.mac in (select d.mac from device , monitor_point as m where d.monitor_point_id=m.id and m.id=#{id}) and d.mac in (select d.mac from device , monitor_point as m where d.monitor_point_id=m.id and m.id=#{id}) </select> <select id="getDevicesStateByRegion" resultType="map">