From c5efa74e622a96e789e95cc8f18a11144f9d29a0 Mon Sep 17 00:00:00 2001
From: tangxu <76880903@qq.com>
Date: 星期三, 26 十月 2022 13:47:34 +0800
Subject: [PATCH] 修改南通硬件PLC解析指令

---
 Calculation/IStation.Calculation.Dispatch/DispatchAnalyCalculatorFactory.cs |   95 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 88 insertions(+), 7 deletions(-)

diff --git a/Calculation/IStation.Calculation.Dispatch/DispatchAnalyCalculatorFactory.cs b/Calculation/IStation.Calculation.Dispatch/DispatchAnalyCalculatorFactory.cs
index 701eeb0..e9f6ebb 100644
--- a/Calculation/IStation.Calculation.Dispatch/DispatchAnalyCalculatorFactory.cs
+++ b/Calculation/IStation.Calculation.Dispatch/DispatchAnalyCalculatorFactory.cs
@@ -3,6 +3,8 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using IStation.Calculation.DispatchAna;
+using IStation.Numerics;
 
 namespace IStation.Calculation
 {
@@ -26,25 +28,104 @@
             EPT = 1
         }
         /// <summary>
-        /// 鍒涘缓璁$畻鍣�
+        /// 鍒涘缓璁$畻鍣�(褰撳墠璋冨害淇℃伅)
         /// </summary>
-        public static IDispatchAnalyCalculator CreateCalculator(long CorpID, string ObjectType,long ObjectID, eCalcTool? CalcTool)  
+        public static IGetCurrentRecord CreateGetCurrentRecord(
+            long CorpID, string ObjectType, long ObjectID )
         {
-            if(ObjectType == IStation.ObjectType.Station)
+            if (ObjectType == IStation.ObjectType.Station)
             {
-                if(CorpID == 4)
+                IGetCurrentRecord calc = null;
+                if (CorpID == 4)
                 {//涓婃捣 鍘熸按
                     if (ObjectID == 2)
                     {
-                        return new IStation.Calculation.DispatchAna.Calculator4ShysCxbz();
-                    }           
+                        calc = new IStation.Calculation.DispatchAna.Calculator_Current_SHYS_闀垮叴宀�();
+                    }
                 }
-                return new IStation.Calculation.DispatchAna.Calculator4StationGeneral();
+
+
+
+
+                if (calc == null)
+                {
+                    var general =   new IStation.Calculation.DispatchAna.Calculator_Current_Gneral();
+                    calc = general;
+                }
+                return calc;
             }
 
 
 
             return null;
         }
+
+        /// <summary>
+        /// 鍒涘缓璁$畻鍣�(鏈�浼樻柟妗堣绠�)
+        /// </summary>
+        public static IOptAnaCalc CreateOptAnaCalculator(
+            long CorpID, string ObjectType, long ObjectID, eCalcTool? CalcTool)  
+        {
+            if (ObjectType == IStation.ObjectType.Station)
+            {
+                IOptAnaCalc calc = null;
+                if (CorpID == 4)
+                {//涓婃捣 鍘熸按
+                    if (ObjectID == 2)
+                    {
+                        calc = new IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_闀垮叴宀�();
+                    }
+                }
+
+                if (calc == null)
+                {
+                    var general = new IStation.Calculation.DispatchAna.Calculator_OptAna_General();
+                    calc = general;
+                }
+
+
+                return calc;
+            }
+
+
+
+            return null;
+        }
+
+
+        /// <summary>
+        /// 鍒涘缓璁$畻鍣�(鏈�浼樻柟妗堣绠�)
+        /// </summary>
+        public static IKeepStatusCalc CreateKeepStatusCalculator(
+            long CorpID, string ObjectType, long ObjectID, eCalcTool? CalcTool)
+        {
+            if (ObjectType == IStation.ObjectType.Station)
+            {
+                IKeepStatusCalc calc = null;
+                if (CorpID == 4)
+                {//涓婃捣 鍘熸按
+                    if (ObjectID == 2)
+                    {
+                        calc = new IStation.Calculation.DispatchAna.Calculator_KeepStatus_SHYS_闀垮叴宀�();
+                    }
+                }
+
+                if (calc == null)
+                {
+                    var general = new IStation.Calculation.DispatchAna.Calculator_KeepStatus_General();
+                    calc = general;
+                }
+
+
+                return calc;
+            }
+
+
+
+            return null;
+        }
+
+
+
     }
 }

--
Gitblit v1.9.3