2 Commits e82a5efa04 ... 4ce631b84f

Author SHA1 Message Date
  lijun 4ce631b84f fix 5 months ago
  lijun 71a1905fc6 fix 5 months ago
2 changed files with 8 additions and 2 deletions
  1. 0 1
      Pas.ScadaService/Core/GopTimeCalc.cs
  2. 8 1
      Pas.ScadaService/StartUp.cs

+ 0 - 1
Pas.ScadaService/Core/GopTimeCalc.cs

@@ -152,7 +152,6 @@ namespace Pas.ScadaService.Core
 
         private static string HandleTime(string time)
         {
-            Console.WriteLine("time:"+time);
             var last = time.Split(':').Last();
             var lastLength = last.Length + 1;
             return time.Substring(0, time.Length - lastLength) + "." + last;

+ 8 - 1
Pas.ScadaService/StartUp.cs

@@ -51,7 +51,14 @@ namespace Pas.ScadaService
             };
             _scada.Start();
             Thread.Sleep(3000);
-            GopTimeCalc.Load(config, sqlConn, GetAllData());
+            try
+            {
+                GopTimeCalc.Load(config, sqlConn, GetAllData());
+            }
+            catch (Exception e)
+            {
+                XTrace.Log.Error(e.ToString());
+            }
             _isStart = true;
         }
         private static List<Model.Data> GetAllData()