ソースを参照

feat:功率分析查询

mux 4 ヶ月 前
コミット
c060fe4acd

+ 33 - 6
DPTools/DevFrmMain.Designer.cs

@@ -692,6 +692,7 @@
             this.gridColumn72 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.repositoryItemCheckEdit6 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
             this.panelControl7 = new DevExpress.XtraEditors.PanelControl();
+            this.importGLData = new DevExpress.XtraEditors.SimpleButton();
             this.deleteGLdata = new DevExpress.XtraEditors.SimpleButton();
             this.xtraTabPageQKData = new DevExpress.XtraTab.XtraTabPage();
             this.gridControl7 = new DevExpress.XtraGrid.GridControl();
@@ -704,6 +705,7 @@
             this.gridColumn69 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.repositoryItemCheckEdit7 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
             this.panelControl8 = new DevExpress.XtraEditors.PanelControl();
+            this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
             this.deleteQKdata = new DevExpress.XtraEditors.SimpleButton();
             this.xtraTabPageMTLF = new DevExpress.XtraTab.XtraTabPage();
             this.xtraTabPageZZJH = new DevExpress.XtraTab.XtraTabPage();
@@ -5109,6 +5111,7 @@
             // 
             // panelControl7
             // 
+            this.panelControl7.Controls.Add(this.importGLData);
             this.panelControl7.Controls.Add(this.deleteGLdata);
             this.panelControl7.Dock = System.Windows.Forms.DockStyle.Top;
             this.panelControl7.Location = new System.Drawing.Point(0, 0);
@@ -5117,6 +5120,17 @@
             this.panelControl7.Size = new System.Drawing.Size(1657, 60);
             this.panelControl7.TabIndex = 19;
             // 
+            // importGLData
+            // 
+            this.importGLData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.importGLData.Location = new System.Drawing.Point(1415, 19);
+            this.importGLData.Margin = new System.Windows.Forms.Padding(4);
+            this.importGLData.Name = "importGLData";
+            this.importGLData.Size = new System.Drawing.Size(90, 29);
+            this.importGLData.TabIndex = 6;
+            this.importGLData.Text = "导入";
+            this.importGLData.Click += new System.EventHandler(this.importGLData_Click);
+            // 
             // deleteGLdata
             // 
             this.deleteGLdata.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -5232,6 +5246,7 @@
             // 
             // panelControl8
             // 
+            this.panelControl8.Controls.Add(this.simpleButton1);
             this.panelControl8.Controls.Add(this.deleteQKdata);
             this.panelControl8.Dock = System.Windows.Forms.DockStyle.Top;
             this.panelControl8.Location = new System.Drawing.Point(0, 0);
@@ -5240,6 +5255,16 @@
             this.panelControl8.Size = new System.Drawing.Size(1657, 60);
             this.panelControl8.TabIndex = 21;
             // 
+            // simpleButton1
+            // 
+            this.simpleButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.simpleButton1.Location = new System.Drawing.Point(1415, 19);
+            this.simpleButton1.Margin = new System.Windows.Forms.Padding(4);
+            this.simpleButton1.Name = "simpleButton1";
+            this.simpleButton1.Size = new System.Drawing.Size(90, 29);
+            this.simpleButton1.TabIndex = 6;
+            this.simpleButton1.Text = "导入";
+            // 
             // deleteQKdata
             // 
             this.deleteQKdata.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -5319,7 +5344,7 @@
             // gridColumn34
             // 
             this.gridColumn34.Caption = "线路名";
-            this.gridColumn34.FieldName = "Xlm";
+            this.gridColumn34.FieldName = "Xianlu";
             this.gridColumn34.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
             this.gridColumn34.Name = "gridColumn34";
             this.gridColumn34.OptionsColumn.ReadOnly = true;
@@ -5330,7 +5355,7 @@
             // gridColumn36
             // 
             this.gridColumn36.Caption = "车站";
-            this.gridColumn36.FieldName = "chezhan";
+            this.gridColumn36.FieldName = "Chezhan";
             this.gridColumn36.Name = "gridColumn36";
             this.gridColumn36.OptionsColumn.FixedWidth = true;
             this.gridColumn36.OptionsColumn.ReadOnly = true;
@@ -5361,7 +5386,7 @@
             // gridColumn49
             // 
             this.gridColumn49.Caption = "原始文件名";
-            this.gridColumn49.FieldName = "Yswjm";
+            this.gridColumn49.FieldName = "FileName";
             this.gridColumn49.Name = "gridColumn49";
             this.gridColumn49.OptionsColumn.ReadOnly = true;
             this.gridColumn49.Visible = true;
@@ -5371,7 +5396,7 @@
             // gridColumn50
             // 
             this.gridColumn50.Caption = "文件大小";
-            this.gridColumn50.FieldName = "Daxiao";
+            this.gridColumn50.FieldName = "FileSize";
             this.gridColumn50.Name = "gridColumn50";
             this.gridColumn50.OptionsColumn.FixedWidth = true;
             this.gridColumn50.OptionsColumn.ReadOnly = true;
@@ -5382,7 +5407,7 @@
             // gridColumn51
             // 
             this.gridColumn51.Caption = "任务状态";
-            this.gridColumn51.FieldName = "Rwzt";
+            this.gridColumn51.FieldName = "TaskStatus";
             this.gridColumn51.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right;
             this.gridColumn51.Name = "gridColumn51";
             this.gridColumn51.OptionsColumn.FixedWidth = true;
@@ -5394,7 +5419,7 @@
             // gridColumn52
             // 
             this.gridColumn52.Caption = "文件状态";
-            this.gridColumn52.FieldName = "Wjzt";
+            this.gridColumn52.FieldName = "FileStatus";
             this.gridColumn52.Name = "gridColumn52";
             this.gridColumn52.OptionsColumn.FixedWidth = true;
             this.gridColumn52.OptionsColumn.ReadOnly = true;
@@ -6194,5 +6219,7 @@
         private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit repositoryItemCheckEdit7;
         private DevExpress.XtraEditors.PanelControl panelControl8;
         private DevExpress.XtraEditors.SimpleButton deleteQKdata;
+        private DevExpress.XtraEditors.SimpleButton importGLData;
+        private DevExpress.XtraEditors.SimpleButton simpleButton1;
     }
 }

+ 14 - 1
DPTools/DevFrmMain.cs

@@ -22,6 +22,7 @@ using System.Threading.Tasks;
 using System.Configuration;
 using System.IO;
 using Uninpho.Tools.components.SFZDH;
+using Uninpho.Tools.components.DWForm;
 
 namespace Uninpho.Tools
 {
@@ -343,7 +344,10 @@ namespace Uninpho.Tools
             this.gridControl6.DataSource = gonglvList;
 
             List<T_quekou_account> quekouList = SqlQueryable_QX.Search_QKData();
-            this.gridControl7.DataSource = quekouList;            
+            this.gridControl7.DataSource = quekouList;
+            // 初始化查询功率分析数据列表
+            List<T_dwfile_account> gl_dataList = DataAnalysisToPG.getDwfile("bny", new List<int>(), new List<string>()) as List<T_dwfile_account>;
+            this.gridControl4.DataSource = gl_dataList;
 
             List<T_file_account> daochaListjhfx = DataAnalysisToPG.getfile("bny",new List<int>(),new List<string>()) as List<T_file_account>;
             this.gridControl3.DataSource = daochaListjhfx;
@@ -918,5 +922,14 @@ namespace Uninpho.Tools
                 }
             }
         }
+
+        private void importGLData_Click(object sender, EventArgs e)
+        {
+            ImportGLdataForm frm = new ImportGLdataForm();
+            frm.StartPosition = FormStartPosition.CenterParent;
+            if (frm.ShowDialog(this) == DialogResult.OK)
+            {
+            }
+        }
     }
 }

+ 9 - 0
DPTools/Uninpho.Railway.Tools.csproj

@@ -298,6 +298,12 @@
       <DependentUpon>JHjgjFrom.cs</DependentUpon>
     </Compile>
     <Compile Include="components\DataManager\WaveDataTools.cs" />
+    <Compile Include="components\DWForm\ImportGLdataForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="components\DWForm\ImportGLdataForm.Designer.cs">
+      <DependentUpon>ImportGLdataForm.cs</DependentUpon>
+    </Compile>
     <Compile Include="components\LogGeneratorFun.cs" />
     <Compile Include="components\LoggingForm.cs">
       <SubType>Form</SubType>
@@ -556,6 +562,9 @@
     <EmbeddedResource Include="components\DataAnalysis\JHjgjFrom.resx">
       <DependentUpon>JHjgjFrom.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="components\DWForm\ImportGLdataForm.resx">
+      <DependentUpon>ImportGLdataForm.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="components\LoggingForm.resx">
       <DependentUpon>LoggingForm.cs</DependentUpon>
     </EmbeddedResource>

+ 21 - 0
Uninpho.DBOperation/Model/T_dwfile_account .cs

@@ -0,0 +1,21 @@
+using SqlSugar;
+using System;
+
+namespace Uninpho.DBOperation.Model
+{
+      public class T_dwfile_account
+    {
+        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+        public int Id { get; set; }
+        public string Xianlu { get; set; }
+        public string Chezhan { get; set; }
+        public DateTime StartTime { get; set; }
+        public DateTime EndTime { get; set; }
+        public string FileName { get; set; }
+        public string FileSize { get; set; }
+        public string FileStatusc { get; set; }
+        public string FileStatus { get; set; }
+        public string TaskStatus { get; set; }
+        public string Srlj { get; set; }
+    }
+}

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

@@ -50,6 +50,29 @@ namespace Uninpho.DBOperation.Operation
             return obj;
         }
         /// <summary>
+        /// 读取数据并展示
+        /// </summary>
+        public static Object getDwfile(string cxtj, List<int> suanfarunid, List<string> suanfazt)
+        {
+            var obj = db.SqlQueryable<T_dwfile_account>("select * from \"t_dwfile_account\"").ToList();
+            for (int i = 0; i < obj.Count; i++)
+            {
+                if (!File.Exists(obj[i].Srlj))
+                {
+                    obj[i].FileStatus = "文件未找到";
+                }
+
+                ///for (int j = 0; j < suanfarunid.Count; j++)
+                ///{
+                ///    if (suanfarunid[j] == obj[i].Id)
+                ///    {
+                ///        obj[i].TaskStatus = suanfazt[j];
+                ///    }
+                ///}
+            }
+            return obj;
+        }
+        /// <summary>
         /// 自动化读取数据
         /// </summary>
         public static Object getfile(string cxtj)

+ 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_dwfile_account .cs" />
     <Compile Include="Model\T_file_account.cs" />
     <Compile Include="Model\T_quekou_account.cs" />
     <Compile Include="Model\T_gonglv_account.cs" />