From 208ad71314820e8680cf9b202c1a48d0aaf5ef92 Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Thu, 27 Aug 2020 17:42:34 +0800 Subject: [PATCH] 更新O3保良值 --- src/main/java/com/moral/service/impl/WeatherServiceImpl.java | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/moral/service/impl/WeatherServiceImpl.java b/src/main/java/com/moral/service/impl/WeatherServiceImpl.java index 7125594..c3e539c 100644 --- a/src/main/java/com/moral/service/impl/WeatherServiceImpl.java +++ b/src/main/java/com/moral/service/impl/WeatherServiceImpl.java @@ -648,6 +648,7 @@ //���4��������������� double value = 160.0 * 8; int nowHour = Integer.valueOf(sdf1.format(now).substring(11, 13)); + int nowMinute = Integer.valueOf(sdf1.format(now).substring(14, 16)); String format = sdf1.format(now).substring(0, 13) + ":00:00"; if (nowHour < 8) { return resultList; @@ -668,6 +669,11 @@ if (rhour == 0) { rhour = 24; } + + if (nowMinute >= 46) { + nowHour = nowHour + 1; + } + if (rhour == nowHour) { Map<String, Object> sumO3Map = hangzhouAqiMapper.getSumO3(hashMap); double v = value - Double.valueOf(sumO3Map.get("O3Sum").toString()); -- Gitblit v1.8.0