gongqiuhong 1 жил өмнө
parent
commit
8f679c950c

+ 35 - 26
XdCxRhDW.App/EditForms/TaskEditor.Designer.cs

@@ -28,6 +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();
@@ -60,6 +61,7 @@
             this.layoutControlItemAdja2 = 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.txtTaskName.Properties)).BeginInit();
@@ -82,6 +84,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -105,7 +108,7 @@
             // 
             // btnSave
             // 
-            this.btnSave.Location = new System.Drawing.Point(299, 454);
+            this.btnSave.Location = new System.Drawing.Point(299, 445);
             this.btnSave.Name = "btnSave";
             this.btnSave.Size = new System.Drawing.Size(116, 26);
             this.btnSave.StyleController = this.layoutControl1;
@@ -115,27 +118,27 @@
             // 
             // txtTaskName
             // 
-            this.txtTaskName.Location = new System.Drawing.Point(22, 40);
+            this.txtTaskName.Location = new System.Drawing.Point(22, 39);
             this.txtTaskName.Name = "txtTaskName";
             this.txtTaskName.Properties.AutoHeight = false;
-            this.txtTaskName.Size = new System.Drawing.Size(393, 24);
+            this.txtTaskName.Size = new System.Drawing.Size(393, 25);
             this.txtTaskName.StyleController = this.layoutControl1;
             this.txtTaskName.TabIndex = 4;
             // 
             // txtPosType
             // 
             this.txtPosType.EditValue = 0;
-            this.txtPosType.Location = new System.Drawing.Point(22, 94);
+            this.txtPosType.Location = new System.Drawing.Point(22, 93);
             this.txtPosType.Name = "txtPosType";
             this.txtPosType.Properties.Columns = 1;
-            this.txtPosType.Size = new System.Drawing.Size(393, 170);
+            this.txtPosType.Size = new System.Drawing.Size(393, 171);
             this.txtPosType.StyleController = this.layoutControl1;
             this.txtPosType.TabIndex = 5;
             this.txtPosType.EditValueChanged += new System.EventHandler(this.txtPosType_EditValueChanged);
             // 
             // txtFreq
             // 
-            this.txtFreq.Location = new System.Drawing.Point(22, 418);
+            this.txtFreq.Location = new System.Drawing.Point(22, 408);
             this.txtFreq.Name = "txtFreq";
             this.txtFreq.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
@@ -144,13 +147,13 @@
             this.txtFreq.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtFreq.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtFreq.Properties.MaskSettings.Set("mask", "f3");
-            this.txtFreq.Size = new System.Drawing.Size(194, 22);
+            this.txtFreq.Size = new System.Drawing.Size(194, 23);
             this.txtFreq.StyleController = this.layoutControl1;
             this.txtFreq.TabIndex = 10;
             // 
             // txtBand
             // 
-            this.txtBand.Location = new System.Drawing.Point(220, 418);
+            this.txtBand.Location = new System.Drawing.Point(220, 408);
             this.txtBand.Name = "txtBand";
             this.txtBand.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)});
@@ -159,20 +162,20 @@
             this.txtBand.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtBand.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtBand.Properties.MaskSettings.Set("mask", "f3");
-            this.txtBand.Size = new System.Drawing.Size(195, 22);
+            this.txtBand.Size = new System.Drawing.Size(195, 23);
             this.txtBand.StyleController = this.layoutControl1;
             this.txtBand.TabIndex = 10;
             // 
             // txtMainSat
             // 
-            this.txtMainSat.Location = new System.Drawing.Point(22, 286);
+            this.txtMainSat.Location = new System.Drawing.Point(22, 285);
             this.txtMainSat.Name = "txtMainSat";
             this.txtMainSat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.txtMainSat.Properties.NullText = "";
             this.txtMainSat.Properties.PopupSizeable = false;
             this.txtMainSat.Properties.PopupView = this.searchLookUpEdit1View;
-            this.txtMainSat.Size = new System.Drawing.Size(393, 22);
+            this.txtMainSat.Size = new System.Drawing.Size(393, 20);
             this.txtMainSat.StyleController = this.layoutControl1;
             this.txtMainSat.TabIndex = 7;
             // 
@@ -185,14 +188,14 @@
             // 
             // txtAdja1Sat
             // 
-            this.txtAdja1Sat.Location = new System.Drawing.Point(22, 330);
+            this.txtAdja1Sat.Location = new System.Drawing.Point(22, 326);
             this.txtAdja1Sat.Name = "txtAdja1Sat";
             this.txtAdja1Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.txtAdja1Sat.Properties.NullText = "";
             this.txtAdja1Sat.Properties.PopupSizeable = false;
             this.txtAdja1Sat.Properties.PopupView = this.gridView1;
-            this.txtAdja1Sat.Size = new System.Drawing.Size(393, 22);
+            this.txtAdja1Sat.Size = new System.Drawing.Size(393, 20);
             this.txtAdja1Sat.StyleController = this.layoutControl1;
             this.txtAdja1Sat.TabIndex = 8;
             // 
@@ -205,14 +208,14 @@
             // 
             // txtAdja2Sat
             // 
-            this.txtAdja2Sat.Location = new System.Drawing.Point(22, 374);
+            this.txtAdja2Sat.Location = new System.Drawing.Point(22, 367);
             this.txtAdja2Sat.Name = "txtAdja2Sat";
             this.txtAdja2Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.txtAdja2Sat.Properties.NullText = "";
             this.txtAdja2Sat.Properties.PopupSizeable = false;
             this.txtAdja2Sat.Properties.PopupView = this.gridView2;
-            this.txtAdja2Sat.Size = new System.Drawing.Size(393, 22);
+            this.txtAdja2Sat.Size = new System.Drawing.Size(393, 20);
             this.txtAdja2Sat.StyleController = this.layoutControl1;
             this.txtAdja2Sat.TabIndex = 9;
             // 
@@ -258,9 +261,9 @@
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 422);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 413);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(277, 46);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(277, 55);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // layoutControlItem2
@@ -280,12 +283,12 @@
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.btnSave;
-            this.layoutControlItem3.Location = new System.Drawing.Point(277, 422);
+            this.layoutControlItem3.Location = new System.Drawing.Point(277, 413);
             this.layoutControlItem3.MaxSize = new System.Drawing.Size(120, 40);
             this.layoutControlItem3.MinSize = new System.Drawing.Size(120, 40);
             this.layoutControlItem3.Name = "layoutControlItem3";
             this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem3.Size = new System.Drawing.Size(120, 46);
+            this.layoutControlItem3.Size = new System.Drawing.Size(120, 55);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
@@ -295,7 +298,7 @@
             this.layoutControlItem4.Control = this.txtMainSat;
             this.layoutControlItem4.Location = new System.Drawing.Point(0, 246);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(397, 44);
+            this.layoutControlItem4.Size = new System.Drawing.Size(397, 41);
             this.layoutControlItem4.Text = "主星";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(48, 14);
@@ -303,9 +306,9 @@
             // layoutControlItemAdja1
             // 
             this.layoutControlItemAdja1.Control = this.txtAdja1Sat;
-            this.layoutControlItemAdja1.Location = new System.Drawing.Point(0, 290);
+            this.layoutControlItemAdja1.Location = new System.Drawing.Point(0, 287);
             this.layoutControlItemAdja1.Name = "layoutControlItemAdja1";
-            this.layoutControlItemAdja1.Size = new System.Drawing.Size(397, 44);
+            this.layoutControlItemAdja1.Size = new System.Drawing.Size(397, 41);
             this.layoutControlItemAdja1.Text = "邻星1";
             this.layoutControlItemAdja1.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItemAdja1.TextSize = new System.Drawing.Size(48, 14);
@@ -314,9 +317,9 @@
             // layoutControlItemAdja2
             // 
             this.layoutControlItemAdja2.Control = this.txtAdja2Sat;
-            this.layoutControlItemAdja2.Location = new System.Drawing.Point(0, 334);
+            this.layoutControlItemAdja2.Location = new System.Drawing.Point(0, 328);
             this.layoutControlItemAdja2.Name = "layoutControlItemAdja2";
-            this.layoutControlItemAdja2.Size = new System.Drawing.Size(397, 44);
+            this.layoutControlItemAdja2.Size = new System.Drawing.Size(397, 41);
             this.layoutControlItemAdja2.Text = "邻星2";
             this.layoutControlItemAdja2.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItemAdja2.TextSize = new System.Drawing.Size(48, 14);
@@ -325,7 +328,7 @@
             // layoutControlItem7
             // 
             this.layoutControlItem7.Control = this.txtFreq;
-            this.layoutControlItem7.Location = new System.Drawing.Point(0, 378);
+            this.layoutControlItem7.Location = new System.Drawing.Point(0, 369);
             this.layoutControlItem7.Name = "layoutControlItem7";
             this.layoutControlItem7.Size = new System.Drawing.Size(198, 44);
             this.layoutControlItem7.Text = "上行频点";
@@ -337,13 +340,17 @@
             this.layoutControlItem8.Control = this.txtBand;
             this.layoutControlItem8.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem8.CustomizationFormText = "上行频点";
-            this.layoutControlItem8.Location = new System.Drawing.Point(198, 378);
+            this.layoutControlItem8.Location = new System.Drawing.Point(198, 369);
             this.layoutControlItem8.Name = "layoutControlItem8";
             this.layoutControlItem8.Size = new System.Drawing.Size(199, 44);
             this.layoutControlItem8.Text = "信号带宽";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(48, 14);
             // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
             // TaskEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -376,6 +383,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -404,5 +412,6 @@
         private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
         private DevExpress.XtraEditors.SearchLookUpEdit txtAdja2Sat;
         private DevExpress.XtraGrid.Views.Grid.GridView gridView2;
+        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
     }
 }

+ 12 - 10
XdCxRhDW.App/EditForms/TaskEditor.cs

@@ -1,6 +1,7 @@
 using DevExpress.Utils.About;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
+using DevExpress.XtraEditors.DXErrorProvider;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -80,14 +81,15 @@ namespace XdCxRhDW.App.EditForms
         {
             try
             {
+                dxErrorProvider.ClearErrors();
                 if (txtTaskName.EditValue == null)
                 {
-                    DxHelper.MsgBoxHelper.ShowError("请填写任务名");
+                    dxErrorProvider.SetError(txtTaskName, "请填写任务名");
                     return;
                 }
                 if (txtPosType.SelectedIndex== -1)
                 {
-                    DxHelper.MsgBoxHelper.ShowError("请选择定位类型");
+                    dxErrorProvider.SetError(txtPosType, "请选择定位类型");
                     return;
                 }
                 var posType = (EnumPosType)txtPosType.Properties.Items[txtPosType.SelectedIndex].Value;
@@ -95,7 +97,7 @@ namespace XdCxRhDW.App.EditForms
                 {
                     if (txtMainSat.EditValue == null)
                     {
-                        DxHelper.MsgBoxHelper.ShowError("请选择卫星");
+                        dxErrorProvider.SetError(txtMainSat, "请选择卫星");
                         return;
                     }
                 }
@@ -103,12 +105,12 @@ namespace XdCxRhDW.App.EditForms
                 {
                     if (txtMainSat.EditValue == null)
                     {
-                        DxHelper.MsgBoxHelper.ShowError("请选择主星");
+                        dxErrorProvider.SetError(txtMainSat, "请选择主星");
                         return;
                     }
                     if (txtAdja1Sat.EditValue == null)
                     {
-                        DxHelper.MsgBoxHelper.ShowError("请选择邻星");
+                        dxErrorProvider.SetError(txtAdja1Sat, "请选择邻星");
                         return;
                     }
                 }
@@ -116,29 +118,29 @@ namespace XdCxRhDW.App.EditForms
                 {
                     if (txtMainSat.EditValue == null)
                     {
-                        DxHelper.MsgBoxHelper.ShowError("请选择主星");
+                        dxErrorProvider.SetError(txtMainSat, "请选择主星");
                         return; 
                     }
                     if (txtAdja1Sat.EditValue == null)
                     {
-                        DxHelper.MsgBoxHelper.ShowError("请选择邻星1");
+                        dxErrorProvider.SetError(txtAdja1Sat, "请选择邻星1");
                         return;
                     }
                     if (txtAdja2Sat.EditValue == null)
                     {
-                        DxHelper.MsgBoxHelper.ShowError("请选择邻星2");
+                        dxErrorProvider.SetError(txtAdja2Sat, "请选择邻星2");
                         return;
                     }
                    
                 }
                 if (txtFreq.EditValue == null)
                 {
-                    DxHelper.MsgBoxHelper.ShowError("请填写频点");
+                    dxErrorProvider.SetError(txtFreq, "请填写频点");
                     return;
                 }
                 if (txtBand.EditValue == null)
                 {
-                    DxHelper.MsgBoxHelper.ShowError("请填写带宽");
+                    dxErrorProvider.SetError(txtBand, "请填写带宽");
                     return;
                 }
 

+ 3 - 0
XdCxRhDW.App/EditForms/TaskEditor.resx

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="dxErrorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 17 - 0
XdCxRhDW.WebApi/Controllers/PosController.cs

@@ -20,6 +20,7 @@ using XdCxRhDW.Dto;
 using XdCxRhDW.Repostory.EFContext;
 using XdCxRhDW.Repostory.Model;
 using XdCxRhDW.WebApi.Controllers;
+using System.ComponentModel.DataAnnotations;
 
 namespace XdCxRhDW.App.WebAPI
 {
@@ -35,6 +36,7 @@ namespace XdCxRhDW.App.WebAPI
         /// <param name="dto">定位参数</param>
         /// <returns></returns>
         [HttpPost]
+        [CustomValidation(typeof(X1D1PosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX1D1Async(X1D1PosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -106,6 +108,7 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns>返回定位结果ID</returns>
         [HttpPost]
+        [CustomValidation(typeof(X1D1NoXlPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX1D1NoXlAsync(X1D1NoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -192,6 +195,7 @@ namespace XdCxRhDW.App.WebAPI
         /// <param name="dto">定位参数</param>
         /// <returns></returns>
         [HttpPost]
+        [CustomValidation(typeof(X2D1PosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX2D1Async(X2D1PosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -262,6 +266,7 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns>返回定位结果ID</returns>
         [HttpPost]
+        [CustomValidation(typeof(X2D1NoXlPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX2D1NoXlAsync(X2D1NoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -360,6 +365,7 @@ namespace XdCxRhDW.App.WebAPI
         /// <param name="dto">定位参数</param>
         /// <returns></returns>
         [HttpPost]
+        [CustomValidation(typeof(X2D1NoParPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX2D1NoParAsync(X2D1NoParPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -427,6 +433,7 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns>返回定位结果ID</returns>
         [HttpPost]
+        [CustomValidation(typeof(X2D1NoXlNoParlPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX2D1NoXlNoParAsync(X2D1NoXlNoParlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -524,6 +531,7 @@ namespace XdCxRhDW.App.WebAPI
         /// <param name="dto">定位参数</param>
         /// <returns></returns>
         [HttpPost]
+        [CustomValidation(typeof(RHPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosRhAsync(RHPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -603,6 +611,7 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns>返回定位结果ID</returns>
         [HttpPost]
+        [CustomValidation(typeof(RHNoXlPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosRhNoXlAsync(RHNoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -712,6 +721,7 @@ namespace XdCxRhDW.App.WebAPI
         /// <param name="dto">定位参数</param>
         /// <returns></returns>
         [HttpPost]
+        [CustomValidation(typeof(X3TwoDtoPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX3TwoDtoAsync(X3TwoDtoPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -785,6 +795,7 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns>返回定位结果ID</returns>
         [HttpPost]
+        [CustomValidation(typeof(X3TwoDtoNoXlPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX3TwoDtoNoXlAsync(X3TwoDtoNoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -898,6 +909,7 @@ namespace XdCxRhDW.App.WebAPI
         /// <param name="dto">定位参数</param>
         /// <returns></returns>
         [HttpPost]
+        [CustomValidation(typeof(X3TwoDtoNoParPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX3TwoDtoNoParAsync(X3TwoDtoNoParPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -966,6 +978,7 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns>返回定位结果ID</returns>
         [HttpPost]
+        [CustomValidation(typeof(X3TwoDtoNoXlNoParPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX3TwoDtoNoXlNoParAsync(X3TwoDtoNoXlNoParPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -1076,6 +1089,7 @@ namespace XdCxRhDW.App.WebAPI
         /// <param name="dto">定位参数</param>
         /// <returns></returns>
         [HttpPost]
+        [CustomValidation(typeof(X3TwoDfoPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX3TwoDfoAsync(X3TwoDfoPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -1162,6 +1176,7 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns>返回定位结果ID</returns>
         [HttpPost]
+        [CustomValidation(typeof(X3TwoDfoNoXlPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX3TwoDfoNoXlAsync(X3TwoDfoNoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -1291,6 +1306,7 @@ namespace XdCxRhDW.App.WebAPI
         /// <param name="dto">定位参数</param>
         /// <returns></returns>
         [HttpPost]
+        [CustomValidation(typeof(X2DtoDfoPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX2DtoDfoAsync(X2DtoDfoPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
@@ -1368,6 +1384,7 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns>返回定位结果ID</returns>
         [HttpPost]
+        [CustomValidation(typeof(X2DtoDfoNoXlPosDto), "Validate")]
         public async Task<AjaxResult<PosResDto>> PosX2DtoDfoNoXlAsync(X2DtoDfoNoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())

+ 14 - 0
XdCxRhDw.Dto/PosDto/RHNoXlPosDto.cs

@@ -19,16 +19,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int AdjaCode { get; set; }
 
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double SxDto { get; set; }
 
         /// <summary>
@@ -44,6 +47,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 目标星地时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double XdDto { get; set; }
 
         /// <summary>
@@ -59,11 +63,13 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 参考样本主时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double MainYbDto { get; set; }
 
         /// <summary>
         /// 参考样本邻时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double AdjaYbDto { get; set; }
 
         /// <summary>
@@ -84,41 +90,49 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 超短波天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CdbTxLon { get; set; }
 
         /// <summary>
         /// 超短波接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CdbTxLat { get; set; }
 
         /// <summary>
         /// 测向站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CxLon { get; set; }
 
         /// <summary>
         /// 测向站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
     }
 }

+ 14 - 0
XdCxRhDw.Dto/PosDto/RHPosDto.cs

@@ -19,16 +19,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int AdjaCode { get; set; }
 
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double SxDto { get; set; }
 
         /// <summary>
@@ -44,6 +47,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 目标星地时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double XdDto { get; set; }
 
         /// <summary>
@@ -59,11 +63,13 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double MainYbDto { get; set; }
 
         /// <summary>
         /// 样本邻星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double AdjaYbDto { get; set; }
 
         /// <summary>
@@ -114,41 +120,49 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 超短波天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CdbTxLon { get; set; }
 
         /// <summary>
         /// 超短波接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CdbTxLat { get; set; }
 
         /// <summary>
         /// 测向站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CxLon { get; set; }
 
         /// <summary>
         /// 测向站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
     }
         

+ 12 - 0
XdCxRhDw.Dto/PosDto/X1D1NoXlPosDto.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -19,11 +20,13 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 目标星地时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double XdDto { get; set; }
 
         /// <summary>
@@ -39,6 +42,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double MainYbDto { get; set; }
 
         /// <summary>
@@ -59,41 +63,49 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 超短波天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CdbTxLon { get; set; }
 
         /// <summary>
         /// 超短波接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CdbTxLat { get; set; }
 
         /// <summary>
         /// 测向站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CxLon { get; set; }
 
         /// <summary>
         /// 测向站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
     }
 }

+ 11 - 0
XdCxRhDw.Dto/PosDto/X1D1PosDto.cs

@@ -19,11 +19,13 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 目标星地时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double XdDto { get; set; }
 
         /// <summary>
@@ -39,6 +41,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double MainYbDto { get; set; }
 
         /// <summary>
@@ -74,41 +77,49 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 超短波天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CdbTxLon { get; set; }
 
         /// <summary>
         /// 超短波接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CdbTxLat { get; set; }
 
         /// <summary>
         /// 测向站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CxLon { get; set; }
 
         /// <summary>
         /// 测向站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
     }
         

+ 8 - 0
XdCxRhDw.Dto/PosDto/X2D1NoParPosDto.cs

@@ -19,16 +19,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int AdjaCode { get; set; }
 
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double SxDto { get; set; }
 
         /// <summary>
@@ -44,6 +47,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 目标星地时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double XdDto { get; set; }
 
         /// <summary>
@@ -99,21 +103,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 超短波天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CdbTxLon { get; set; }
 
         /// <summary>
         /// 超短波接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CdbTxLat { get; set; }
     }
         

+ 8 - 0
XdCxRhDw.Dto/PosDto/X2D1NoXlNoParlPosDto.cs

@@ -19,16 +19,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int AdjaCode { get; set; }
 
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double SxDto { get; set; }
 
         /// <summary>
@@ -44,6 +47,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 目标星地时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double XdDto { get; set; }
 
         /// <summary>
@@ -69,21 +73,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 超短波天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CdbTxLon { get; set; }
 
         /// <summary>
         /// 超短波接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CdbTxLat { get; set; }
 
     }

+ 12 - 2
XdCxRhDw.Dto/PosDto/X2D1NoXlPosDto.cs

@@ -20,16 +20,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int AdjaCode { get; set; }
 
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double SxDto { get; set; }
 
         /// <summary>
@@ -45,9 +48,9 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 目标星地时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double XdDto { get; set; }
 
-
         /// <summary>
         /// 目标星地频差(Hz)
         /// </summary>
@@ -62,14 +65,15 @@ namespace XdCxRhDw.Dto
         /// <summary>
         ///样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double MainYbDto { get; set; }
 
         /// <summary>
         /// 样本邻星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double AdjaYbDto { get; set; }
 
-
         /// <summary>
         /// 目标名称(可空)
         /// </summary>
@@ -83,31 +87,37 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 超短波天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CdbTxLon { get; set; }
 
         /// <summary>
         /// 超短波接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CdbTxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
     }
 }

+ 12 - 0
XdCxRhDw.Dto/PosDto/X2D1PosDto.cs

@@ -19,16 +19,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int AdjaCode { get; set; }
 
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double SxDto { get; set; }
 
         /// <summary>
@@ -44,6 +47,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 目标星地时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double XdDto { get; set; }
 
         /// <summary>
@@ -59,11 +63,13 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double MainYbDto { get; set; }
 
         /// <summary>
         /// 样本邻星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double AdjaYbDto { get; set; }
 
         /// <summary>
@@ -109,31 +115,37 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 超短波天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double CdbTxLon { get; set; }
 
         /// <summary>
         /// 超短波接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double CdbTxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
 
     }

+ 17 - 0
XdCxRhDw.Dto/PosDto/X2DtoDfoNoXlPosDto.cs

@@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.Attribute;
 
 namespace XdCxRhDw.Dto
 {
@@ -20,21 +21,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int AdjaCode { get; set; }
 
         /// <summary>
         /// 主邻时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto { get; set; }
 
         /// <summary>
         /// 主邻频差(Hz)
         /// </summary>
+        [Pow2]
         public double Dfo { get; set; }
 
         /// <summary>
@@ -45,41 +50,49 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbMainDto { get; set; }
 
         /// <summary>
         /// 样本邻星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbAdjaDto { get; set; }
 
         /// <summary>
         /// 样本主星频差(Hz)
         /// </summary>
+        [Pow2]
         public double YbMainDfo { get; set; }
 
         /// <summary>
         /// 样本邻星频差(Hz)
         /// </summary>
+        [Pow2]
         public double YbAdjaDfo { get; set; }
 
         /// <summary>
         /// 目标上行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double TarFreqUp { get; set; }
 
         /// <summary>
         /// 目标下行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double TarFreqDown { get; set; }
 
         /// <summary>
         /// 参考上行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double RefFreqUp { get; set; }
 
         /// <summary>
         /// 参考下行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double RefFreqDown { get; set; }
 
         /// <summary>
@@ -95,21 +108,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
 
     }

+ 17 - 0
XdCxRhDw.Dto/PosDto/X2DtoDfoPosDto.cs

@@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.Attribute;
 
 namespace XdCxRhDw.Dto
 {
@@ -20,21 +21,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int AdjaCode { get; set; }
 
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto { get; set; }
 
         /// <summary>
         /// 主邻1频差(Hz)
         /// </summary>
+        [Pow2]
         public double Dfo { get; set; }
 
         /// <summary>
@@ -45,41 +50,49 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbMainDto { get; set; }
 
         /// <summary>
         /// 样本邻星1时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbAdjaDto { get; set; }
 
         /// <summary>
         /// 样本主星频差(Hz)
         /// </summary>
+        [Pow2]
         public double YbMainDfo { get; set; }
 
         /// <summary>
         /// 样本邻星频差(Hz)
         /// </summary>
+        [Pow2]
         public double YbAdjaDfo { get; set; }
 
         /// <summary>
         /// 目标上行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double TarFreqUp { get; set; }
 
         /// <summary>
         /// 目标下行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double TarFreqDown { get; set; }
 
         /// <summary>
         /// 参考上行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double RefFreqUp { get; set; }
 
         /// <summary>
         /// 参考下行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double RefFreqDown { get; set; }
 
         /// <summary>
@@ -155,21 +168,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
 
     }

+ 14 - 0
XdCxRhDw.Dto/PosDto/X3TwoDfoNoXlPosDto.cs

@@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.Attribute;
 
 namespace XdCxRhDw.Dto
 {
@@ -20,16 +21,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星1编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja1Code { get; set; }
 
         /// <summary>
         /// 邻星2编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja2Code { get; set; }
 
         /// <summary>
@@ -40,6 +44,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主邻1频差(Hz)
         /// </summary>
+        [Pow2]
         public double Dfo1 { get; set; }
 
         /// <summary>
@@ -55,6 +60,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主邻2频差(Hz)
         /// </summary>
+        [Pow2]
         public double Dfo2 { get; set; }
 
         /// <summary>
@@ -80,21 +86,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 目标上行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double TarFreqUp { get; set; }
 
         /// <summary>
         /// 目标下行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double TarFreqDown { get; set; }
 
         /// <summary>
         /// 参考上行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double RefFreqUp { get; set; }
 
         /// <summary>
         /// 参考下行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double RefFreqDown { get; set; }
 
         /// <summary>
@@ -110,21 +120,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
 
     }

+ 17 - 0
XdCxRhDw.Dto/PosDto/X3TwoDfoPosDto.cs

@@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.Attribute;
 
 namespace XdCxRhDw.Dto
 {
@@ -20,16 +21,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星1编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja1Code { get; set; }
 
         /// <summary>
         /// 邻星2编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja2Code { get; set; }
 
         /// <summary>
@@ -40,6 +44,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主邻1频差(Hz)
         /// </summary>
+        [Pow2]
         public double Dfo1 { get; set; }
 
         /// <summary>
@@ -55,6 +60,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主邻2频差(Hz)
         /// </summary>
+        [Pow2]
         public double Dfo2 { get; set; }
 
         /// <summary>
@@ -65,36 +71,43 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星频差(Hz)
         /// </summary>
+        [Pow2]
         public double YbMainDfo { get; set; }
 
         /// <summary>
         /// 样本邻星1频差(Hz)
         /// </summary>
+        [Pow2]
         public double YbAdja1Dfo { get; set; }
 
         /// <summary>
         /// 样本邻星1频差(Hz)
         /// </summary>
+        [Pow2]
         public double YbAdja2Dfo { get; set; }
 
         /// <summary>
         /// 目标上行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double TarFreqUp { get; set; }
 
         /// <summary>
         /// 目标下行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double TarFreqDown { get; set; }
 
         /// <summary>
         /// 参考上行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double RefFreqUp { get; set; }
 
         /// <summary>
         /// 参考下行频点(Hz)
         /// </summary>
+        [RangeDouble(0, IncludeMin = true)]
         public double RefFreqDown { get; set; }
 
         /// <summary>
@@ -200,21 +213,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
     }
         

+ 7 - 0
XdCxRhDw.Dto/PosDto/X3TwoDtoNoParPosDto.cs

@@ -20,21 +20,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星1编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja1Code { get; set; }
 
         /// <summary>
         /// 邻星2编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja2Code { get; set; }
 
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -50,6 +54,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto2 { get; set; }
 
         /// <summary>
@@ -120,11 +125,13 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
     }

+ 7 - 0
XdCxRhDw.Dto/PosDto/X3TwoDtoNoXlNoParPosDto.cs

@@ -20,21 +20,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星1编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja1Code { get; set; }
 
         /// <summary>
         /// 邻星2编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja2Code { get; set; }
 
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -50,6 +54,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto2 { get; set; }
 
         /// <summary>
@@ -75,11 +80,13 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
     }

+ 12 - 0
XdCxRhDw.Dto/PosDto/X3TwoDtoNoXlPosDto.cs

@@ -20,21 +20,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星1编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja1Code { get; set; }
 
         /// <summary>
         /// 邻星2编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]/// 
         public int Adja2Code { get; set; }
 
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -50,6 +54,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto2 { get; set; }
 
         /// <summary>
@@ -65,16 +70,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbMainDto { get; set; }
 
         /// <summary>
         /// 样本邻星1时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbAdja1Dto { get; set; }
 
         /// <summary>
         /// 样本邻星2时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbAdja2Dto { get; set; }
 
         /// <summary>
@@ -90,21 +98,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
 
     }

+ 12 - 0
XdCxRhDw.Dto/PosDto/X3TwoDtoPosDto.cs

@@ -20,21 +20,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主星编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int MainCode { get; set; }
 
         /// <summary>
         /// 邻星1编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja1Code { get; set; }
 
         /// <summary>
         /// 邻星2编号
         /// </summary>
+        [RangeInt(10000, IncludeMin = true)]
         public int Adja2Code { get; set; }
 
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -50,6 +54,7 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double Dto2 { get; set; }
 
         /// <summary>
@@ -65,16 +70,19 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 样本主星时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbMainDto { get; set; }
 
         /// <summary>
         /// 样本邻星1时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbAdja1Dto { get; set; }
 
         /// <summary>
         /// 样本邻星2时差(us)
         /// </summary>
+        [RangeDouble(0, 100000)]
         public double YbAdja2Dto { get; set; }
 
         /// <summary>
@@ -135,21 +143,25 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 卫星接收天线经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double SatTxLon { get; set; }
 
         /// <summary>
         /// 卫星接收天线纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double SatTxLat { get; set; }
 
         /// <summary>
         /// 参考站经度
         /// </summary>
+        [RangeDouble(-180, 180)]
         public double RefLon { get; set; }
 
         /// <summary>
         /// 参考站纬度
         /// </summary>
+        [RangeDouble(-90, 90)]
         public double RefLat { get; set; }
     }