zoulei 1 rok pred
rodič
commit
ed57f2aad0
30 zmenil súbory, kde vykonal 950 pridanie a 561 odobranie
  1. BIN
      Service/CapMoni/2.dat
  2. 35 4
      Service/CapMoni/Program.cs
  3. 2 0
      Service/CheckServer/Controllers/CheckController.cs
  4. 2 1
      Service/CheckServer/MainForm.cs
  5. 4 1
      Service/X2D1NoRefTaskServer/App.config
  6. 1 0
      Service/X2D1NoRefTaskServer/Controllers/X2D1NoRefTaskProcessingController.cs
  7. 37 0
      Service/X2D1NoRefTaskServer/MainForm.cs
  8. 26 0
      Service/X2D1NoRefTaskServer/Program.cs
  9. 675 451
      Service/X2D1NoRefTaskServer/Service/TaskService.cs
  10. 23 0
      Service/X2D1TaskServer54/Program.cs
  11. 3 0
      XdCxRhDW.Api/AddIns/定位/PosApi.cs
  12. 33 11
      XdCxRhDW.App/ExtensionsDev/MapControlEx.cs
  13. 1 1
      XdCxRhDW.App/MainForm.cs
  14. 24 14
      XdCxRhDW.App/Program.cs
  15. 43 41
      XdCxRhDW.App/UserControl/CtrlHome.cs
  16. 7 3
      XdCxRhDW.Framework/HttpHelper.cs
  17. 16 16
      XdCxRhDw.Dto/Attribute/RangeAttribute.cs
  18. 1 1
      XdCxRhDw.Dto/PosDto/RHNoXlPosDto.cs
  19. 1 1
      XdCxRhDw.Dto/PosDto/RHPosDto.cs
  20. 1 1
      XdCxRhDw.Dto/PosDto/X2D1NoParPosDto.cs
  21. 1 1
      XdCxRhDw.Dto/PosDto/X2D1NoXlNoParlPosDto.cs
  22. 1 1
      XdCxRhDw.Dto/PosDto/X2D1NoXlPosDto.cs
  23. 1 1
      XdCxRhDw.Dto/PosDto/X2D1PosDto.cs
  24. 1 1
      XdCxRhDw.Dto/PosDto/X2DtoDfoNoXlPosDto.cs
  25. 1 1
      XdCxRhDw.Dto/PosDto/X2DtoDfoPosDto.cs
  26. 2 2
      XdCxRhDw.Dto/PosDto/X3TwoDfoNoXlPosDto.cs
  27. 2 2
      XdCxRhDw.Dto/PosDto/X3TwoDtoNoParPosDto.cs
  28. 2 2
      XdCxRhDw.Dto/PosDto/X3TwoDtoNoXlNoParPosDto.cs
  29. 2 2
      XdCxRhDw.Dto/PosDto/X3TwoDtoNoXlPosDto.cs
  30. 2 2
      XdCxRhDw.Dto/PosDto/X3TwoDtoPosDto.cs

BIN
Service/CapMoni/2.dat


+ 35 - 4
Service/CapMoni/Program.cs

@@ -6,15 +6,14 @@ using System.Threading.Tasks;
 using System.Configuration;
 using System.IO;
 using System.Threading;
+using System.Globalization;
 
 namespace CapMoni
 {
     internal class Program
     {
-        static void Main(string[] args)
+        static  void Main(string[] args)
         {
-
-            Console.WriteLine("开始采集...");
             var fileDir = ConfigurationManager.AppSettings["FileDir"].Trim();//采集文件存放目录
             var duration = ConfigurationManager.AppSettings["Duration"].Trim();//采集时长
             if (!int.TryParse(duration, out int durationInt))
@@ -23,7 +22,39 @@ namespace CapMoni
                 return;
             }
             var freqs = ConfigurationManager.AppSettings["Freqs"].Trim();//频点
-
+            Task.Run(() =>
+            {
+                while (true)
+                {
+                    try
+                    {
+                        var dirs = Directory.EnumerateDirectories(fileDir);
+                        foreach (var dir in dirs)
+                        {
+                            DirectoryInfo info = new DirectoryInfo(dir);
+                            var canParse = DateTime.TryParseExact(info.Name, "yyyy_MM_dd_HH", null, System.Globalization.DateTimeStyles.None, out DateTime time);
+                            if (canParse)
+                            {
+                                if ((DateTime.Now - time).TotalHours > 1.2)
+                                {
+                                    try
+                                    {
+                                        Directory.Delete(dir, true);
+                                        Console.WriteLine($"目录【{dir}】已删除");
+                                    }
+                                    catch
+                                    {
+                                        Console.WriteLine($"目录【{dir}】删除失败!");
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    catch
+                    { }
+                    Thread.Sleep(60000);
+                }
+            });
             while (true)
             {
                 var dateNow = DateTime.Now;

+ 2 - 0
Service/CheckServer/Controllers/CheckController.cs

@@ -26,6 +26,7 @@ namespace CheckServer.Controllers
         {
             try
             {
+                Serilog.Log.Information($"正在检测文件{dto.file1}");
                 dto.file1 = GetLocalFile(dto.file1);
                 List<DetectResDto> list = new List<DetectResDto>();
                 List<DmcResult> listRes = new List<DmcResult>();
@@ -145,6 +146,7 @@ namespace CheckServer.Controllers
         [HttpPost]
         public async Task<AjaxResult<List<SignalProcResDto>>> SignalProc(SignalProcDto dto)
         {
+            Serilog.Log.Information($"正在识别文件{dto.File}");
             return await Task.Run(() =>
             {
                 try

+ 2 - 1
Service/CheckServer/MainForm.cs

@@ -96,7 +96,8 @@ namespace CheckServer
                 url = posPlatformAddr + "api/SvrReport/Report";
             else
                 url = posPlatformAddr + "/api/SvrReport/Report";
-            _=ClearLocalFile();
+#warning 检测程序不知道为啥崩溃,先不清理数据,方便找到崩溃文件
+            //_ = ClearLocalFile();
             bool preSucceed = false;
             while (!this.Disposing)
             {

+ 4 - 1
Service/X2D1NoRefTaskServer/App.config

@@ -18,7 +18,7 @@
 		<add key="PosDtoFactor" value="1"/>
 
 		<!--实时任务采集时长(秒)-->
-		<add key="CapSeconds" value="6"/>
+		<add key="CapSeconds" value="60"/>
 
 		<!--主星转发延迟(us),平台信号中没有配置信号对应主星的转发延迟时将使用这个值-->
 		<add key="MainSatDelay" value="2235"/>
@@ -29,6 +29,9 @@
 		<!--检测文件类型(上行信号=0,主星下行信号=1)-->
 		<add key="CheckFileType" value="0"/>
 
+		<!--并行处理线程个数(支持0到N,0表示不限制,每个频点都在独立的线程中处理)-->
+		<add key="ThreadCount" value="1"/>
+
 	</appSettings>
 	<startup>
 		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />

+ 1 - 0
Service/X2D1NoRefTaskServer/Controllers/X2D1NoRefTaskProcessingController.cs

@@ -8,6 +8,7 @@ using System.Web.Http;
 using XdCxRhDW.Dto;
 using XdCxRhDW.WebApi;
 using X2D1NoRefTaskServer.Service;
+using System.Threading;
 
 namespace X2D1NoRefTaskServer.Controllers
 {

+ 37 - 0
Service/X2D1NoRefTaskServer/MainForm.cs

@@ -9,6 +9,9 @@ using X2D1NoRefTaskServer;
 using DevExpress.Utils;
 using DevExpress.XtraEditors.Repository;
 using System.Threading.Tasks;
+using System.Threading;
+using DevExpress.Utils.Extensions;
+using System.IO;
 
 namespace X2D1NoRefTaskServer
 {
@@ -22,6 +25,7 @@ namespace X2D1NoRefTaskServer
             gridView1.Columns[nameof(LogInfo.LogType)].MaxWidth = 100;
             gridView1.Columns[nameof(LogInfo.LogTime)].MaxWidth = 160;
             gridView1.Columns[nameof(LogInfo.Msg)].AppearanceCell.TextOptions.HAlignment = HorzAlignment.Near;
+            gridView1.Columns[nameof(LogInfo.Msg)].OptionsColumn.AllowSort = DefaultBoolean.False;
             this.IconOptions.SvgImage = DxHelper.SvgHelper.LoadFromFile("Service.svg");
             LogHelper.Logger = info =>
             {
@@ -74,6 +78,7 @@ namespace X2D1NoRefTaskServer
                 url = posPlatformAddr + "api/SvrReport/Report";
             else
                 url = posPlatformAddr + "/api/SvrReport/Report";
+            _ = ClearLocalFile();
             bool preSucceed = false;
             while (!this.Disposing)
             {
@@ -137,5 +142,37 @@ namespace X2D1NoRefTaskServer
                 LogHelper.Error("状态上报异常", ex);
             }
         }
+
+        //清理10分钟之前的文件
+        private async Task ClearLocalFile()
+        {
+            while (true)
+            {
+                try
+                {
+                    var uploadFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot");
+                    var files = Directory.EnumerateFiles(uploadFolder);
+                    foreach (var file in files)
+                    {
+                        FileInfo info = new FileInfo(file);
+                        if (info.CreationTime < DateTime.Now.AddMinutes(-10))
+                        {
+                            try
+                            {
+                                info.Delete();
+                            }
+                            catch
+                            {
+                            }
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    Serilog.Log.Error(ex, "清理wwwroot历史文件异常");
+                }
+                await Task.Delay(5 * 60 * 1000);
+            }
+        }
     }
 }

+ 26 - 0
Service/X2D1NoRefTaskServer/Program.cs

@@ -1,5 +1,6 @@
 using DevExpress.LookAndFeel;
 using DevExpress.XtraEditors;
+using Microsoft.Win32;
 using Serilog;
 using System;
 using System.Collections.Generic;
@@ -83,12 +84,36 @@ namespace X2D1NoRefTaskServer
 
             Application.Exit();
         }
+
+        //win10及以上版本管理员运行无法访问网络映射盘等,需要修改注册表并且重启设备
+        static void CheckUACReg()
+        {
+            try
+            {
+                RegistryKey key = Registry.LocalMachine;
+                RegistryKey system = key.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true);
+                if (system == null)
+                {
+                    system = key.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System");
+                }
+                object obj = system.GetValue("EnableLinkedConnections");
+                if (obj == null || (int)obj != 1)
+                {
+                    system.SetValue("EnableLinkedConnections", Convert.ToInt32(1), RegistryValueKind.DWord);
+                }
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "修改UAC注册表信息异常!");
+            }
+        }
         /// <summary>
         /// 应用程序的主入口点。
         /// </summary>
         [STAThread]
         static void Main()
         {
+           
             string outputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}  {Exception}";
             Serilog.Log.Logger = new Serilog.LoggerConfiguration()
                 .WriteTo.Console(outputTemplate: outputTemplate)
@@ -117,6 +142,7 @@ namespace X2D1NoRefTaskServer
             }
             if (IsRunningAsAdmin())
             {
+                CheckUACReg();
                 XdCxRhDW.ChsLocalizer.UseChs();
                 MainForm mainForm = new MainForm();
                 System.Windows.Forms.Application.Run(mainForm);

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 675 - 451
Service/X2D1NoRefTaskServer/Service/TaskService.cs


+ 23 - 0
Service/X2D1TaskServer54/Program.cs

@@ -1,5 +1,6 @@
 using DevExpress.LookAndFeel;
 using DevExpress.XtraEditors;
+using Microsoft.Win32;
 using Serilog;
 using System;
 using System.Collections.Generic;
@@ -83,6 +84,28 @@ namespace X3TaskServer54
 
             Application.Exit();
         }
+        //win10及以上版本管理员运行无法访问网络映射盘等,需要修改注册表并且重启设备
+        static void CheckUACReg()
+        {
+            try
+            {
+                RegistryKey key = Registry.LocalMachine;
+                RegistryKey system = key.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true);
+                if (system == null)
+                {
+                    system = key.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System");
+                }
+                object obj = system.GetValue("EnableLinkedConnections");
+                if (obj == null || (int)obj != 1)
+                {
+                    system.SetValue("EnableLinkedConnections", Convert.ToInt32(1), RegistryValueKind.DWord);
+                }
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "修改UAC注册表信息异常!");
+            }
+        }
         /// <summary>
         /// 应用程序的主入口点。
         /// </summary>

+ 3 - 0
XdCxRhDW.Api/AddIns/定位/PosApi.cs

@@ -421,7 +421,10 @@ namespace XdCxRhDW.Api
             double[] res;
             var p1 = list.OrderBy(p => p.Item3 + p.Item4).FirstOrDefault();
             if (p1 == default)
+            {
                 res = new double[7] { 999, 999, 0, 999, 999, 0, -1 };
+                return res;
+            }
             var p2 = list.Where(p => PhysicsHelper.DistanceGeo((p1.Item1, p1.Item2, 0), (p.Item1, p.Item2, 0)) > 10000).OrderBy(p => p.Item3 + p.Item4).FirstOrDefault();
             if (p2 == default)
                 res = new double[7] { p1.Item1, p1.Item2, 0, 999, 999, 0, -1 };

+ 33 - 11
XdCxRhDW.App/ExtensionsDev/MapControlEx.cs

@@ -252,7 +252,7 @@ public static class MapControlEx
                     sb.Append("\r\n");
                     sb.Append("-------------------");
                     sb.Append("\r\n");
-                    sb.Append(((object[])item.Tag)[1]);
+                    sb.Append(((object[])item.Tag).Last());
                 }
                 ele.ToolTipPattern = sb.ToString();
             }
@@ -666,18 +666,21 @@ public static class MapControlEx
         if (data == null || !data.Any()) return;
         foreach (var item in data)
         {
-            ctrl.DelPosItem(item);
+            ctrl.DelPosItem(item, false);
         }
         ctrl.Refresh();
     }
 
+
+
     /// <summary>
     /// 定位图层数据源删除定位点
     /// </summary>
     /// <typeparam name="T"></typeparam>
     /// <param name="ctrl"></param>
     /// <param name="item"></param>
-    public static void DelPosItem<T>(this MapControl ctrl, T item) where T : PosData, new()
+    /// <param name="refreshCtrl"></param>
+    public static void DelPosItem<T>(this MapControl ctrl, T item, bool refreshCtrl = true) where T : PosData, new()
     {
         if (item == null) return;
         var innerData = ctrl.Tag as InnerData;
@@ -687,7 +690,8 @@ public static class MapControlEx
             innerData.posStorge.Items.Remove(innerData._dataCache[key]);
             innerData._dataCache.Remove(key);
         }
-        ctrl.Refresh();
+        if (refreshCtrl)
+            ctrl.Refresh();
 
     }
 
@@ -709,7 +713,7 @@ public static class MapControlEx
         }
         foreach (var item in keys)
         {
-            ctrl.DelPosItem(item);
+            ctrl.DelPosItem(item, false);
         }
         ctrl.Refresh();
     }
@@ -815,14 +819,15 @@ public static class MapControlEx
     /// </summary>
     /// <param name="ctrl"></param>
     /// <param name="tag"></param>
+    /// <param name="id"></param>
     /// <param name="imgLat"></param>
     /// <param name="imgLon"></param>
     /// <param name="img"></param>
     /// <param name="toolTip"></param>
-    public static void DrawFixedImg(this MapControl ctrl, string tag, double imgLat, double imgLon, Image img, string toolTip = "")
+    public static void DrawFixedImg(this MapControl ctrl, string tag, string id, double imgLat, double imgLon, Image img, string toolTip = "")
     {
         var innerData = ctrl.Tag as InnerData;
-        var item = new MapCustomElement() { Tag = new object[] { tag, toolTip } };
+        var item = new MapCustomElement() { Tag = new object[] { tag, id, toolTip } };
         item.UseAnimation = false;
         item.BackgroundDrawingMode = ElementState.None;
         item.Location = new GeoPoint(imgLat, imgLon);
@@ -835,14 +840,15 @@ public static class MapControlEx
     /// </summary>
     /// <param name="ctrl"></param>
     /// <param name="tag"></param>
+    /// <param name="id"></param>
     /// <param name="imgLat"></param>
     /// <param name="imgLon"></param>
     /// <param name="img"></param>
     /// <param name="toolTip"></param>
-    public static void DrawFixedImg(this MapControl ctrl, string tag, double imgLat, double imgLon, SvgImage img, string toolTip = "")
+    public static void DrawFixedImg(this MapControl ctrl, string tag, string id, double imgLat, double imgLon, SvgImage img, string toolTip = "")
     {
         var innerData = ctrl.Tag as InnerData;
-        var item = new MapCustomElement() { Tag = new object[] { tag, toolTip } };
+        var item = new MapCustomElement() { Tag = new object[] { tag, id, toolTip } };
         item.UseAnimation = false;
         item.BackgroundDrawingMode = ElementState.None;
         item.Location = new GeoPoint(imgLat, imgLon);
@@ -854,6 +860,22 @@ public static class MapControlEx
         innerData.mMapStorageFixed.Items.Add(item);
     }
 
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="ctrl"></param>
+    /// <param name="id"></param>
+    /// <param name="imgLat"></param>
+    /// <param name="imgLon"></param>
+    /// <returns></returns>
+    public static bool ExistFixedImg(this MapControl ctrl, string id, double imgLat, double imgLon)
+    {
+        var innerData = ctrl.Tag as InnerData;
+        return innerData.mMapStorageFixed.Items.Any(p => (p is MapCustomElement ele)
+        && (ele.Tag as object[])[1].ToString() == id
+        && (ele.Location as GeoPoint).Longitude == imgLon
+        && (ele.Location as GeoPoint).Latitude == imgLat);
+    }
     public static void DelFixedImg(this MapControl ctrl, string tag)
     {
         var innerData = ctrl.Tag as InnerData;
@@ -1647,7 +1669,7 @@ public static class MapControlEx
             EnableHighlighting = DefaultBoolean.True,
             Stroke = ColorHelper.GetColor(title),
             StrokeWidth = 2,
-            HighlightedStrokeWidth=4,
+            HighlightedStrokeWidth = 4,
             IsGeodesic = true,
             CanResize = false,
             CanEdit = false,
@@ -1698,7 +1720,7 @@ public static class MapControlEx
                     EnableHighlighting = DefaultBoolean.False,
                     EnableSelection = DefaultBoolean.False,
                     StrokeWidth = 2,
-                    HighlightedStrokeWidth=4,
+                    HighlightedStrokeWidth = 4,
                     IsGeodesic = true,
                     CanResize = false,
                     CanEdit = false,

+ 1 - 1
XdCxRhDW.App/MainForm.cs

@@ -103,7 +103,7 @@ namespace XdCxRhDW
                 Serilog.Log.Error(ex, $"启动Http服务失败!");
                 if (ex.InnerException is HttpListenerException)
                 {
-                    DxHelper.MsgBoxHelper.ShowWarning($"{ex.InnerException.Message}");
+                    DxHelper.MsgBoxHelper.ShowWarning($"启动Http服务失败,{ex.InnerException.Message}");
                 }
                 else
                 {

+ 24 - 14
XdCxRhDW.App/Program.cs

@@ -1,5 +1,6 @@
 using DevExpress.LookAndFeel;
 using DevExpress.XtraEditors;
+using Microsoft.Win32;
 using Serilog;
 using System;
 using System.Collections.Generic;
@@ -87,26 +88,34 @@ namespace XdCxRhDW
 
             Application.Exit();
         }
+        //win10及以上版本管理员运行无法访问网络映射盘等,需要修改注册表并且重启设备
+        static void CheckUACReg()
+        {
+            try
+            {
+                RegistryKey key = Registry.LocalMachine;
+                RegistryKey system = key.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true);
+                if (system == null)
+                {
+                    system = key.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System");
+                }
+                object obj = system.GetValue("EnableLinkedConnections");
+                if (obj == null || (int)obj != 1)
+                {
+                    system.SetValue("EnableLinkedConnections", Convert.ToInt32(1), RegistryValueKind.DWord);
+                }
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "修改UAC注册表信息异常!");
+            }
+        }
         /// <summary>
         /// 应用程序的主入口点。
         /// </summary>
         [STAThread]
         static void Main()
         {
-            //double max = 0;
-            //double min = 99999;
-            //for (int i = 0; i < 1000000; i++)
-            //{
-            //    var res = RandomHelper.Normal(0, 1);
-            //    if (max < res)
-            //    {
-            //        max = res;
-            //    }
-            //    if (min > res)
-            //    {
-            //        min = res;
-            //    }
-            //}
             string outputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}  {Exception}";
             Serilog.Log.Logger = new Serilog.LoggerConfiguration()
                 .WriteTo.Console(outputTemplate: outputTemplate)
@@ -135,6 +144,7 @@ namespace XdCxRhDW
             }
             if (IsRunningAsAdmin())
             {
+                CheckUACReg();
                 string screenTitle = ConfigurationManager.AppSettings["SystemName"];
                 string screenCompany = ConfigurationManager.AppSettings["Company"];
                 DxHelper.WaitHelper.SetSplashTips("Tips.txt");

+ 43 - 41
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -45,6 +45,7 @@ namespace XdCxRhDW.App.UserControl
                 this.splitterItem1.Location = new Point(200, 0);
             txtStartTime.UseDefault();
             txtEndTime.UseDefault();
+            //txtFrequpMHz.Properties.Sorted = true;
         }
 
 
@@ -193,12 +194,35 @@ namespace XdCxRhDW.App.UserControl
                 }
             }
         }
+        bool canQuery = true;
         private void OnPosAdd(ModelPosRes posRes)
         {
             var currentTask = gridView1.GetFocusedRow() as TaskInfo;
             if (currentTask.ID == posRes.TaskInfoID)
             {
-                if (txtFrequpMHz.EditValue != null && posRes.FreqUpHz != (long)(Convert.ToDouble(txtFrequpMHz.EditValue) * 1e6))
+                lock (this)
+                {
+                    var items = txtFrequpMHz.Properties.Items.Where(p => p.Value != null).Select(t => Convert.ToInt64(t.Value)).ToList();
+                    if (!items.Contains(posRes.FreqUpHz))
+                    {
+                        canQuery = false;
+                        items.Add(posRes.FreqUpHz);
+                        items.Sort();
+                        var selectdItem = this.txtFrequpMHz.SelectedItem;
+                        this.Invoke(new Action(() =>
+                        {
+                            this.txtFrequpMHz.Properties.Items.Clear();
+                            this.txtFrequpMHz.Properties.Items.Add(new ImageComboBoxItem("全部", null));
+                            foreach (var item in items)
+                            {
+                                this.txtFrequpMHz.Properties.Items.Add(new ImageComboBoxItem((item / 1e6).ToString("f3"), item));
+                            }
+                            this.txtFrequpMHz.SelectedItem = selectdItem;
+                        }));
+                        canQuery = true;
+                    }
+                }
+                if (txtFrequpMHz.EditValue != null && posRes.FreqUpHz != Convert.ToInt64(txtFrequpMHz.EditValue))
                     return;
                 if (posRes.PosLon == 999 && !btnIncludeInvalidate.Checked)
                     return;
@@ -209,27 +233,6 @@ namespace XdCxRhDW.App.UserControl
                     gridView2.RefreshData();
                     mapControl1.AddPosItem(posRes);
                 }));
-
-
-                var txtFrequpItemFreq = new List<long>();
-                txtFrequpItemFreq.AddRange(txtFrequpMHz.Properties.Items.Select(t => Convert.ToInt64(t.Value)));
-                if (!txtFrequpItemFreq.Contains(posRes.FreqUpHz))
-                {
-                    txtFrequpItemFreq.Add(posRes.FreqUpHz);
-
-                }
-                else
-                {
-                    return;
-                }
-                txtFrequpItemFreq.Sort();
-                var itemsNew = txtFrequpItemFreq.Select(t => new ImageComboBoxItem((posRes.FreqUpHz / 1e6).ToString("f3"), posRes.FreqUpHz)).ToArray();
-                this.Invoke(new Action(() =>
-                {
-                    this.txtFrequpMHz.Properties.Items.Clear();
-                    this.txtFrequpMHz.Properties.Items.AddRange(itemsNew);
-                }));
-
             }
         }
         private async void GridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
@@ -250,17 +253,6 @@ namespace XdCxRhDW.App.UserControl
             {
                 gridView2.Columns[nameof(ModelPosRes.CxResID)].Visible = false;
             }
-
-            //using (RHDWContext db = new RHDWContext())
-            //{
-            //this.txtFrequpMHz.Properties.Items.Clear();
-            //this.txtFrequpMHz.Properties.Items.Add(new ImageComboBoxItem("全部", null));
-            // var sigs = await db.TaskSigs.Where(w => w.TaskInfoID == tsk.ID).ToListAsync();
-            //foreach (var item in sigs)
-            //{
-            //    this.txtFrequpMHz.Properties.Items.Add(new ImageComboBoxItem((item.FreqUp / 1e6).ToString("f3"), item.FreqUp));
-            //}
-            // }
             this.txtFrequpMHz.Properties.Items.Clear();
             this.txtFrequpMHz.Properties.Items.Add(new ImageComboBoxItem("全部", null));
             var sigs = new List<TaskFreqResDto>();
@@ -300,11 +292,11 @@ namespace XdCxRhDW.App.UserControl
                 var sat2 = db.SatInfos.Where(p => p.SatCode == tsk.Adja1Sat).FirstOrDefault();
                 var sat3 = db.SatInfos.Where(p => p.SatCode == tsk.Adja2Sat).FirstOrDefault();
                 if (sat1 != null && sat1.SatLon != null)
-                    mapControl1.DrawFixedImg("Sat", 0, sat1.SatLon.Value, DxHelper.SvgHelper.CreateSat(width: 16, height: 16), $"主星\r\n{sat1.Sat}");
+                    mapControl1.DrawFixedImg("Sat", "Sat1", 0, sat1.SatLon.Value, DxHelper.SvgHelper.CreateSat(width: 16, height: 16), $"主星\r\n{sat1.Sat}");
                 if (sat2 != null && sat2.SatLon != null)
-                    mapControl1.DrawFixedImg("Sat", 0, sat2.SatLon.Value, DxHelper.SvgHelper.CreateSat(width: 16, height: 16), $"邻1星\r\n{sat2.Sat}");
+                    mapControl1.DrawFixedImg("Sat", "Sat2", 0, sat2.SatLon.Value, DxHelper.SvgHelper.CreateSat(width: 16, height: 16), $"邻1星\r\n{sat2.Sat}");
                 if (sat3 != null && sat3.SatLon != null)
-                    mapControl1.DrawFixedImg("Sat", 0, sat3.SatLon.Value, DxHelper.SvgHelper.CreateSat(width: 16, height: 16), $"邻2星\r\n{sat3.Sat}");
+                    mapControl1.DrawFixedImg("Sat", "Sat3", 0, sat3.SatLon.Value, DxHelper.SvgHelper.CreateSat(width: 16, height: 16), $"邻2星\r\n{sat3.Sat}");
             }
 
         }
@@ -344,14 +336,23 @@ namespace XdCxRhDW.App.UserControl
                 var station = db?.StationRes.Where(p => p.ID == posItem.StationResID).FirstOrDefault();
                 if (station != null)
                 {
-                    mapControl1.DrawFixedImg("Tx", station.SatTxLat, station.SatTxLon, DxHelper.SvgHelper.CreateAnt(width: 16, height: 16), $"[卫星接收天线]\r\n经度:{station.SatTxLon}°\r\n纬度:{station.SatTxLat}°");
+                    if (mapControl1.ExistFixedImg($"SatTx_{station.SatTxLon}_{station.SatTxLat}", station.SatTxLat, station.SatTxLon))
+                        mapControl1.DrawFixedImg("Tx", $"SatTx_{station.SatTxLon}_{station.SatTxLat}", station.SatTxLat, station.SatTxLon, DxHelper.SvgHelper.CreateAnt(width: 16, height: 16), $"[卫星接收天线]\r\n经度:{station.SatTxLon}°\r\n纬度:{station.SatTxLat}°");
                     if (station.CdbTxLon != null)
-                        mapControl1.DrawFixedImg("Tx", station.CdbTxLat.Value, station.CdbTxLon.Value, DxHelper.SvgHelper.CreateAnt(width: 16, height: 16), $"[超短接收天线]\r\n经度:{station.CdbTxLon.Value}°\r\n纬度:{station.CdbTxLat.Value}°");
+                    {
+                        if (mapControl1.ExistFixedImg($"SatTx_{station.CdbTxLon.Value}_{station.CdbTxLat.Value}", station.CdbTxLat.Value, station.CdbTxLon.Value))
+                            mapControl1.DrawFixedImg("Tx", $"CdbTx_{station.CdbTxLon.Value}_{station.CdbTxLat.Value}", station.CdbTxLat.Value, station.CdbTxLon.Value, DxHelper.SvgHelper.CreateAnt(width: 16, height: 16), $"[超短接收天线]\r\n经度:{station.CdbTxLon.Value}°\r\n纬度:{station.CdbTxLat.Value}°");
+                    }
                     if (station.RefLon != null)
-                        mapControl1.DrawFixedImg("Tx", station.RefLat.Value, station.RefLon.Value, DxHelper.SvgHelper.CreatePentagram(width: 16, height: 16), $"[参考站]\r\n经度:{station.RefLon.Value}°\r\n纬度:{station.RefLat.Value}°");
+                    {
+                        if (mapControl1.ExistFixedImg($"SatTx_{station.RefLon.Value}_{station.RefLat.Value}", station.RefLat.Value, station.RefLon.Value))
+                            mapControl1.DrawFixedImg("Tx", $"RefTx_{station.RefLon.Value}_{station.RefLat.Value}", station.RefLat.Value, station.RefLon.Value, DxHelper.SvgHelper.CreatePentagram(width: 16, height: 16), $"[参考站]\r\n经度:{station.RefLon.Value}°\r\n纬度:{station.RefLat.Value}°");
+                    }
                     if (station.CxLon != null)
-                        mapControl1.DrawFixedImg("Tx", station.CxLat.Value, station.CxLon.Value, DxHelper.SvgHelper.CreatePentagram(width: 16, height: 16), $"[测向站]\r\n经度:{station.CxLon.Value}°\r\n纬度:{station.CxLat.Value}°");
-
+                    {
+                        if (mapControl1.ExistFixedImg($"SatTx_{station.CxLon.Value}_{station.CxLat.Value}", station.CxLat.Value, station.CxLon.Value))
+                            mapControl1.DrawFixedImg("Tx", $"CxTx_{station.CxLon.Value}_{station.CxLat.Value}", station.CxLat.Value, station.CxLon.Value, DxHelper.SvgHelper.CreatePentagram(width: 16, height: 16), $"[测向站]\r\n经度:{station.CxLon.Value}°\r\n纬度:{station.CxLat.Value}°");
+                    }
                 }
             }
         }
@@ -747,6 +748,7 @@ namespace XdCxRhDW.App.UserControl
 
         private void txtFrequpMHz_SelectedIndexChanged(object sender, EventArgs e)
         {
+            if (!canQuery) return;
             txtTimeCho_SelectedIndexChanged(null, null);
         }
         private async void txtTimeCho_SelectedIndexChanged(object sender, EventArgs e)

+ 7 - 3
XdCxRhDW.Framework/HttpHelper.cs

@@ -166,11 +166,15 @@ public class HttpHelper
         }
         catch (TaskCanceledException)
         {
-            throw new Exception($"上传文件{Path.GetFileName(localFile)}到{uploadUrl}超时!");
+            if (token != null && token.IsCancellationRequested)
+                throw new TaskCanceledException();
+            else
+                throw new Exception($"上传文件{Path.GetFileName(localFile)}到{uploadUrl}超时!");
+
         }
-        catch(Exception ex)
+        catch (Exception ex)
         {
-            throw new Exception($"上传文件{Path.GetFileName(localFile)}到{uploadUrl}失败!",ex);
+            throw new Exception($"上传文件{Path.GetFileName(localFile)}到{uploadUrl}失败!", ex);
         }
     }
 

+ 16 - 16
XdCxRhDw.Dto/Attribute/RangeAttribute.cs

@@ -194,22 +194,22 @@ namespace XdCxRhDW.Dto
 
                 if (IncludeMin && IncludeMax)
                 {
-                    ErrorMessage = "字段 {0} 范围" + $"[{Min},{Max}]";
+                    ErrorMessage = "字段 {0} 范围" + $"[{Min},{Max}],当前值{val}";
                     return val >= Min && val <= Max;
                 }
                 else if (IncludeMin && !IncludeMax)
                 {
-                    ErrorMessage = "字段 {0} 范围" + $"[{Min},{Max})";
+                    ErrorMessage = "字段 {0} 范围" + $"[{Min},{Max}),当前值{val}";
                     return val >= Min && val < Max;
                 }
                 else if (!IncludeMin && IncludeMax)
                 {
-                    ErrorMessage = "字段 {0} 范围" + $"({Min},{Max}]";
+                    ErrorMessage = "字段 {0} 范围" + $"({Min},{Max}],当前值{val}";
                     return val > Min && val <= Max;
                 }
                 else
                 {
-                    ErrorMessage = "字段 {0} 范围" + $"({Min},{Max})";
+                    ErrorMessage = "字段 {0} 范围" + $"({Min},{Max}),当前值{val}";
                     return val > Min && val < Max;
                 }
 
@@ -218,12 +218,12 @@ namespace XdCxRhDW.Dto
             {
                 if (IncludeMin)
                 {
-                    ErrorMessage = "字段 {0} 必须大于等于" + $"{Min}";
+                    ErrorMessage = "字段 {0} 必须大于等于" + $"{Min},当前值{val}";
                     return val >= Min;
                 }
                 else
                 {
-                    ErrorMessage = "字段 {0} 必须大于" + $"{Min}";
+                    ErrorMessage = "字段 {0} 必须大于" + $"{Min},当前值{val}";
                     return val > Min;
                 }
             }
@@ -231,12 +231,12 @@ namespace XdCxRhDW.Dto
             {
                 if (IncludeMax)
                 {
-                    ErrorMessage = "字段 {0} 必须小于等于" + $"{Max}";
+                    ErrorMessage = "字段 {0} 必须小于等于" + $"{Max},当前值{val}";
                     return val <= Max;
                 }
                 else
                 {
-                    ErrorMessage = "字段 {0} 必须小于" + $"{Max}";
+                    ErrorMessage = "字段 {0} 必须小于" + $"{Max},当前值{val}";
                     return val < Max;
                 }
             }
@@ -312,22 +312,22 @@ namespace XdCxRhDW.Dto
 
                 if (IncludeMin && IncludeMax)
                 {
-                    ErrorMessage = "字段 {0} 范围" + $"[{Min},{Max}]";
+                    ErrorMessage = "字段 {0} 范围" + $"[{Min},{Max}],当前值{val}";
                     return val >= Min && val <= Max;
                 }
                 else if (IncludeMin && !IncludeMax)
                 {
-                    ErrorMessage = "字段 {0} 范围" + $"[{Min},{Max})";
+                    ErrorMessage = "字段 {0} 范围" + $"[{Min},{Max}),当前值{val}";
                     return val >= Min && val < Max;
                 }
                 else if (!IncludeMin && IncludeMax)
                 {
-                    ErrorMessage = "字段 {0} 范围" + $"({Min},{Max}]";
+                    ErrorMessage = "字段 {0} 范围" + $"({Min},{Max}],当前值{val}";
                     return val > Min && val <= Max;
                 }
                 else
                 {
-                    ErrorMessage = "字段 {0} 范围" + $"({Min},{Max})";
+                    ErrorMessage = "字段 {0} 范围" + $"({Min},{Max}),当前值{val}";
                     return val > Min && val < Max;
                 }
 
@@ -336,12 +336,12 @@ namespace XdCxRhDW.Dto
             {
                 if (IncludeMin)
                 {
-                    ErrorMessage = "字段 {0} 必须大于等于" + $"{Min}";
+                    ErrorMessage = "字段 {0} 必须大于等于" + $"{Min},当前值{val}";
                     return val >= Min;
                 }
                 else
                 {
-                    ErrorMessage = "字段 {0} 必须大于" + $"{Min}";
+                    ErrorMessage = "字段 {0} 必须大于" + $"{Min},当前值{val}";
                     return val > Min;
                 }
             }
@@ -349,12 +349,12 @@ namespace XdCxRhDW.Dto
             {
                 if (IncludeMax)
                 {
-                    ErrorMessage = "字段 {0} 必须小于等于" + $"{Max}";
+                    ErrorMessage = "字段 {0} 必须小于等于" + $"{Max},当前值{val}";
                     return val <= Max;
                 }
                 else
                 {
-                    ErrorMessage = "字段 {0} 必须小于" + $"{Max}";
+                    ErrorMessage = "字段 {0} 必须小于" + $"{Max},当前值{val}";
                     return val < Max;
                 }
             }

+ 1 - 1
XdCxRhDw.Dto/PosDto/RHNoXlPosDto.cs

@@ -38,7 +38,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double SxDto { get; set; }
 
         /// <summary>

+ 1 - 1
XdCxRhDw.Dto/PosDto/RHPosDto.cs

@@ -38,7 +38,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double SxDto { get; set; }
 
         /// <summary>

+ 1 - 1
XdCxRhDw.Dto/PosDto/X2D1NoParPosDto.cs

@@ -38,7 +38,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double SxDto { get; set; }
 
         /// <summary>

+ 1 - 1
XdCxRhDw.Dto/PosDto/X2D1NoXlNoParlPosDto.cs

@@ -38,7 +38,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double SxDto { get; set; }
 
         /// <summary>

+ 1 - 1
XdCxRhDw.Dto/PosDto/X2D1NoXlPosDto.cs

@@ -39,7 +39,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double SxDto { get; set; }
 
         /// <summary>

+ 1 - 1
XdCxRhDw.Dto/PosDto/X2D1PosDto.cs

@@ -38,7 +38,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 目标双星时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double SxDto { get; set; }
 
         /// <summary>

+ 1 - 1
XdCxRhDw.Dto/PosDto/X2DtoDfoNoXlPosDto.cs

@@ -39,7 +39,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto { get; set; }
 
         /// <summary>

+ 1 - 1
XdCxRhDw.Dto/PosDto/X2DtoDfoPosDto.cs

@@ -39,7 +39,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto { get; set; }
 
         /// <summary>

+ 2 - 2
XdCxRhDw.Dto/PosDto/X3TwoDfoNoXlPosDto.cs

@@ -45,7 +45,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -61,7 +61,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto2 { get; set; }
 
         /// <summary>

+ 2 - 2
XdCxRhDw.Dto/PosDto/X3TwoDtoNoParPosDto.cs

@@ -44,7 +44,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -60,7 +60,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto2 { get; set; }
 
         /// <summary>

+ 2 - 2
XdCxRhDw.Dto/PosDto/X3TwoDtoNoXlNoParPosDto.cs

@@ -44,7 +44,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -60,7 +60,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto2 { get; set; }
 
         /// <summary>

+ 2 - 2
XdCxRhDw.Dto/PosDto/X3TwoDtoNoXlPosDto.cs

@@ -44,7 +44,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -60,7 +60,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto2 { get; set; }
 
         /// <summary>

+ 2 - 2
XdCxRhDw.Dto/PosDto/X3TwoDtoPosDto.cs

@@ -44,7 +44,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻1时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto1 { get; set; }
 
         /// <summary>
@@ -60,7 +60,7 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 主邻2时差(us)
         /// </summary>
-        [RangeDouble(-20000, 20000, IncludeMin = true)]
+        [RangeDouble(-30000, 30000, IncludeMin = true)]
         public double Dto2 { get; set; }
 
         /// <summary>

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov