tangxu
2024-12-19 9acdf3c826311bd67180821ce19c625d0e384ca8
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;
        }