From 1c5fa983ae3506c2edaa88c51a959d46685c1ba1 Mon Sep 17 00:00:00 2001
From: tangxu <tangxu76880903>
Date: 星期三, 24 四月 2024 14:25:34 +0800
Subject: [PATCH] 分离成3个分析

---
 WinFrmUI/IStation.WinFrmUI.CalcErQu/Wizard/pageCalcParas.cs |   68 +++++++++++++++-------------------
 1 files changed, 30 insertions(+), 38 deletions(-)

diff --git a/WinFrmUI/IStation.WinFrmUI.CalcErQu/Wizard/pageCalcParas.cs b/WinFrmUI/IStation.WinFrmUI.CalcErQu/Wizard/pageCalcParas.cs
index 8e3ecc2..7ee8542 100644
--- a/WinFrmUI/IStation.WinFrmUI.CalcErQu/Wizard/pageCalcParas.cs
+++ b/WinFrmUI/IStation.WinFrmUI.CalcErQu/Wizard/pageCalcParas.cs
@@ -10,6 +10,7 @@
 using IStation.CalcModel;
 using System.Threading.Tasks;
 using DevExpress.XtraRichEdit.Model;
+using IStation.BLL;
 
 namespace IStation.WinFrmUI.CalcErQu
 {
@@ -29,9 +30,7 @@
             this.winBottomPnl.ButtonUnchecked += new DevExpress.XtraBars.Docking2010.ButtonEventHandler(this.winBottomPnl_ButtonUnchecked);
             this.winBottomPnl.ButtonChecked += new DevExpress.XtraBars.Docking2010.ButtonEventHandler(this.winBottomPnl_ButtonChecked);
 
-       
-
-            textEdit鏈�楂樻按浣嶉檺鍒�.Enabled = textEdit鏈�浣庢按浣嶉檺鍒�.Enabled = checkEdit姘翠綅闄愬埗.Checked = false;
+ 
 
         }
 
@@ -100,14 +99,14 @@
             IStation.CalcModel.AnaRequest request = new CalcModel.AnaRequest();
             request.CalcOptType = GetOptCalcType();
             request.StartTime = new DateTime(dateEditDay.DateTime.Year, dateEditDay.DateTime.Month, dateEditDay.DateTime.Day, Convert.ToInt32(spinEditStart.EditValue), 0, 0);
-            if(Convert.ToInt32(spinEditStart.EditValue)<= Convert.ToInt32(spinEditEnd.EditValue))
+            if(Convert.ToInt32(spinEditStart.EditValue) < Convert.ToInt32(spinEditEnd.EditValue))
             {
                 request.EndTime = new DateTime(dateEditDay.DateTime.Year, dateEditDay.DateTime.Month, dateEditDay.DateTime.Day, Convert.ToInt32(spinEditEnd.EditValue), 0, 0);
             }
             else
             {
                 request.EndTime = new DateTime(dateEditDay.DateTime.Year, dateEditDay.DateTime.Month, dateEditDay.DateTime.Day, Convert.ToInt32(spinEditEnd.EditValue), 0, 0);
-                request.EndTime.AddDays(1);
+                request.EndTime = request.EndTime.AddDays(1);
             }
 
 
@@ -136,32 +135,20 @@
             }
 
 
-            if (checkEdit姘翠綅闄愬埗.Checked)
+
+
+            if (!string.IsNullOrEmpty(textEdit鏈�楂樻按浣嶉檺鍒�.Text))
             {
-                if (string.IsNullOrEmpty(textEdit鏈�楂樻按浣嶉檺鍒�.Text))
-                {
-                    textEdit鏈�楂樻按浣嶉檺鍒�.Focus();
-                    MessageBox.Show("璇疯緭鍏� 鏈�楂樻按浣嶉檺鍒�");
-                    return null;
-                }
-
-                if (string.IsNullOrEmpty(textEdit鏈�浣庢按浣嶉檺鍒�.Text))
-                {
-                    textEdit鏈�浣庢按浣嶉檺鍒�.Focus();
-                    MessageBox.Show("璇疯緭鍏� 鏈�浣庢按浣嶉檺鍒�");
-                    return null;
-                }
-
                 request.MaxLimitWaterBoxLevel = Convert.ToDouble(textEdit鏈�楂樻按浣嶉檺鍒�.Text);
-                request.MinLimitWaterBoxLevel = Convert.ToDouble(textEdit鏈�浣庢按浣嶉檺鍒�.Text);
 
-                if (request.MinLimitWaterBoxLevel > request.MaxLimitWaterBoxLevel)
-                {//鍙互鐩哥瓑
-                    textEdit鏈�浣庢按浣嶉檺鍒�.Focus();
-                    MessageBox.Show("璇疯緭鍏ュ悎鐞嗙殑 鏈�浣庢按浣嶉檺鍒�");
-                    return null;
-                }
+                if (!string.IsNullOrEmpty(textEdit鏈�楂樻按浣嶆椂闂�.Text))
+                {
+                    request.MaxLimitWaterBoxTime = textEdit鏈�楂樻按浣嶆椂闂�.Text;
+                }  
             }
+
+
+
 
 
 
@@ -177,8 +164,8 @@
             }
             request.ReservoirDropFlow = flow_list;
 
-            request.ReservoirMaxLimitHours = reservoirParasRequestCtrl.GetMaxLevelHourValues();
-            request.ReservoirMinLimitHours = reservoirParasRequestCtrl.GetMinLevelHourValues();
+           // request.ReservoirMaxLimitHours = reservoirParasRequestCtrl.GetMaxLevelHourValues();
+           // request.ReservoirMinLimitHours = reservoirParasRequestCtrl.GetMinLevelHourValues();
 
             return request;
         }
@@ -319,9 +306,20 @@
             //anaSetting.LastReservoirMaxLevel =
             //              textEdit鏈�楂樻按浣嶉檺鍒�.Text;
             //anaSetting.LastTargetTotalFlow = Convert.ToDouble(textEdit渚涙按鎬婚噺涓�.Text);
-
-
             //IStation.SettingsHelper.Save();
+
+
+           //PredictWater predictWater = new PredictWater();
+           // //绠楁硶
+           //var Predict= predictWater.GetPredictWaterOneDay(new DateTime(2023, 3, 1, 0, 0, 0), new DateTime(2023, 3, 1, 23, 0, 0), 30,out string error);
+           // //骞冲潎鏁�
+           // var Ana = predictWater.GetAnaWaterOneDay(new DateTime(2023, 3, 1, 0, 0, 0), new DateTime(2023, 3, 1, 23, 0, 0), 30,out string error1);
+
+
+
+
+
+
 
             if (OnNextPageEvent != null)
             {
@@ -566,13 +564,7 @@
         {
             return checkEdit閲嶆柊璁$畻鏂规.Checked;
         }
-
-        private void checkEdit姘翠綅闄愬埗_CheckedChanged(object sender, EventArgs e)
-        {
-            textEdit鏈�楂樻按浣嶉檺鍒�.Enabled =
-                textEdit鏈�浣庢按浣嶉檺鍒�.Enabled =
-                checkEdit姘翠綅闄愬埗.Checked;
-        }
+ 
 
         private void BTN璁$畻鏂规_Click(object sender, EventArgs e)
         {

--
Gitblit v1.9.3