From 9acdf3c826311bd67180821ce19c625d0e384ca8 Mon Sep 17 00:00:00 2001
From: tangxu <tangxu76880903>
Date: 星期四, 19 十二月 2024 09:45:18 +0800
Subject: [PATCH] 紧急提交更新

---
 Calc/IStation.Calc.Core/CalcPrj.cs |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/Calc/IStation.Calc.Core/CalcPrj.cs b/Calc/IStation.Calc.Core/CalcPrj.cs
index 34bbf12..76c3770 100644
--- a/Calc/IStation.Calc.Core/CalcPrj.cs
+++ b/Calc/IStation.Calc.Core/CalcPrj.cs
@@ -39,7 +39,32 @@
             //anaPrjs.Sort(new AnaPrj.Comparer(anaRequest.CalcOptType));
             //optPrj = anaPrjs.First();
 
+            //
+            double maxHeight = 0;
+            DateTime maxHeightTime = optPrj.StartTime;
+            if (optPrj.BlockTimes != null)
+            { 
+                foreach (var bt in optPrj.BlockTimes)
+                {
+                    if (bt.OpenPumpIndexs == null)
+                        continue;
  
+                    if (bt.PointTimes != null)
+                    { 
+                        foreach (var bt2 in bt.PointTimes)
+                        {
+                            if (maxHeight < bt2.WaterLevelH)
+                            {
+                                maxHeight = bt2.WaterLevelH;
+                                //maxHeight = Math.Max(maxHeight, bt2.WaterLevelH);
+                                maxHeightTime = bt2.Time;
+                            }
+                        }
+                    }
+                }
+            }
+            optPrj.MaxWaterLevelH = maxHeight;
+            optPrj.MaxWaterLevelTime = maxHeightTime;
 
             return null;
         }

--
Gitblit v1.9.3