swb
2024-07-04 3faca3fc0bb178afd9cf17222bee14e1c8722f6b
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);