Ver código fonte

1.轮轨力删除 2.功率算法导出结果增加

wrinkle17 1 mês atrás
pai
commit
7087db6e30

+ 10 - 9
DPTools/Properties/licenses.licx

@@ -1,14 +1,15 @@
-DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.Repository.RepositoryItemProgressBar, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraReports.UserDesigner.XRDesignDockManager, DevExpress.XtraReports.v15.2.Extensions, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraSpreadsheet.SpreadsheetControl, DevExpress.XtraSpreadsheet.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v15.2.UI, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraReports.UserDesigner.XRDesignDockManager, DevExpress.XtraReports.v15.2.Extensions, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.Patch.InMemoryPatch, DevExpress.Patch.Common, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7fc7bfca2443de66
+DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraSpreadsheet.SpreadsheetControl, DevExpress.XtraSpreadsheet.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.Repository.RepositoryItemProgressBar, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

+ 2 - 1
DPTools/app.config

@@ -7,7 +7,8 @@
     <add key="sqssrY" value="MxYwaxN4XPqLpTL9yJI/Su5Tk9K/psFAJ1q+ezrNakU=" />
     <add key="pzConfig" value="pzConfig.ini" />
     <add key="jgtpath" value="GD_JGT_01.jpg" />
-    <add key="dbConnection" value="PORT=5432;DATABASE=jiance10;HOST=49.232.243.74;PASSWORD=UninphoSQL;USER ID=postgres" />
+    <!--<add key="dbConnection" value="PORT=5432;DATABASE=jiance10;HOST=49.232.243.74;PASSWORD=UninphoSQL;USER ID=postgres" />-->
+    <add key="dbConnection" value="PORT=5432;DATABASE=jiance10-1209;HOST=localhost;PASSWORD=123456;USER ID=postgres" />
     <!--43.138.89.214 localhost MxYwaxN4XPqLpTL9yJI/Su5Tk9K/psFAJ1q+ezrNakU=-->
     <add key="ClientSettingsProvider.ServiceUri" value="" />
   </appSettings>

+ 81 - 2
DPTools/components/DataAnalysis/DataAnalysisClass.cs

@@ -68,6 +68,7 @@ namespace Uninpho.Tools.components.DataAnalysis
                 if (boo)
                 {
                     AsyncFun();
+
                 }
             }
         }
@@ -269,6 +270,7 @@ namespace Uninpho.Tools.components.DataAnalysis
                     if (boo)
                     {
                         GV.SetRowCellValue(selectrow[i], "Taskstatus", type + "算法执行完毕");
+                    
                     }
                     else
                     {
@@ -956,15 +958,24 @@ namespace Uninpho.Tools.components.DataAnalysis
                         Console.WriteLine($"时间解析失败: {ex.Message}");
                         gldata.Time = null; // 或者设置为默认值
                     }
+                    // 检查关键字段是否为空或默认值
+                    if (gldata.Curvenumber != 0 && gldata.Directionalmarker != 0 && gldata.Curvetype != 0 &&
+                        gldata.Totalwork != 0 && gldata.Changerate != 0 && gldata.Offsetvalue != 0 &&
+                        gldata.Powervariance != 0 && gldata.Time != null)
+                    {
+                        GLobjs.Add(gldata);
+                    }
 
-                    GLobjs.Add(gldata);
+                   // GLobjs.Add(gldata);
                 }
 
                 //Console.WriteLine("解析完成,共 " + GLobjs.Count + " 条记录");
               
                 DataAnalysisToPG.updataTaskstatus(new string[] { whichfile.Id.ToString(), type + "算法执行完毕" });
                 DataAnalysisToPG.InsertGLFXDataToPG(GLobjs);
-              
+                CalculateAndInsertAnalysisProData(whichfile.Filename);
+
+
             }
             catch (Exception ex)
             {
@@ -1035,6 +1046,74 @@ namespace Uninpho.Tools.components.DataAnalysis
             }
         }
 
+        private void CalculateAndInsertAnalysisProData(string filename)
+        {
+            try
+            {
+                // 1. 从 T_glanalysis_account 表中获取数据
+                var analysisData = DataAnalysisToPG.QueryAllGLAnalysisData(filename) as List<T_glanalysis_account>; ;
+
+                if (analysisData == null || !analysisData.Any())
+                {
+                    Console.WriteLine($"没有找到文件 {filename} 的分析数据");
+                    return;
+                }
+
+                // 2. 按日期分组
+                var groupedData = analysisData
+                    .GroupBy(x => DateTime.Parse(x.Time).Date.ToString("yyyy-MM-dd"))
+                    .ToList();
+
+                foreach (var group in groupedData)
+                {
+                    var proAccount = new T_glanalysispro_account
+                    {
+                        Xianlu = group.First().Xianlu,
+                        Chezhan = group.First().Chezhan,
+                        Time = group.Key,
+                        Filename = filename,
+                        Curvetype = group.First().Curvetype,
+                        Curvenumber = group.First().Curvenumber,
+
+                        // 计算总功率的最大、最小、平均值
+                        Totalworkmax = group.Max(x => x.Totalwork),
+                        Totalworkmin = group.Min(x => x.Totalwork),
+                        Totalworkavg = group.Average(x => x.Totalwork),
+
+                        // 计算变化率的最大、最小、平均值
+                        Changeratemax = group.Max(x => x.Changerate),
+                        Changeratemin = group.Min(x => x.Changerate),
+                        Changerateavg = group.Average(x => x.Changerate),
+
+                        // 计算偏差值的最大、最小、平均值
+                        Offsetvaluemax = group.Max(x => x.Offsetvalue),
+                        Offsetvaluemin = group.Min(x => x.Offsetvalue),
+                        Offsetvalueavg = group.Average(x => x.Offsetvalue),
+
+                        // 计算功率方差的最大、最小、平均值
+                        Powervariancemax = group.Max(x => x.Powervariance),
+                        Powervariancemin = group.Min(x => x.Powervariance),
+                        Powervarianceavg = group.Average(x => x.Powervariance)
+                    };
+
+                    // 3. 插入数据到 T_glanalysispro_account 表
+                    try
+                    {
+                        DataAnalysisToPG.InsertGLAnalysisProData(proAccount);
+                        Console.WriteLine($"成功插入日期 {group.Key} 的统计数据");
+                    }
+                    catch (Exception ex)
+                    {
+                        Console.WriteLine($"插入数据失败: {ex.Message}");
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine($"处理数据时出错: {ex.Message}");
+                Console.WriteLine($"堆栈跟踪: {ex.StackTrace}");
+            }
+        }
         ///
         /// 缺口算法
         public void QK_new(T_dwqkfile_account whichfile)

+ 1 - 0
DPTools/components/DataManager/BXDBFrom.Designer.cs

@@ -43,6 +43,7 @@
             this.ShowLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
             this.ShowLayoutPanel.Size = new System.Drawing.Size(699, 439);
             this.ShowLayoutPanel.TabIndex = 1;
+            this.ShowLayoutPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.ShowLayoutPanel_Paint);
             // 
             // BXDBFrom
             // 

+ 5 - 1
DPTools/components/DataManager/BXDBFrom.cs

@@ -62,7 +62,7 @@ namespace Uninpho.Tools.components.DataManager
             //轮轨力波形数据
             List<T_lunguili_boxing> lglBX = DMControl.GetLGL_BXDataByIDS(yswjm_lgl.Count == 0 ? "0,0" : yswjm_lgl[0]);
             List<T_lunguili_boxing> lglBXold = DMControl.GetLGL_BXDataByIDS(yswjm_lgl.Count == 0 ? "0,0" : yswjm_lgl[1]);
-            SetWaveFun("lgl", "Licheng", lglBX, lglBXold, lglwave, drawfrmlgl);
+            //SetWaveFun("lgl", "Licheng", lglBX, lglBXold, lglwave, drawfrmlgl);
         }
 
         private void SetWaveFun<T>(string type, string XaxisList, List<T> jhfxBX, List<T> jhfxBXold, WaveInput jhwave, DrawCrl drawfrmjh)
@@ -102,5 +102,9 @@ namespace Uninpho.Tools.components.DataManager
             DrawCrl.boardkey = 0;
         }
 
+        private void ShowLayoutPanel_Paint(object sender, PaintEventArgs e)
+        {
+
+        }
     }
 }

+ 6 - 3
DPTools/components/DataManager/DMCtrl.cs

@@ -73,9 +73,12 @@ namespace Uninpho.Tools
                 fillDataqs(lglMeta, rows, ref pzlgl, ref listarr);
                 fillDataqs(jhfxMeta, rows,ref pzjh,ref listarr1);
                 listarr = listarr.Union(listarr1).ToList();
-                var pzda = pzlgl.Union(pzjh).ToList();
+                //var pzda = pzlgl.Union(pzjh).ToList();
+                List<PZClass> pzda = null;
 
-                QSFXForm frm = new QSFXForm(ConvDict(listarr), pzda);
+
+
+                 QSFXForm frm = new QSFXForm(ConvDict(listarr), pzda);
                 frm.StartPosition = FormStartPosition.CenterParent;
                 frm.ShowDialog();
                 //FrmAnalyze frm = new FrmAnalyze("趋势分析");
@@ -255,7 +258,7 @@ namespace Uninpho.Tools
                         if (string.IsNullOrEmpty(jcrq))
                             jcrq += this.gridView.GetRowCellDisplayText(id, "jcrq");
                         else
-                            jcrq += " , "+this.gridView.GetRowCellDisplayText(id, "jcrq");
+                            jcrq += " , " + this.gridView.GetRowCellDisplayText(id, "jcrq");
                     }
                     if (yswjm_jhfx.Count == 2 || yswjm_lgl.Count == 2)
                     {

+ 6 - 4
DPTools/components/DataManager/DMGrid.cs

@@ -240,16 +240,18 @@ namespace Uninpho.Tools.components.DataManager
         {
             int[] rowhandles = this.gridView.GetSelectedRows();
             int rowhandle = this.gridView.FocusedRowHandle;
-            String yswjm_lgl = this.gridView.GetRowCellDisplayText(rowhandle, "yswjm");
+            //String yswjm_lgl = this.gridView.GetRowCellDisplayText(rowhandle, "yswjm");
             String yswjm_jhfx = this.gridView.GetRowCellDisplayText(rowhandle, "yswjm_jhfx");
-            if (string.IsNullOrEmpty(yswjm_lgl) && string.IsNullOrEmpty(yswjm_jhfx))
-            {
+           // if (string.IsNullOrEmpty(yswjm_lgl) && string.IsNullOrEmpty(yswjm_jhfx))
+                if (string.IsNullOrEmpty(yswjm_jhfx))
+                {
                 XtraMessageBox.Show("波形数据为空!", "提示");
                 return;
             }
             else
             {
-                BXTForm frm = new BXTForm(new List<string>() { string.IsNullOrEmpty(yswjm_lgl)?"0,0":yswjm_lgl }, new List<string>() { string.IsNullOrEmpty(yswjm_jhfx) ? "0,0" : yswjm_jhfx });
+               // BXTForm frm = new BXTForm(new List<string>() { string.IsNullOrEmpty(yswjm_lgl)?"0,0":yswjm_lgl }, new List<string>() { string.IsNullOrEmpty(yswjm_jhfx) ? "0,0" : yswjm_jhfx });
+                BXTForm frm = new BXTForm(new List<string>() { "0,0" }, new List<string>() { string.IsNullOrEmpty(yswjm_jhfx) ? "0,0" : yswjm_jhfx });
                 frm.StartPosition = FormStartPosition.CenterParent;
                 frm.ShowDialog(this);
                 //FrmAnalyze anaFrm = new FrmAnalyze("波形查看");

+ 178 - 177
DPTools/components/DataManager/FrmSetting.Designer.cs

@@ -29,26 +29,26 @@ namespace Uninpho.Tools.components.DataManager
         private void InitializeComponent()
         {
             this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.checkBoxInput3 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput2 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput12 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput1 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput11 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput10 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
-            this.checkBoxInput13 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput9 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput6 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput8 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.checkBoxInput4 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.btnCancle = new DevExpress.XtraEditors.SimpleButton();
+            this.btnOK = new DevExpress.XtraEditors.SimpleButton();
             this.checkBoxInput18 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
             this.checkBoxInput17 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
             this.checkBoxInput14 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
             this.checkBoxInput16 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
             this.checkBoxInput15 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
-            this.btnCancle = new DevExpress.XtraEditors.SimpleButton();
-            this.btnOK = new DevExpress.XtraEditors.SimpleButton();
+            this.checkBoxInput13 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput9 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput6 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput8 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput4 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput3 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput2 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput12 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput1 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput11 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
+            this.checkBoxInput10 = new Uninpho.Tools.components.DataManager.CheckBoxInput();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
@@ -71,125 +71,144 @@ namespace Uninpho.Tools.components.DataManager
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "过岔平稳性信息";
             // 
-            // checkBoxInput3
+            // groupBox2
             // 
-            this.checkBoxInput3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput3.Checked = false;
-            this.checkBoxInput3.ColumnName = "gjhy";
-            this.checkBoxInput3.LBText = "构架横移";
-            this.checkBoxInput3.Location = new System.Drawing.Point(12, 81);
-            this.checkBoxInput3.Name = "checkBoxInput3";
-            this.checkBoxInput3.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput3.TabIndex = 4;
-            this.checkBoxInput3.Value = new decimal(new int[] {
-            0,
-            0,
-            0,
-            0});
+            this.groupBox2.Controls.Add(this.checkBoxInput13);
+            this.groupBox2.Controls.Add(this.checkBoxInput9);
+            this.groupBox2.Controls.Add(this.checkBoxInput6);
+            this.groupBox2.Controls.Add(this.checkBoxInput8);
+            this.groupBox2.Controls.Add(this.checkBoxInput4);
+            this.groupBox2.Location = new System.Drawing.Point(7, 147);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(454, 124);
+            this.groupBox2.TabIndex = 1;
+            this.groupBox2.TabStop = false;
+            this.groupBox2.Text = "轨道几何信息";
             // 
-            // checkBoxInput2
+            // groupBox3
             // 
-            this.checkBoxInput2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput2.Checked = false;
-            this.checkBoxInput2.ColumnName = "ctcjfz";
-            this.checkBoxInput2.LBText = "车体垂加峰值";
-            this.checkBoxInput2.Location = new System.Drawing.Point(12, 50);
-            this.checkBoxInput2.Name = "checkBoxInput2";
-            this.checkBoxInput2.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput2.TabIndex = 4;
-            this.checkBoxInput2.Value = new decimal(new int[] {
+            this.groupBox3.Controls.Add(this.checkBoxInput18);
+            this.groupBox3.Controls.Add(this.checkBoxInput17);
+            this.groupBox3.Controls.Add(this.checkBoxInput14);
+            this.groupBox3.Controls.Add(this.checkBoxInput16);
+            this.groupBox3.Controls.Add(this.checkBoxInput15);
+            this.groupBox3.Location = new System.Drawing.Point(7, 284);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(454, 135);
+            this.groupBox3.TabIndex = 2;
+            this.groupBox3.TabStop = false;
+            this.groupBox3.Text = "轮轨力信息";
+            this.groupBox3.Visible = false;
+            // 
+            // btnCancle
+            // 
+            this.btnCancle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnCancle.Location = new System.Drawing.Point(371, 425);
+            this.btnCancle.Name = "btnCancle";
+            this.btnCancle.Size = new System.Drawing.Size(75, 23);
+            this.btnCancle.TabIndex = 3;
+            this.btnCancle.Text = "取消";
+            this.btnCancle.Click += new System.EventHandler(this.btnCancle_Click);
+            // 
+            // btnOK
+            // 
+            this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnOK.Location = new System.Drawing.Point(262, 425);
+            this.btnOK.Name = "btnOK";
+            this.btnOK.Size = new System.Drawing.Size(75, 23);
+            this.btnOK.TabIndex = 3;
+            this.btnOK.Text = "确认";
+            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+            // 
+            // checkBoxInput18
+            // 
+            this.checkBoxInput18.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.checkBoxInput18.Checked = false;
+            this.checkBoxInput18.ColumnName = "lzjzl";
+            this.checkBoxInput18.LBText = "轮重减载率";
+            this.checkBoxInput18.Location = new System.Drawing.Point(236, 54);
+            this.checkBoxInput18.Name = "checkBoxInput18";
+            this.checkBoxInput18.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput18.TabIndex = 4;
+            this.checkBoxInput18.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // checkBoxInput12
+            // checkBoxInput17
             // 
-            this.checkBoxInput12.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput17.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput12.Checked = false;
-            this.checkBoxInput12.ColumnName = "cthjffz";
-            this.checkBoxInput12.Font = new System.Drawing.Font("Tahoma", 9F);
-            this.checkBoxInput12.LBText = "车体横加峰峰值";
-            this.checkBoxInput12.Location = new System.Drawing.Point(236, 21);
-            this.checkBoxInput12.Name = "checkBoxInput12";
-            this.checkBoxInput12.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput12.TabIndex = 4;
-            this.checkBoxInput12.Value = new decimal(new int[] {
+            this.checkBoxInput17.Checked = false;
+            this.checkBoxInput17.ColumnName = "lgcxl";
+            this.checkBoxInput17.LBText = "小轮轨垂向力";
+            this.checkBoxInput17.Location = new System.Drawing.Point(12, 20);
+            this.checkBoxInput17.Name = "checkBoxInput17";
+            this.checkBoxInput17.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput17.TabIndex = 4;
+            this.checkBoxInput17.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // checkBoxInput1
+            // checkBoxInput14
             // 
-            this.checkBoxInput1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput14.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput1.Checked = false;
-            this.checkBoxInput1.ColumnName = "cthjfz";
-            this.checkBoxInput1.LBText = "车体横加峰值";
-            this.checkBoxInput1.Location = new System.Drawing.Point(12, 21);
-            this.checkBoxInput1.Name = "checkBoxInput1";
-            this.checkBoxInput1.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput1.TabIndex = 4;
-            this.checkBoxInput1.Value = new decimal(new int[] {
+            this.checkBoxInput14.Checked = false;
+            this.checkBoxInput14.ColumnName = "lzlfz";
+            this.checkBoxInput14.LBText = "轮轴横向力";
+            this.checkBoxInput14.Location = new System.Drawing.Point(12, 88);
+            this.checkBoxInput14.Name = "checkBoxInput14";
+            this.checkBoxInput14.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput14.TabIndex = 4;
+            this.checkBoxInput14.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // checkBoxInput11
+            // checkBoxInput16
             // 
-            this.checkBoxInput11.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput16.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput11.Checked = false;
-            this.checkBoxInput11.ColumnName = "gjhyffz";
-            this.checkBoxInput11.LBText = "构架横移峰峰值";
-            this.checkBoxInput11.Location = new System.Drawing.Point(236, 81);
-            this.checkBoxInput11.Name = "checkBoxInput11";
-            this.checkBoxInput11.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput11.TabIndex = 4;
-            this.checkBoxInput11.Value = new decimal(new int[] {
+            this.checkBoxInput16.Checked = false;
+            this.checkBoxInput16.ColumnName = "lghxl";
+            this.checkBoxInput16.LBText = "轮轨横向力";
+            this.checkBoxInput16.Location = new System.Drawing.Point(12, 54);
+            this.checkBoxInput16.Name = "checkBoxInput16";
+            this.checkBoxInput16.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput16.TabIndex = 4;
+            this.checkBoxInput16.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // checkBoxInput10
+            // checkBoxInput15
             // 
-            this.checkBoxInput10.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput15.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput10.Checked = false;
-            this.checkBoxInput10.ColumnName = "ctcjffz";
-            this.checkBoxInput10.LBText = "车体垂加峰峰值";
-            this.checkBoxInput10.Location = new System.Drawing.Point(236, 50);
-            this.checkBoxInput10.Name = "checkBoxInput10";
-            this.checkBoxInput10.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput10.TabIndex = 4;
-            this.checkBoxInput10.Value = new decimal(new int[] {
+            this.checkBoxInput15.Checked = false;
+            this.checkBoxInput15.ColumnName = "tgxs";
+            this.checkBoxInput15.LBText = "脱轨系数";
+            this.checkBoxInput15.Location = new System.Drawing.Point(236, 20);
+            this.checkBoxInput15.Name = "checkBoxInput15";
+            this.checkBoxInput15.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput15.TabIndex = 4;
+            this.checkBoxInput15.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // groupBox2
-            // 
-            this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.groupBox2.Controls.Add(this.checkBoxInput13);
-            this.groupBox2.Controls.Add(this.checkBoxInput9);
-            this.groupBox2.Controls.Add(this.checkBoxInput6);
-            this.groupBox2.Controls.Add(this.checkBoxInput8);
-            this.groupBox2.Controls.Add(this.checkBoxInput4);
-            this.groupBox2.Location = new System.Drawing.Point(7, 147);
-            this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Size = new System.Drawing.Size(454, 124);
-            this.groupBox2.TabIndex = 1;
-            this.groupBox2.TabStop = false;
-            this.groupBox2.Text = "轨道几何信息";
-            // 
             // checkBoxInput13
             // 
             this.checkBoxInput13.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
@@ -276,127 +295,109 @@ namespace Uninpho.Tools.components.DataManager
             0,
             0});
             // 
-            // groupBox3
+            // checkBoxInput3
             // 
-            this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.groupBox3.Controls.Add(this.checkBoxInput18);
-            this.groupBox3.Controls.Add(this.checkBoxInput17);
-            this.groupBox3.Controls.Add(this.checkBoxInput14);
-            this.groupBox3.Controls.Add(this.checkBoxInput16);
-            this.groupBox3.Controls.Add(this.checkBoxInput15);
-            this.groupBox3.Location = new System.Drawing.Point(7, 284);
-            this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Size = new System.Drawing.Size(454, 135);
-            this.groupBox3.TabIndex = 2;
-            this.groupBox3.TabStop = false;
-            this.groupBox3.Text = "轮轨力信息";
+            this.checkBoxInput3.Checked = false;
+            this.checkBoxInput3.ColumnName = "gjhy";
+            this.checkBoxInput3.LBText = "构架横移";
+            this.checkBoxInput3.Location = new System.Drawing.Point(12, 81);
+            this.checkBoxInput3.Name = "checkBoxInput3";
+            this.checkBoxInput3.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput3.TabIndex = 4;
+            this.checkBoxInput3.Value = new decimal(new int[] {
+            0,
+            0,
+            0,
+            0});
             // 
-            // checkBoxInput18
+            // checkBoxInput2
             // 
-            this.checkBoxInput18.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput18.Checked = false;
-            this.checkBoxInput18.ColumnName = "lzjzl";
-            this.checkBoxInput18.LBText = "轮重减载率";
-            this.checkBoxInput18.Location = new System.Drawing.Point(236, 54);
-            this.checkBoxInput18.Name = "checkBoxInput18";
-            this.checkBoxInput18.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput18.TabIndex = 4;
-            this.checkBoxInput18.Value = new decimal(new int[] {
+            this.checkBoxInput2.Checked = false;
+            this.checkBoxInput2.ColumnName = "ctcjfz";
+            this.checkBoxInput2.LBText = "车体垂加峰值";
+            this.checkBoxInput2.Location = new System.Drawing.Point(12, 50);
+            this.checkBoxInput2.Name = "checkBoxInput2";
+            this.checkBoxInput2.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput2.TabIndex = 4;
+            this.checkBoxInput2.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // checkBoxInput17
+            // checkBoxInput12
             // 
-            this.checkBoxInput17.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput12.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput17.Checked = false;
-            this.checkBoxInput17.ColumnName = "lgcxl";
-            this.checkBoxInput17.LBText = "小轮轨垂向力";
-            this.checkBoxInput17.Location = new System.Drawing.Point(12, 20);
-            this.checkBoxInput17.Name = "checkBoxInput17";
-            this.checkBoxInput17.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput17.TabIndex = 4;
-            this.checkBoxInput17.Value = new decimal(new int[] {
+            this.checkBoxInput12.Checked = false;
+            this.checkBoxInput12.ColumnName = "cthjffz";
+            this.checkBoxInput12.Font = new System.Drawing.Font("Tahoma", 9F);
+            this.checkBoxInput12.LBText = "车体横加峰峰值";
+            this.checkBoxInput12.Location = new System.Drawing.Point(236, 21);
+            this.checkBoxInput12.Name = "checkBoxInput12";
+            this.checkBoxInput12.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput12.TabIndex = 4;
+            this.checkBoxInput12.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // checkBoxInput14
+            // checkBoxInput1
             // 
-            this.checkBoxInput14.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput14.Checked = false;
-            this.checkBoxInput14.ColumnName = "lzlfz";
-            this.checkBoxInput14.LBText = "轮轴横向力";
-            this.checkBoxInput14.Location = new System.Drawing.Point(12, 88);
-            this.checkBoxInput14.Name = "checkBoxInput14";
-            this.checkBoxInput14.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput14.TabIndex = 4;
-            this.checkBoxInput14.Value = new decimal(new int[] {
+            this.checkBoxInput1.Checked = false;
+            this.checkBoxInput1.ColumnName = "cthjfz";
+            this.checkBoxInput1.LBText = "车体横加峰值";
+            this.checkBoxInput1.Location = new System.Drawing.Point(12, 21);
+            this.checkBoxInput1.Name = "checkBoxInput1";
+            this.checkBoxInput1.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput1.TabIndex = 4;
+            this.checkBoxInput1.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // checkBoxInput16
+            // checkBoxInput11
             // 
-            this.checkBoxInput16.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput11.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput16.Checked = false;
-            this.checkBoxInput16.ColumnName = "lghxl";
-            this.checkBoxInput16.LBText = "轮轨横向力";
-            this.checkBoxInput16.Location = new System.Drawing.Point(12, 54);
-            this.checkBoxInput16.Name = "checkBoxInput16";
-            this.checkBoxInput16.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput16.TabIndex = 4;
-            this.checkBoxInput16.Value = new decimal(new int[] {
+            this.checkBoxInput11.Checked = false;
+            this.checkBoxInput11.ColumnName = "gjhyffz";
+            this.checkBoxInput11.LBText = "构架横移峰峰值";
+            this.checkBoxInput11.Location = new System.Drawing.Point(236, 81);
+            this.checkBoxInput11.Name = "checkBoxInput11";
+            this.checkBoxInput11.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput11.TabIndex = 4;
+            this.checkBoxInput11.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // checkBoxInput15
+            // checkBoxInput10
             // 
-            this.checkBoxInput15.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.checkBoxInput10.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.checkBoxInput15.Checked = false;
-            this.checkBoxInput15.ColumnName = "tgxs";
-            this.checkBoxInput15.LBText = "脱轨系数";
-            this.checkBoxInput15.Location = new System.Drawing.Point(236, 20);
-            this.checkBoxInput15.Name = "checkBoxInput15";
-            this.checkBoxInput15.Size = new System.Drawing.Size(212, 28);
-            this.checkBoxInput15.TabIndex = 4;
-            this.checkBoxInput15.Value = new decimal(new int[] {
+            this.checkBoxInput10.Checked = false;
+            this.checkBoxInput10.ColumnName = "ctcjffz";
+            this.checkBoxInput10.LBText = "车体垂加峰峰值";
+            this.checkBoxInput10.Location = new System.Drawing.Point(236, 50);
+            this.checkBoxInput10.Name = "checkBoxInput10";
+            this.checkBoxInput10.Size = new System.Drawing.Size(212, 28);
+            this.checkBoxInput10.TabIndex = 4;
+            this.checkBoxInput10.Value = new decimal(new int[] {
             0,
             0,
             0,
             0});
             // 
-            // btnCancle
-            // 
-            this.btnCancle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnCancle.Location = new System.Drawing.Point(371, 425);
-            this.btnCancle.Name = "btnCancle";
-            this.btnCancle.Size = new System.Drawing.Size(75, 23);
-            this.btnCancle.TabIndex = 3;
-            this.btnCancle.Text = "取消";
-            this.btnCancle.Click += new System.EventHandler(this.btnCancle_Click);
-            // 
-            // btnOK
-            // 
-            this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnOK.Location = new System.Drawing.Point(262, 425);
-            this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(75, 23);
-            this.btnOK.TabIndex = 3;
-            this.btnOK.Text = "确认";
-            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
-            // 
             // FrmSetting
             // 
             this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;

+ 1 - 0
DPTools/components/DataManager/QSFXForm.Designer.cs

@@ -37,6 +37,7 @@
             this.ClientSize = new System.Drawing.Size(722, 441);
             this.Name = "QSFXForm";
             this.Text = "趋势分析";
+            this.Load += new System.EventHandler(this.QSFXForm_Load);
             this.ResumeLayout(false);
 
         }

+ 3 - 1
DPTools/components/DataManager/QSFXForm.cs

@@ -38,7 +38,9 @@ namespace Uninpho.Tools.components.DataManager
             qsfxCrl1.YXCLoadEvnet(qsfxwave,false);
         }
 
+        private void QSFXForm_Load(object sender, EventArgs e)
+        {
 
-
+        }
     }
 }

+ 30 - 0
Uninpho.DBOperation/Model/t_glanalysispro_account.cs

@@ -0,0 +1,30 @@
+using SqlSugar;
+using System;
+
+namespace Uninpho.DBOperation.Model
+{
+      public class T_glanalysispro_account
+    {
+        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+        public int Id { get; set; }
+        public string Xianlu { get; set; }
+        public string Chezhan { get; set; }
+        public string Time { get; set; }
+        public string Filename { get; set; }
+        public int Curvetype { get; set; }
+        public int Curvenumber { get; set; }
+        public decimal Totalworkmax { get; set; }
+        public decimal Totalworkmin { get; set; }
+        public decimal Totalworkavg { get; set; }
+        public decimal Changeratemax { get; set; }
+        public decimal Changeratemin { get; set; }
+        public decimal Changerateavg { get; set; }
+        public decimal Offsetvaluemax { get; set; }
+        public decimal Offsetvaluemin { get; set; }
+        public decimal Offsetvalueavg { get; set; }    
+        public decimal Powervariancemax { get; set; }
+        public decimal Powervariancemin { get; set; }
+        public decimal Powervarianceavg { get; set; }
+
+    }
+}

+ 20 - 0
Uninpho.DBOperation/Operation/DataAnalysisToPG.cs

@@ -902,5 +902,25 @@ namespace Uninpho.DBOperation.Operation
                 lglbx = db.Queryable<T_lunguili_boxing>().Where(it => it.Id >= lglindex0 && it.Id <= lglindex1).ToList();
             }
         }
+
+        ///
+        ///查询功率表
+        /// 
+        public static Object QueryAllGLAnalysisData(string filename)
+        {
+            return db.Queryable<T_glanalysis_account>().Where(it => it.Filename == filename).ToList();
+        }
+
+        // 插入到 T_glanalysispro_account 表
+        public static void InsertGLAnalysisProData(T_glanalysispro_account proAccount)
+        {
+       
+                // 插入 proAccount 到 T_glanalysispro_account 表
+                db.Insertable(proAccount).ExecuteCommand();
+            
+        }
+
+
+        ///
     }
 }

+ 1 - 0
Uninpho.DBOperation/Uninpho.DBOperation.csproj

@@ -78,6 +78,7 @@
     <Compile Include="Model\Assist_quxian.cs" />
     <Compile Include="Model\Assist_xxxwcsvdata.cs" />
     <Compile Include="Model\T_daocha_account.cs" />
+    <Compile Include="Model\t_glanalysispro_account.cs" />
     <Compile Include="Model\T_qkanalysis_account.cs" />
     <Compile Include="Model\T_glanalysis_account.cs" />
     <Compile Include="Model\T_dwqkfile_account.cs" />