From 010f4ba252db180fc7fea4d7cb1b84a0bca7479f Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 11 Aug 2023 16:37:43 +0800
Subject: [PATCH] Merge branch 'dev' of http://blit.7drlb.com:8888/r/moral into wb

---
 screen-api/src/main/java/com/moral/api/service/impl/SpecialDeviceServiceImpl.java |   47 ++++++++++++++++++++++++++++++-----------------
 1 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/service/impl/SpecialDeviceServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/SpecialDeviceServiceImpl.java
index 65d397d..73e3552 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/SpecialDeviceServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/SpecialDeviceServiceImpl.java
@@ -211,7 +211,10 @@
         String time2 = params.get("time2").toString();
         String rsTime = getTime(time1, time2);
         list.add(rsTime);
-        List<Map<String, Object>> maps = specialDeviceService.carTrajectory(params,false);
+//        List<Map<String, Object>> maps = specialDeviceService.carTrajectory(params,false);
+//        List<Map<String, Object>> maps = HistorySecondCruiserMapper.getCruiserData(params);
+        List<Map<String, Object>> maps = HistorySecondCruiserMapper.getAllCruiserData(params);
+
         if (ObjectUtils.isEmpty(maps)){
             return null;
         }
@@ -223,7 +226,8 @@
             map.put("time1",time3);
             map.put("time2",time4);
             map.put("mac",mac);
-            List<Map<String, Object>> maps1 = specialDeviceService.carTrajectory(map,false);
+//            List<Map<String, Object>> maps1 = specialDeviceService.carTrajectory(map,false);
+            List<Map<String, Object>> maps1 = HistorySecondCruiserMapper.getAllCruiserData(params);
             if (ObjectUtils.isEmpty(maps1)){
                 return null;
             }
@@ -239,7 +243,8 @@
             map.put("time1",time5);
             map.put("time2",time6);
             map.put("mac",mac);
-            List<Map<String, Object>> maps1 = specialDeviceService.carTrajectory(map,false);
+//            List<Map<String, Object>> maps1 = specialDeviceService.carTrajectory(map,false);
+            List<Map<String, Object>> maps1 = HistorySecondCruiserMapper.getAllCruiserData(params);
             if (ObjectUtils.isEmpty(maps1)){
                 return null;
             }
@@ -459,20 +464,28 @@
 
 
         for (Map<String, Object> map : maps) {
-//            String flylon = map.get("flylon").toString();
-//            String flylat = map.get("flylat").toString();
-//            String s = flylon + "-" + flylat;
-//            if (Double.parseDouble(map.get("a34004").toString())>200){
-//
-//            }
-            pm25List.add(Double.parseDouble(map.get("a34004").toString()));
-            pm10List.add(Double.parseDouble(map.get("a34002").toString()));
-            COList.add(Double.parseDouble(map.get("a21005").toString()));
-            SO2List.add(Double.parseDouble(map.get("a21026").toString()));
-            NO2List.add(Double.parseDouble(map.get("a21004").toString()));
-            O3List.add(Double.parseDouble(map.get("a05024").toString()));
-            VOCList.add(Double.parseDouble(map.get("a99054").toString()));
-
+            Map value = JSON.parseObject(map.get("value").toString(), Map.class);
+            if (!ObjectUtils.isEmpty(value.get("a34004"))){
+                pm25List.add(Double.parseDouble(value.get("a34004").toString()));
+            }
+            if (!ObjectUtils.isEmpty(value.get("a34002"))){
+                pm10List.add(Double.parseDouble(value.get("a34002").toString()));
+            }
+            if (!ObjectUtils.isEmpty(value.get("a21005"))){
+                COList.add(Double.parseDouble(value.get("a21005").toString()));
+            }
+            if (!ObjectUtils.isEmpty(value.get("a21026"))){
+                SO2List.add(Double.parseDouble(value.get("a21026").toString()));
+            }
+            if (!ObjectUtils.isEmpty(value.get("a21004"))){
+                NO2List.add(Double.parseDouble(value.get("a21004").toString()));
+            }
+            if (!ObjectUtils.isEmpty(value.get("a05024"))){
+                O3List.add(Double.parseDouble(value.get("a05024").toString()));
+            }
+            if (!ObjectUtils.isEmpty(value.get("a99054"))){
+                VOCList.add(Double.parseDouble(value.get("a99054").toString()));
+            }
         }
 
         //���������������

--
Gitblit v1.8.0