From 186ec9dcec258b3cead27c6874a828b9f48e1c8b Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 28 Aug 2020 13:55:15 +0800
Subject: [PATCH] update
---
src/main/java/com/moral/service/impl/WeatherServiceImpl.java | 11 +++++++++++
1 files changed, 11 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..667a819 100644
--- a/src/main/java/com/moral/service/impl/WeatherServiceImpl.java
+++ b/src/main/java/com/moral/service/impl/WeatherServiceImpl.java
@@ -648,10 +648,19 @@
//���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;
}
+
+ if (nowMinute >= 46) {
+ nowHour = nowHour + 1;
+ cal.setTime(now);
+ cal.add(Calendar.HOUR_OF_DAY,1);
+ format=sdf1.format(cal.getTime()).substring(0, 13) + ":00:00";
+ }
+
for (Map<String, Object> resultMap : resultList) {
if (resultMap.get("type").equals("������")) {
if (sdf.parse(time).getTime() == sdf.parse(sdf.format(now)).getTime()) {
@@ -668,6 +677,7 @@
if (rhour == 0) {
rhour = 24;
}
+
if (rhour == nowHour) {
Map<String, Object> sumO3Map = hangzhouAqiMapper.getSumO3(hashMap);
double v = value - Double.valueOf(sumO3Map.get("O3Sum").toString());
@@ -765,4 +775,5 @@
}
}
}
+
}
--
Gitblit v1.8.0