From 48bb075f91c5daf35cff0a16abe1136f132aafb4 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Mon, 28 Sep 2020 15:40:26 +0800
Subject: [PATCH] 不同天气给定不同分数
---
src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java b/src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java
index bbe110c..4e3457b 100644
--- a/src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java
+++ b/src/main/java/com/moral/service/impl/ForecastWeatherServiceImpl.java
@@ -198,15 +198,32 @@
String condition = "";
if ("���".equals(text)) {
condition = "100";
+ } else if ("���".equals(text)) {
+ condition = "90";
} else if ("������".equals(text)) {
condition = "80";
- } else if ("���".equals(text)) {
+ } else if ("���".equals(text)) {
+ condition = "70";
+ } else if ("���".equals(text) || "������".equals(text) || "������".equals(text) || "".equals(text)) {
condition = "60";
- } else if ("���������".equals(text) || "������".equals(text)) {
+ } else if ("������".equals(text)) {
+ condition = "45";
+ } else if ("���������".equals(text)) {
condition = "40";
+ } else if ("������������������".equals(text) || "���������������".equals(text)) {
+ condition = "30";
} else if ("������".equals(text)) {
condition = "20";
} else if ("���".equals(text)) {
+ condition = "10";
+ } else if ("������������������".equals(text)) {
+ condition = "5";
+ } else if ("������������������".equals(text)) {
+ condition = "4";
+ } else if ("������".equals(text) || "������".equals(text) || "������".equals(text)
+ || "������".equals(text) || "������".equals(text) || "������".equals(text)
+ || "���������".equals(text) || "���������������������������".equals(text) || "������".equals(text)
+ ) {
condition = "0";
} else {
condition = "50";
@@ -273,7 +290,7 @@
map1.put("times", times);
map1.put("time", hour);
List<Map<String, Object>> O3List = new ArrayList<>();
- List<Map<String, Object>> beamList=new ArrayList<>();
+ List<Map<String, Object>> beamList = new ArrayList<>();
if (times.size() != 0) {
O3List = aqiMapper.getO3(map1);
if (O3List.size() == 0) {
--
Gitblit v1.8.0