瀏覽代碼

BuG修复

DGJ 3 月之前
父節點
當前提交
dadf82386d

+ 20 - 20
Assets/FrameWork/ProjectManager/Demo.prefab

@@ -3000,7 +3000,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &8283009555782397851
 RectTransform:
   m_ObjectHideFlags: 0
@@ -3745,7 +3745,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 12:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -5067,7 +5067,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 14:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -5416,7 +5416,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 16:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -8001,7 +8001,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 10:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -8811,7 +8811,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 14:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -9544,7 +9544,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 10:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -12621,7 +12621,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 8:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -14542,7 +14542,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 14:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -14915,7 +14915,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 12:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -18755,7 +18755,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 8:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -18860,9 +18860,9 @@ RectTransform:
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
+  m_SizeDelta: {x: -2, y: 0}
   m_Pivot: {x: 0, y: 1}
 --- !u!222 &392687524054079084
 CanvasRenderer:
@@ -20579,7 +20579,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 16:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -21031,7 +21031,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 16:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -23252,8 +23252,8 @@ RectTransform:
   m_Father: {fileID: 5398507866066873424}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 0.4111371}
+  m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 20, y: 20}
   m_Pivot: {x: 0.5, y: 0.5}
@@ -24477,7 +24477,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 10:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -25032,7 +25032,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 8:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -25613,7 +25613,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_text: 12:00
+  m_text: 
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}

+ 1 - 1
Assets/HotUpdate/Scripts/Scripts/GetHttpTimer.cs

@@ -72,7 +72,7 @@ public class GetHttpTimer : MonoSingleton<GetHttpTimer>
     }
 
     // 将Unix时间戳转换为DateTime
-    DateTime UnixTimeStampToDateTime(long unixTimeStamp)
+  public  DateTime UnixTimeStampToDateTime(long unixTimeStamp)
     {
 
       //  string times = unixTimeStamp.ToString() + "000";

+ 8 - 4
Assets/HotUpdate/Scripts/Scripts/Project/DaoHang/DaoHangDataManager.cs

@@ -172,7 +172,8 @@ public class DaoHangDataManager : MonoSingleton<DaoHangDataManager>
 
     public void GoHome()
     {
-        BladeServerManager.Instance.isDaoHang = false;
+        // BladeServerManager.Instance.isDaoHang = false;
+        BladeServerManager.Instance.ExitDaoHang();
         WayFindingManager.Instance.CloseWayFind();
         WindowsManager.Instance.show(WindowConfig.windowType.ProjectMain);
 
@@ -181,7 +182,8 @@ public class DaoHangDataManager : MonoSingleton<DaoHangDataManager>
 
     public void GoDemo()
     {
-        BladeServerManager.Instance.isDaoHang = false;
+        // BladeServerManager.Instance.isDaoHang = false;
+        BladeServerManager.Instance.ExitDaoHang();
         WayFindingManager.Instance.CloseWayFind();
         TopManager.Instance.transform.localPosition = new Vector3(TopManager.Instance.transform.localPosition.x, 0, TopManager.Instance.transform.localPosition.z);
         WindowsManager.Instance.show(WindowConfig.windowType.Demo);
@@ -193,7 +195,8 @@ public class DaoHangDataManager : MonoSingleton<DaoHangDataManager>
     {
         //ShowInfoTipManager.Instance.showTip("ÔÝ먦·Å,¾´ÇëÆÚ´ý");
         //TimerMgr.Instance.CreateTimer(() => { ShowInfoTipManager.Instance.closeTip(); }, 2f);
-        BladeServerManager.Instance.isDaoHang = false;
+        // BladeServerManager.Instance.isDaoHang = false;
+        BladeServerManager.Instance.ExitDaoHang();
         WayFindingManager.Instance.CloseWayFind();
         TopManager.Instance.transform.localPosition = new Vector3(TopManager.Instance.transform.localPosition.x, 0, TopManager.Instance.transform.localPosition.z);
         WindowsManager.Instance.show(WindowConfig.windowType.RTC);
@@ -201,7 +204,8 @@ public class DaoHangDataManager : MonoSingleton<DaoHangDataManager>
 
     public void GoXunJian()
     {
-        BladeServerManager.Instance.isDaoHang = false;
+        // BladeServerManager.Instance.isDaoHang = false;
+        BladeServerManager.Instance.ExitDaoHang();
         WayFindingManager.Instance.CloseWayFind();
         TopManager.Instance.transform.localPosition = new Vector3(TopManager.Instance.transform.localPosition.x, 0, TopManager.Instance.transform.localPosition.z);
         WindowsManager.Instance.show(WindowConfig.windowType.XunJianLB);

+ 11 - 0
Assets/HotUpdate/Scripts/Scripts/Project/DaoHang/Managers/BladeServerManager.cs

@@ -595,6 +595,17 @@ public class BladeServerManager : MonoSingleton<BladeServerManager>
            
     }
 
+    public void ExitDaoHang()
+    {
+        isDaoHang = false;
+        devicetControl.CloseOnClick();
+
+        foundItem.gameObject.SetActive(false);
+        foundItem = null;
+        foundTag = null;
+        foundID = null;
+    }
+
     private void SaveData()
     {
         /*

+ 4 - 4
Assets/HotUpdate/Scripts/Scripts/Project/Demo/AIDeviceAlarmControl.cs

@@ -90,7 +90,7 @@ public class AIDeviceAlarmControl : MonoBehaviour
                         string msgData = data["data"]["list"].ToString();
                         List<AIDeviceAlarm> listAlarmdata = new List<AIDeviceAlarm>();
 
-                         listAlarmdata = JsonConvert.DeserializeObject<List<AIDeviceAlarm>>(msgData);
+                         listAlarmdata = JsonConvert.DeserializeObject<List<AIDeviceAlarm>>(data["data"]["list"].ToJson());
                         if (listAlarmdata.Count > 0)
                         {
                             listAlarm.AddRange(listAlarmdata);
@@ -122,11 +122,11 @@ public class AIDeviceAlarmControl : MonoBehaviour
     private void NormalCallBack(GameObject cell, int index)
     {
         //  cell.transform.Find("Text1").GetComponent<Text>().text = index.ToString();
-
+        Debug.Log("DGJ ==> Index" + index);
         if (isGetData)
             return;
 
-        if(index!=listAlarm.Count&&((index+1)>= listAlarm.Count))
+        if(ListCount != listAlarm.Count&&((index+1)>= listAlarm.Count))
         {
             isGetData = true;
             // ÇëÇóÌí¼Ó
@@ -144,7 +144,7 @@ public class AIDeviceAlarmControl : MonoBehaviour
                     string msgData = data["data"]["list"].ToString();
                     List<AIDeviceAlarm> listAlarmdata = new List<AIDeviceAlarm>();
 
-                    listAlarmdata = JsonConvert.DeserializeObject<List<AIDeviceAlarm>>(msgData);
+                    listAlarmdata = JsonConvert.DeserializeObject<List<AIDeviceAlarm>>(data["data"]["list"].ToJson());
                     if (listAlarmdata.Count > 0)
                     {
                         listAlarm.AddRange(listAlarmdata);

+ 33 - 7
Assets/HotUpdate/Scripts/Scripts/Project/Demo/AIDeviceAlarmItem.cs

@@ -1,3 +1,4 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using TMPro;
@@ -14,11 +15,29 @@ public class AIDeviceAlarmItem : MonoBehaviour
     public TMP_Text durationText;
 
     public AIDeviceAlarm aIDeviceAlarm;
+    private RectTransform rectTransform;
+    private void OnEnable()
+    {
+        if (rectTransform == null)
+            rectTransform = this.GetComponent<RectTransform>();
+      
+    }
 
-   
+    private void Update()
+    {
+        if (rectTransform.localPosition.z != 0)
+            rectTransform.localPosition = new Vector3(rectTransform.localPosition.x, rectTransform.localPosition.y, 0);
+
+        if (rectTransform.localEulerAngles.y != 0)
+            rectTransform.localEulerAngles = new Vector3(rectTransform.localEulerAngles.x, 0, rectTransform.localEulerAngles.z);
+
+    }
 
     public void DataUpdate(AIDeviceAlarm data)
     {
+        if (data == null)
+            return;
+        Debug.Log(data.level);
         this.aIDeviceAlarm = data;
         switch (data.level)
         {
@@ -27,6 +46,7 @@ public class AIDeviceAlarmItem : MonoBehaviour
                 alamText.text = "低";
                 break;
             case "一般":
+
                 break;
             case "中":
                 alarmImage.color = new Color32(255, 123, 58, 255);
@@ -44,11 +64,17 @@ public class AIDeviceAlarmItem : MonoBehaviour
         deviceText.text = data.deviceName;
         describeText.text = data.describe;
 
-        string times = data.times;
-        int index = times.IndexOf('.');
-        times = times.Remove(index);
-        string[] timeArry = times.Split('T');
-        timeText.text = timeArry[0] + " " + timeArry[1];
+       
+        DateTime timer =   GetHttpTimer.Instance.UnixTimeStampToDateTime(data.times);
+
+        string month = timer.Month < 10 ? "0" + timer.Month.ToString() : timer.Month.ToString();
+        string day = timer.Day < 10 ? "0" + timer.Day.ToString() : timer.Day.ToString();
+        string hour = timer.Hour < 10 ? "0" + timer.Hour.ToString() : timer.Hour.ToString();
+        string minute = timer.Minute < 10 ? "0" + timer.Minute.ToString() : timer.Minute.ToString();
+        string second = timer.Second < 10 ? "0" + timer.Second.ToString() : timer.Second.ToString();
+      
+        timeText.text = timer.Year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
+
 
         durationText.text = data.duarationTimer;
 
@@ -70,7 +96,7 @@ public class AIDeviceAlarm
     /// <summary>
     /// 告警时间
     /// </summary>
-    public string times { get; set; }
+    public long times { get; set; }
     /// <summary>
     /// 设备名称
     /// </summary>

+ 38 - 10
Assets/HotUpdate/Scripts/Scripts/Project/Demo/AIDeviceManager.cs

@@ -99,6 +99,7 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
                 if (ishumidity == false)
                 {
                     data["deviceClassification"] = "TEMPERATURE_HUMIDITY";
+                   
                     HttpTool.Instance.Post(HttpActionLang.aiDeviceState, data.ToJson(), (msg) =>
                     {
                         Debug.Log("DGJ ==> " + HttpActionLang.aiDeviceState + "  " + msg);
@@ -122,7 +123,7 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
                         }
                     });
 
-
+                    data["ago"] = 9;
                     HttpTool.Instance.Post(HttpActionLang.aiDeviceDataPoint, data.ToJson(), (msg) =>
                     {
                         Debug.Log("DGJ ==> " + HttpActionLang.aiDeviceDataPoint + "  " + msg);
@@ -132,9 +133,17 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
                             Dictionary<string, float> dicTemperature = new Dictionary<string, float>();
                             Dictionary<string, float> dicHumidity = new Dictionary<string, float>();
 
-                            dicTemperature = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["温度"].ToJson());
-                            dicHumidity = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["湿度"].ToJson());
-
+                            
+                            try
+                            {
+                                dicTemperature = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["温度"].ToJson());
+                                dicHumidity = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["湿度"].ToJson());
+                            }
+                            catch (System.Exception e)
+                            {
+
+                                Debug.LogError(e.Message);
+                            }
                             humitureControl.SetDataStatistics(dicTemperature, dicHumidity);
 
 
@@ -158,6 +167,7 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
                 if(isoscillate == false)
                 {
                     data["deviceClassification"] = "VIBRATE";
+                   
                     HttpTool.Instance.Post(HttpActionLang.aiDeviceState, data.ToJson(), (msg) =>
                     {
                         Debug.Log("DGJ ==> " + HttpActionLang.aiDeviceState + "  " + msg);
@@ -181,7 +191,7 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
 
                         }
                     });
-
+                    data["ago"] = 9;
                     HttpTool.Instance.Post(HttpActionLang.aiDeviceDataPoint, data.ToJson(), (msg) =>
                     {
                         Debug.Log("DGJ ==> " + HttpActionLang.aiDeviceDataPoint + "  " + msg);
@@ -192,9 +202,18 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
                             Dictionary<string, float> dicSpeed = new Dictionary<string, float>();
                             Dictionary<string, float> dicMove = new Dictionary<string, float>();
 
-                            dicTemperature = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["温度"].ToJson());
-                            dicSpeed = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["速度"].ToJson());
-                            dicMove = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["位移"].ToJson());
+                            try
+                            {
+                                dicTemperature = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["温度"].ToJson());
+                                dicSpeed = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["速度"].ToJson());
+                                dicMove = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["位移"].ToJson());
+                            }
+                            catch (System.Exception e)
+                            {
+
+                                Debug.LogError(e.Message);
+                            }
+                           
                             oscillateControl.SetDataStatistics(dicTemperature, dicSpeed, dicMove);
 
 
@@ -217,6 +236,7 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
                 if (isnoise == false)
                 {
                     data["deviceClassification"] = "VOICE";
+                    
                     HttpTool.Instance.Post(HttpActionLang.aiDeviceState, data.ToJson(), (msg) =>
                     {
                         Debug.Log("DGJ ==> " + HttpActionLang.aiDeviceState + "  " + msg);
@@ -234,7 +254,7 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
                            
                         }
                     });
-
+                    data["ago"] = 9;
                     HttpTool.Instance.Post(HttpActionLang.aiDeviceDataPoint, data.ToJson(), (msg) =>
                     {
                         Debug.Log("DGJ ==> " + HttpActionLang.aiDeviceDataPoint + "  " + msg);
@@ -243,8 +263,16 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
                         {
                             Dictionary<string, float> dicNoise = new Dictionary<string, float>();
 
+                            try
+                            {
+                                dicNoise = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["NOISE值"].ToJson());
+                            }
+                            catch (System.Exception e)
+                            {
 
-                            dicNoise = JsonConvert.DeserializeObject<Dictionary<string, float>>(data["data"]["point"]["NOISE值"].ToJson());
+                                Debug.LogError(e.Message);
+                            }
+                          
 
 
                             noiseControl.SetDataStatistics(dicNoise);

+ 139 - 24
Assets/HotUpdate/Scripts/Scripts/Project/Demo/HumitureDataStatistics.cs

@@ -1,3 +1,4 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using TMPro;
@@ -44,43 +45,133 @@ public class HumitureDataStatistics : MonoBehaviour
         lineHumidityPoint = new List<Vector3>();
         foreach (var item in dicTemper)
         {
-            listTimerStr.Add(item.Key);
-            lineTemperaturePoint.Add(new Vector3(0,item.Value,0));
-        }
+            string[] str1 = item.Key.Split(' ');
+            string[] str2 = str1[1].Split(':');
 
-        foreach (var item in dicHumity)
+            if (str2[1] == "00")
+            {
+                int timers = int.Parse(str2[0]);
+                timers++;
+                timers = timers % 24;
+                string timer;
+                if (timers < 10)
+                {
+                    timer = "0" + timers.ToString() + ":00";
+                }
+                else
+                {
+                    timer = timers.ToString() + ":00";
+                }
+
+                listTimerStr.Add(timer);
+                lineTemperaturePoint.Add(new Vector3(0, item.Value, 0));
+            }
+
+           
+        }
+        Dictionary<string, Vector3> dicHumidity = new Dictionary<string, Vector3>();
+        List<string> listTimerStr2 = GetListTime();
+        List<Vector3> listTemperatureData = new List<Vector3>();
+        for (int i = 0; i < listTimerStr2.Count; i++)
         {
-            lineHumidityPoint.Add(new Vector3(0, item.Value, 0));
+            bool finish = false;
+            for (int j = 0; j < listTimerStr.Count; j++)
+            {
+                if (listTimerStr2[i] == listTimerStr[j])
+                {
+                    finish = true;
+                    listTemperatureData.Add(lineTemperaturePoint[j]);
+                    break;
+                }
+            }
+            if (finish == false)
+            {
+                listTemperatureData.Add(Vector3.up);
+            }
         }
 
-        int num = 0;
-        for (int i = 0; i < listTimerStr.Count; i=i+2)
+        listTimerStr.Clear();
+        listTimerStr = new List<string>();
+        foreach (var item in dicHumity)
         {
-            string[] str = listTimerStr[i].Split(' ');
-
-
+            string[] str1 = item.Key.Split(' ');
+            string[] str2 = str1[1].Split(':');
 
-            // listTimeKD[num++].text = str[1];
-            string[] str2 = str[1].Split(':');
-            int timers = int.Parse(str2[0]);
-            timers++;
-            Debug.Log("DGJ ===> timers " + timers);
-            if(timers<10)
+            if (str2[1] == "00")
             {
-                listTimeKD[num++].text = "0"+timers.ToString() + ":00";
+                int timers = int.Parse(str2[0]);
+                timers++;
+                timers = timers % 24;
+                string timer;
+                if (timers < 10)
+                {
+                    timer = "0" + timers.ToString() + ":00";
+                }
+                else
+                {
+                    timer = timers.ToString() + ":00";
+                }
+
+                listTimerStr.Add(timer);
+                lineHumidityPoint.Add(new Vector3(0, item.Value, 0));
             }
-            else
+               
+        }
+       
+        List<Vector3> listHumidtyData = new List<Vector3>();
+        for (int i = 0; i < listTimerStr2.Count; i++)
+        {
+            bool finish = false;
+            for (int j = 0; j < listTimerStr.Count; j++)
             {
-                listTimeKD[num++].text =  timers.ToString() + ":00";
+                if (listTimerStr2[i] == listTimerStr[j])
+                {
+                    finish = true;
+                    listHumidtyData.Add(lineHumidityPoint[j]);
+                    break;
+                }
             }
-            
+            if (finish == false)
+            {
+                listHumidtyData.Add(Vector3.zero);
+            }
+        }
+      
+
+        int num = 0;
+        for (int i = 0; i < listTimerStr2.Count; i = i + 2)
+        {
+            listTimeKD[num++].text = listTimerStr2[i];
         }
 
-        DrawLine(humidityLine, lineHumidityPoint);
-        DrawLine(temperatureLine, lineTemperaturePoint);
+            //int num = 0;
+            //for (int i = 0; i < listTimerStr.Count; i=i+2)
+            //{
+            //    string[] str = listTimerStr[i].Split(' ');
+
+            //    string[] str2 = str[1].Split(':');
+            //    int timers = int.Parse(str2[0]);
+            //    timers++;
+            //    Debug.Log("DGJ ===> timers " + timers);
+            //    if(timers<10)
+            //    {
+            //        listTimeKD[num++].text = "0"+timers.ToString() + ":00";
+            //    }
+            //    else
+            //    {
+            //        listTimeKD[num++].text =  timers.ToString() + ":00";
+            //    }
+
+            //}
+
+
 
-        CreateMesh(humidityMeshFilter, lineHumidityPoint , new Color32(27,126,242,240), new Color32(27, 126, 242, 180));
-        CreateMesh(temperatureMeshFilter, lineTemperaturePoint, new Color32(112,238,255,240), new Color32(112, 238, 255, 180));
+
+            DrawLine(humidityLine, listHumidtyData);
+        DrawLine(temperatureLine, listTemperatureData);
+
+        CreateMesh(humidityMeshFilter, listHumidtyData, new Color32(27,126,242,240), new Color32(27, 126, 242, 180));
+        CreateMesh(temperatureMeshFilter, listTemperatureData, new Color32(112,238,255,240), new Color32(112, 238, 255, 180));
     }
 
     public void DrawLine(LineRenderer line, List<Vector3> linePoint)
@@ -161,4 +252,28 @@ public class HumitureDataStatistics : MonoBehaviour
         meshFilter.mesh = mesh;
     }
    
+
+    private List<string> GetListTime()
+    {
+        List<string> listTimer = new List<string>();
+
+        int hour = DateTime.Now.Hour;
+
+        for (int i = 0; i < 9; i++)
+        {
+            int hTimer = hour - 8 + i;
+            if (hTimer < 10)
+            {
+                listTimer.Add("0" + hTimer.ToString() + ":00");
+            }
+            else
+            {
+                listTimer.Add( hTimer.ToString() + ":00");
+            }
+
+            Debug.Log(listTimer[i]);
+        }
+
+        return listTimer;
+    }
 }

+ 93 - 19
Assets/HotUpdate/Scripts/Scripts/Project/Demo/NoiseDataStatistics.cs

@@ -1,3 +1,4 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using TMPro;
@@ -30,34 +31,78 @@ public class NoiseDataStatistics : MonoBehaviour
        
         foreach (var item in dicNoise)
         {
-            listTimerStr.Add(item.Key);
-            lineNoisePoint.Add(new Vector3(0, item.Value, 0));
-        }
+            string[] str1 = item.Key.Split(' ');
+            string[] str2 = str1[1].Split(':');
 
-   
+            if (str2[1] == "00")
+            {
+                int timers = int.Parse(str2[0]);
+                timers++;
+                timers = timers % 24;
+                string timer;
+                if (timers < 10)
+                {
+                    timer = "0" + timers.ToString() + ":00";
+                }
+                else
+                {
+                    timer = timers.ToString() + ":00";
+                }
+
+                listTimerStr.Add(timer);
+                lineNoisePoint.Add(new Vector3(0, item.Value, 0));
+            }
+           
+        }
 
-        int num = 0;
-        for (int i = 0; i < listTimerStr.Count; i = i + 2)
+        Dictionary<string, Vector3> dicHumidity = new Dictionary<string, Vector3>();
+        List<string> listTimerStr2 = GetListTime();
+        List<Vector3> listNoiseData = new List<Vector3>();
+        for (int i = 0; i < listTimerStr2.Count; i++)
         {
-            string[] str = listTimerStr[i].Split(' ');
-
-            // listTimeKD[num++].text = str[1];
-            string[] str2 = str[1].Split(':');
-            int timers = int.Parse(str2[0]);
-            timers++;
-            Debug.Log("DGJ ===> timers " + timers);
-            if (timers < 10)
+            bool finish = false;
+            for (int j = 0; j < listTimerStr.Count; j++)
             {
-                listTimeKD[num++].text = "0" + timers.ToString() + ":00";
+                if (listTimerStr2[i] == listTimerStr[j])
+                {
+                    finish = true;
+                    listNoiseData.Add(lineNoisePoint[j]);
+                    break;
+                }
             }
-            else
+            if (finish == false)
             {
-                listTimeKD[num++].text = timers.ToString() + ":00";
+                listNoiseData.Add(Vector3.up);
             }
         }
+        int num = 0;
+        for (int i = 0; i < listTimerStr2.Count; i = i + 2)
+        {
+            listTimeKD[num++].text = listTimerStr2[i];
+        }
 
-        DrawLine(noiseLine, lineNoisePoint);
-        CreateMesh(noiseMeshFilter, lineNoisePoint, new Color32(112, 238, 255, 240), new Color32(112, 238, 255, 180));
+        //int num = 0;
+        //for (int i = 0; i < listTimerStr.Count; i = i + 2)
+        //{
+        //    string[] str = listTimerStr[i].Split(' ');
+
+        //    // listTimeKD[num++].text = str[1];
+        //    string[] str2 = str[1].Split(':');
+        //    int timers = int.Parse(str2[0]);
+        //    timers++;
+        //    Debug.Log("DGJ ===> timers " + timers);
+        //    if (timers < 10)
+        //    {
+        //        listTimeKD[num++].text = "0" + timers.ToString() + ":00";
+        //    }
+        //    else
+        //    {
+        //        listTimeKD[num++].text = timers.ToString() + ":00";
+        //    }
+        //}
+
+        DrawLine(noiseLine, listNoiseData);
+        CreateMesh(noiseMeshFilter, listNoiseData, new Color32(112, 238, 255, 240), new Color32(112, 238, 255, 180));
     }
 
     public void DrawLine(LineRenderer line, List<Vector3> linePoint)
@@ -137,4 +182,33 @@ public class NoiseDataStatistics : MonoBehaviour
 
         meshFilter.mesh = mesh;
     }
+
+ 
+
+
+    private List<string> GetListTime()
+    {
+        List<string> listTimer = new List<string>();
+
+        int hour = DateTime.Now.Hour;
+
+        for (int i = 0; i < 9; i++)
+        {
+            int hTimer = hour - 8 + i;
+            if (hTimer < 0)
+                hTimer = 24 + hTimer;
+            if (hTimer < 10)
+            {
+                listTimer.Add("0" + hTimer.ToString() + ":00");
+            }
+            else
+            {
+                listTimer.Add(hTimer.ToString() + ":00");
+            }
+
+            Debug.Log(listTimer[i]);
+        }
+
+        return listTimer;
+    }
 }

+ 182 - 26
Assets/HotUpdate/Scripts/Scripts/Project/Demo/OscillateDataStatistics.cs

@@ -1,3 +1,4 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using TMPro;
@@ -47,48 +48,178 @@ public class OscillateDataStatistics : MonoBehaviour
         lineMovePoint = new List<Vector3>();
         foreach (var item in dicTemper)
         {
-            listTimerStr.Add(item.Key);
-            lineTemperaturePoint.Add(new Vector3(0, item.Value, 0));
+            string[] str1 = item.Key.Split(' ');
+            string[] str2 = str1[1].Split(':');
+
+            if (str2[1] == "00")
+            {
+                int timers = int.Parse(str2[0]);
+                timers++;
+                timers = timers % 24;
+                string timer;
+                if (timers < 10)
+                {
+                    timer = "0" + timers.ToString() + ":00";
+                }
+                else
+                {
+                    timer = timers.ToString() + ":00";
+                }
+
+                listTimerStr.Add(timer);
+                lineTemperaturePoint.Add(new Vector3(0, item.Value, 0));
+            }
+           
         }
 
+        Dictionary<string, Vector3> dicHumidity = new Dictionary<string, Vector3>();
+        List<string> listTimerStr2 = GetListTime();
+        List<Vector3> listTemperatureData = new List<Vector3>();
+        for (int i = 0; i < listTimerStr2.Count; i++)
+        {
+            bool finish = false;
+            for (int j = 0; j < listTimerStr.Count; j++)
+            {
+                if (listTimerStr2[i] == listTimerStr[j])
+                {
+                    finish = true;
+                    listTemperatureData.Add(lineTemperaturePoint[j]);
+                    break;
+                }
+            }
+            if (finish == false)
+            {
+                listTemperatureData.Add(Vector3.up);
+            }
+        }
+
+        listTimerStr.Clear();
+        listTimerStr = new List<string>();
         foreach (var item in dicSpeed)
         {
-            lineSpeedPoint.Add(new Vector3(0, item.Value, 0));
+            string[] str1 = item.Key.Split(' ');
+            string[] str2 = str1[1].Split(':');
+
+            if (str2[1] == "00")
+            {
+                int timers = int.Parse(str2[0]);
+                timers++;
+                timers = timers % 24;
+                string timer;
+                if (timers < 10)
+                {
+                    timer = "0" + timers.ToString() + ":00";
+                }
+                else
+                {
+                    timer = timers.ToString() + ":00";
+                }
+
+                listTimerStr.Add(timer);
+                lineSpeedPoint.Add(new Vector3(0, item.Value, 0));
+            }
+            
+        }
+        List<Vector3> listSpeedData = new List<Vector3>();
+        for (int i = 0; i < listTimerStr2.Count; i++)
+        {
+            bool finish = false;
+            for (int j = 0; j < listTimerStr.Count; j++)
+            {
+                if (listTimerStr2[i] == listTimerStr[j])
+                {
+                    finish = true;
+                    listSpeedData.Add(lineSpeedPoint[j]);
+                    break;
+                }
+            }
+            if (finish == false)
+            {
+                listSpeedData.Add(Vector3.up);
+            }
         }
 
+        listTimerStr.Clear();
+        listTimerStr = new List<string>();
         foreach (var item in dicMove)
         {
-            lineMovePoint.Add(new Vector3(0, item.Value, 0));
+            string[] str1 = item.Key.Split(' ');
+            string[] str2 = str1[1].Split(':');
+
+            if (str2[1] == "00")
+            {
+                int timers = int.Parse(str2[0]);
+                timers++;
+                timers = timers % 24;
+                string timer;
+                if (timers < 10)
+                {
+                    timer = "0" + timers.ToString() + ":00";
+                }
+                else
+                {
+                    timer = timers.ToString() + ":00";
+                }
+
+                listTimerStr.Add(timer);
+                lineMovePoint.Add(new Vector3(0, item.Value, 0));
+            }
+           
         }
 
-        int num = 0;
-        for (int i = 0; i < listTimerStr.Count; i = i + 2)
+        List<Vector3> listMoveData = new List<Vector3>();
+        for (int i = 0; i < listTimerStr2.Count; i++)
         {
-            string[] str = listTimerStr[i].Split(' ');
-
-            // listTimeKD[num++].text = str[1];
-            string[] str2 = str[1].Split(':');
-            int timers = int.Parse(str2[0]);
-            timers++;
-            Debug.Log("DGJ ===> timers " + timers);
-            if (timers < 10)
+            bool finish = false;
+            for (int j = 0; j < listTimerStr.Count; j++)
             {
-                listTimeKD[num++].text = "0" + timers.ToString() + ":00";
+                if (listTimerStr2[i] == listTimerStr[j])
+                {
+                    finish = true;
+                    listMoveData.Add(lineMovePoint[j]);
+                    break;
+                }
             }
-            else
+            if (finish == false)
             {
-                listTimeKD[num++].text = timers.ToString() + ":00";
+                listMoveData.Add(Vector3.up);
             }
         }
 
-       
-        DrawLine(temperatureLine, lineTemperaturePoint);
-        DrawLine(speedLine, lineSpeedPoint);
-        DrawLine(moveLine, lineMovePoint);
+        int num = 0;
+        for (int i = 0; i < listTimerStr2.Count; i = i + 2)
+        {
+            listTimeKD[num++].text = listTimerStr2[i];
+        }
 
-        CreateMesh(speedMeshFilter, lineSpeedPoint, new Color32(255, 230, 98, 240), new Color32(255, 230, 98, 180));
-        CreateMesh(moveMeshFilter, lineMovePoint, new Color32(27, 126, 242, 240), new Color32(27, 126, 242, 180));
-        CreateMesh(temperatureMeshFilter, lineTemperaturePoint, new Color32(112, 238, 255, 240), new Color32(112, 238, 255, 180));
+        //int num = 0;
+        //for (int i = 0; i < listTimerStr.Count; i = i + 2)
+        //{
+        //    string[] str = listTimerStr[i].Split(' ');
+
+        //    // listTimeKD[num++].text = str[1];
+        //    string[] str2 = str[1].Split(':');
+        //    int timers = int.Parse(str2[0]);
+        //    timers++;
+        //    Debug.Log("DGJ ===> timers " + timers);
+        //    if (timers < 10)
+        //    {
+        //        listTimeKD[num++].text = "0" + timers.ToString() + ":00";
+        //    }
+        //    else
+        //    {
+        //        listTimeKD[num++].text = timers.ToString() + ":00";
+        //    }
+        //}
+
+
+        DrawLine(temperatureLine, listTemperatureData);
+        DrawLine(speedLine, listSpeedData);
+        DrawLine(moveLine, listMoveData);
+
+        CreateMesh(speedMeshFilter, listSpeedData, new Color32(255, 230, 98, 240), new Color32(255, 230, 98, 180));
+        CreateMesh(moveMeshFilter, listMoveData, new Color32(27, 126, 242, 240), new Color32(27, 126, 242, 180));
+        CreateMesh(temperatureMeshFilter, listTemperatureData, new Color32(112, 238, 255, 240), new Color32(112, 238, 255, 180));
     }
 
     public void DrawLine(LineRenderer line, List<Vector3> linePoint)
@@ -142,7 +273,7 @@ public class OscillateDataStatistics : MonoBehaviour
         for (int i = 0; i < listVertices.Count; i++)
         {
             vertices[i] = listVertices[i];
-            Debug.Log(listVertices[i].ToString());
+          //  Debug.Log(listVertices[i].ToString());
         }
 
         int[] triangles = new int[listTriangles.Count];
@@ -150,7 +281,7 @@ public class OscillateDataStatistics : MonoBehaviour
         {
             triangles[i] = listTriangles[i];
 
-            Debug.Log(listTriangles);
+          //  Debug.Log(listTriangles);
         }
 
         Color[] colors = new Color[listcolor.Count];
@@ -168,4 +299,29 @@ public class OscillateDataStatistics : MonoBehaviour
 
         meshFilter.mesh = mesh;
     }
+
+    private List<string> GetListTime()
+    {
+        List<string> listTimer = new List<string>();
+
+        int hour = DateTime.Now.Hour;
+
+        for (int i = 0; i < 9; i++)
+        {
+            int hTimer = hour - 8 + i;
+            if (hTimer < 10)
+            {
+                listTimer.Add("0" + hTimer.ToString() + ":00");
+            }
+            else
+            {
+                listTimer.Add(hTimer.ToString() + ":00");
+            }
+
+            Debug.Log(listTimer[i]);
+        }
+
+        return listTimer;
+    }
+
 }

+ 1 - 1
Assets/RecycleView/RecycleView.cs

@@ -344,7 +344,7 @@ public class RecycleView : MonoBehaviour, IBeginDragHandler, IEndDragHandler, ID
             GameObject cell = GetPoolsObj();
             cell.transform.GetComponent<RectTransform>().anchoredPosition = cellInfo.pos;
             cell.gameObject.name = i.ToString();
-
+            
             //-> 存数据
             cellInfo.obj = cell;
             cellInfos[i] = cellInfo;

+ 1 - 10
ProjectSettings/ProjectSettings.asset

@@ -146,16 +146,7 @@ PlayerSettings:
     16:9: 1
     Others: 1
   bundleVersion: 1.0.0
-  preloadedAssets:
-  - {fileID: 2720162604194769745, guid: 6f45d16099e3af24c9d1814902f6c1cd, type: 2}
-  - {fileID: -1976151159784538485, guid: 2fc93d2ce72dd364f968f3400a68213b, type: 2}
-  - {fileID: 4800000, guid: ea9a295053a0dc440b9698a7f41d9741, type: 3}
-  - {fileID: 4800000, guid: 1499e61b3897c4a4b9318a56ca931b8a, type: 3}
-  - {fileID: 4800000, guid: 798d6e253a35a144d94205b80c8fd48b, type: 3}
-  - {fileID: 4800000, guid: ae539cb2b258bd047a57837fd579cc80, type: 3}
-  - {fileID: 4800000, guid: 58841e6e22debfc43ba09a0cf58cd92d, type: 3}
-  - {fileID: 4800000, guid: a336f422ffebbec4c89b4dac26022d5f, type: 3}
-  - {fileID: 11400000, guid: 852e6bd112d2b174996470390b08d3a7, type: 2}
+  preloadedAssets: []
   metroInputSource: 0
   wsaTransparentSwapchain: 0
   m_HolographicPauseOnTrackingLoss: 1