Browse Source

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

gongqiuhong 9 months ago
parent
commit
312220b913
38 changed files with 1057 additions and 782 deletions
  1. 1 1
      DW5S.App/CorTools/ResampleForm.cs
  2. 2 2
      DW5S.App/EditForms/FixedStationEditor.cs
  3. 1 1
      DW5S.App/EditForms/RefTaskFreqEditor.cs
  4. 13 12
      DW5S.App/EditForms/SampleEditor.cs
  5. 10 7
      DW5S.App/EditForms/SatEditor.cs
  6. 9 8
      DW5S.App/EditForms/SigDelayEditor.cs
  7. 250 263
      DW5S.App/EditForms/SigEditor.Designer.cs
  8. 8 6
      DW5S.App/EditForms/SigEditor.cs
  9. 27 27
      DW5S.App/EditForms/SigEditor.resx
  10. 3 3
      DW5S.App/EditForms/TaskEditor.cs
  11. 10 10
      DW5S.App/EditForms/TaskEditorSignal.cs
  12. 1 1
      DW5S.App/ExtensionsDev/GridControlEx.cs
  13. 3 19
      DW5S.App/ExtensionsDev/SearchLookUpEditExtension.cs
  14. 3 3
      DW5S.App/UserControl/CtrlRefTask.cs
  15. 13 12
      DW5S.App/UserControl/CtrlSample.cs
  16. 14 21
      DW5S.App/UserControl/CtrlSat.cs
  17. 46 42
      DW5S.App/UserControl/CtrlSignal.cs
  18. 1 0
      DW5S.App/UserControl/CtrlSysSettings.cs
  19. 0 247
      DW5S.Basic/HttpHelper.cs
  20. 10 3
      DW5S.Basic/SysConfig.cs
  21. 2 2
      DW5S.Controller/DetectCgController.cs
  22. 20 0
      DW5S.Controller/TaskController.cs
  23. 8 8
      DW5S.Entity/RefTaskFreq.cs
  24. 27 47
      DW5S.Entity/SampleInfo.cs
  25. 0 4
      DW5S.Entity/SigDelay.cs
  26. 18 25
      DW5S.Entity/SigInfo.cs
  27. 334 0
      DW5S.Service/HttpHelper.cs
  28. 5 0
      DW5S.ViewModel/09.DW5S.ViewModel.csproj
  29. 5 3
      DW5S.ViewModel/BaseViewModel.cs
  30. 1 1
      DW5S.ViewModel/CdbTxViewModel.cs
  31. 1 1
      DW5S.ViewModel/CxTxViewModel.cs
  32. 1 1
      DW5S.ViewModel/RecTxViewModel.cs
  33. 1 1
      DW5S.ViewModel/RefTxViewModel.cs
  34. 74 0
      DW5S.ViewModel/SampleViewModel.cs
  35. 38 0
      DW5S.ViewModel/SatViewModel.cs
  36. 52 0
      DW5S.ViewModel/SigDelayViewModel.cs
  37. 44 0
      DW5S.ViewModel/SigViewModel.cs
  38. 1 1
      DW5S.ViewModel/XlViewModel.cs

+ 1 - 1
DW5S.App/CorTools/ResampleForm.cs

@@ -113,7 +113,7 @@ namespace DW5S.App.CorTools
                 if (response.code == 200)
                 {
                     string outFile = Path.Combine(txtOutDir.Text, Path.GetFileNameWithoutExtension(txtFile.Text) + $"_Resample{txtOutFs.Text}K.dat");
-                    if (await HttpHelper.DownloadFileAsync(SysConfig.GetBaseUrl(), response.data.File, outFile))
+                    if (await HttpHelper.DownloadWithNameAsync(response.data.File, outFile))
                         this.txtOutFile.Text = outFile;
                     else
                     {

+ 2 - 2
DW5S.App/EditForms/FixedStationEditor.cs

@@ -47,8 +47,8 @@ namespace DW5S.App.EditForms
             var res = await repsFixed.GetAllAsync();
             infos.AddRange(res.To<List<FixedStationViewModel>>());
             var repsSig = unitOfWork.Of<SigInfo>();
-            var sigs = await repsSig.GetAllAsync();
-            this.txtFreqUp.UseDefault().SetData(sigs, displayField: nameof(SigInfo.FreqUpDis)).UseDoubleClickToSelectAll();
+           var sigs = await repsSig.GetAllAsync();
+            this.txtFreqUp.UseDefault().SetData(sigs.To<List<SigViewModel>>(), displayField: nameof(SigViewModel.FreqUpDis)).UseDoubleClickToSelectAll();
             if (this.Text == "固定站编辑" && info != null)
             {
                 this.txtName.Text = info.StationName;

+ 1 - 1
DW5S.App/EditForms/RefTaskFreqEditor.cs

@@ -40,7 +40,7 @@ namespace DW5S.App.EditForms
             var unitOfWork = IocContainer.UnitOfWork;
 
             var repsSample = unitOfWork.Of<SampleInfo>();
-            var res = await repsSample.AsQueryable().Include(s => s.SigInfo).Include(s => s.RefTxInfo).ToListAsync();
+            var res = await repsSample.AsQueryable().Include(s => s.SigInfo).Include(s => s.TxInfo).ToListAsync();
             samples.AddRange(res);
 
             var satInfos = await unitOfWork.Of<SatInfo>().GetAllAsync();

+ 13 - 12
DW5S.App/EditForms/SampleEditor.cs

@@ -1,5 +1,6 @@
 using DW5S.Entity;
 using DW5S.Repostory;
+using DW5S.ViewModel;
 using ExtensionsDev;
 using Microsoft.EntityFrameworkCore;
 using System;
@@ -14,9 +15,9 @@ namespace DW5S.App.EditForms
     public partial class SampleEditor : DevExpress.XtraEditors.XtraForm
     {
 
-        public SampleInfo info;
+        public SampleViewModel info;
 
-        private List<SampleInfo> infos;
+        private List<SampleViewModel> infos;
         public SampleEditor()
         {
             InitializeComponent();
@@ -24,10 +25,10 @@ namespace DW5S.App.EditForms
             txtSampleName.UseDoubleClickToSelectAll();
             txtSampleFile.UseDoubleClickToSelectAll();
             this.Text = "添加样本";
-            info = new SampleInfo();
+            info = new SampleViewModel();
             this.StartPosition = FormStartPosition.CenterParent;
         }
-        public SampleEditor(SampleInfo info)
+        public SampleEditor(SampleViewModel info)
             : this()
         {
             this.Text = "编辑样本";
@@ -44,8 +45,8 @@ namespace DW5S.App.EditForms
             var refsigList = await unitOfWork.Of<SigInfo>().FindAsync(s => s.SigType == EnumSigType.Ref);
             refsigs.AddRange(refsigList);
 
-            this.searchLookRef.UseDefault().SetData(reftxs, displayField: nameof(TxInfo.Name)).UseDoubleClickToSelectAll();
-            this.txtRefSig.UseDefault().SetData(refsigs, displayField: nameof(SigInfo.FreqDownDis)).UseDoubleClickToSelectAll();
+            this.searchLookRef.UseDefault().SetData(reftxs.To<List<RefTxViewModel>>(), displayField: nameof(RefTxViewModel.Name)).UseDoubleClickToSelectAll();
+            this.txtRefSig.UseDefault().SetData(refsigs.To<List<SigViewModel>>(), displayField: nameof(SigViewModel.FreqDownDis)).UseDoubleClickToSelectAll();
 
             if (this.Text == "编辑样本" && info != null)
             {
@@ -59,10 +60,10 @@ namespace DW5S.App.EditForms
                 this.txtRmark.Text = info.Remark;
             }
 
-            infos = new List<SampleInfo>();
+            infos = new List<SampleViewModel>();
             var repsSample = unitOfWork.Of<SampleInfo>();
             var sampleres = await repsSample.GetAllAsync();
-            infos.AddRange(sampleres);
+            infos.AddRange(sampleres.To<List<SampleViewModel>>());
         }
 
         private void btnCancel_Click(object sender, EventArgs e)
@@ -162,16 +163,16 @@ namespace DW5S.App.EditForms
                     DxHelper.MsgBoxHelper.ShowError($"移动样本文件到样本存储目录{settings.SampleDirectory}失败");
                     return;
                 }
-                var refinfo = (searchLookRef.EditValue as TxInfo);
-                var siginfo = (txtRefSig.EditValue as SigInfo);
+                var refinfo = (searchLookRef.EditValue as RefTxViewModel);
+                var siginfo = (txtRefSig.EditValue as SigViewModel);
                 info.SampleName = sampleName;
                 info.Fs = fsHz;
                 info.StartSec = startSec;
                 info.EndSec = endSec;
                 info.RefTxInfoID = refinfo.Id;
-                info.RefTxInfo = refinfo;
+                info.RefTxInfo = refinfo.To<TxInfo>();
                 info.SigInfoID = siginfo.Id;
-                info.SigInfo = siginfo;
+                info.SigInfo = siginfo.To<SigInfo>();
                 info.SampleFileName = fileName;
                 info.SamplePath = settings.SampleDirectory;
                 info.Remark = txtRmark.Text;

+ 10 - 7
DW5S.App/EditForms/SatEditor.cs

@@ -14,6 +14,8 @@ using DW5S.Entity;
 using DW5S.Repostory;
 using Serilog;
 using DW5S.Service;
+using XdCxRhDW5S.Entity;
+using DW5S.ViewModel;
 
 namespace DW5S.App.EditForms
 {
@@ -22,18 +24,18 @@ namespace DW5S.App.EditForms
         
         
 
-        public SatInfo info;
+        public SatViewModel info;
 
-        private List<SatInfo> infos;
+        private List<SatViewModel> infos;
         public SatEditor()
         {
             InitializeComponent();
             this.layoutControl1.UseDefault();
             this.Text = "添加卫星";
-            info = new SatInfo();
+            info = new SatViewModel();
             this.StartPosition = FormStartPosition.CenterParent;
         }
-        public SatEditor(SatInfo info)
+        public SatEditor(SatViewModel info)
             : this()
         {
             this.Text = "编辑卫星";
@@ -44,7 +46,7 @@ namespace DW5S.App.EditForms
             var unitOfWork = IocContainer.UnitOfWork;
             var repsXl = unitOfWork.Of<XlInfo>() as XlRepository;
             var listXl = await repsXl.GetAllSat();
-            this.searchLookUpEdit1.UseDefault().SetData(listXl, nameof(XlInfo.Sat)).UseDoubleClickToSelectAll();
+            this.searchLookUpEdit1.UseDefault().SetData(listXl.To<List<XlViewModel>>(), nameof(XlViewModel.Sat)).UseDoubleClickToSelectAll();
             if (this.Text == "编辑卫星" && info != null)
             {
                 this.txtSatName.Text = info.SatName;
@@ -53,9 +55,9 @@ namespace DW5S.App.EditForms
                 this.searchLookUpEdit1.EditValue = info.Sat;
             }
 
-            infos = new List<SatInfo>();
+            infos = new List<SatViewModel>();
             var res = await unitOfWork.Of<SatInfo>().GetAllAsync();
-            infos.AddRange(res);
+            infos.AddRange(res.To<List<SatViewModel>>());
         }
 
         private void btnCancel_Click(object sender, EventArgs e)
@@ -79,6 +81,7 @@ namespace DW5S.App.EditForms
                 }
                 info.SatCode = satCode;
                 info.SatName = txtSatName.Text.Trim();
+                info.UpdateTime = DateTime.Now;
                 if (!string.IsNullOrWhiteSpace(txtSatTrans.Text))
                     info.SatTrans = Math.Round(Convert.ToDouble(txtSatTrans.Text), 3);
                 if (!string.IsNullOrWhiteSpace(txtSatLon.Text))

+ 9 - 8
DW5S.App/EditForms/SigDelayEditor.cs

@@ -18,25 +18,25 @@ using DW5S.Repostory;
 using Serilog;
 using Serilog.Core;
 using DW5S.Service;
+using DW5S.ViewModel;
+using XdCxRhDW5S.Entity;
 
 namespace DW5S.App.EditForms
 {
     public partial class SigDelayEditor : DevExpress.XtraEditors.XtraForm
     {
-
-
-        public SigDelay info;
+        public SigDelayViewModel info;
         public int sigId;
         public SigDelayEditor(int sigId)
         {
             InitializeComponent();
             this.layoutControl1.UseDefault();
             this.Text = "添加转发延迟";
-            info = new SigDelay();
+            info = new SigDelayViewModel();
             this.StartPosition = FormStartPosition.CenterParent;
             this.sigId = sigId;
         }
-        public SigDelayEditor(SigDelay info, int sigId)
+        public SigDelayEditor(SigDelayViewModel info, int sigId)
             : this(sigId)
         {
             this.Text = "编辑转发延迟";
@@ -48,10 +48,11 @@ namespace DW5S.App.EditForms
             var unitOfWork = IocContainer.UnitOfWork;
             var repsSat = unitOfWork.Of<SatInfo>();
             var sats = await repsSat.GetAllAsync();
-            this.txtSat.UseDefault().SetData(sats, displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+            var satList = sats.To<List<SatViewModel>>();
+            this.txtSat.UseDefault().SetData(satList, displayField: nameof(SatViewModel.Sat)).UseDoubleClickToSelectAll();
             if (this.Text == "编辑转发延迟" && info != null)
             {
-                this.txtSat.EditValue = sats.FirstOrDefault(f => f.SatCode == info.SatInfoSatCode);
+                this.txtSat.EditValue = satList.FirstOrDefault(f => f.SatCode == info.SatInfoSatCode);
                 this.txtDelay.EditValue = info.Delay;
             }
         }
@@ -75,7 +76,7 @@ namespace DW5S.App.EditForms
                     dxErrorProvider.SetError(txtDelay, "请输入转发延迟");
                     return;
                 }
-                var satInfo = (SatInfo)txtSat.EditValue;
+                var satInfo = (SatViewModel)txtSat.EditValue;
 
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSigDelay = unitOfWork.Of<SigDelay>();

+ 250 - 263
DW5S.App/EditForms/SigEditor.Designer.cs

@@ -28,17 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
+            components = new System.ComponentModel.Container();
             DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
@@ -49,318 +39,315 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = new DevExpress.Utils.SerializableAppearanceObject();
-            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
-            this.txtSigCheckType = new DevExpress.XtraEditors.CheckedListBoxControl();
-            this.btnOk = new DevExpress.XtraEditors.SimpleButton();
-            this.btnCancel = new DevExpress.XtraEditors.SimpleButton();
-            this.txtSnr = new DevExpress.XtraEditors.ButtonEdit();
-            this.txtFreqDown = new DevExpress.XtraEditors.ButtonEdit();
-            this.txtFreqUp = new DevExpress.XtraEditors.ButtonEdit();
-            this.txtBandHz = new DevExpress.XtraEditors.ButtonEdit();
-            this.cbSigType = new DevExpress.XtraEditors.ImageComboBoxEdit();
-            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
-            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
-            this.layoutControl1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.txtSigCheckType)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtSnr.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtFreqDown.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtFreqUp.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtBandHz.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.cbSigType.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
-            this.SuspendLayout();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions5 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject17 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject18 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject19 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject20 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
+            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            txtSigCheckType = new DevExpress.XtraEditors.CheckedListBoxControl();
+            btnOk = new DevExpress.XtraEditors.SimpleButton();
+            btnCancel = new DevExpress.XtraEditors.SimpleButton();
+            txtSnr = new DevExpress.XtraEditors.ButtonEdit();
+            txtFreqDown = new DevExpress.XtraEditors.ButtonEdit();
+            txtFreqUp = new DevExpress.XtraEditors.ButtonEdit();
+            txtBandHz = new DevExpress.XtraEditors.ButtonEdit();
+            cbSigType = new DevExpress.XtraEditors.ImageComboBoxEdit();
+            Root = new DevExpress.XtraLayout.LayoutControlGroup();
+            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
+            dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components);
+            ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
+            layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)txtSigCheckType).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtSnr.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtFreqDown.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtFreqUp.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtBandHz.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)cbSigType.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)Root).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)dxErrorProvider).BeginInit();
+            SuspendLayout();
             // 
             // layoutControl1
             // 
-            this.layoutControl1.Controls.Add(this.txtSigCheckType);
-            this.layoutControl1.Controls.Add(this.btnOk);
-            this.layoutControl1.Controls.Add(this.btnCancel);
-            this.layoutControl1.Controls.Add(this.txtSnr);
-            this.layoutControl1.Controls.Add(this.txtFreqDown);
-            this.layoutControl1.Controls.Add(this.txtFreqUp);
-            this.layoutControl1.Controls.Add(this.txtBandHz);
-            this.layoutControl1.Controls.Add(this.cbSigType);
-            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.layoutControl1.Location = new System.Drawing.Point(0, 0);
-            this.layoutControl1.Name = "layoutControl1";
-            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(831, 101, 650, 400);
-            this.layoutControl1.Root = this.Root;
-            this.layoutControl1.Size = new System.Drawing.Size(257, 426);
-            this.layoutControl1.TabIndex = 0;
-            this.layoutControl1.Text = "layoutControl1";
+            layoutControl1.Controls.Add(txtSigCheckType);
+            layoutControl1.Controls.Add(btnOk);
+            layoutControl1.Controls.Add(btnCancel);
+            layoutControl1.Controls.Add(txtSnr);
+            layoutControl1.Controls.Add(txtFreqDown);
+            layoutControl1.Controls.Add(txtFreqUp);
+            layoutControl1.Controls.Add(txtBandHz);
+            layoutControl1.Controls.Add(cbSigType);
+            layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+            layoutControl1.Location = new System.Drawing.Point(0, 0);
+            layoutControl1.Name = "layoutControl1";
+            layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(831, 101, 650, 400);
+            layoutControl1.Root = Root;
+            layoutControl1.Size = new System.Drawing.Size(287, 454);
+            layoutControl1.TabIndex = 0;
+            layoutControl1.Text = "layoutControl1";
             // 
             // txtSigCheckType
             // 
-            this.txtSigCheckType.Location = new System.Drawing.Point(22, 157);
-            this.txtSigCheckType.MultiColumn = true;
-            this.txtSigCheckType.Name = "txtSigCheckType";
-            this.txtSigCheckType.ShowFocusRect = true;
-            this.txtSigCheckType.Size = new System.Drawing.Size(213, 48);
-            this.txtSigCheckType.StyleController = this.layoutControl1;
-            this.txtSigCheckType.TabIndex = 11;
-            this.txtSigCheckType.ItemCheck += new DevExpress.XtraEditors.Controls.ItemCheckEventHandler(this.txtSigType_ItemCheck_1);
-            this.txtSigCheckType.SelectedIndexChanged += new System.EventHandler(this.txtSigType_SelectedIndexChanged);
+            txtSigCheckType.Location = new System.Drawing.Point(22, 157);
+            txtSigCheckType.MultiColumn = true;
+            txtSigCheckType.Name = "txtSigCheckType";
+            txtSigCheckType.ShowFocusRect = true;
+            txtSigCheckType.Size = new System.Drawing.Size(243, 73);
+            txtSigCheckType.StyleController = layoutControl1;
+            txtSigCheckType.TabIndex = 11;
+            txtSigCheckType.ItemCheck += txtSigType_ItemCheck_1;
+            txtSigCheckType.SelectedIndexChanged += txtSigType_SelectedIndexChanged;
             // 
             // btnOk
             // 
-            this.btnOk.Location = new System.Drawing.Point(130, 381);
-            this.btnOk.Name = "btnOk";
-            this.btnOk.Size = new System.Drawing.Size(105, 23);
-            this.btnOk.StyleController = this.layoutControl1;
-            this.btnOk.TabIndex = 10;
-            this.btnOk.Text = "确定";
-            this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+            btnOk.Location = new System.Drawing.Point(145, 409);
+            btnOk.Name = "btnOk";
+            btnOk.Size = new System.Drawing.Size(120, 23);
+            btnOk.StyleController = layoutControl1;
+            btnOk.TabIndex = 10;
+            btnOk.Text = "确定";
+            btnOk.Click += btnOk_Click;
             // 
             // btnCancel
             // 
-            this.btnCancel.Location = new System.Drawing.Point(22, 381);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(104, 23);
-            this.btnCancel.StyleController = this.layoutControl1;
-            this.btnCancel.TabIndex = 9;
-            this.btnCancel.Text = "取消";
-            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+            btnCancel.Location = new System.Drawing.Point(22, 409);
+            btnCancel.Name = "btnCancel";
+            btnCancel.Size = new System.Drawing.Size(119, 23);
+            btnCancel.StyleController = layoutControl1;
+            btnCancel.TabIndex = 9;
+            btnCancel.Text = "取消";
+            btnCancel.Click += btnCancel_Click;
             // 
             // txtSnr
             // 
-            this.txtSnr.EditValue = "15";
-            this.txtSnr.Location = new System.Drawing.Point(22, 344);
-            this.txtSnr.Name = "txtSnr";
-            this.txtSnr.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
-            this.txtSnr.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "dB", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtSnr.Size = new System.Drawing.Size(213, 23);
-            this.txtSnr.StyleController = this.layoutControl1;
-            this.txtSnr.TabIndex = 4;
+            txtSnr.EditValue = "15";
+            txtSnr.Location = new System.Drawing.Point(22, 372);
+            txtSnr.Name = "txtSnr";
+            txtSnr.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
+            txtSnr.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "dB", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtSnr.Size = new System.Drawing.Size(243, 23);
+            txtSnr.StyleController = layoutControl1;
+            txtSnr.TabIndex = 4;
             // 
             // txtFreqDown
             // 
-            this.txtFreqDown.Location = new System.Drawing.Point(22, 103);
-            this.txtFreqDown.Name = "txtFreqDown";
-            this.txtFreqDown.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
-            this.txtFreqDown.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtFreqDown.Size = new System.Drawing.Size(213, 23);
-            this.txtFreqDown.StyleController = this.layoutControl1;
-            this.txtFreqDown.TabIndex = 2;
+            txtFreqDown.Location = new System.Drawing.Point(22, 103);
+            txtFreqDown.Name = "txtFreqDown";
+            txtFreqDown.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
+            txtFreqDown.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtFreqDown.Size = new System.Drawing.Size(243, 23);
+            txtFreqDown.StyleController = layoutControl1;
+            txtFreqDown.TabIndex = 2;
             // 
             // txtFreqUp
             // 
-            this.txtFreqUp.Location = new System.Drawing.Point(22, 49);
-            this.txtFreqUp.MinimumSize = new System.Drawing.Size(0, 23);
-            this.txtFreqUp.Name = "txtFreqUp";
-            this.txtFreqUp.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtFreqUp.Size = new System.Drawing.Size(213, 23);
-            this.txtFreqUp.StyleController = this.layoutControl1;
-            this.txtFreqUp.TabIndex = 0;
+            txtFreqUp.Location = new System.Drawing.Point(22, 49);
+            txtFreqUp.MinimumSize = new System.Drawing.Size(0, 23);
+            txtFreqUp.Name = "txtFreqUp";
+            txtFreqUp.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtFreqUp.Size = new System.Drawing.Size(243, 23);
+            txtFreqUp.StyleController = layoutControl1;
+            txtFreqUp.TabIndex = 0;
             // 
             // txtBandHz
             // 
-            this.txtBandHz.EditValue = "25000";
-            this.txtBandHz.Location = new System.Drawing.Point(22, 290);
-            this.txtBandHz.Name = "txtBandHz";
-            this.txtBandHz.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
-            this.txtBandHz.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtBandHz.Size = new System.Drawing.Size(213, 23);
-            this.txtBandHz.StyleController = this.layoutControl1;
-            this.txtBandHz.TabIndex = 4;
+            txtBandHz.EditValue = "25000";
+            txtBandHz.Location = new System.Drawing.Point(22, 318);
+            txtBandHz.Name = "txtBandHz";
+            txtBandHz.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
+            txtBandHz.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) });
+            txtBandHz.Size = new System.Drawing.Size(243, 23);
+            txtBandHz.StyleController = layoutControl1;
+            txtBandHz.TabIndex = 4;
             // 
             // cbSigType
             // 
-            this.cbSigType.Location = new System.Drawing.Point(22, 238);
-            this.cbSigType.MinimumSize = new System.Drawing.Size(0, 23);
-            this.cbSigType.Name = "cbSigType";
-            this.cbSigType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.cbSigType.Size = new System.Drawing.Size(213, 23);
-            this.cbSigType.StyleController = this.layoutControl1;
-            this.cbSigType.TabIndex = 12;
-            this.cbSigType.SelectedIndexChanged += new System.EventHandler(this.cbSigType_SelectedIndexChanged);
+            cbSigType.Location = new System.Drawing.Point(22, 263);
+            cbSigType.MinimumSize = new System.Drawing.Size(0, 23);
+            cbSigType.Name = "cbSigType";
+            cbSigType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            cbSigType.Size = new System.Drawing.Size(243, 23);
+            cbSigType.StyleController = layoutControl1;
+            cbSigType.TabIndex = 12;
+            cbSigType.SelectedIndexChanged += cbSigType_SelectedIndexChanged;
             // 
             // Root
             // 
-            this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
-            this.Root.GroupBordersVisible = false;
-            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
-            this.layoutControlItem2,
-            this.layoutControlItem3,
-            this.layoutControlItem4,
-            this.layoutControlItem5,
-            this.layoutControlItem6,
-            this.layoutControlItem1,
-            this.layoutControlItem7,
-            this.layoutControlItem8});
-            this.Root.Name = "Root";
-            this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(20, 20, 20, 20);
-            this.Root.Size = new System.Drawing.Size(257, 426);
-            this.Root.TextVisible = false;
+            Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
+            Root.GroupBordersVisible = false;
+            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem5, layoutControlItem6, layoutControlItem1, layoutControlItem7, layoutControlItem8 });
+            Root.Name = "Root";
+            Root.Padding = new DevExpress.XtraLayout.Utils.Padding(20, 20, 20, 20);
+            Root.Size = new System.Drawing.Size(287, 454);
+            Root.TextVisible = false;
             // 
             // layoutControlItem2
             // 
-            this.layoutControlItem2.Control = this.txtFreqUp;
-            this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
-            this.layoutControlItem2.MaxSize = new System.Drawing.Size(0, 54);
-            this.layoutControlItem2.MinSize = new System.Drawing.Size(54, 54);
-            this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem2.Size = new System.Drawing.Size(217, 54);
-            this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem2.Text = "上行频点";
-            this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem2.TextSize = new System.Drawing.Size(72, 14);
+            layoutControlItem2.Control = txtFreqUp;
+            layoutControlItem2.Location = new System.Drawing.Point(0, 0);
+            layoutControlItem2.MaxSize = new System.Drawing.Size(0, 54);
+            layoutControlItem2.MinSize = new System.Drawing.Size(54, 54);
+            layoutControlItem2.Name = "layoutControlItem2";
+            layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            layoutControlItem2.Size = new System.Drawing.Size(247, 54);
+            layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem2.Text = "上行频点";
+            layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem2.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem3
             // 
-            this.layoutControlItem3.Control = this.txtSnr;
-            this.layoutControlItem3.Location = new System.Drawing.Point(0, 295);
-            this.layoutControlItem3.MaxSize = new System.Drawing.Size(0, 54);
-            this.layoutControlItem3.MinSize = new System.Drawing.Size(54, 54);
-            this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem3.Size = new System.Drawing.Size(217, 54);
-            this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem3.Text = "门限";
-            this.layoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem3.TextSize = new System.Drawing.Size(72, 14);
+            layoutControlItem3.Control = txtSnr;
+            layoutControlItem3.Location = new System.Drawing.Point(0, 323);
+            layoutControlItem3.MaxSize = new System.Drawing.Size(0, 54);
+            layoutControlItem3.MinSize = new System.Drawing.Size(54, 54);
+            layoutControlItem3.Name = "layoutControlItem3";
+            layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            layoutControlItem3.Size = new System.Drawing.Size(247, 54);
+            layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem3.Text = "门限";
+            layoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem3.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem4
             // 
-            this.layoutControlItem4.Control = this.btnCancel;
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 349);
-            this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 37);
-            this.layoutControlItem4.MinSize = new System.Drawing.Size(35, 37);
-            this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem4.Size = new System.Drawing.Size(108, 37);
-            this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem4.TextVisible = false;
+            layoutControlItem4.Control = btnCancel;
+            layoutControlItem4.Location = new System.Drawing.Point(0, 377);
+            layoutControlItem4.MaxSize = new System.Drawing.Size(0, 37);
+            layoutControlItem4.MinSize = new System.Drawing.Size(35, 37);
+            layoutControlItem4.Name = "layoutControlItem4";
+            layoutControlItem4.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            layoutControlItem4.Size = new System.Drawing.Size(123, 37);
+            layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem4.TextVisible = false;
             // 
             // layoutControlItem5
             // 
-            this.layoutControlItem5.Control = this.btnOk;
-            this.layoutControlItem5.Location = new System.Drawing.Point(108, 349);
-            this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 37);
-            this.layoutControlItem5.MinSize = new System.Drawing.Size(35, 37);
-            this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem5.Size = new System.Drawing.Size(109, 37);
-            this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem5.TextVisible = false;
+            layoutControlItem5.Control = btnOk;
+            layoutControlItem5.Location = new System.Drawing.Point(123, 377);
+            layoutControlItem5.MaxSize = new System.Drawing.Size(0, 37);
+            layoutControlItem5.MinSize = new System.Drawing.Size(35, 37);
+            layoutControlItem5.Name = "layoutControlItem5";
+            layoutControlItem5.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            layoutControlItem5.Size = new System.Drawing.Size(124, 37);
+            layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem5.TextVisible = false;
             // 
             // layoutControlItem6
             // 
-            this.layoutControlItem6.Control = this.txtFreqDown;
-            this.layoutControlItem6.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem6.CustomizationFormText = "轨道经度";
-            this.layoutControlItem6.Location = new System.Drawing.Point(0, 54);
-            this.layoutControlItem6.MaxSize = new System.Drawing.Size(0, 54);
-            this.layoutControlItem6.MinSize = new System.Drawing.Size(64, 54);
-            this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem6.Size = new System.Drawing.Size(217, 54);
-            this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem6.Text = "下行频点";
-            this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem6.TextSize = new System.Drawing.Size(72, 14);
+            layoutControlItem6.Control = txtFreqDown;
+            layoutControlItem6.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            layoutControlItem6.CustomizationFormText = "轨道经度";
+            layoutControlItem6.Location = new System.Drawing.Point(0, 54);
+            layoutControlItem6.MaxSize = new System.Drawing.Size(0, 54);
+            layoutControlItem6.MinSize = new System.Drawing.Size(64, 54);
+            layoutControlItem6.Name = "layoutControlItem6";
+            layoutControlItem6.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            layoutControlItem6.Size = new System.Drawing.Size(247, 54);
+            layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem6.Text = "下行频点";
+            layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem6.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem1
             // 
-            this.layoutControlItem1.Control = this.txtSigCheckType;
-            this.layoutControlItem1.Location = new System.Drawing.Point(0, 108);
-            this.layoutControlItem1.MinSize = new System.Drawing.Size(54, 21);
-            this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem1.Size = new System.Drawing.Size(217, 79);
-            this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem1.Text = "信号检测类型";
-            this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem1.TextSize = new System.Drawing.Size(72, 14);
+            layoutControlItem1.Control = txtSigCheckType;
+            layoutControlItem1.Location = new System.Drawing.Point(0, 108);
+            layoutControlItem1.MaxSize = new System.Drawing.Size(0, 104);
+            layoutControlItem1.MinSize = new System.Drawing.Size(76, 104);
+            layoutControlItem1.Name = "layoutControlItem1";
+            layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            layoutControlItem1.Size = new System.Drawing.Size(247, 104);
+            layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem1.Text = "信号检测类型";
+            layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem1.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem7
             // 
-            this.layoutControlItem7.Control = this.txtBandHz;
-            this.layoutControlItem7.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem7.CustomizationFormText = "门限";
-            this.layoutControlItem7.Location = new System.Drawing.Point(0, 241);
-            this.layoutControlItem7.MaxSize = new System.Drawing.Size(0, 54);
-            this.layoutControlItem7.MinSize = new System.Drawing.Size(54, 54);
-            this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem7.Size = new System.Drawing.Size(217, 54);
-            this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem7.Text = "带宽";
-            this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem7.TextSize = new System.Drawing.Size(72, 14);
+            layoutControlItem7.Control = txtBandHz;
+            layoutControlItem7.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            layoutControlItem7.CustomizationFormText = "门限";
+            layoutControlItem7.Location = new System.Drawing.Point(0, 269);
+            layoutControlItem7.MaxSize = new System.Drawing.Size(0, 54);
+            layoutControlItem7.MinSize = new System.Drawing.Size(54, 54);
+            layoutControlItem7.Name = "layoutControlItem7";
+            layoutControlItem7.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            layoutControlItem7.Size = new System.Drawing.Size(247, 54);
+            layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem7.Text = "带宽";
+            layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem7.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem8
             // 
-            this.layoutControlItem8.Control = this.cbSigType;
-            this.layoutControlItem8.Location = new System.Drawing.Point(0, 187);
-            this.layoutControlItem8.MinSize = new System.Drawing.Size(50, 25);
-            this.layoutControlItem8.Name = "layoutControlItem8";
-            this.layoutControlItem8.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 14, 2);
-            this.layoutControlItem8.Size = new System.Drawing.Size(217, 54);
-            this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem8.Text = "信号类型";
-            this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14);
+            layoutControlItem8.Control = cbSigType;
+            layoutControlItem8.Location = new System.Drawing.Point(0, 212);
+            layoutControlItem8.MinSize = new System.Drawing.Size(50, 25);
+            layoutControlItem8.Name = "layoutControlItem8";
+            layoutControlItem8.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 14, 2);
+            layoutControlItem8.Size = new System.Drawing.Size(247, 57);
+            layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem8.Text = "信号类型";
+            layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem8.TextSize = new System.Drawing.Size(72, 14);
             // 
             // dxErrorProvider
             // 
-            this.dxErrorProvider.ContainerControl = this;
+            dxErrorProvider.ContainerControl = this;
             // 
             // SigEditor
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(257, 426);
-            this.Controls.Add(this.layoutControl1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Name = "SigEditor";
-            this.Text = "TaskEditor";
-            this.Load += new System.EventHandler(this.SatEditor_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
-            this.layoutControl1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.txtSigCheckType)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtSnr.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtFreqDown.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtFreqUp.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtBandHz.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.cbSigType.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
-            this.ResumeLayout(false);
-
+            AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            ClientSize = new System.Drawing.Size(287, 454);
+            Controls.Add(layoutControl1);
+            FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            Name = "SigEditor";
+            Text = "TaskEditor";
+            Load += SatEditor_Load;
+            ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit();
+            layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)txtSigCheckType).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtSnr.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtFreqDown.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtFreqUp.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtBandHz.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)cbSigType.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)Root).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit();
+            ((System.ComponentModel.ISupportInitialize)dxErrorProvider).EndInit();
+            ResumeLayout(false);
         }
 
         #endregion

+ 8 - 6
DW5S.App/EditForms/SigEditor.cs

@@ -1,5 +1,6 @@
 using DW5S.Entity;
 using DW5S.Repostory;
+using DW5S.ViewModel;
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
@@ -12,9 +13,9 @@ namespace DW5S.App.EditForms
     public partial class SigEditor : DevExpress.XtraEditors.XtraForm
     {
 
-        public SigInfo info;
+        public SigViewModel info;
 
-        private List<SigInfo> infos;
+        private List<SigViewModel> infos;
         public SigEditor()
         {
             InitializeComponent();
@@ -23,10 +24,10 @@ namespace DW5S.App.EditForms
             txtFreqDown.UseDoubleClickToSelectAll();
             txtSnr.UseDoubleClickToSelectAll();
             this.Text = "添加信号";
-            info = new SigInfo();
+            info = new SigViewModel();
             this.StartPosition = FormStartPosition.CenterParent;
         }
-        public SigEditor(SigInfo info)
+        public SigEditor(SigViewModel info)
             : this()
         {
             this.Text = "编辑信号";
@@ -50,11 +51,11 @@ namespace DW5S.App.EditForms
                 }
                 this.cbSigType.EditValue = info.SigType;
             }
-            infos = new List<SigInfo>();
+            infos = new List<SigViewModel>();
             var unitOfWork = IocContainer.UnitOfWork;
             var repsSig = unitOfWork.Of<SigInfo>();
             var res = await repsSig.GetAllAsync();
-            infos.AddRange(res);
+            infos.AddRange(res.To<List<SigViewModel>>());
         }
 
         private void btnCancel_Click(object sender, EventArgs e)
@@ -117,6 +118,7 @@ namespace DW5S.App.EditForms
                 }
                 info.SigCheckType = sigCheckType;
                 info.SigType = (EnumSigType)cbSigType.EditValue;
+                info.UpdateTime = DateTime.Now;
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)

+ 27 - 27
DW5S.App/EditForms/SigEditor.resx

@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <root>
-  <!-- 
-    Microsoft ResX Schema 
-    
+  <!--
+    Microsoft ResX Schema
+
     Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
+
+    The primary goals of this format is to allow a simple XML format
+    that is mostly human readable. The generation and parsing of the
+    various data types are done through the TypeConverter classes
     associated with the data types.
-    
+
     Example:
-    
+
     ... ado.net/XML headers & schema ...
     <resheader name="resmimetype">text/microsoft-resx</resheader>
     <resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
         <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
         <comment>This is a comment</comment>
     </data>
-                
-    There are any number of "resheader" rows that contain simple 
+
+    There are any number of "resheader" rows that contain simple
     name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
+
+    Each data row contains a name, and value. The row also contains a
+    type or mimetype. Type corresponds to a .NET class that support
+    text/value conversion through the TypeConverter architecture.
+    Classes that don't support this are serialized and stored with the
     mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
+
+    The mimetype is used for serialized objects, and tells the
+    ResXResourceReader how to depersist the object. This is currently not
     extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
+
+    Note - application/x-microsoft.net.object.binary.base64 is the format
+    that the ResXResourceWriter will generate, however the reader can
     read any of the formats listed below.
-    
+
     mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
+    value   : The object must be serialized with
             : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
-    
+
     mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
+    value   : The object must be serialized with
             : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
             : and then encoded with base64 encoding.
 
     mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
+    value   : The object must be serialized into a byte array
             : using a System.ComponentModel.TypeConverter
             : and then encoded with base64 encoding.
     -->

+ 3 - 3
DW5S.App/EditForms/TaskEditor.cs

@@ -71,9 +71,9 @@ namespace DW5S.App.EditForms
             var unitOfWork = IocContainer.UnitOfWork;
             var repsSat = unitOfWork.Of<SatInfo>();
             var sats = await repsSat.GetAllAsync();
-            this.txtMainSat.UseDefault().SetData(sats,displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
-            this.txtAdja1Sat.UseDefault().SetData(sats, displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
-            this.txtAdja2Sat.UseDefault().SetData(sats, displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+            this.txtMainSat.UseDefault().SetData(sats.ToList(), displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+            this.txtAdja1Sat.UseDefault().SetData(sats.ToList(), displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+            this.txtAdja2Sat.UseDefault().SetData(sats.ToList(), displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
             if (this.Text.StartsWith("编辑任务") && info != null)
             {
                 var satMain = sats.FirstOrDefault(w => w.SatCode == info.MainSat);

+ 10 - 10
DW5S.App/EditForms/TaskEditorSignal.cs

@@ -70,10 +70,10 @@ namespace DW5S.App.EditForms
                 listSigInfo.AddRange(items);
                 foreach (var item in listSigInfo)
                 {
-                    if (fixedStations.Any(p => p.FreqUpHz == item.FreqUp))
-                        item.IsFixedStationFreq = "✔";
-                    else
-                        item.IsFixedStationFreq = "✖";
+                    //if (fixedStations.Any(p => p.FreqUpHz == item.FreqUp))
+                    //    item.IsFixedStationFreq = "✔";
+                    //else
+                    //    item.IsFixedStationFreq = "✖";
                 }
                 foreach (var item in listSigInfoSelected)
                 {
@@ -105,12 +105,12 @@ namespace DW5S.App.EditForms
                 var res = gridViewTaskSignal.GetRow(selectedRows[i]) as SigInfo;
                 listSigInfoSelected.Add(res);
             }
-            int count = listSigInfoSelected.Count(s => s.IsFixedStationFreq.Trim() == "✔".Trim());
-            if (count >= 2)
-            {
-                DxHelper.MsgBoxHelper.ShowError("只支持一个固定站频点");
-                return;
-            }
+            //int count = listSigInfoSelected.Count(s => s.IsFixedStationFreq.Trim() == "✔".Trim());
+            //if (count >= 2)
+            //{
+            //    DxHelper.MsgBoxHelper.ShowError("只支持一个固定站频点");
+            //    return;
+            //}
             this.DialogResult = DialogResult.OK;
         }
 

+ 1 - 1
DW5S.App/ExtensionsDev/GridControlEx.cs

@@ -573,7 +573,7 @@ public static class GridControlEx
             {
                 try
                 {
-                    if (await HttpHelper.DownloadFileAsync(url, d.FileName))
+                    if (await HttpHelper.DownloadAsync(url, d.FileName))
                     {
                         var dir = Path.GetDirectoryName(d.FileName);
                         System.Diagnostics.Process.Start("explorer.exe", dir);

+ 3 - 19
DW5S.App/ExtensionsDev/SearchLookUpEditExtension.cs

@@ -71,7 +71,7 @@ namespace ExtensionsDev
             return ctrl;
         }
 
-        public static SearchLookUpEdit SetData<T>(this SearchLookUpEdit ctrl, IEnumerable<T> data, string valueField = "Id", string displayField = "")
+        public static SearchLookUpEdit SetData<T>(this SearchLookUpEdit ctrl, List<T> data, string displayField, string valueField = "This")
         {
             ctrl.Properties.ValueMember = valueField;
             ctrl.Properties.KeyMember = valueField;
@@ -82,25 +82,9 @@ namespace ExtensionsDev
             view.Tag = ctrl;
             view.OptionsView.ShowColumnHeaders = true;
             view.GridControl.UseDefault<T>(null);
-            ctrl.CustomDisplayText += (sender, e) =>
-            {
-                if (e.Value == null) return;
-                if (typeof(T) != e.Value.GetType())
-                {
-                    e.DisplayText = e.Value.ToString();
-                }
-                else if (string.IsNullOrWhiteSpace(displayField))
-                {
-                    e.DisplayText = e.Value.ToString();
-                }
-                else
-                {
-                    e.DisplayText = typeof(T).GetProperty(displayField).GetValue(e.Value).ToString();
-                }
-            };
             return ctrl;
         }
-        public static SearchLookUpEdit SetData<T>(this SearchLookUpEdit ctrl, Func<Task<List<T>>> onGetDataAsync, string valueField = "Id", string displayField = "")
+        public static SearchLookUpEdit SetData<T>(this SearchLookUpEdit ctrl, Func<Task<IEnumerable<T>>> onGetDataAsync, string displayField, string valueField = "This")
         {
             ctrl.Properties.ValueMember = valueField;
             ctrl.Properties.KeyMember = valueField;
@@ -167,7 +151,7 @@ namespace ExtensionsDev
             view.GridControl.HideColumn("CreateTime", "UpdateTime", "Enable", "Enabled", "IsEnable", "Remark");
             view.GridControl.HideColumn(p => p.FieldName.ToUpper().EndsWith("ID"));
             view.GridControl.HideColumn(p => p.ColumnType == typeof(List<>));
-            view.GridControl.HideColumn(p => p.ColumnType.BaseType != null && p.ColumnType.BaseType.Name.Contains("BaseEntity"));
+            //view.GridControl.HideColumn(p => p.ColumnType.BaseType != null && p.ColumnType.BaseType.Name.Contains("BaseEntity"));
             if (ctrl.Tag is RepositoryItemSearchLookUpEdit edit)
             {
                 var onGetData = (Func<dynamic>)edit.Tag;

+ 3 - 3
DW5S.App/UserControl/CtrlRefTask.cs

@@ -79,7 +79,7 @@ namespace DW5S.App.UserControl
                 var items = await unitOfWork.Of<RefTaskFreq>().AsQueryable()
                      .Include(r => r.SampleInfo)
                         .Include(r => r.SampleInfo.SigInfo)
-                        .Include(r => r.SampleInfo.RefTxInfo)
+                        .Include(r => r.SampleInfo.TxInfo)
                         .Include(r => r.SatInfo).OrderBy(p => p.Enable).ToListAsync();
                 list.AddRange(items);
 
@@ -203,11 +203,11 @@ namespace DW5S.App.UserControl
                 var query = unitOfWork.Of<RefTaskFreq>().AsQueryable();
                 if (reftxInfo != null)
                 {
-                    query.Where(r => r.SampleInfo.RefTxInfoID == reftxInfo.Id);
+                    query.Where(r => r.SampleInfo.TxInfoID == reftxInfo.Id);
                 }
                 var items = await query
                      .Include(r => r.SampleInfo.SigInfo)
-                        .Include(r => r.SampleInfo.RefTxInfo)
+                        .Include(r => r.SampleInfo.TxInfo)
                         .Include(r => r.SatInfo)
                         .OrderBy(p => p.Enable).ToListAsync();
                 list.Clear();

+ 13 - 12
DW5S.App/UserControl/CtrlSample.cs

@@ -1,6 +1,7 @@
 using DW5S.App.EditForms;
 using DW5S.Entity;
 using DW5S.Repostory;
+using DW5S.ViewModel;
 using Microsoft.EntityFrameworkCore;
 using System;
 using System.Collections.Generic;
@@ -13,7 +14,7 @@ namespace DW5S.App.UserControl
 {
     public partial class CtrlSample : DevExpress.XtraEditors.XtraUserControl
     {
-        readonly List<SampleInfo> listSampleInfo = new List<SampleInfo>();
+        readonly List<SampleViewModel> listSampleInfo = new List<SampleViewModel>();
         public CtrlSample()
         {
             InitializeComponent();
@@ -25,18 +26,18 @@ namespace DW5S.App.UserControl
             {
                 gridSample.UseDefault(listSampleInfo).UseMultiSelect().UseRowNumber()
           .UseAddAsync(AddSampleInfo)
-          .UseEditAsync<SampleInfo>(EditSampleInfo)
-          .UseDeleteAsync<SampleInfo>(DeleteSampleInfo);
+          .UseEditAsync<SampleViewModel>(EditSampleInfo)
+          .UseDeleteAsync<SampleViewModel>(DeleteSampleInfo);
 
 
                 var unitOfWork = IocContainer.UnitOfWork;
                 var items = await unitOfWork.Of<SampleInfo>().AsQueryable()
                       .Include(s => s.SigInfo)
-                        .Include(s => s.RefTxInfo)
+                        .Include(s => s.TxInfo)
                         .OrderBy(p => p.SampleName)
                         .ToListAsync();
 
-                listSampleInfo.AddRange(items);
+                listSampleInfo.AddRange(items.To<List<SampleViewModel>>());
 
                 gridViewSample.RefreshData();
             }
@@ -49,7 +50,7 @@ namespace DW5S.App.UserControl
 
 
 
-        private async Task<SampleInfo> AddSampleInfo()
+        private async Task<SampleViewModel> AddSampleInfo()
         {
             try
             {
@@ -65,7 +66,7 @@ namespace DW5S.App.UserControl
                     Fs = addItem.Fs,
                     StartSec = addItem.StartSec,
                     EndSec = addItem.EndSec,
-                    RefTxInfoID = addItem.RefTxInfoID,
+                    TxInfoID = addItem.RefTxInfoID,
                     SigInfoID = addItem.SigInfoID,
                     Remark = addItem.Remark,
                     UpdateTime = DateTime.Now,
@@ -81,7 +82,7 @@ namespace DW5S.App.UserControl
                 return null;
             }
         }
-        private async Task<SampleInfo> EditSampleInfo(SampleInfo editItem)
+        private async Task<SampleViewModel> EditSampleInfo(SampleViewModel editItem)
         {
             try
             {
@@ -90,7 +91,7 @@ namespace DW5S.App.UserControl
                 editItem = frm.info;
                 var unitOfWork = IocContainer.UnitOfWork;
                 editItem.UpdateTime = DateTime.Now;
-                await unitOfWork.Of<SampleInfo>().AddOrUpdateAsync(editItem);
+                await unitOfWork.Of<SampleInfo>().AddOrUpdateAsync(editItem.To<SampleInfo>());
                 await unitOfWork.SaveAsync();
                 return editItem;
             }
@@ -101,12 +102,12 @@ namespace DW5S.App.UserControl
                 return null;
             }
         }
-        private async Task<bool> DeleteSampleInfo(List<SampleInfo> list)
+        private async Task<bool> DeleteSampleInfo(List<SampleViewModel> list)
         {
             try
             {
                 var unitOfWork = IocContainer.UnitOfWork;
-                await unitOfWork.Of<SampleInfo>().DeleteAsync(list);
+                await unitOfWork.Of<SampleInfo>().DeleteAsync(list.To<List<SampleInfo>>());
                 await unitOfWork.SaveAsync();
                 return true;
             }
@@ -119,7 +120,7 @@ namespace DW5S.App.UserControl
         }
         private async void gridViewSignal_DoubleClick(object sender, EventArgs e)
         {
-            var editItem = gridViewSample.GetFocusedRow() as SampleInfo;
+            var editItem = gridViewSample.GetFocusedRow() as SampleViewModel;
             if (editItem == null) return;
             await EditSampleInfo(editItem);
         }

+ 14 - 21
DW5S.App/UserControl/CtrlSat.cs

@@ -11,12 +11,13 @@ using DW5S.Entity;
 using DW5S.Repostory;
 using DW5S.Service;
 using Serilog;
+using XdCxRhDW5S.Entity;
 
 namespace DW5S.App.UserControl
 {
     public partial class CtrlSat : DevExpress.XtraEditors.XtraUserControl
     {
-        readonly List<SatInfo> list = new List<SatInfo>();
+        readonly List<SatViewModel> list = new List<SatViewModel>();
         public CtrlSat()
         {
             InitializeComponent();
@@ -27,12 +28,12 @@ namespace DW5S.App.UserControl
             {
                 gridSat.UseDefault(list).UseMultiSelect().UseRowNumber()
                     .UseAddAsync(Add)
-                    .UseEditAsync<SatInfo>(Edit)
-                    .UseDeleteAsync<SatInfo>(Delete);
+                    .UseEditAsync<SatViewModel>(Edit)
+                    .UseDeleteAsync<SatViewModel>(Delete);
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSat = unitOfWork.Of<SatInfo>();
                 var items = await repsSat.GetAllAsync(p => p.SatName);
-                list.AddRange(items);
+                list.AddRange(items.To<List<SatViewModel>>());
             }
             catch (Exception ex)
             {
@@ -42,7 +43,7 @@ namespace DW5S.App.UserControl
             }
         }
 
-        private async Task<SatInfo> Add()
+        private async Task<SatViewModel> Add()
         {
             try
             {
@@ -51,9 +52,9 @@ namespace DW5S.App.UserControl
                 var addItem = frm.info;
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSat = unitOfWork.Of<SatInfo>();
-                await repsSat.AddOrUpdateAsync(addItem);
+                var satInfo = await repsSat.AddOrUpdateAsync(addItem.To<SatInfo>());
                 await unitOfWork.SaveAsync();
-
+                addItem.Id = satInfo.Id;
                 return addItem;
             }
             catch (Exception ex)
@@ -64,7 +65,7 @@ namespace DW5S.App.UserControl
             }
         }
 
-        private async Task<SatInfo> Edit(SatInfo editItem)
+        private async Task<SatViewModel> Edit(SatViewModel editItem)
         {
             try
             {
@@ -73,34 +74,26 @@ namespace DW5S.App.UserControl
                 editItem = frm.info;
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSat = unitOfWork.Of<SatInfo>();
-                var find = await repsSat.FirstOrDefaultAsync(p => p.Id == editItem.Id);
-                find.SatName = editItem.SatName;
-                find.SatCode = editItem.SatCode;
-                find.SatLon = editItem.SatLon;
-                find.UpdateTime = DateTime.Now;
-                await repsSat.AddOrUpdateAsync(find);
+                await repsSat.AddOrUpdateAsync(editItem.To<SatInfo>());
                 await unitOfWork.SaveAsync();
-
-
                 return editItem;
             }
             catch (Exception ex)
             {
-                IocContainer.Logger.Error(ex,"保存卫星信息异常");
+                IocContainer.Logger.Error(ex, "保存卫星信息异常");
                 DxHelper.MsgBoxHelper.ShowError("保存卫星信息异常");
                 return null;
             }
         }
 
-        private async Task<bool> Delete(List<SatInfo> list)
+        private async Task<bool> Delete(List<SatViewModel> list)
         {
             try
             {
                 var ids = list.Select(p => p.Id);
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSat = unitOfWork.Of<SatInfo>();
-                var delItems = await repsSat.FindAsync(p => ids.Contains(p.Id));
-                await repsSat.DeleteAsync(delItems);
+                await repsSat.DeleteAsync(list.To<List<SatInfo>>());
                 await unitOfWork.SaveAsync();
                 return true;
             }
@@ -114,7 +107,7 @@ namespace DW5S.App.UserControl
 
         private async void gridView1_DoubleClick(object sender, EventArgs e)
         {
-            var editItem = gridView1.GetFocusedRow() as SatInfo;
+            var editItem = gridView1.GetFocusedRow() as SatViewModel;
             if (editItem == null) return;
             await Edit(editItem);
         }

+ 46 - 42
DW5S.App/UserControl/CtrlSignal.cs

@@ -16,13 +16,14 @@ using DW5S.Repostory;
 using Serilog;
 using DevExpress.XtraBars.Customization;
 using DW5S.Service;
+using DW5S.ViewModel;
 
 namespace DW5S.App.UserControl
 {
     public partial class CtrlSignal : DevExpress.XtraEditors.XtraUserControl
     {
-        readonly List<SigInfo> listSigInfo = new List<SigInfo>();
-        readonly List<SigDelay> listSigDelay = new List<SigDelay>();
+        readonly List<SigViewModel> listSigInfo = new List<SigViewModel>();
+        readonly List<SigDelayViewModel> listSigDelay = new List<SigDelayViewModel>();
         public CtrlSignal()
         {
             InitializeComponent();
@@ -34,17 +35,17 @@ namespace DW5S.App.UserControl
             {
                 gridSignal.UseDefault(listSigInfo).UseMultiSelect().UseRowNumber()
                     .UseAddAsync(AddSigInfo)
-                    .UseEditAsync<SigInfo>(EditSigInfo)
-                    .UseDeleteAsync<SigInfo>(DeleteSigInfo);
+                    .UseEditAsync<SigViewModel>(EditSigInfo)
+                    .UseDeleteAsync<SigViewModel>(DeleteSigInfo);
                 gridSigDelay.UseDefault(listSigDelay).UseMultiSelect().UseRowNumber()
                    .UseAddAsync(AddSigDelay)
-                   .UseEditAsync<SigDelay>(EditSigDelay)
-                   .UseDeleteAsync<SigDelay>(DeleteSigDelay);
+                   .UseEditAsync<SigDelayViewModel>(EditSigDelay)
+                   .UseDeleteAsync<SigDelayViewModel>(DeleteSigDelay);
 
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSig = unitOfWork.Of<SigInfo>();
                 var items = await repsSig.GetAllAsync(p => p.FreqUp);
-                listSigInfo.AddRange(items);
+                listSigInfo.AddRange(items.To<List<SigViewModel>>());
                 var repsFixedStation = unitOfWork.Of<FixedStation>();
                 var fixedStations = await repsFixedStation.FindAsync(p => p.Enable);
                 foreach (var item in listSigInfo)
@@ -54,9 +55,23 @@ namespace DW5S.App.UserControl
                     else
                         item.IsFixedStationFreq = "✖";
                 }
-                //var delayItems = await db.SigDelays.ToListAsync();
-                //var delayRes = delayItems.Where(w => w.SigInfoID == items.FirstOrDefault().ID);
-                //listSigDelay.AddRange(delayRes);
+                if (listSigInfo.Count > 0)
+                {
+                    var repsSigDelay = unitOfWork.Of<SigDelay>();
+                    var repsSat = unitOfWork.Of<SatInfo>();
+                    var delayItems = await repsSigDelay.FindAsync(w => w.SigInfoId == listSigInfo.First().Id);
+                    var sats = await repsSat.GetAllAsync();
+                    foreach (var delayItem in delayItems)
+                    {
+                        SigDelay sigDelay = delayItem as SigDelay;
+                        var satInfo = sats.FirstOrDefault(f => f.SatCode == sigDelay.SatInfoSatCode);
+                        if (satInfo != null)
+                        {
+                            sigDelay.Sat = $"[{satInfo.SatLon}°]{satInfo.SatName}({satInfo.SatCode})";
+                        }
+                        listSigDelay.Add(sigDelay.To<SigDelayViewModel>());
+                    }
+                }
 
                 gridViewSignal.RefreshData();
             }
@@ -66,7 +81,7 @@ namespace DW5S.App.UserControl
                 DxHelper.MsgBoxHelper.ShowError("查询信号信息异常");
             }
         }
-        private async Task<SigInfo> AddSigInfo()
+        private async Task<SigViewModel> AddSigInfo()
         {
             try
             {
@@ -75,8 +90,9 @@ namespace DW5S.App.UserControl
                 var addItem = frm.info;
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSig = unitOfWork.Of<SigInfo>();
-                var sig = await repsSig.AddOrUpdateAsync(addItem);
+                var sig = await repsSig.AddOrUpdateAsync(addItem.To<SigInfo>());
                 await unitOfWork.SaveAsync();
+                addItem.Id = sig.Id;
                 return addItem;
             }
             catch (Exception ex)
@@ -86,7 +102,7 @@ namespace DW5S.App.UserControl
                 return null;
             }
         }
-        private async Task<SigInfo> EditSigInfo(SigInfo editItem)
+        private async Task<SigViewModel> EditSigInfo(SigViewModel editItem)
         {
             try
             {
@@ -95,14 +111,7 @@ namespace DW5S.App.UserControl
                 editItem = frm.info;
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSig = unitOfWork.Of<SigInfo>();
-                var find = await repsSig.FirstOrDefaultAsync(p => p.Id == editItem.Id);
-                find.FreqUp = editItem.FreqUp;
-                find.FreqDown = editItem.FreqDown;
-                find.SigType = editItem.SigType;
-                find.Band = editItem.Band;
-                find.Snr = editItem.Snr;
-                find.UpdateTime = DateTime.Now;
-                var sig = await repsSig.AddOrUpdateAsync(find);
+                var sig = await repsSig.AddOrUpdateAsync(editItem.To<SigInfo>());
                 await unitOfWork.SaveAsync();
 
                 return editItem;
@@ -114,7 +123,7 @@ namespace DW5S.App.UserControl
                 return null;
             }
         }
-        private async Task<bool> DeleteSigInfo(List<SigInfo> list)
+        private async Task<bool> DeleteSigInfo(List<SigViewModel> list)
         {
             try
             {
@@ -124,8 +133,7 @@ namespace DW5S.App.UserControl
                 var delayItems = await repsSigDelay.FindAsync(p => ids.Contains(p.SigInfoId));
                 await repsSigDelay.DeleteAsync(delayItems);
                 var repsSig = unitOfWork.Of<SigInfo>();
-                var delItems = await repsSig.FindAsync(p => ids.Contains(p.Id));
-                await repsSig.DeleteAsync(delItems);
+                await repsSig.DeleteAsync(list.To<List<SigInfo>>());
                 await unitOfWork.SaveAsync();
 
                 return true;
@@ -137,11 +145,11 @@ namespace DW5S.App.UserControl
                 return false;
             }
         }
-        private async Task<SigDelay> AddSigDelay()
+        private async Task<SigDelayViewModel> AddSigDelay()
         {
             try
             {
-                var sigInfoId = gridViewSignal.GetFocusedRow() as SigInfo;
+                var sigInfoId = gridViewSignal.GetFocusedRow() as SigViewModel;
                 if (sigInfoId == null) return null;
                 SigDelayEditor frm = new SigDelayEditor(sigInfoId.Id);
                 if (frm.ShowDialog() != DialogResult.OK) return null;
@@ -149,9 +157,9 @@ namespace DW5S.App.UserControl
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSigDelay = unitOfWork.Of<SigDelay>();
                 addItem.SigInfoId = sigInfoId.Id;
-                var sig = repsSigDelay.AddOrUpdateAsync(addItem);
+                var sigDelay = repsSigDelay.AddOrUpdateAsync(addItem.To<SigDelay>());
                 await unitOfWork.SaveAsync();
-
+                addItem.Id = sigDelay.Id;
                 return addItem;
             }
             catch (Exception ex)
@@ -161,21 +169,18 @@ namespace DW5S.App.UserControl
                 return null;
             }
         }
-        private async Task<SigDelay> EditSigDelay(SigDelay editItem)
+        private async Task<SigDelayViewModel> EditSigDelay(SigDelayViewModel editItem)
         {
             try
             {
-                var sigInfoId = gridViewSignal.GetFocusedRow() as SigInfo;
+                var sigInfoId = gridViewSignal.GetFocusedRow() as SigViewModel;
                 if (sigInfoId == null) return null;
                 SigDelayEditor frm = new SigDelayEditor(editItem, sigInfoId.Id);
                 if (frm.ShowDialog() != DialogResult.OK) return null;
                 editItem = frm.info;
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSigDelay = unitOfWork.Of<SigDelay>();
-                var find = await repsSigDelay.FirstOrDefaultAsync(p => p.Id == editItem.Id);
-                find.SigInfoId = editItem.SigInfoId;
-                find.SatInfoSatCode = editItem.SatInfoSatCode;
-                find.Delay = editItem.Delay;
+                await repsSigDelay.AddOrUpdateAsync(editItem.To<SigDelay>());
                 await unitOfWork.SaveAsync();
 
                 return editItem;
@@ -187,15 +192,14 @@ namespace DW5S.App.UserControl
                 return null;
             }
         }
-        private async Task<bool> DeleteSigDelay(List<SigDelay> list)
+        private async Task<bool> DeleteSigDelay(List<SigDelayViewModel> list)
         {
             try
             {
                 var ids = list.Select(p => p.Id);
                 var unitOfWork = IocContainer.UnitOfWork;
                 var repsSigDelay = unitOfWork.Of<SigDelay>();
-                var delItems = await repsSigDelay.FindAsync(p => ids.Contains(p.Id));
-                await repsSigDelay.DeleteAsync(delItems);
+                await repsSigDelay.DeleteAsync(list.To<SigDelay>());
                 await unitOfWork.SaveAsync();
 
                 return true;
@@ -211,12 +215,12 @@ namespace DW5S.App.UserControl
         private async void gridViewSignal_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
         {
             listSigDelay.Clear();
-            var sigInfoId = gridViewSignal.GetFocusedRow() as SigInfo;
+            var sigInfoId = gridViewSignal.GetFocusedRow() as SigViewModel;
             if (sigInfoId == null) return;
             var unitOfWork = IocContainer.UnitOfWork;
             var repsSigDelay = unitOfWork.Of<SigDelay>();
             var repsSat = unitOfWork.Of<SatInfo>();
-            var delayItems = await repsSigDelay.FindAsync(w => w.SigInfoId == sigInfoId.Id, p => p.SatInfo.SatName);
+            var delayItems = await repsSigDelay.FindAsync(w => w.SigInfoId == sigInfoId.Id);
             var sats = await repsSat.GetAllAsync();
             foreach (var delayItem in delayItems)
             {
@@ -226,21 +230,21 @@ namespace DW5S.App.UserControl
                 {
                     sigDelay.Sat = $"[{satInfo.SatLon}°]{satInfo.SatName}({satInfo.SatCode})";
                 }
-                listSigDelay.Add(sigDelay);
+                listSigDelay.Add(sigDelay.To<SigDelayViewModel>());
             }
             gridViewSigDelay.RefreshData();
         }
 
         private async void gridViewSignal_DoubleClick(object sender, EventArgs e)
         {
-            var editItem = gridViewSignal.GetFocusedRow() as SigInfo;
+            var editItem = gridViewSignal.GetFocusedRow() as SigViewModel;
             if (editItem == null) return;
             await EditSigInfo(editItem);
         }
 
         private async void gridViewSigDelay_DoubleClick(object sender, EventArgs e)
         {
-            var editItem = gridViewSigDelay.GetFocusedRow() as SigDelay;
+            var editItem = gridViewSigDelay.GetFocusedRow() as SigDelayViewModel;
             if (editItem == null) return;
             await EditSigDelay(editItem);
 

+ 1 - 0
DW5S.App/UserControl/CtrlSysSettings.cs

@@ -53,6 +53,7 @@ namespace DW5S.App.UserControl
                 {
                     this.txtHttpPort.Text = settings.HttpPort.ToString();
                     this.txtTimeZone.TimeZoneId = settings.TimeZoneID;
+                    this.txtSampleDire.Text = settings.SampleDirectory;
                     if (!string.IsNullOrEmpty(settings.XLDirectory))
                         this.txtXLDirectory.Text = settings.XLDirectory.ToString();
                     if (this.txtMapType.SelectedIndex == settings.MapType)

+ 0 - 247
DW5S.Basic/HttpHelper.cs

@@ -1,247 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net.Http;
-using System.Security.Policy;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-
-/// <summary>
-/// http调用帮助类
-/// </summary>
-public class HttpHelper
-{
-    /// <summary>
-    /// 文件删除模型
-    /// </summary>
-    class FileDeleteDto
-    {
-        /// <summary>
-        /// 要删除的服务器上的文件名称
-        /// </summary>
-        public List<string> Files { get; set; }
-    }
-    static HttpHelper()
-    {
-        client = new HttpClient(new HttpClientHandler()
-        {
-            UseCookies = false,
-            UseDefaultCredentials = false,
-            UseProxy = false,
-            AllowAutoRedirect = false,
-        });
-        client.Timeout = TimeSpan.FromSeconds(60);
-        //client.MaxResponseContentBufferSize //该值默认为2GB
-
-        downLoadClient = new HttpClient(new HttpClientHandler()
-        {
-            UseCookies = false,
-            UseDefaultCredentials = false,
-            UseProxy = false,
-            AllowAutoRedirect = false,
-        });
-        downLoadClient.Timeout = TimeSpan.FromSeconds(180);
-    }
-
-    private static HttpClient client;
-    private static HttpClient downLoadClient;
-
-    public static async Task<AjaxResult<T>> PostRequestAsync<T>(string url, object dto, CancellationToken token = default)
-    {
-        var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
-        var message = new HttpRequestMessage(HttpMethod.Post, url);
-        message.Content = content;
-        var response = await client.SendAsync(message, token);
-        message.Dispose();//http1.1没啥用,http2有用
-        response.EnsureSuccessStatusCode();
-        var result = await response.Content.ReadAsStringAsync();
-        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<T>>(result);
-        return AjaxResult;
-    }
-
-    public static async Task<AjaxResult> PostRequestAsync(string url, object dto, CancellationToken token = default)
-    {
-        var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
-        var message = new HttpRequestMessage(HttpMethod.Post, url);
-        message.Content = content;
-        var response = await client.SendAsync(message, token);
-        message.Dispose();//http1.1没啥用,http2有用
-        response.EnsureSuccessStatusCode();
-        var result = await response.Content.ReadAsStringAsync();
-        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult>(result);
-        return AjaxResult;
-    }
-
-    public static async Task<AjaxResult<T>> GetRequestAsync<T>(string url)
-    {
-        var response = await client.GetAsync(url);
-        response.EnsureSuccessStatusCode();
-        var result = await response.Content.ReadAsStringAsync();
-        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<T>>(result);
-        return AjaxResult;
-    }
-
-    public static async Task<bool> DownloadFileAsync(string baseUrl, string remoteFileName, string localFile)
-    {
-        baseUrl = baseUrl.Replace("/api", "");
-        if (!baseUrl.EndsWith("/"))
-            baseUrl += "/";
-        var server = new Uri(baseUrl + $"wwwroot/{remoteFileName}");
-        var responseMessage = await downLoadClient.GetAsync(server);
-        if (responseMessage.IsSuccessStatusCode)
-        {
-            using (var fs = File.Create(localFile))
-            {
-                // 获取结果,并转成 stream 保存到本地。
-                var streamFromService = await responseMessage.Content.ReadAsStreamAsync();
-                streamFromService.CopyTo(fs);
-            }
-            return true;
-        }
-        else
-            return false;
-    }
-    public static async Task<bool> DownloadFileAsync(string url, string localFile)
-    {
-        var server = new Uri(url);
-        var responseMessage = await downLoadClient.GetAsync(server);
-        if (responseMessage.IsSuccessStatusCode)
-        {
-            using (var fs = File.Create(localFile))
-            {
-                // 获取结果,并转成 stream 保存到本地。
-                var streamFromService = await responseMessage.Content.ReadAsStreamAsync();
-                streamFromService.CopyTo(fs);
-            }
-            return true;
-        }
-        else
-            return false;
-    }
-    /// <summary>
-    /// 上传文件,wav文件会自动去掉44字节头
-    /// </summary>
-    /// <param name="localFile"></param>
-    /// <param name="baseUrl"></param>
-    /// <param name="token"></param>
-    /// <returns></returns>
-    public static async Task<string> UploadFileAsync(string localFile, string baseUrl, CancellationToken token = default)
-    {
-        string uploadUrl = baseUrl;
-        if (baseUrl.EndsWith("/"))
-            uploadUrl += "File/UploadFileAsync";
-        else
-            uploadUrl += "/File/UploadFileAsync";
-        try
-        {
-            // 添加文件内容到 MultipartFormDataContent
-            FileInfo info = new FileInfo(localFile);
-            bool isWav = info.Extension.ToLower() == ".wav";
-            byte[] fileBytes = File.ReadAllBytes(localFile);
-            if (isWav)
-            {
-                fileBytes = fileBytes.Skip(44).ToArray();//wav文件有44字节头
-            }
-            MultipartFormDataContent content = new MultipartFormDataContent();
-            ByteArrayContent fileContent = new ByteArrayContent(fileBytes);
-            content.Add(fileContent, "file", Path.GetFileName(localFile));
-            var message = new HttpRequestMessage(HttpMethod.Post, uploadUrl);
-            message.Content = content;
-            var response = await downLoadClient.SendAsync(message, token);
-            message.Dispose();
-            response.EnsureSuccessStatusCode();
-            var result = await response.Content.ReadAsStringAsync();
-            var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<string>>(result);
-            if (AjaxResult.code == 200)
-            {
-                return AjaxResult.data;
-            }
-            else
-            {
-                throw new Exception(AjaxResult.msg);
-            }
-        }
-        catch (TaskCanceledException)
-        {
-            if (token != default && token.IsCancellationRequested)
-                throw new TaskCanceledException();
-            else
-                throw new Exception($"上传文件{Path.GetFileName(localFile)}到{uploadUrl}超时!");
-
-        }
-        catch (Exception ex)
-        {
-            throw new Exception($"上传文件{Path.GetFileName(localFile)}到{uploadUrl}失败!", ex);
-        }
-    }
-
-    /// <summary>
-    /// 删除文件
-    /// </summary>
-    /// <param name="files">要删除的文件</param>
-    /// <param name="baseUrl">baseUrl</param>
-    /// <returns></returns>
-    public static async Task<int> DeleteFileAsync(string baseUrl, params string[] files)
-    {
-        FileDeleteDto dto = new FileDeleteDto()
-        {
-            Files = files.ToList()
-        };
-        var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
-        var message = new HttpRequestMessage(HttpMethod.Post, baseUrl + "/File/DeleteFiles");
-        message.Content = content;
-        var response = await client.SendAsync(message);
-        message.Dispose();
-        response.EnsureSuccessStatusCode();
-        var result = await response.Content.ReadAsStringAsync();
-        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<int>>(result);
-        return AjaxResult.data;
-    }
-}
-
-/// <summary>
-/// Http接口返回泛型对象
-/// </summary>
-public class AjaxResult<T>
-{
-    /// <summary>
-    /// 返回对象
-    /// </summary>
-    public T data { get; set; }
-
-    /// <summary>
-    /// 返回消息
-    /// </summary>
-    public string msg { get; set; } = "ok";
-
-    /// <summary>
-    /// 状态码.成功=200,失败=0
-    /// </summary>
-    public int code { get; set; } = 200;
-
-}
-/// <summary>
-/// Http接口返回对象
-/// </summary>
-public class AjaxResult
-{
-    /// <summary>
-    /// 返回对象
-    /// </summary>
-    public object data { get; set; }
-
-    /// <summary>
-    /// 返回消息
-    /// </summary>
-    public string msg { get; set; } = "ok";
-
-    /// <summary>
-    /// 状态码.成功=200,失败=0
-    /// </summary>
-    public int code { get; set; } = 200;
-
-}
-

+ 10 - 3
DW5S.Basic/SysConfig.cs

@@ -28,13 +28,20 @@ public static class SysConfig
     }
     public static string GetUrl(string url)
     {
-        if (url.StartsWith("/"))
+        if (!url.ToLower().StartsWith("http"))
         {
-            return $"http://{IpHelper.GetLocalIp()}:{AppConfigHelper.Get("HttpPort", 8090)}/api{url}";
+            return url;
         }
         else
         {
-            return $"http://{IpHelper.GetLocalIp()}:{AppConfigHelper.Get("HttpPort", 8090)}/api/{url}";
+            if (url.StartsWith("/"))
+            {
+                return $"{GetBaseUrl}{url}";
+            }
+            else
+            {
+                return $"{GetBaseUrl}{url}/{url}";
+            }
         }
     }
 }

+ 2 - 2
DW5S.Controller/DetectCgController.cs

@@ -197,7 +197,7 @@ namespace DW5S.Controllers
                 var svr = ServerContext.Instance.GetRandomOne(EnumSvrType.CheckSvr);
                 dto.File = await HttpHelper.UploadFileAsync(GetLocalFile(dto.File), svr.BaseHttpAddr);
                 var res = await HttpHelper.PostRequestAsync<SigFilterResponseDto>(svr.BaseHttpAddr + "Check/SigFilterProc", dto);
-                await HttpHelper.DownloadFileAsync(svr.BaseHttpAddr, res.data.File, GetLocalFile(res.data.File));
+                await HttpHelper.DownloadWithNameAsync(res.data.File, GetLocalFile(res.data.File));
                 return res;
             }
             catch (TaskCanceledException)
@@ -217,7 +217,7 @@ namespace DW5S.Controllers
             var svr = ServerContext.Instance.GetRandomOne(EnumSvrType.CheckSvr);
             dto.File = await HttpHelper.UploadFileAsync(GetLocalFile(dto.File), svr.BaseHttpAddr);
             var res = await HttpHelper.PostRequestAsync<ResampleResponseDto>(svr.BaseHttpAddr + "Check/Resample", dto);
-            await HttpHelper.DownloadFileAsync(svr.BaseHttpAddr, res.data.File, GetLocalFile(res.data.File));
+            await HttpHelper.DownloadWithNameAsync(res.data.File, GetLocalFile(res.data.File));
             return res;
         }
     }

+ 20 - 0
DW5S.Controller/TaskController.cs

@@ -15,6 +15,8 @@ using Microsoft.AspNetCore.Mvc;
 using Serilog;
 using Serilog.Core;
 using DW5S.Service;
+using Newtonsoft.Json;
+using System.Security.Policy;
 
 namespace DW5S.Controllers
 {
@@ -27,6 +29,15 @@ namespace DW5S.Controllers
 
         IUnitOfWork unitOfWork { get; set; }
 
+        [Autowired]
+        HttpClient client { get; set; }
+
+        [HttpGet]
+        public AjaxResult<string> Test()
+        {
+            return Success("1");
+        }
+
         /// <summary>
         /// 获取客户端IP地址
         /// </summary>
@@ -36,6 +47,15 @@ namespace DW5S.Controllers
         {
             try
             {
+                while (true)
+                {
+                    var factory = IocContainer.GetService<IHttpClientFactory>();
+                    var client1 = factory.CreateClient("");
+                    var response = client1.GetAsync("http://192.168.1.7:8090/api/task/test").Result;
+                    response.EnsureSuccessStatusCode();
+                    var result = response.Content.ReadAsStringAsync().Result;
+                };
+
                 var ip = RemoteIp;
                 return Success(ip);
             }

+ 8 - 8
DW5S.Entity/RefTaskFreq.cs

@@ -30,18 +30,18 @@ namespace DW5S.Entity
         [Display(Name = "样本名称")]
         public string SampleName => SampleInfo.SampleName;
 
-        [Display(Name = "参考站")]
-        public string RefName => SampleInfo.RefName;
+        //[Display(Name = "参考站")]
+        //public string RefName => SampleInfo.RefName;
 
-        [Display(Name = "上行频点(MHz)")]
-        public double FreqUpDis => SampleInfo.FreqUpDis;
+        //[Display(Name = "上行频点(MHz)")]
+        //public double FreqUpDis => SampleInfo.FreqUpDis;
 
 
-        [Display(Name = "下行频点(MHz)")]
-        public double FreqDownDis => SampleInfo.FreqDownDis;
+        //[Display(Name = "下行频点(MHz)")]
+        //public double FreqDownDis => SampleInfo.FreqDownDis;
 
-        [Display(Name = "带宽(Hz)")]
-        public double Band => SampleInfo.Band;
+        //[Display(Name = "带宽(Hz)")]
+        //public double Band => SampleInfo.Band;
 
         /// <summary>
         /// 卫星

+ 27 - 47
DW5S.Entity/SampleInfo.cs

@@ -15,68 +15,48 @@ namespace DW5S.Entity
     [Table("SampleInfo")]
     public class SampleInfo : BaseEntity
     {
-
-        [Display(Name = "样本名称")]
+        /// <summary>
+        /// 样本名称
+        /// </summary>
+        
         public string SampleName { get; set; }
 
-        [Display(Name = "参考站", AutoGenerateField = false)]
-        public int RefTxInfoID { get; set; }
-
-        [Display(AutoGenerateField = false)]
-        [JsonIgnore]
-        public virtual TxInfo RefTxInfo { get; set; }
+        /// <summary>
+        /// 参考站编号
+        /// </summary>
+        public int TxInfoID { get; set; }
 
-        [Display(Name = "参考站")]
-        public string RefName => RefTxInfo.Name;
+        public virtual TxInfo TxInfo { get; set; }
         /// <summary>
         /// 信号编号
         /// </summary>
-        [Display(Name = "信号编号", AutoGenerateField = false)]
         public int SigInfoID { get; set; }
 
-        [Display(AutoGenerateField = false)]
-        [JsonIgnore]
         public virtual SigInfo SigInfo { get; set; }
-
-
-        [Display(Name = "上行频点(MHz)")]
-        public double FreqUpDis => SigInfo.FreqUpDis;
-
-
-        [Display(Name = "下行频点(MHz)")]
-        public double FreqDownDis => SigInfo.FreqDownDis;
-
-        [Display(Name = "带宽(Hz)")]
-        public double Band => SigInfo.Band;
-
-
-        [DisplayName("采样率(Hz)")]
+        /// <summary>
+        /// 采样率(Hz)
+        /// </summary>
         public double Fs { get; set; }
-
-        [DisplayName("开始秒数")]
+        /// <summary>
+        /// 开始秒数
+        /// </summary>
         public int StartSec { get; set; }
-
-        [DisplayName("结束秒数")]
+        /// <summary>
+        /// 结束秒数
+        /// </summary>
         public int EndSec { get; set; }
-
-        [Display(Name = "样本文件", AutoGenerateField = false), MaxLength(200)]
+        /// <summary>
+        /// 样本文件
+        /// </summary>
         public string SampleFileName { get; set; }
-
-        [Display(Name = "样本路径", AutoGenerateField = false)]
+        /// <summary>
+        /// 样本路径
+        /// </summary>
         public string SamplePath { get; set; }
-
-        [Display(Name = "样本")]
-        public string SampleFileDis => Path.Combine(SamplePath, SampleFileName);
-
-        [Display(Name = "备注"), MaxLength(200)]
+        /// <summary>
+        /// 备注
+        /// </summary>
         public string Remark { get; set; }
 
-
-        public override string ToString()
-        {
-            return $"{SampleName}";
-        }
-
-
     }
 }

+ 0 - 4
DW5S.Entity/SigDelay.cs

@@ -20,8 +20,6 @@ namespace DW5S.Entity
         /// </summary>
         public int SigInfoId { get; set; }
 
-        public virtual SigInfo SigInfo { get; set; }
-
         /// <summary>
         /// 卫星编号
         /// </summary>
@@ -32,8 +30,6 @@ namespace DW5S.Entity
         /// </summary>
         public string Sat { get; set; }
 
-        public virtual SatInfo SatInfo { get; set; }
-
         /// <summary>
         /// 转发延迟(us)
         /// </summary>

+ 18 - 25
DW5S.Entity/SigInfo.cs

@@ -6,38 +6,31 @@ namespace DW5S.Entity
     [Table("SigInfo")]
     public class SigInfo : BaseEntity
     {
-        [Display(Name = "上行频点(Hz)", AutoGenerateField = false)]
+        /// <summary>
+        /// 上行频点(Hz)
+        /// </summary>
         public long FreqUp { get; set; }
+        /// <summary>
+        /// 下行频点(Hz)
+        /// </summary>
 
-        [Display(Name = "上行频点(MHz)")]
-        public double FreqUpDis => FreqUp / 1e6;
-
-        [Display(Name = "下行频点(Hz)", AutoGenerateField = false)]
         public long FreqDown { get; set; }
-
-        [Display(Name = "下行频点(MHz)")]
-        public double FreqDownDis => FreqDown / 1e6;
-
-        [Display(Name = "信号类型")]
+        /// <summary>
+        /// 信号类型
+        /// </summary>
         public EnumSigType SigType { get; set; }
+        /// <summary>
+        /// /信号检测类型
+        /// </summary>
 
-        [Display(Name = "信号检测类型")]
         public EnumSigCheckType SigCheckType { get; set; }
-
-        [Display(Name = "门限(dB)")]
+        /// <summary>
+        /// 门限(dB)
+        /// </summary>
         public double Snr { get; set; }
-
-
-        [Display(Name = "带宽(Hz)")]
+        /// <summary>
+        /// 带宽(Hz)
+        /// </summary>
         public double Band { get; set; }
-
-        [NotMapped]
-        [Display(Name = "是否是固定站")]
-        public string IsFixedStationFreq { get; set; }
-
-        public override string ToString()
-        {
-            return $"上行{FreqUpDis}MHz 下行{FreqDownDis}MHz 带宽{Band}Hz";
-        }
     }
 }

+ 334 - 0
DW5S.Service/HttpHelper.cs

@@ -0,0 +1,334 @@
+using DW5S.Repostory;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net.Http;
+using System.Security.Policy;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+/// <summary>
+/// http调用帮助类
+/// </summary>
+public class HttpHelper
+{
+    /// <summary>
+    /// 文件删除模型
+    /// </summary>
+    class FileDeleteDto
+    {
+        /// <summary>
+        /// 要删除的服务器上的文件名称
+        /// </summary>
+        public List<string> Files { get; set; }
+    }
+    static HttpHelper()
+    {
+        //client = new HttpClient(new HttpClientHandler()
+        //{
+        //    UseCookies = false,
+        //    UseDefaultCredentials = false,
+        //    UseProxy = false,
+        //    AllowAutoRedirect = false,
+        //});
+        //client.Timeout = TimeSpan.FromSeconds(60);
+        ////client.MaxResponseContentBufferSize //该值默认为2GB
+
+        //downLoadClient = new HttpClient(new HttpClientHandler()
+        //{
+        //    UseCookies = false,
+        //    UseDefaultCredentials = false,
+        //    UseProxy = false,
+        //    AllowAutoRedirect = false,
+        //});
+        //downLoadClient.Timeout = TimeSpan.FromSeconds(180);
+    }
+    private static readonly string httpKey = "DW5S";
+    private static readonly string httpFileKey = "DW5S_File";
+
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <typeparam name="T"></typeparam>
+    /// <param name="url"></param>
+    /// <param name="dto"></param>
+    /// <param name="token"></param>
+    /// <returns></returns>
+    public static async Task<AjaxResult<T>> PostRequestAsync<T>(string url, object dto, CancellationToken token = default)
+    {
+        url = SysConfig.GetUrl(url);
+        var factory = IocContainer.GetService<IHttpClientFactory>();
+        var client = factory.CreateClient(httpKey);
+        var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
+        var message = new HttpRequestMessage(HttpMethod.Post, url);
+        message.Content = content;
+        var response = await client.SendAsync(message, token);
+        message.Dispose();//http1.1没啥用,http2有用
+        response.EnsureSuccessStatusCode();
+        var result = await response.Content.ReadAsStringAsync();
+        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<T>>(result);
+        return AjaxResult;
+    }
+
+    public static async Task<AjaxResult> PostRequestAsync(string url, object dto, CancellationToken token = default)
+    {
+        url = SysConfig.GetUrl(url);
+        var factory = IocContainer.GetService<IHttpClientFactory>();
+        var client = factory.CreateClient(httpKey);
+
+        var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
+        var message = new HttpRequestMessage(HttpMethod.Post, url);
+        message.Content = content;
+        var response = await client.SendAsync(message, token);
+        message.Dispose();//http1.1没啥用,http2有用
+        response.EnsureSuccessStatusCode();
+        var result = await response.Content.ReadAsStringAsync();
+        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult>(result);
+        return AjaxResult;
+    }
+
+    public static async Task<AjaxResult<T>> GetRequestAsync<T>(string url)
+    {
+        url = SysConfig.GetUrl(url);
+        var factory = IocContainer.GetService<IHttpClientFactory>();
+        var client = factory.CreateClient(httpKey);
+
+        var response = await client.GetAsync(url);
+        response.EnsureSuccessStatusCode();
+        var result = await response.Content.ReadAsStringAsync();
+        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<T>>(result);
+        return AjaxResult;
+    }
+
+    public static async Task<bool> DownloadWithNameAsync(string remoteFileName, string localFile)
+    {
+        string url = SysConfig.GetUrl($"upload/{remoteFileName}");
+        var factory = IocContainer.GetService<IHttpClientFactory>();
+        var client = factory.CreateClient(httpFileKey);
+        var responseMessage = await client.GetAsync(url);
+        if (responseMessage.IsSuccessStatusCode)
+        {
+            using (var fs = File.Create(localFile))
+            {
+                // 获取结果,并转成 stream 保存到本地。
+                var streamFromService = await responseMessage.Content.ReadAsStreamAsync();
+                streamFromService.CopyTo(fs);
+            }
+            return true;
+        }
+        else
+            return false;
+    }
+    public static async Task<bool> DownloadAsync(string url, string localFile)
+    {
+        var factory = IocContainer.GetService<IHttpClientFactory>();
+        var client = factory.CreateClient(httpFileKey);
+        var responseMessage = await client.GetAsync(url);
+        if (responseMessage.IsSuccessStatusCode)
+        {
+            using (var fs = File.Create(localFile))
+            {
+                // 获取结果,并转成 stream 保存到本地。
+                var streamFromService = await responseMessage.Content.ReadAsStreamAsync();
+                streamFromService.CopyTo(fs);
+            }
+            return true;
+        }
+        else
+            return false;
+    }
+    private static string GetMimeType(string fileName)
+    {
+        string ext = Path.GetExtension(fileName).ToLower();
+        return ext switch
+        {
+            ".txt" => "text/plain",
+            ".jpg" or ".jpeg" => "image/jpeg",
+            ".png" => "image/png",
+            ".pdf" => "application/pdf",
+            _ => "application/octet-stream"
+        };
+    }
+
+    public static async Task<string> UploadFileAsync(string localFile, string baseUrl, CancellationToken token = default)
+    {
+        string url = SysConfig.GetUrl("File/UploadFileAsync");
+        try
+        {
+            var factory = IocContainer.GetService<IHttpClientFactory>();
+            var client = factory.CreateClient(httpFileKey);
+            using (var fileStream = File.OpenRead(localFile))
+            using (var fileContent = new StreamContent(fileStream))
+            {
+                // 3. (可选)设置文件 MIME 类型
+                string fileName = Path.GetFileName(localFile);
+                string contentType = GetMimeType(fileName);
+                fileContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(contentType);
+
+                // 4. 构造 MultipartFormDataContent
+                using var formData = new MultipartFormDataContent();
+                formData.Add(fileContent, "file", fileName);
+                var response = await client.PostAsync(url, formData);
+                if (response.IsSuccessStatusCode)
+                {
+                    string responseBody = await response.Content.ReadAsStringAsync();
+                    var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<string>>(responseBody);
+                    if (AjaxResult.code == 200)
+                    {
+                        return AjaxResult.data;
+                    }
+                    else
+                    {
+                        throw new Exception(AjaxResult.msg);
+                    }
+                }
+                else
+                {
+                    throw new Exception($"上传文件{Path.GetFileName(localFile)}到{url}失败!");
+                }
+            }
+        }
+        catch (TaskCanceledException)
+        {
+            if (token != default && token.IsCancellationRequested)
+                throw new TaskCanceledException();
+            else
+                throw new Exception($"上传文件{Path.GetFileName(localFile)}到{url}超时!");
+
+        }
+        catch (Exception ex)
+        {
+            throw new Exception($"上传文件{Path.GetFileName(localFile)}到{url}失败!", ex);
+        }
+    }
+
+    ///// <summary>
+    ///// 上传文件,wav文件会自动去掉44字节头
+    ///// </summary>
+    ///// <param name="localFile"></param>
+    ///// <param name="baseUrl"></param>
+    ///// <param name="token"></param>
+    ///// <returns></returns>
+    //public static async Task<string> UploadFileAsync(string localFile, string baseUrl, CancellationToken token = default)
+    //{
+    //    string uploadUrl = baseUrl;
+    //    if (baseUrl.EndsWith("/"))
+    //        uploadUrl += "File/UploadFileAsync";
+    //    else
+    //        uploadUrl += "/File/UploadFileAsync";
+    //    try
+    //    {
+    //        // 添加文件内容到 MultipartFormDataContent
+    //        FileInfo info = new FileInfo(localFile);
+    //        bool isWav = info.Extension.ToLower() == ".wav";
+    //        byte[] fileBytes = File.ReadAllBytes(localFile);
+    //        if (isWav)
+    //        {
+    //            fileBytes = fileBytes.Skip(44).ToArray();//wav文件有44字节头
+    //        }
+    //        MultipartFormDataContent content = new MultipartFormDataContent();
+    //        ByteArrayContent fileContent = new ByteArrayContent(fileBytes);
+    //        content.Add(fileContent, "file", Path.GetFileName(localFile));
+    //        var message = new HttpRequestMessage(HttpMethod.Post, uploadUrl);
+    //        message.Content = content;
+    //        var response = await downLoadClient.SendAsync(message, token);
+    //        message.Dispose();
+    //        response.EnsureSuccessStatusCode();
+    //        var result = await response.Content.ReadAsStringAsync();
+    //        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<string>>(result);
+    //        if (AjaxResult.code == 200)
+    //        {
+    //            return AjaxResult.data;
+    //        }
+    //        else
+    //        {
+    //            throw new Exception(AjaxResult.msg);
+    //        }
+    //    }
+    //    catch (TaskCanceledException)
+    //    {
+    //        if (token != default && token.IsCancellationRequested)
+    //            throw new TaskCanceledException();
+    //        else
+    //            throw new Exception($"上传文件{Path.GetFileName(localFile)}到{uploadUrl}超时!");
+
+    //    }
+    //    catch (Exception ex)
+    //    {
+    //        throw new Exception($"上传文件{Path.GetFileName(localFile)}到{uploadUrl}失败!", ex);
+    //    }
+    //}
+
+    /// <summary>
+    /// 删除文件
+    /// </summary>
+    /// <param name="files">要删除的文件</param>
+    /// <param name="baseUrl">baseUrl</param>
+    /// <returns></returns>
+    public static async Task<int> DeleteFileAsync(params string[] files)
+    {
+        string url = SysConfig.GetUrl("File/DeleteFiles");
+        var factory = IocContainer.GetService<IHttpClientFactory>();
+        var client = factory.CreateClient(httpKey);
+        FileDeleteDto dto = new FileDeleteDto()
+        {
+            Files = files.ToList()
+        };
+        var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
+        var message = new HttpRequestMessage(HttpMethod.Post, url);
+        message.Content = content;
+        var response = await client.SendAsync(message);
+        message.Dispose();
+        response.EnsureSuccessStatusCode();
+        var result = await response.Content.ReadAsStringAsync();
+        var AjaxResult = JsonConvert.DeserializeObject<AjaxResult<int>>(result);
+        return AjaxResult.data;
+    }
+}
+
+/// <summary>
+/// Http接口返回泛型对象
+/// </summary>
+public class AjaxResult<T>
+{
+    /// <summary>
+    /// 返回对象
+    /// </summary>
+    public T data { get; set; }
+
+    /// <summary>
+    /// 返回消息
+    /// </summary>
+    public string msg { get; set; } = "ok";
+
+    /// <summary>
+    /// 状态码.成功=200,失败=0
+    /// </summary>
+    public int code { get; set; } = 200;
+
+}
+/// <summary>
+/// Http接口返回对象
+/// </summary>
+public class AjaxResult
+{
+    /// <summary>
+    /// 返回对象
+    /// </summary>
+    public object data { get; set; }
+
+    /// <summary>
+    /// 返回消息
+    /// </summary>
+    public string msg { get; set; } = "ok";
+
+    /// <summary>
+    /// 状态码.成功=200,失败=0
+    /// </summary>
+    public int code { get; set; } = 200;
+
+}
+

+ 5 - 0
DW5S.ViewModel/09.DW5S.ViewModel.csproj

@@ -7,4 +7,9 @@
     <RootNamespace>DW5S.ViewModel</RootNamespace>
   </PropertyGroup>
 
+  <ItemGroup>
+    <ProjectReference Include="..\DW5S.DTO\02.DW5S.DTO.csproj" />
+    <ProjectReference Include="..\DW5S.Entity\03.DW5S.Entity.csproj" />
+  </ItemGroup>
+
 </Project>

+ 5 - 3
DW5S.ViewModel/BaseViewModel.cs

@@ -1,4 +1,5 @@
-using System;
+using DW5S.Entity;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Linq;
@@ -7,10 +8,10 @@ using System.Threading.Tasks;
 
 namespace DW5S.ViewModel
 {
-    public class BaseViewModel
+    public  class BaseViewModel<T>
     {
         [Display(Name = "编号")]
-        public long Id { get; set; }
+        public T Id { get; set; }
 
         [Display(Name = "创建时间")]
         public DateTime CreateTime { get; set; }
@@ -18,4 +19,5 @@ namespace DW5S.ViewModel
         [Display(Name = "更新时间")]
         public DateTime UpdateTime { get; set; }
     }
+
 }

+ 1 - 1
DW5S.ViewModel/CdbTxViewModel.cs

@@ -10,7 +10,7 @@ using System.Threading.Tasks;
 
 namespace DW5S.Entity
 {
-    public class CdbTxViewModel : BaseViewModel
+    public class CdbTxViewModel : BaseViewModel<int>
     {
 
         [Display(Name = "超短波站名称")]

+ 1 - 1
DW5S.ViewModel/CxTxViewModel.cs

@@ -9,7 +9,7 @@ using System.Threading.Tasks;
 
 namespace DW5S.Entity
 {
-    public class CxTxViewModel : BaseViewModel
+    public class CxTxViewModel :  BaseViewModel<int>
     {
 
         [Display(Name = "测向站名称")]

+ 1 - 1
DW5S.ViewModel/RecTxViewModel.cs

@@ -12,7 +12,7 @@ namespace DW5S.Entity
     /// <summary>
     /// 天线信息
     /// </summary>
-    public class RecTxViewModel : BaseViewModel
+    public class RecTxViewModel : BaseViewModel<int>
     {
         [Display(Name = "接收站名称")]
         public string Name { get; set; }

+ 1 - 1
DW5S.ViewModel/RefTxViewModel.cs

@@ -9,7 +9,7 @@ using System.Threading.Tasks;
 
 namespace DW5S.Entity
 {
-    public class RefTxViewModel : BaseViewModel
+    public class RefTxViewModel  : BaseViewModel<int>
     {
 
         [Display(Name = "参考站名称")]

+ 74 - 0
DW5S.ViewModel/SampleViewModel.cs

@@ -0,0 +1,74 @@
+using DW5S.Entity;
+using Newtonsoft.Json;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+
+namespace DW5S.ViewModel
+{
+    public class SampleViewModel : BaseViewModel<int>
+    {
+
+        [Display(Name = "样本名称")]
+        public string SampleName { get; set; }
+
+        [Display(Name = "参考站", AutoGenerateField = false)]
+        public int RefTxInfoID { get; set; }
+
+        [Display(AutoGenerateField = false)]
+        [JsonIgnore]
+        public virtual TxInfo RefTxInfo { get; set; }
+
+        [Display(Name = "参考站")]
+        public string RefName => RefTxInfo.Name;
+        /// <summary>
+        /// 信号编号
+        /// </summary>
+        [Display(Name = "信号编号", AutoGenerateField = false)]
+        public int SigInfoID { get; set; }
+
+        [Display(AutoGenerateField = false)]
+        [JsonIgnore]
+        public virtual SigInfo SigInfo { get; set; }
+
+
+        [Display(Name = "上行频点(MHz)")]
+        public double FreqUpDis => SigInfo.FreqUp / 1e6;
+
+
+        [Display(Name = "下行频点(MHz)")]
+        public double FreqDownDis => SigInfo.FreqDown / 1e6;
+
+        [Display(Name = "带宽(Hz)")]
+        public double Band => SigInfo.Band;
+
+
+        [DisplayName("采样率(Hz)")]
+        public double Fs { get; set; }
+
+        [DisplayName("开始秒数")]
+        public int StartSec { get; set; }
+
+        [DisplayName("结束秒数")]
+        public int EndSec { get; set; }
+
+        [Display(Name = "样本文件", AutoGenerateField = false), MaxLength(200)]
+        public string SampleFileName { get; set; }
+
+        [Display(Name = "样本路径", AutoGenerateField = false)]
+        public string SamplePath { get; set; }
+
+        [Display(Name = "样本")]
+        public string SampleFileDis => Path.Combine(SamplePath, SampleFileName);
+
+        [Display(Name = "备注"), MaxLength(200)]
+        public string Remark { get; set; }
+
+
+        public override string ToString()
+        {
+            return $"{SampleName}";
+        }
+
+
+    }
+}

+ 38 - 0
DW5S.ViewModel/SatViewModel.cs

@@ -0,0 +1,38 @@
+using DW5S.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XdCxRhDW5S.Entity
+{
+    public class SatViewModel : BaseViewModel<int>
+    {
+        [Display(Name = "卫星编号")]
+        public int SatCode { get; set; }
+
+        [Display(Name = "卫星名称")]
+        public string SatName { get; set; }
+
+        [Display(Name = "轨道经度")]
+        public double? SatLon { get; set; }
+
+        [Display(Name = "卫星本振(MHz)")]
+        public double? SatTrans { get; set; }
+
+        [Display(Name = "卫星")]
+        public string Sat
+        {
+            get
+            {
+                if (SatLon == null)
+                    return $"{SatName}({SatCode})";
+                else
+                    return $"[{SatLon}°]{SatName}({SatCode})";
+            }
+        }
+    }
+}

+ 52 - 0
DW5S.ViewModel/SigDelayViewModel.cs

@@ -0,0 +1,52 @@
+using DW5S.Entity;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DW5S.ViewModel
+{
+    /// <summary>
+    /// 信号转发延迟信息
+    /// </summary>
+    public class SigDelayViewModel : BaseViewModel<int>
+    {
+
+        /// <summary>
+        /// 信号编号
+        /// </summary>
+        [Display(Name = "信号编号")]
+        public int SigInfoId { get; set; }
+
+        [Display(AutoGenerateField = false)]
+        [JsonIgnore]
+        public virtual SigInfo SigInfo { get; set; }
+
+        /// <summary>
+        /// 卫星编号
+        /// </summary>
+        [Display(Name = "卫星编号")]
+        public int SatInfoSatCode { get; set; }
+
+        /// <summary>
+        /// 卫星
+        /// </summary>
+        [Display(Name = "卫星")]
+        public string Sat { get; set; }
+
+        [Display(AutoGenerateField = false)]
+        [JsonIgnore]
+
+        public virtual SatInfo SatInfo { get; set; }
+
+        /// <summary>
+        /// 转发延迟(us)
+        /// </summary>
+        [Display(Name = "转发延迟(us)")]
+        public double Delay { get; set; }
+    }
+}

+ 44 - 0
DW5S.ViewModel/SigViewModel.cs

@@ -0,0 +1,44 @@
+
+using DW5S.Entity;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace DW5S.ViewModel
+{
+    public class SigViewModel : BaseViewModel<int>
+    {
+        [Display(Name = "上行频点(Hz)", AutoGenerateField = false)]
+        public long FreqUp { get; set; }
+
+        [Display(Name = "上行频点(MHz)")]
+        public double FreqUpDis => FreqUp / 1e6;
+
+        [Display(Name = "下行频点(Hz)", AutoGenerateField = false)]
+        public long FreqDown { get; set; }
+
+        [Display(Name = "下行频点(MHz)")]
+        public double FreqDownDis => FreqDown / 1e6;
+
+        [Display(Name = "信号类型")]
+        public EnumSigType SigType { get; set; }
+
+        [Display(Name = "信号检测类型")]
+        public EnumSigCheckType SigCheckType { get; set; }
+
+        [Display(Name = "门限(dB)")]
+        public double Snr { get; set; }
+
+
+        [Display(Name = "带宽(Hz)")]
+        public double Band { get; set; }
+
+        [NotMapped]
+        [Display(Name = "是否是固定站")]
+        public string IsFixedStationFreq { get; set; }
+
+        public override string ToString()
+        {
+            return $"上行{FreqUpDis}MHz 下行{FreqDownDis}MHz 带宽{Band}Hz";
+        }
+    }
+}

+ 1 - 1
DW5S.ViewModel/XlViewModel.cs

@@ -2,7 +2,7 @@
 
 namespace DW5S.ViewModel
 {
-    public class XlViewModel : BaseViewModel
+    public class XlViewModel : BaseViewModel<int>
     {
         [Display(Name = "卫星编号")]
         public int SatCode { get; set; }