From 732074dfc7598ad52c6ecfc0ee99bcda1cb9af94 Mon Sep 17 00:00:00 2001
From: 于紫祥_1901 <email@yuzixiang_1910>
Date: Fri, 18 Sep 2020 14:09:26 +0800
Subject: [PATCH] 重复点删除,剔除特殊经纬度点

---
 src/main/java/com/moral/service/impl/WeatherServiceImpl.java |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/moral/service/impl/WeatherServiceImpl.java b/src/main/java/com/moral/service/impl/WeatherServiceImpl.java
index 0184499..5c6d0e4 100644
--- a/src/main/java/com/moral/service/impl/WeatherServiceImpl.java
+++ b/src/main/java/com/moral/service/impl/WeatherServiceImpl.java
@@ -744,9 +744,15 @@
                 map.put("COC", map.get("CO").toString());
                 map.remove("CO");
             }
-            if ((!map.containsKey("PM25C")) && map.containsKey("PM2_5")) {
-                map.put("PM25C", map.get("PM2_5").toString().replace("\\.", ""));
-                map.remove("PM2_5");
+            if ((!map.containsKey("PM25C")) && (map.containsKey("PM2_5")||map.containsKey("PM25"))) {
+                if (map.get("PM2_5") != null) {
+                    map.put("PM25C", map.get("PM2_5").toString().replace("\\.", ""));
+                    map.remove("PM2_5");
+                }
+                if(map.get("PM25") != null){
+                    map.put("PM25C", map.get("PM25").toString().replace("\\.", ""));
+                    map.remove("PM25");
+                }
             }
             if ((!map.containsKey("PM10C")) && map.containsKey("PM10")) {
                 map.put("PM10C", map.get("PM10").toString().replace("\\.", ""));

--
Gitblit v1.8.0