소스 검색

Merge branch 'master' of http://139.155.15.221:3000/zoulei/DW5S

zoule 3 달 전
부모
커밋
ce66006ab7
5개의 변경된 파일346개의 추가작업 그리고 59개의 파일을 삭제
  1. 2 2
      DW5S.App/MainForm.cs
  2. 184 39
      DW5S.App/UserControl/CtrlAdRes.Designer.cs
  3. 150 8
      DW5S.App/UserControl/CtrlAdRes.cs
  4. 1 1
      DW5S.App/UserControl/CtrlCgRes.cs
  5. 9 9
      DW5S.ViewModel/ADResViewModel.cs

+ 2 - 2
DW5S.App/MainForm.cs

@@ -54,7 +54,8 @@ namespace DW5S
             InitializeComponent();
             ribbon.UseDefault();
             tabbedView1.UseDefault();
-            ctrlTypes.Add("任务管理", typeof(CtrlHome));
+            ctrlTypes.Add("任务管理", typeof(CtrlHome));            ;
+            ctrlTypes.Add("采集结果", typeof(CtrlAdRes));
             ctrlTypes.Add("参考任务", typeof(CtrlRefTask));
             ctrlTypes.Add("参估结果", typeof(CtrlCgRes));
             ctrlTypes.Add("参考参估", typeof(CtrlRefCgRes));
@@ -77,7 +78,6 @@ namespace DW5S
             ctrlTypes.Add("信号仿真", typeof(SignalEmulation));
             ctrlTypes.Add("服务状态", typeof(CtrlSvrs));
             ctrlTypes.Add("服务日志", typeof(CtrlSvrLog));
-            ctrlTypes.Add("采集结果", typeof(CtrlSvrLog));
             DxHelper.WaitHelper.UpdateSplashMessage("正在检查数据库环境...");
 
         }

+ 184 - 39
DW5S.App/UserControl/CtrlAdRes.Designer.cs

@@ -31,22 +31,42 @@
             gridAdRes = new DevExpress.XtraGrid.GridControl();
             gridView = new DevExpress.XtraGrid.Views.Grid.GridView();
             layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            txtSat = new DevExpress.XtraEditors.SearchLookUpEdit();
+            searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            txtTimeCho = new DevExpress.XtraEditors.ImageComboBoxEdit();
+            ctrlPage = new CtrlPage();
+            txtSigEndTime = new DevExpress.XtraEditors.DateEdit();
             btnQuery = new DevExpress.XtraEditors.SimpleButton();
-            dateEdit1 = new DevExpress.XtraEditors.DateEdit();
+            txtSigStartTime = new DevExpress.XtraEditors.DateEdit();
             Root = new DevExpress.XtraLayout.LayoutControlGroup();
             layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
-            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
+            itemStart = new DevExpress.XtraLayout.LayoutControlItem();
             layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
+            itemEnd = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
+            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             ((System.ComponentModel.ISupportInitialize)gridAdRes).BeginInit();
             ((System.ComponentModel.ISupportInitialize)gridView).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
             layoutControl1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)dateEdit1.Properties).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)dateEdit1.Properties.CalendarTimeProperties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtSat.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)searchLookUpEdit1View).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtTimeCho.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtSigEndTime.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtSigEndTime.Properties.CalendarTimeProperties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtSigStartTime.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtSigStartTime.Properties.CalendarTimeProperties).BeginInit();
             ((System.ComponentModel.ISupportInitialize)Root).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)itemStart).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)itemEnd).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit();
             SuspendLayout();
             // 
             // gridAdRes
@@ -54,8 +74,8 @@
             gridAdRes.Location = new System.Drawing.Point(12, 38);
             gridAdRes.MainView = gridView;
             gridAdRes.Name = "gridAdRes";
-            gridAdRes.Size = new System.Drawing.Size(625, 292);
-            gridAdRes.TabIndex = 4;
+            gridAdRes.Size = new System.Drawing.Size(855, 374);
+            gridAdRes.TabIndex = 6;
             gridAdRes.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView });
             // 
             // gridView
@@ -65,45 +85,98 @@
             // 
             // layoutControl1
             // 
+            layoutControl1.Controls.Add(txtSat);
+            layoutControl1.Controls.Add(txtTimeCho);
+            layoutControl1.Controls.Add(ctrlPage);
+            layoutControl1.Controls.Add(txtSigEndTime);
             layoutControl1.Controls.Add(btnQuery);
-            layoutControl1.Controls.Add(dateEdit1);
+            layoutControl1.Controls.Add(txtSigStartTime);
             layoutControl1.Controls.Add(gridAdRes);
             layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             layoutControl1.Location = new System.Drawing.Point(0, 0);
             layoutControl1.Name = "layoutControl1";
             layoutControl1.Root = Root;
-            layoutControl1.Size = new System.Drawing.Size(649, 342);
+            layoutControl1.Size = new System.Drawing.Size(879, 455);
             layoutControl1.TabIndex = 5;
             layoutControl1.Text = "layoutControl1";
             // 
+            // txtSat
+            // 
+            txtSat.Location = new System.Drawing.Point(72, 12);
+            txtSat.Name = "txtSat";
+            txtSat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtSat.Properties.PopupView = searchLookUpEdit1View;
+            txtSat.Size = new System.Drawing.Size(90, 20);
+            txtSat.StyleController = layoutControl1;
+            txtSat.TabIndex = 0;
+            // 
+            // searchLookUpEdit1View
+            // 
+            searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            searchLookUpEdit1View.Name = "searchLookUpEdit1View";
+            searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
+            searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
+            // 
+            // txtTimeCho
+            // 
+            txtTimeCho.EditValue = "1";
+            txtTimeCho.Location = new System.Drawing.Point(236, 12);
+            txtTimeCho.Name = "txtTimeCho";
+            txtTimeCho.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtTimeCho.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近1小时", "1", -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近6小时", "6", -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近12小时", "12", -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近一天", "24", -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近3天", "72", -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("自定义", "0", -1) });
+            txtTimeCho.Size = new System.Drawing.Size(98, 20);
+            txtTimeCho.StyleController = layoutControl1;
+            txtTimeCho.TabIndex = 2;
+            txtTimeCho.SelectedIndexChanged += txtTimeCho_SelectedIndexChanged;
+            // 
+            // ctrlPage
+            // 
+            ctrlPage.Location = new System.Drawing.Point(12, 416);
+            ctrlPage.Margin = new System.Windows.Forms.Padding(0);
+            ctrlPage.MinimumSize = new System.Drawing.Size(100, 26);
+            ctrlPage.Name = "ctrlPage";
+            ctrlPage.Size = new System.Drawing.Size(855, 27);
+            ctrlPage.TabIndex = 7;
+            // 
+            // txtSigEndTime
+            // 
+            txtSigEndTime.EditValue = null;
+            txtSigEndTime.Location = new System.Drawing.Point(630, 12);
+            txtSigEndTime.Name = "txtSigEndTime";
+            txtSigEndTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtSigEndTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtSigEndTime.Size = new System.Drawing.Size(144, 20);
+            txtSigEndTime.StyleController = layoutControl1;
+            txtSigEndTime.TabIndex = 4;
+            // 
             // btnQuery
             // 
-            btnQuery.Location = new System.Drawing.Point(585, 12);
+            btnQuery.Location = new System.Drawing.Point(778, 12);
             btnQuery.Name = "btnQuery";
-            btnQuery.Size = new System.Drawing.Size(52, 22);
+            btnQuery.Size = new System.Drawing.Size(79, 22);
             btnQuery.StyleController = layoutControl1;
-            btnQuery.TabIndex = 6;
+            btnQuery.TabIndex = 5;
             btnQuery.Text = "查询";
             btnQuery.Click += btnQuery_Click;
             // 
-            // dateEdit1
+            // txtSigStartTime
             // 
-            dateEdit1.EditValue = null;
-            dateEdit1.Location = new System.Drawing.Point(72, 12);
-            dateEdit1.Name = "dateEdit1";
-            dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
-            dateEdit1.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
-            dateEdit1.Size = new System.Drawing.Size(509, 20);
-            dateEdit1.StyleController = layoutControl1;
-            dateEdit1.TabIndex = 5;
+            txtSigStartTime.EditValue = null;
+            txtSigStartTime.Location = new System.Drawing.Point(408, 12);
+            txtSigStartTime.Name = "txtSigStartTime";
+            txtSigStartTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtSigStartTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtSigStartTime.Size = new System.Drawing.Size(148, 20);
+            txtSigStartTime.StyleController = layoutControl1;
+            txtSigStartTime.TabIndex = 3;
             // 
             // Root
             // 
             Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
             Root.GroupBordersVisible = false;
-            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3 });
+            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, itemStart, layoutControlItem3, itemEnd, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1 });
             Root.Name = "Root";
-            Root.Size = new System.Drawing.Size(649, 342);
+            Root.Size = new System.Drawing.Size(879, 455);
             Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -111,46 +184,108 @@
             layoutControlItem1.Control = gridAdRes;
             layoutControlItem1.Location = new System.Drawing.Point(0, 26);
             layoutControlItem1.Name = "layoutControlItem1";
-            layoutControlItem1.Size = new System.Drawing.Size(629, 296);
+            layoutControlItem1.Size = new System.Drawing.Size(859, 378);
             layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
             layoutControlItem1.TextVisible = false;
             // 
-            // layoutControlItem2
+            // itemStart
             // 
-            layoutControlItem2.Control = dateEdit1;
-            layoutControlItem2.Location = new System.Drawing.Point(0, 0);
-            layoutControlItem2.Name = "layoutControlItem2";
-            layoutControlItem2.Size = new System.Drawing.Size(573, 26);
-            layoutControlItem2.Text = "信号时间";
-            layoutControlItem2.TextSize = new System.Drawing.Size(48, 14);
+            itemStart.Control = txtSigStartTime;
+            itemStart.Location = new System.Drawing.Point(326, 0);
+            itemStart.Name = "itemStart";
+            itemStart.Padding = new DevExpress.XtraLayout.Utils.Padding(12, 2, 2, 2);
+            itemStart.Size = new System.Drawing.Size(222, 26);
+            itemStart.Text = "开始时间";
+            itemStart.TextSize = new System.Drawing.Size(48, 14);
+            itemStart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
             // layoutControlItem3
             // 
             layoutControlItem3.Control = btnQuery;
-            layoutControlItem3.Location = new System.Drawing.Point(573, 0);
+            layoutControlItem3.Location = new System.Drawing.Point(766, 0);
+            layoutControlItem3.MaxSize = new System.Drawing.Size(83, 26);
+            layoutControlItem3.MinSize = new System.Drawing.Size(83, 26);
             layoutControlItem3.Name = "layoutControlItem3";
-            layoutControlItem3.Size = new System.Drawing.Size(56, 26);
+            layoutControlItem3.Size = new System.Drawing.Size(83, 26);
+            layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             layoutControlItem3.TextVisible = false;
             // 
+            // itemEnd
+            // 
+            itemEnd.Control = txtSigEndTime;
+            itemEnd.Location = new System.Drawing.Point(548, 0);
+            itemEnd.Name = "itemEnd";
+            itemEnd.Padding = new DevExpress.XtraLayout.Utils.Padding(12, 2, 2, 2);
+            itemEnd.Size = new System.Drawing.Size(218, 26);
+            itemEnd.Text = "结束时间";
+            itemEnd.TextSize = new System.Drawing.Size(48, 14);
+            itemEnd.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            // 
+            // layoutControlItem5
+            // 
+            layoutControlItem5.Control = ctrlPage;
+            layoutControlItem5.Location = new System.Drawing.Point(0, 404);
+            layoutControlItem5.Name = "layoutControlItem5";
+            layoutControlItem5.Size = new System.Drawing.Size(859, 31);
+            layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem5.TextVisible = false;
+            // 
+            // layoutControlItem6
+            // 
+            layoutControlItem6.Control = txtTimeCho;
+            layoutControlItem6.Location = new System.Drawing.Point(154, 0);
+            layoutControlItem6.Name = "layoutControlItem6";
+            layoutControlItem6.Padding = new DevExpress.XtraLayout.Utils.Padding(12, 2, 2, 2);
+            layoutControlItem6.Size = new System.Drawing.Size(172, 26);
+            layoutControlItem6.Text = "时间选择";
+            layoutControlItem6.TextSize = new System.Drawing.Size(48, 14);
+            // 
+            // layoutControlItem7
+            // 
+            layoutControlItem7.Control = txtSat;
+            layoutControlItem7.Location = new System.Drawing.Point(0, 0);
+            layoutControlItem7.Name = "layoutControlItem7";
+            layoutControlItem7.Size = new System.Drawing.Size(154, 26);
+            layoutControlItem7.Text = "卫星";
+            layoutControlItem7.TextSize = new System.Drawing.Size(48, 14);
+            // 
+            // emptySpaceItem1
+            // 
+            emptySpaceItem1.AllowHotTrack = false;
+            emptySpaceItem1.Location = new System.Drawing.Point(849, 0);
+            emptySpaceItem1.Name = "emptySpaceItem1";
+            emptySpaceItem1.Size = new System.Drawing.Size(10, 26);
+            emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
+            // 
             // CtrlAdRes
             // 
             AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             Controls.Add(layoutControl1);
             Name = "CtrlAdRes";
-            Size = new System.Drawing.Size(649, 342);
+            Size = new System.Drawing.Size(879, 455);
             Load += CtrlAdRes_Load;
             ((System.ComponentModel.ISupportInitialize)gridAdRes).EndInit();
             ((System.ComponentModel.ISupportInitialize)gridView).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit();
             layoutControl1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)dateEdit1.Properties.CalendarTimeProperties).EndInit();
-            ((System.ComponentModel.ISupportInitialize)dateEdit1.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtSat.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)searchLookUpEdit1View).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtTimeCho.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtSigEndTime.Properties.CalendarTimeProperties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtSigEndTime.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtSigStartTime.Properties.CalendarTimeProperties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtSigStartTime.Properties).EndInit();
             ((System.ComponentModel.ISupportInitialize)Root).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit();
-            ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)itemStart).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit();
+            ((System.ComponentModel.ISupportInitialize)itemEnd).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit();
             ResumeLayout(false);
         }
 
@@ -161,9 +296,19 @@
         private DevExpress.XtraLayout.LayoutControl layoutControl1;
         private DevExpress.XtraLayout.LayoutControlGroup Root;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
-        private DevExpress.XtraEditors.DateEdit dateEdit1;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
+        private DevExpress.XtraEditors.DateEdit txtSigStartTime;
+        private DevExpress.XtraLayout.LayoutControlItem itemStart;
         private DevExpress.XtraEditors.SimpleButton btnQuery;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
+        private DevExpress.XtraEditors.DateEdit txtSigEndTime;
+        private DevExpress.XtraLayout.LayoutControlItem itemEnd;
+        private CtrlPage ctrlPage;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
+        private DevExpress.XtraEditors.SearchLookUpEdit txtSat;
+        private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View;
+        private DevExpress.XtraEditors.ImageComboBoxEdit txtTimeCho;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
     }
 }

+ 150 - 8
DW5S.App/UserControl/CtrlAdRes.cs

@@ -1,7 +1,13 @@
-using DW5S.DTO;
+using DevExpress.CodeParser;
+using DevExpress.Diagram.Core.Shapes;
+using DevExpress.Map.Dashboard;
+using DW5S.DTO;
 using DW5S.Entity;
 using DW5S.Repostory;
 using DW5S.ViewModel;
+using DxHelper;
+using ExtensionsDev;
+using Microsoft.EntityFrameworkCore;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -11,6 +17,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using XdCxRhDW5S.ViewModel;
 
 namespace DW5S.App.UserControl
 {
@@ -20,18 +27,30 @@ namespace DW5S.App.UserControl
         public CtrlAdRes()
         {
             InitializeComponent();
+            this.layoutControl1.UseDefault();
         }
 
-        private void CtrlAdRes_Load(object sender, EventArgs e)
+        private async Task<IEnumerable<SatViewModel>> GetAllSat()
+        {
+            var unitOfWork = IocContainer.UnitOfWork;
+            var repsXl = unitOfWork.Of<XlInfo>() as XlRepository;
+            var list = await repsXl.GetAllSat();
+            return list.To<List<SatViewModel>>();
+        }
+
+        private async void CtrlAdRes_Load(object sender, EventArgs e)
         {
             try
             {
-                gridAdRes.UseDefault(list).UseEmptyText("无结果").UseRowNumber().UseDeleteAsync<ADResViewModel>(async data =>
-                {
-                var delItems = data.Select(t => new LogDeleteDto(t.Id));
-                var rsp = await HttpHelper.PostRequestAsync(SysConfig.GetUrl("Log/Delete"), delItems);
-                return rsp.code == 200;
-                });
+                ctrlPage.SetOnQuery(LoadPageData);
+                txtSigStartTime.UseDefault();
+                txtSigEndTime.UseDefault();
+                gridAdRes.UseDefault(list, showScrollH: true).UseEmptyText("无结果").UseMultiSelect().UseRowNumber().UseDeleteAsync<AdRes>(DelAd);
+                List<SatInfo> satList = new List<SatInfo>();
+                var unitOfWork = IocContainer.UnitOfWork;
+                var repsSat = unitOfWork.Of<SatInfo>();
+                satList.AddRange(await repsSat.GetAllAsync(p => p.UpdateTime));
+                this.txtSat.UseDefault().SetData(GetAllSat, nameof(SatViewModel.Sat)).UseDoubleClickToSelectAll();
             }
             catch (Exception ex)
             {
@@ -41,9 +60,132 @@ namespace DW5S.App.UserControl
             }
         }
 
+        private async Task<bool> DelAd(List<AdRes> selectedRes)
+        {
+            try
+            {
+                var unitOfWork = IocContainer.UnitOfWork;
+                var repsAd = unitOfWork.OfLong<AdRes>();
+                var count = await repsAd.DeleteAsync(selectedRes);
+                await unitOfWork.SaveAsync();
+                ctrlPage.RefreshData();
+                IocContainer.Logger.Information($"删除选中参估结果,共删除了{count}条参估结果记录");
+                return true;
+            }
+            catch (Exception ex)
+            {
+                string msg = "删除采集结果异常";
+                IocContainer.Logger.Error(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
+                return false;
+            }
+        }
+        private void txtTimeCho_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            switch (txtTimeCho.Text)
+            {
+                case "最近1小时":
+                case "最近6小时":
+                case "最近12小时":
+                case "最近1天":
+                case "最近3天":
+                    itemStart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                    itemEnd.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                    break;
+                case "自定义":
+                    itemStart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                    itemEnd.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                    break;
+            }
+        }
+
         private void btnQuery_Click(object sender, EventArgs e)
         {
+            if (txtSat.EditValue == null)
+            {
+                MsgBoxHelper.ShowError("请选择卫星");
+                return;
+            }
+            if (txtTimeCho.SelectedText == "自定义")
+            {
+                if (txtSigStartTime.EditValue == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowError($"请选择信号开始时间!");
+                    return;
+                }
+                if (txtSigEndTime.EditValue == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowError($"请选择信号结束时间!");
+                    return;
+                }
+                if (txtSigStartTime.DateTime > txtSigEndTime.DateTime)
+                {
+                    DxHelper.MsgBoxHelper.ShowError($"开始时间不能大于结束时间!");
+                    return;
+                }
+                if ((txtSigEndTime.DateTime - txtSigStartTime.DateTime).TotalDays > 10)
+                {
+                    MsgBoxHelper.ShowWarning("时间跨度不能超过10天!");
+                    return;
+                }
+            }
+            ctrlPage.RefreshData();
+        }
+
+        private async Task<PageData> LoadPageData(PageQueryDto arg)
+        {
+            var unitOfWork = IocContainer.UnitOfWork;
+            var repsAd = unitOfWork.OfLong<AdRes>();
+            var queryable = repsAd.AsQueryable();
+            int? satCode = ((SatViewModel)txtSat.EditValue)?.SatCode;
+            try
+            {
 
+                DateTime start = DateTime.MinValue;
+                DateTime end = DateTime.MinValue;
+                if (satCode != null)
+                {
+                    queryable = queryable.Where(p => p.SatCode == satCode);
+                }
+                if (txtTimeCho.Text == "自定义")
+                {
+                    start = txtSigStartTime.DateTime;
+                    end = txtSigEndTime.DateTime;
+                }
+                else
+                {
+                    var max = queryable.OrderByDescending(p => p.SigTime).FirstOrDefault();
+                    if (max != null)
+                    {
+                        end = max.SigTime;
+                        start = end.AddHours(-Convert.ToInt32(txtTimeCho.EditValue));
+                    }
+                }
+                if (start != DateTime.MinValue)
+                {
+                    queryable = queryable.Where(w => w.SigTime >= start);
+                }
+                if (end != DateTime.MinValue)
+                {
+                    queryable = queryable.Where(w => w.SigTime <= end);
+                }
+                queryable = queryable
+                       .OrderByDescending(o => o.SigTime)
+                       .ThenBy(p => p.SatCode);
+            }
+            catch (TaskCanceledException) { }
+            catch (Exception ex)
+            {
+                string msg = "参估结果查询异常";
+                IocContainer.Logger.Error(ex, msg);
+                MsgBoxHelper.ShowError(msg);
+            }
+            var pageData = await repsAd.GetPageData(arg, queryable);
+            list.Clear();
+            list.AddRange(pageData.Data.To<List<ADResViewModel>>());
+            gridView.RefreshData();
+            gridView.BestFitColumns();
+            return pageData;
         }
     }
 }

+ 1 - 1
DW5S.App/UserControl/CtrlCgRes.cs

@@ -151,7 +151,7 @@ namespace DW5S.App.UserControl
                     if (max != null)
                     {
                         end = max.SigTime;
-                        start = end.AddHours(-(int)txtTimeCho.EditValue);
+                        start = end.AddHours(-(int)txtTimeCho.EditValue);       
                     }
                 }
                 if (start != DateTime.MinValue)

+ 9 - 9
DW5S.ViewModel/ADResViewModel.cs

@@ -29,11 +29,11 @@ namespace DW5S.ViewModel
         [Display(Name = "卫星编号", AutoGenerateField = false)]
         public int SatCode { get; set; }
 
-        [Display(AutoGenerateField = false)]
-        public virtual SatViewModel SatInfo { get; set; }
+        //[Display(AutoGenerateField = false)]
+        //public virtual SatViewModel SatInfo { get; set; }
 
-        [Display(Name = "卫星")]
-        public string Sat => SatInfo.Sat;
+        //[Display(Name = "卫星")]
+        //public string Sat => SatInfo.Sat;
 
         [Display(Name = "上行频点(Hz)", AutoGenerateField = false)]
         public double FrequpHz { get; set; }
@@ -71,14 +71,14 @@ namespace DW5S.ViewModel
         [Display(Name = "实际文件字节大小(B)")]
         public long RealFileSize { get; set; }
 
-        [Display(Name = "接收站编号")]
+        [Display(Name = "接收站编号", AutoGenerateField = false)]
         public int RecTxInfoID { get; set; }
 
-        [Display(Name = "通道号")]
-        public virtual TxInfo RecTxInfo { get; set; }
+        //[Display(Name = "接收站",AutoGenerateField = false)]
+        //public virtual TxInfo RecTxInfo { get; set; }
 
-        [Display(Name = "接收站名称")]
-        public string RecStationName => RecTxInfo.Name;
+        //[Display(Name = "接收站名称")]
+        //public string RecStationName => RecTxInfo.Name;
 
         /// <summary>
         /// 文件错误信息(文件大小、落盘时间等)