From f694728af353dcf32e270c0b1b27d81ba76fecd8 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Mon, 21 Sep 2020 10:51:51 +0800
Subject: [PATCH] update
---
src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java b/src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java
index ae0bec1..e87aa6a 100644
--- a/src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java
+++ b/src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java
@@ -188,6 +188,8 @@
condition = "20";
} else if ("���".equals(text)) {
condition = "0";
+ }else {
+ condition = "50";
}
nextDayMap.put("condition", condition);
}
@@ -233,13 +235,13 @@
String nextDayTemp = dataMap.get("temp").toString();
String nextDayCloud = dataMap.get("cloud").toString();
Integer condition = Integer.valueOf(dataMap.get("condition").toString());
- String value="";
+ Integer value=0;
if (condition >= 80) {
- value = "80";
+ value = 80;
} else if (condition >= 40) {
- value = "40";
+ value = 40;
} else if (condition >= 0) {
- value = "0";
+ value = 0;
}
map.put("condition", value);
List<Map<String, Object>> tempAndCloudList = realWeatherMapper.getTempAndCloud(map);
@@ -347,7 +349,7 @@
Double n = Double.valueOf(cmap.get("n").toString());
double beam = n * Double.valueOf(nextDayCloud) + m;
if (beam < 1.0) {
- beam=1.0;
+ beam=0.0;
}
dataMap.put("beam", String.valueOf(Math.round(beam)));
}
--
Gitblit v1.8.0