From 64c0604d9a7d2460f6bf1b6cc7df02d769db3a15 Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期三, 19 六月 2024 09:23:32 +0800
Subject: [PATCH] 优化预测错误日志

---
 BLL/IStation.BLL.Connect/ReservoirWaterLevel.cs |   32 +++++++++++++-------------------
 1 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/BLL/IStation.BLL.Connect/ReservoirWaterLevel.cs b/BLL/IStation.BLL.Connect/ReservoirWaterLevel.cs
index 705f1c0..c413eb6 100644
--- a/BLL/IStation.BLL.Connect/ReservoirWaterLevel.cs
+++ b/BLL/IStation.BLL.Connect/ReservoirWaterLevel.cs
@@ -4,28 +4,27 @@
 using System.IO;
 using System.Linq;
 using System.Net;
-using System.Text; 
+using System.Text;
 
 namespace IStation.BLL
 {
     /// <summary>
-    /// 姘村簱姘翠綅 
+    /// 姘村簱姘翠綅
     /// </summary>
     public class ReservoirWaterLevel
     {
         public static double GetRealValue()
         {
-            if(!ServiceParas.IsRemote)
+            if (!ServiceParas.IsRemote)
             {
                 return -100;
             }
- 
+
             if (string.IsNullOrEmpty(ServiceParas.ApiServiceUrl))
             {
                 return -100;
             }
             string url = string.Format(@"{0}/ReservoirWaterLevel/GetRealValue", ServiceParas.ApiServiceUrl);
-
 
             //鍏堟牴鎹敤鎴疯姹傜殑uri鏋勯�犺姹傚湴鍧�
             //string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
@@ -38,7 +37,7 @@
 
             myRequest.Method = "GET";
             //myRequest.Accept = "application/json";
-            //myRequest.ContentType = "application/json";  // //Content-Type: application/x-www-form-urlencoded 
+            //myRequest.ContentType = "application/json";  // //Content-Type: application/x-www-form-urlencoded
             myRequest.AutomaticDecompression = DecompressionMethods.GZip;
             myRequest.Accept = Accept;
             //myRequest.ContentType = ContentType;
@@ -71,13 +70,12 @@
             reader.Close();
             myResponse.Close();
 
-
             return ret.Data;
         }
 
         /// <summary>
-        /// 鑾峰彇 棰勬祴鍊� 
-        /// </summary> 
+        /// 鑾峰彇 棰勬祴鍊�
+        /// </summary>
         /// <returns></returns>
         public static List<IStation.Model.WaterPredictRecord> GetPredictRecordByHourRange(DateTime start_time, DateTime end_time)
         {
@@ -86,11 +84,10 @@
             {
                 return null;
             }
-            string url = string.Format(@"{0}/ReservoirWaterLevel/GetPredictRecordByHourRange?start_time={1}&end_time={2}", 
+            string url = string.Format(@"{0}/ReservoirWaterLevel/GetPredictRecordByHourRange?start_time={1}&end_time={2}",
                 apiServiceUrl,
                 start_time.ToString("yyyy-MM-dd HH:mm:00"),
                 end_time.ToString("yyyy-MM-dd HH:mm:00"));
-
 
             //鍏堟牴鎹敤鎴疯姹傜殑uri鏋勯�犺姹傚湴鍧�
             //string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
@@ -103,7 +100,7 @@
 
             myRequest.Method = "GET";
             //myRequest.Accept = "application/json";
-            //myRequest.ContentType = "application/json";  // //Content-Type: application/x-www-form-urlencoded 
+            //myRequest.ContentType = "application/json";  // //Content-Type: application/x-www-form-urlencoded
             myRequest.AutomaticDecompression = DecompressionMethods.GZip;
             myRequest.Accept = Accept;
             //myRequest.ContentType = ContentType;
@@ -136,13 +133,12 @@
             reader.Close();
             myResponse.Close();
 
-
             return ret.Data;
         }
 
         ///// <summary>
-        ///// 鑾峰彇浠婃棩棰勬祴鍊�(24鐐规椂) 
-        ///// </summary> 
+        ///// 鑾峰彇浠婃棩棰勬祴鍊�(24鐐规椂)
+        ///// </summary>
         ///// <returns></returns>
         //public static double GetTodayEndPredictiveValue()
         //{
@@ -152,7 +148,6 @@
         //        return -100;
         //    }
         //    string url = string.Format(@"{0}/ReservoirWaterLevel/GetTodayEndPredictiveValue", apiServiceUrl);
-
 
         //    //鍏堟牴鎹敤鎴疯姹傜殑uri鏋勯�犺姹傚湴鍧�
         //    //string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
@@ -165,7 +160,7 @@
 
         //    myRequest.Method = "GET";
         //    //myRequest.Accept = "application/json";
-        //    //myRequest.ContentType = "application/json";  // //Content-Type: application/x-www-form-urlencoded 
+        //    //myRequest.ContentType = "application/json";  // //Content-Type: application/x-www-form-urlencoded
         //    myRequest.AutomaticDecompression = DecompressionMethods.GZip;
         //    myRequest.Accept = Accept;
         //    //myRequest.ContentType = ContentType;
@@ -198,8 +193,7 @@
         //    reader.Close();
         //    myResponse.Close();
 
-
         //    return ret.Data;
         //}
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.3