cjl
2024-04-01 3c689f6b593a12a142543b6e922ee8c39c8c4e8a
screen-job/src/main/java/com/moral/api/service/impl/ForecastServiceImpl.java
@@ -189,6 +189,8 @@
                int size = weatherMaps.size();
                Double tempAvg = calculateAvg(weatherMaps, "temp");
                Double o3Avg = calculateAvg(weatherMaps, "O3");
                if(tempAvg == null || o3Avg == null)
                    continue;
                Double sum1 = calculateProduct(weatherMaps, "temp", "O3");
                Double sum2 = calculateProduct(weatherMaps, "temp", "temp");
                double b = (sum1 - size * tempAvg * o3Avg) / (sum2 - size * tempAvg * tempAvg);