cjl
2024-04-23 65b70cf13a2ec91013d876771be878c165cae3a4
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);