zoule 4 mēneši atpakaļ
vecāks
revīzija
a6e6752473
42 mainītis faili ar 577 papildinājumiem un 477 dzēšanām
  1. 1 1
      DW5S.App/CorTools/DetectToolForm.cs
  2. 1 1
      DW5S.App/CorTools/GpuCalcForm.cs
  3. 0 1
      DW5S.App/CorTools/ResampleForm.cs
  4. 17 13
      DW5S.App/CorTools/XlCalculateForm.cs
  5. 2 0
      DW5S.App/DW5S.App.csproj
  6. 1 1
      DW5S.App/EditForms/EditorTar.cs
  7. 18 18
      DW5S.App/EditForms/FixedStationEditor.cs
  8. 1 1
      DW5S.App/EditForms/PosTimeEditor.cs
  9. 8 2
      DW5S.App/EditForms/RHDTOParamEditor.cs
  10. 19 14
      DW5S.App/EditForms/SatEditor.cs
  11. 27 22
      DW5S.App/EditForms/SigDelayEditor.cs
  12. 16 14
      DW5S.App/EditForms/SigEditor.cs
  13. 1 1
      DW5S.App/EditForms/TargetEditor.cs
  14. 7 10
      DW5S.App/EditForms/TaskEditor.cs
  15. 24 14
      DW5S.App/EditForms/TaskEditorSignal.cs
  16. 1 1
      DW5S.App/EditForms/TaskHistoryTimeEditor.cs
  17. 1 1
      DW5S.App/EditForms/X1D1DTOParamEditor.cs
  18. 1 1
      DW5S.App/EditForms/X2D1DTOParamEditor.cs
  19. 1 1
      DW5S.App/EditForms/X2DTOParamEditor.cs
  20. 1 1
      DW5S.App/EditForms/X3DTOParamEditor.cs
  21. 23 11
      DW5S.App/EditForms/X3DfoParamEditor.cs
  22. 7 7
      DW5S.App/ExtensionsDev/MapControlEx.cs
  23. 1 0
      DW5S.App/ExtensionsDev/SearchLookUpEditExtension.cs
  24. 1 1
      DW5S.App/PopupControl/ShowCgCtrl.cs
  25. 1 1
      DW5S.App/PopupControl/ShowCheckCtrl.cs
  26. 1 1
      DW5S.App/PopupControl/ShowCxCtrl.cs
  27. 1 1
      DW5S.App/UserControl/CtrlCgRes.cs
  28. 1 1
      DW5S.App/UserControl/CtrlFixedStation.cs
  29. 292 320
      DW5S.App/UserControl/CtrlHome.cs
  30. 1 1
      DW5S.App/UserControl/CtrlRecTx.cs
  31. 1 1
      DW5S.App/UserControl/CtrlSat.cs
  32. 1 1
      DW5S.App/UserControl/CtrlSignal.cs
  33. 1 1
      DW5S.App/UserControl/CtrlSvrLog.cs
  34. 1 1
      DW5S.App/UserControl/CtrlSvrs.cs
  35. 1 1
      DW5S.App/UserControl/CtrlSysSettings.cs
  36. 1 1
      DW5S.App/UserControl/CtrlTarget.cs
  37. 1 1
      DW5S.App/UserControl/CtrlTx.cs
  38. 1 1
      DW5S.App/UserControl/CtrlXl.cs
  39. 36 0
      DW5S.Basic/ObjectExtension.cs
  40. 2 2
      DW5S.Controller/LogController.cs
  41. 40 3
      DW5S.Repostory/Repository/IRepository.cs
  42. 14 2
      DW5S.Repostory/Repository/XlRepository.cs

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

@@ -4,7 +4,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.IO;
 using System.Linq;

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

@@ -9,7 +9,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.IO;
 using System.IO.Compression;

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

@@ -5,7 +5,6 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
 using System.Drawing;
 using System.IO;
 using System.Linq;

+ 17 - 13
DW5S.App/CorTools/XlCalculateForm.cs

@@ -7,7 +7,6 @@ using System.Collections;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
 using System.Drawing;
 using System.IO;
 using System.Linq;
@@ -17,11 +16,17 @@ using DW5S.DTO;
 using DW5S.App.Model;
 using DW5S.Entity;
 using DW5S.Repostory;
+using Microsoft.Extensions.Logging;
 
 namespace DW5S.App.CorTools
 {
     public partial class XlCalculateForm : DevExpress.XtraEditors.XtraForm
     {
+        [Autowired]
+        private readonly ILogger logger;
+
+        [Autowired]
+        private readonly UnitOfWork unitOfWork;
         List<ModelSatEphRes> listEph = new List<ModelSatEphRes>();
 
         //选择卫星执行星历推算
@@ -29,13 +34,9 @@ namespace DW5S.App.CorTools
         {
             InitializeComponent();
             this.itemTle.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            List<SatInfo> list1 = new List<SatInfo>();//配置的卫星
-            using (RHDWContext db = new RHDWContext())
-            {
-                list1 = db.SatInfos.OrderBy(p=>p.SatCode).ToList();
-            }
-
-            var list2 = XlRepository.GetAllSat().Result;//所有卫星
+            var list1 = unitOfWork.Reps<SatInfo>().GetAllAsync(p => p.SatCode).Result;
+            var repsXl = unitOfWork.Reps<XlInfo>() as XlRepository;
+            var list2 = repsXl.GetAllSat().Result;//所有卫星
             list2.RemoveAll(p => list1.Select(t => t.SatCode).Contains(p.SatCode));
             list2.InsertRange(0, list1);
             this.txtSat.UseDefault().SetData(list2, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
@@ -112,6 +113,7 @@ namespace DW5S.App.CorTools
             listEph.Clear();
             try
             {
+                var repsXl = unitOfWork.Reps<XlInfo>() as XlRepository;
                 if (!string.IsNullOrEmpty(txtEndTime.Text) && !string.IsNullOrEmpty(txtSpanSeconds.Text))
                 {
                     var XlCalcMultDto = new XlCalcMultDto()
@@ -127,7 +129,7 @@ namespace DW5S.App.CorTools
                     else
                     {
                         var sat = txtSat.EditValue as SatInfo;
-                        var xlInfo = await XlRepository.GetLatestAsync(sat.SatCode, startTime);
+                        var xlInfo = await repsXl.GetLatestAsync(sat.SatCode, startTime);
                         XlCalcMultDto.tleStr = xlInfo.TwoLine;
                     }
                     var ephRes = await HttpHelper.PostRequestAsync<List<ModelSatEphRes>>(SysConfig.GetUrl("Xl/CalcMult"), XlCalcMultDto);
@@ -154,7 +156,7 @@ namespace DW5S.App.CorTools
                     else
                     {
                         var sat = txtSat.EditValue as SatInfo;
-                        var xlInfo = await XlRepository.GetLatestAsync(sat.SatCode, XlCalcDto.SigTime);
+                        var xlInfo = await repsXl.GetLatestAsync(sat.SatCode, XlCalcDto.SigTime);
                         XlCalcDto.tleStr = xlInfo.TwoLine;
                     }
                     var ephRes = await HttpHelper.PostRequestAsync<ModelSatEphRes>(SysConfig.GetUrl("Xl/Calc"), XlCalcDto);
@@ -171,12 +173,14 @@ namespace DW5S.App.CorTools
             }
             catch (TaskCanceledException)
             {
-                DW5S.Framework.LogHelper.Warning("星历推算Http接口调用超时");
-                DxHelper.MsgBoxHelper.ShowInfo("星历推算Http接口调用超时");
+                string msg = "星历推算Http接口调用超时";
+                logger.LogWarning(msg);
+                DxHelper.MsgBoxHelper.ShowWarning("星历推算Http接口调用超时");
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error("星历推算异常", ex);
+                string msg = "星历推算异常";
+                logger.LogError(ex,msg);
                 DxHelper.MsgBoxHelper.ShowError("星历推算异常");
             }
         }

+ 2 - 0
DW5S.App/DW5S.App.csproj

@@ -14,6 +14,8 @@
 
   <ItemGroup>
     <PackageReference Include="DevExpress.Win.Design" Version="23.2.3" />
+    <PackageReference Include="Microsoft.Data.Sqlite.Core" Version="9.0.1" />
+    <PackageReference Include="System.Management" Version="9.0.1" />
   </ItemGroup>
 
   <ItemGroup>

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

@@ -4,7 +4,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -4,23 +4,27 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
 using System.Drawing;
 using System.Linq;
-using System.Runtime.Remoting.Metadata.W3cXsd2001;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Documents;
 using System.Windows.Forms;
 using DW5S.Entity;
 using DW5S.Repostory;
+using Microsoft.Extensions.Logging;
 
 namespace DW5S.App.EditForms
 {
     public partial class FixedStationEditor : DevExpress.XtraEditors.XtraForm
     {
-        public FixedStation info;
+        [Autowired]
+        private readonly ILogger logger;
+
+        [Autowired]
+        private readonly UnitOfWork unitOfWork;
 
+        public FixedStation info;
         private List<FixedStation> infos;
         public FixedStationEditor()
         {
@@ -39,17 +43,12 @@ namespace DW5S.App.EditForms
         private async void SatEditor_Load(object sender, EventArgs e)
         {
             infos = new List<FixedStation>();
-            List<SigInfo> sigs;
-            using (RHDWContext db = new RHDWContext())
-            {
-                var res = await db.FixedStation.ToListAsync();
-                infos.AddRange(res);
-                sigs = await db.SigInfos.ToListAsync();
-                if (sigs == null)
-                    sigs = new List<SigInfo>();
-                this.txtFreqUp.UseDefault().SetData(sigs, nameof(SigInfo.FreqUpDis)).UseDoubleClickToSelectAll();
-            }
-
+            var repsFixed = unitOfWork.Reps<FixedStation>();
+            var res = await repsFixed.GetAllAsync();
+            infos.AddRange(res);
+            var repsSig = unitOfWork.Reps<SigInfo>();
+           var sigs = await repsSig.GetAllAsync();
+            this.txtFreqUp.UseDefault().SetData(sigs, nameof(SigInfo.FreqUpDis)).UseDoubleClickToSelectAll();
             if (this.Text == "固定站编辑" && info != null)
             {
                 this.txtName.Text = info.StationName;
@@ -72,13 +71,13 @@ namespace DW5S.App.EditForms
             {
                 var name = txtName.Text.Trim();
 
-                if (infos.Any(i => i.ID != info.ID && i.StationName == name))
+                if (infos.Any(i => i.Id != info.Id && i.StationName == name))
                 {
                     DxHelper.MsgBoxHelper.ShowError($"已经存在名称为[{name}]的固定站!");
                     return;
                 }
                 var freqUpHz = (txtFreqUp.EditValue as SigInfo).FreqUp;
-                if (infos.Any(i => i.ID != info.ID && i.FreqUpHz == freqUpHz))
+                if (infos.Any(i => i.Id != info.Id && i.FreqUpHz == freqUpHz))
                 {
                     DxHelper.MsgBoxHelper.ShowError($"已经存在上行频点为[{freqUpHz / 1e6:f3}MHz]的固定站!");
                     return;
@@ -113,8 +112,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error("编辑固定站信息出错", ex);
-                DxHelper.MsgBoxHelper.ShowError("编辑固定站信息出错");
+                string msg = "编辑固定站信息出错";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
     }

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

@@ -5,7 +5,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

+ 8 - 2
DW5S.App/EditForms/RHDTOParamEditor.cs

@@ -6,7 +6,6 @@ using System.CodeDom;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
 using System.Drawing;
 using System.Linq;
 using System.Text;
@@ -15,11 +14,18 @@ using DW5S.KxcApi;
 using DW5S.DTO;
 using DW5S.Entity;
 using DW5S.Repostory;
+using Microsoft.Extensions.Logging;
 
 namespace DW5S.App.EditForms
 {
     public partial class RHDTOParamEditor : DevExpress.XtraEditors.XtraUserControl
     {
+        [Autowired]
+        private readonly ILogger logger;
+
+        [Autowired]
+        private readonly UnitOfWork unitOfWork;
+
         private MapControl mapControl1;
         private PosRes info;
         private CgRes cg;
@@ -28,7 +34,7 @@ namespace DW5S.App.EditForms
         {
             InitializeComponent();
             this.info = info;
-            itemSigTime.Text = $"{itemSigTime.Text}({SysConfig.Config.TimeZoneUTC})";
+            itemSigTime.Text = $"{itemSigTime.Text}";
             this.layoutControl1.UseDefault();
             txtSigTime.UseDefault();
             this.Text = $"{info.PosResType.GetEnumDisplayName()}时差参数";

+ 19 - 14
DW5S.App/EditForms/SatEditor.cs

@@ -4,21 +4,26 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
 using System.Drawing;
 using System.Linq;
-using System.Runtime.Remoting.Metadata.W3cXsd2001;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Documents;
 using System.Windows.Forms;
 using DW5S.Entity;
 using DW5S.Repostory;
+using Microsoft.Extensions.Logging;
 
 namespace DW5S.App.EditForms
 {
     public partial class SatEditor : DevExpress.XtraEditors.XtraForm
     {
+        [Autowired]
+        private readonly ILogger logger;
+
+        [Autowired]
+        private readonly UnitOfWork unitOfWork;
+
         public SatInfo info;
 
         private List<SatInfo> infos;
@@ -38,21 +43,20 @@ namespace DW5S.App.EditForms
         }
         private async void SatEditor_Load(object sender, EventArgs e)
         {
-            var listXl = await XlRepository.GetAllSat();
-            this.searchLookUpEdit1.UseDefault().SetData(listXl,nameof(XlInfo.Sat)).UseDoubleClickToSelectAll();
+            var repsXl = unitOfWork.Reps<XlInfo>() as XlRepository;
+            var listXl = await repsXl.GetAllSat();
+            this.searchLookUpEdit1.UseDefault().SetData(listXl, nameof(XlInfo.Sat)).UseDoubleClickToSelectAll();
             if (this.Text == "编辑卫星" && info != null)
             {
                 this.txtSatName.Text = info.SatName;
                 this.txtSatLon.Text = info.SatLon?.ToString();
-                this.txtSatTrans.Text=info.SatTrans?.ToString();
+                this.txtSatTrans.Text = info.SatTrans?.ToString();
                 this.searchLookUpEdit1.EditValue = info.Sat;
             }
+
             infos = new List<SatInfo>();
-            using (RHDWContext db = new RHDWContext())
-            {
-                var res = await db.SatInfos.ToListAsync();
-                infos.AddRange(res);
-            }
+            var res = await unitOfWork.Reps<SatInfo>().GetAllAsync();
+            infos.AddRange(res);
         }
 
         private void btnCancel_Click(object sender, EventArgs e)
@@ -67,8 +71,8 @@ namespace DW5S.App.EditForms
                 var sat = searchLookUpEdit1.Text;
                 var idx = sat.LastIndexOf('(');
                 var satCodeStr = sat.Substring(idx + 1, sat.Length - idx - 2);
-                int satCode= Convert.ToInt32(satCodeStr);
-                if (infos.Any(i => i.ID != info.ID && i.SatCode == satCode))
+                int satCode = Convert.ToInt32(satCodeStr);
+                if (infos.Any(i => i.Id != info.Id && i.SatCode == satCode))
                 {
 
                     DxHelper.MsgBoxHelper.ShowError($"卫星[{satCode}]已经存在!");
@@ -84,8 +88,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error("编辑卫星信息出错", ex);
-                DxHelper.MsgBoxHelper.ShowError("编辑卫星信息出错");
+                string msg = "编辑卫星信息出错";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
     }

+ 27 - 22
DW5S.App/EditForms/SigDelayEditor.cs

@@ -7,21 +7,26 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
 using System.Drawing;
 using System.Linq;
-using System.Runtime.Remoting.Metadata.W3cXsd2001;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Documents;
 using System.Windows.Forms;
 using DW5S.Entity;
 using DW5S.Repostory;
+using Microsoft.Extensions.Logging;
+using Serilog.Core;
 
 namespace DW5S.App.EditForms
 {
     public partial class SigDelayEditor : DevExpress.XtraEditors.XtraForm
     {
+        [Autowired]
+        private readonly ILogger logger;
+
+        [Autowired]
+        private readonly UnitOfWork unitOfWork;
         public SigDelay info;
         public int sigId;
         public SigDelayEditor(int sigId)
@@ -42,15 +47,13 @@ namespace DW5S.App.EditForms
         }
         private async void SatEditor_Load(object sender, EventArgs e)
         {
-            using (RHDWContext db = new RHDWContext())
+            var repsSat = unitOfWork.Reps<SatInfo>();
+            var sats = await repsSat.GetAllAsync();
+            this.txtSat.UseDefault().SetData(sats, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+            if (this.Text == "编辑转发延迟" && info != null)
             {
-                var sats = await db.SatInfos.ToListAsync();
-                this.txtSat.UseDefault().SetData(sats, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
-                if (this.Text == "编辑转发延迟" && info != null)
-                {
-                    this.txtSat.EditValue = sats.FirstOrDefault(f=>f.SatCode== info.SatInfoSatCode);
-                    this.txtDelay.EditValue = info.Delay;
-                }
+                this.txtSat.EditValue = sats.FirstOrDefault(f => f.SatCode == info.SatInfoSatCode);
+                this.txtDelay.EditValue = info.Delay;
             }
         }
 
@@ -74,27 +77,29 @@ namespace DW5S.App.EditForms
                     return;
                 }
                 var satInfo = (SatInfo)txtSat.EditValue;
-                using (RHDWContext db = new RHDWContext())
+
+                var repsSigDelay = unitOfWork.Reps<SigDelay>();
+
+                var list = await repsSigDelay.FindAsync(w => w.SigInfoId == sigId);
+                if (list.Where(w => w.Id != info.Id).Any(a => a.SatInfoSatCode == satInfo.SatCode))
                 {
-                    var list = await db.SigDelays.Where(w => w.SigInfoId == sigId).ToListAsync();
-                    if (list.Where(w => w.ID != info.ID).Any(a => a.SatInfoSatCode == satInfo.SatCode))
-                    {
-                        DxHelper.MsgBoxHelper.ShowInfo("已添加该卫星");
-                        return;
-                    }
+                    DxHelper.MsgBoxHelper.ShowInfo("已添加该卫星");
+                    return;
                 }
+
                 info.SigInfoId = sigId;
                 info.SatInfoSatCode = satInfo.SatCode;
-                info.Sat = $"[{satInfo.SatLon}°]{satInfo.SatName}({satInfo.SatCode})"; 
+                info.Sat = $"[{satInfo.SatLon}°]{satInfo.SatName}({satInfo.SatCode})";
                 info.Delay = Convert.ToDouble(txtDelay.EditValue);
-              
-               
+
+
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error("编辑转发延迟出错", ex);
-                DxHelper.MsgBoxHelper.ShowError("编辑转发延迟出错");
+                string msg = "编辑转发延迟出错";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
     }

+ 16 - 14
DW5S.App/EditForms/SigEditor.cs

@@ -5,25 +5,28 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
 using System.Drawing;
 using System.Linq;
-using System.Runtime.Remoting.Metadata.W3cXsd2001;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Documents;
 using System.Windows.Forms;
 using DW5S.Entity;
 using DW5S.Repostory;
+using Microsoft.Extensions.Logging;
 
 namespace DW5S.App.EditForms
 {
     public partial class SigEditor : DevExpress.XtraEditors.XtraForm
     {
-       
+        [Autowired]
+        private readonly ILogger logger;
+
+        [Autowired]
+        private readonly UnitOfWork unitOfWork;
         public SigInfo info;
 
-       private   List<SigInfo> infos;
+        private List<SigInfo> infos;
         public SigEditor()
         {
             InitializeComponent();
@@ -59,11 +62,9 @@ namespace DW5S.App.EditForms
                 }
             }
             infos = new List<SigInfo>();
-            using (RHDWContext db = new RHDWContext())
-            {
-                var res = await db.SigInfos.ToListAsync();
-                infos.AddRange(res);
-            }
+            var repsSig = unitOfWork.Reps<SigInfo>();
+            var res = await repsSig.GetAllAsync();
+            infos.AddRange(res);
         }
 
         private void btnCancel_Click(object sender, EventArgs e)
@@ -100,9 +101,9 @@ namespace DW5S.App.EditForms
                     dxErrorProvider.SetError(txtSnr, "门限格式错误");
                     return;
                 }
-                long  frequp = (long)(freqUp * 1000000);
-               
-                if (infos.Any(i => i.ID != info.ID && i.FreqUp == frequp))
+                long frequp = (long)(freqUp * 1000000);
+
+                if (infos.Any(i => i.Id != info.Id && i.FreqUp == frequp))
                 {
 
                     DxHelper.MsgBoxHelper.ShowError($"上行频点[{freqUp}]已经存在!");
@@ -123,8 +124,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error("编辑信号信息出错", ex);
-                DxHelper.MsgBoxHelper.ShowError("编辑信号信息出错");
+                string msg = "编辑信号信息出错";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
 

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

@@ -5,7 +5,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -111,7 +111,6 @@ namespace DW5S.App.EditForms
                 if (this.Text == "添加任务")
                 {
                     var repsTask = unitOfWork.Reps<TaskInfo>();
-
                     if (await repsTask.FirstOrDefaultAsync(p => p.TaskName == txtTaskName.Text) != null)
                     {
                         dxErrorProvider.SetError(txtTaskName, "任务名称重复");
@@ -120,14 +119,11 @@ namespace DW5S.App.EditForms
                 }
                 else
                 {
-                    using (RHDWContext db = new RHDWContext())
+                    var repsTask = unitOfWork.Reps<TaskInfo>();
+                    if (await repsTask.FirstOrDefaultAsync(p => p.Id != info.Id && p.TaskName == txtTaskName.Text) != null)
                     {
-                        if (await repsTask.FirstOrDefaultAsync(p => p.TaskName == txtTaskName.Text) != null)
-                            if (repsTask.FirstOrDefaultAsync(p => p.ID != info.ID && p.TaskName == txtTaskName.Text))
-                        {
-                            dxErrorProvider.SetError(txtTaskName, "任务名称重复");
-                            return;
-                        }
+                        dxErrorProvider.SetError(txtTaskName, "任务名称重复");
+                        return;
                     }
                 }
                 if (posType == EnumPosType.X1D1CX)
@@ -221,8 +217,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error("编辑任务信息出错", ex);
-                DxHelper.MsgBoxHelper.ShowError("编辑任务信息出错");
+                string msg = "编辑任务信息出错";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
 

+ 24 - 14
DW5S.App/EditForms/TaskEditorSignal.cs

@@ -24,11 +24,20 @@ using System.Windows.Forms;
 using DW5S.DTO;
 using DW5S.Entity;
 using DW5S.Repostory;
+using Microsoft.Extensions.Logging;
+using Serilog.Core;
+using Microsoft.EntityFrameworkCore;
 
 namespace DW5S.App.EditForms
 {
     public partial class TaskEditorSignal : DevExpress.XtraEditors.XtraForm
     {
+        [Autowired]
+        private readonly ILogger logger;
+
+        [Autowired]
+        private readonly UnitOfWork unitOfWork;
+
         public TaskInfo info;
         public List<SigInfo> listSigInfo = new List<SigInfo>();
         public List<SigInfo> listSigInfoSelected = new List<SigInfo>();
@@ -54,22 +63,22 @@ namespace DW5S.App.EditForms
             try
             {
                 gridTaskSignal.UseDefault(listSigInfo).UseMultiSelect().UseRowNumber().DrawGridColumnHeaderCheckBox();
-                using (var db = new RHDWContext())
+               var repsFixed= unitOfWork.Reps<FixedStation>();
+                var fixedStations = await repsFixed.FindAsync(p => p.Enable);
+
+                var repsSig = unitOfWork.Reps<SigInfo>();
+                var items = await repsSig.GetAllAsync(p => p.FreqUp);
+                listSigInfo.AddRange(items);
+                foreach (var item in listSigInfo)
                 {
-                    var fixedStations = await db.FixedStation.Where(p => p.Enable).ToListAsync();
-                    var items = await db.SigInfos.OrderBy(p => p.FreqUp).ToListAsync();
-                    listSigInfo.AddRange(items);
-                    foreach (var item in listSigInfo)
-                    {
-                        if (fixedStations.Any(p => p.FreqUpHz == item.FreqUp))
-                            item.IsFixedStationFreq = "✔";
-                        else
-                            item.IsFixedStationFreq = "✖";
-                    }
+                    if (fixedStations.Any(p => p.FreqUpHz == item.FreqUp))
+                        item.IsFixedStationFreq = "✔";
+                    else
+                        item.IsFixedStationFreq = "✖";
                 }
                 foreach (var item in listSigInfoSelected)
                 {
-                    var selectedIdx = listSigInfo.FindIndex(p => p.ID == item.ID);
+                    var selectedIdx = listSigInfo.FindIndex(p => p.Id == item.Id);
                     if (selectedIdx >= 0)
                         this.gridViewTaskSignal.SelectRow(selectedIdx);
                 }
@@ -77,8 +86,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error("查询信号信息异常", ex);
-                DxHelper.MsgBoxHelper.ShowError("查询信号信息异常");
+                var msg = "查询信号信息异常";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
 

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

@@ -5,7 +5,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -6,7 +6,7 @@ using System.CodeDom;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -7,7 +7,7 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Configuration;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -2,7 +2,7 @@
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using DW5S.KxcApi;

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

@@ -2,7 +2,7 @@
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using DW5S.KxcApi;

+ 23 - 11
DW5S.App/EditForms/X3DfoParamEditor.cs

@@ -9,11 +9,18 @@ using DW5S.DTO;
 using DW5S.Entity;
 using DW5S.Repostory;
 using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Logging;
 
 namespace DW5S.App.EditForms
 {
     public partial class X3DfoParamEditor : DevExpress.XtraEditors.XtraUserControl
     {
+        [Autowired]
+        private readonly ILogger logger;
+
+        [Autowired]
+        private readonly UnitOfWork unitOfWork;
+
         private PosRes info;
         private CgRes cg;
         private MapControl mapControl1;
@@ -263,8 +270,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error($"{info.PosResType.GetEnumDisplayName()}手动定位失败.PosID={info.ID},SigTime={info.SigTime}", ex);
-                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败,{ex.Message}");
+                string msg = $"{info.PosResType.GetEnumDisplayName()}手动定位失败.PosID={info.Id},SigTime={info.SigTime}";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
 
@@ -279,20 +287,21 @@ namespace DW5S.App.EditForms
             var sigTime = this.sigTime.DateTime;
             try
             {
+                var repsXl = unitOfWork.Reps<XlInfo>() as XlRepository;
 
-                var xlInfo = await XlRepository.GetLatestAsync(cg.MainCode.Value, sigTime);
+                var xlInfo = await repsXl.GetLatestAsync(cg.MainCode.Value, sigTime);
                 if (xlInfo == null)
                 {
                     DxHelper.MsgBoxHelper.ShowWarning($"卫星:{cg.MainCode.Value}未找到对应的星历信息,请导入星历");
                     return;
                 }
-                var xlInfo1 = await XlRepository.GetLatestAsync(cg.Adja1Code.Value, sigTime);
+                var xlInfo1 = await repsXl.GetLatestAsync(cg.Adja1Code.Value, sigTime);
                 if (xlInfo1 == null)
                 {
                     DxHelper.MsgBoxHelper.ShowWarning($"卫星:{cg.Adja1Code.Value}未找到对应的星历信息,请导入星历");
                     return;
                 }
-                var xlInfo2 = await XlRepository.GetLatestAsync(cg.Adja2Code.Value, sigTime);
+                var xlInfo2 = await repsXl.GetLatestAsync(cg.Adja2Code.Value, sigTime);
                 if (xlInfo2 == null)
                 {
                     DxHelper.MsgBoxHelper.ShowWarning($"卫星:{cg.Adja2Code.Value}未找到对应的星历信息,请导入星历");
@@ -316,8 +325,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error($"手动{info.PosResType.GetEnumDisplayName()}推算星历失败.PosID={info.ID},SigTime={info.SigTime}", ex);
-                DxHelper.MsgBoxHelper.ShowWarning($"手动{info.PosResType.GetEnumDisplayName()}推算星历失败,{ex.Message}");
+                string msg = $"手动{info.PosResType.GetEnumDisplayName()}推算星历失败.PosID={info.Id},SigTime={info.SigTime}";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
 
         }
@@ -369,8 +379,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败.PosID={info.ID},SigTime={info.SigTime}", ex);
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败,{ex.Message}");
+                string msg = $"绘制{info.PosResType.GetEnumDisplayName()}时差线失败.PosID={info.Id},SigTime={info.SigTime}";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
 
@@ -430,8 +441,9 @@ namespace DW5S.App.EditForms
             }
             catch (Exception ex)
             {
-                DW5S.Framework.LogHelper.Error($"绘制{info.PosResType.GetEnumDisplayName()}频差线失败.PosID={info.ID},SigTime={sigTime}", ex);
-                DxHelper.MsgBoxHelper.ShowError($"绘制{info.PosResType.GetEnumDisplayName()}频差线失败,{ex.Message}");
+                string msg = $"绘制{info.PosResType.GetEnumDisplayName()}频差线失败.PosID={info.Id},SigTime={sigTime}";
+                logger.LogError(ex, msg);
+                DxHelper.MsgBoxHelper.ShowError(msg);
             }
         }
     }

+ 7 - 7
DW5S.App/ExtensionsDev/MapControlEx.cs

@@ -442,7 +442,7 @@ public static class MapControlEx
             view.ClearSelection();
             for (int i = 0; i < view.RowCount; i++)
             {
-                if ((view.GetRow(i) as T).ID == t.ID)
+                if ((view.GetRow(i) as T).Id == t.Id)
                 {
                     view.FocusedRowHandle = i;
                     view.SelectRow(i);
@@ -710,7 +710,7 @@ public static class MapControlEx
     {
         if (item == null) return;
         var innerData = ctrl.Tag as InnerData;
-        var key = innerData._dataCache.Keys.Where(p => p.ID == item.ID).FirstOrDefault();
+        var key = innerData._dataCache.Keys.Where(p => p.Id == item.Id).FirstOrDefault();
         if (key != null)
         {
             innerData.posStorge.Items.Remove(innerData._dataCache[key]);
@@ -755,7 +755,7 @@ public static class MapControlEx
     {
         if (item == null || item.PosLon == 999 || item.PosLat == 999) return;
         var innerData = ctrl.Tag as InnerData;
-        var key = innerData._dataCache.Keys.Where(p => p.ID == item.ID).FirstOrDefault();
+        var key = innerData._dataCache.Keys.Where(p => p.Id == item.Id).FirstOrDefault();
         if (key != null)
         {
             var mapDot = innerData._dataCache[key] as MapDot;
@@ -815,7 +815,7 @@ public static class MapControlEx
         var innerData = ctrl.Tag as InnerData;
         foreach (var item in items)
         {
-            var key = innerData._dataCache.Keys.Where(p => p.ID == item.ID).FirstOrDefault();
+            var key = innerData._dataCache.Keys.Where(p => p.Id == item.Id).FirstOrDefault();
             if (key != null)
             {
                 var mapDot = innerData._dataCache[key] as MapDot;
@@ -944,7 +944,7 @@ public static class MapControlEx
             try
             {
                 string conStr = string.Format("Data Source=\"{0}\";Page Size=32768", files[0]);
-                var con = new System.Data.SQLite.SQLiteConnection(conStr);
+                var con = new Microsoft.Data.Sqlite.SqliteConnection(conStr);
                 con.Open();
                 con.Close();
                 localGmdbDataEnable = true;
@@ -2946,7 +2946,7 @@ public static class MapControlEx
     #region ImageLayer数据源接口实现(本地和Http接口)
     class ImageTileSource : IImageTileSource
     {
-        System.Data.SQLite.SQLiteConnection con;
+        Microsoft.Data.Sqlite.SqliteConnection con;
         public ImageTileSource()
         {
             var files = Directory.GetFiles(Application.StartupPath, "Data.gmdb", SearchOption.AllDirectories);
@@ -2955,7 +2955,7 @@ public static class MapControlEx
                 try
                 {
                     conStr = string.Format(conStr, files[0]);
-                    con = new System.Data.SQLite.SQLiteConnection(conStr);
+                    con = new Microsoft.Data.Sqlite.SqliteConnection(conStr);
                     con.Open();
                 }
                 catch

+ 1 - 0
DW5S.App/ExtensionsDev/SearchLookUpEditExtension.cs

@@ -64,6 +64,7 @@ namespace ExtensionsDev
         /// <param name="displayField"></param>
         public static SearchLookUpEdit SetData<T>(this SearchLookUpEdit ctrl, IEnumerable<T> data, string displayField = "")
         {
+            if (data == null) data = new List<T>();
             ctrl.QueryPopUp += Ctrl_QueryPopUp;
             ctrl.Properties.DataSource = data;
             GridView view = ctrl.Properties.View;

+ 1 - 1
DW5S.App/PopupControl/ShowCgCtrl.cs

@@ -4,7 +4,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

+ 1 - 1
DW5S.App/PopupControl/ShowCheckCtrl.cs

@@ -3,7 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

+ 1 - 1
DW5S.App/PopupControl/ShowCxCtrl.cs

@@ -3,7 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -10,7 +10,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Diagnostics;
 using System.Drawing;
 using System.IO;

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

@@ -1,7 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.Data.Entity;
+
 using System.Linq;
 using System.Threading.Tasks;
 using System.Windows.Forms;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 292 - 320
DW5S.App/UserControl/CtrlHome.cs


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

@@ -2,7 +2,7 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.Data.Entity;
+
 using System.Linq;
 using System.Threading.Tasks;
 using System.Windows.Forms;

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

@@ -1,7 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.Data.Entity;
+
 using System.Linq;
 using System.Threading.Tasks;
 using System.Windows.Forms;

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

@@ -3,7 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -8,7 +8,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -5,7 +5,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -3,7 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Net.Sockets;

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

@@ -5,7 +5,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -3,7 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
-using System.Data.Entity;
+
 using System.Drawing;
 using System.Linq;
 using System.Text;

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

@@ -4,7 +4,7 @@ using DxHelper;
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.Data.Entity;
+
 using System.Diagnostics;
 using System.Linq;
 using System.Threading.Tasks;

+ 36 - 0
DW5S.Basic/ObjectExtension.cs

@@ -0,0 +1,36 @@
+using System;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Text.Encodings.Web;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using System.Text.Unicode;
+
+public static class ObjectExtension
+{
+    public static string ToJsonStr(this object obj)
+    {
+        return Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+    }
+
+    public static T JsonStrToObj<T>(this string obj)
+    {
+        return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(obj);
+    }
+
+
+    /// <summary>
+    /// 将源对象通过Json序列化为一个新对象
+    /// </summary>
+    /// <typeparam name="T">返回对象泛型类型</typeparam>
+    /// <param name="obj">源对象</param>
+    /// <returns></returns>
+    public static T To<T>(this object obj)
+    {
+        var str = obj.ToJsonStr();
+        var objNew = str.JsonStrToObj<T>();
+        return objNew;
+
+    }
+}

+ 2 - 2
DW5S.Controller/LogController.cs

@@ -133,8 +133,8 @@ namespace DW5S.App.Controllers
             try
             {
                 var repsLog = unitOfWork.Reps<LogRes>();
-                var ids = dto.Select(p =>p.ID);
-                repsLog.DeleteById(ids);
+                var ids = dto.Select(p => p.ID);
+                await repsLog.DeleteAsync(p => ids.Contains(p.Id));
                 await unitOfWork.SaveAsync();
                 return Success();
             }

+ 40 - 3
DW5S.Repostory/Repository/IRepository.cs

@@ -12,14 +12,15 @@ namespace DW5S.Repostory
     public interface IRepository<T>
     {
         IQueryable<T> AsQueryable();
-
-
         Task<T> GetByIdAsync(object id);
         Task<IEnumerable<T>> GetAllAsync();
+        Task<IEnumerable<T>> GetAllAsync<TKey>(Expression<Func<T, TKey>> keySelector = null, bool asc = true);
         Task<IEnumerable<T>> FindAsync(Expression<Func<T, bool>> predicate);
+        Task<IEnumerable<T>> FindAsync<TKey>(Expression<Func<T, bool>> predicate, Expression<Func<T, TKey>> keySelector = null, bool asc = true);
         Task<IEnumerable<Res>> GetDistinctAsync<Res>(Expression<Func<T, Res>> selector);
 
         Task<T> FirstOrDefaultAsync(Expression<Func<T, bool>> predicate = null);
+        Task<bool> AnyAsync(Expression<Func<T, bool>> predicate = null);
         Task<T> AddAsync(T entity);
         Task AddRangeAsync(IEnumerable<T> entitis);
 
@@ -53,10 +54,41 @@ namespace DW5S.Repostory
             return await dbSet.ToListAsync();
         }
 
+        public async Task<IEnumerable<T>> GetAllAsync<TKey>(Expression<Func<T, TKey>> keySelector = null, bool asc = true)
+        {
+            if (keySelector == null)
+            {
+                return await dbSet.ToListAsync();
+            }
+            else
+            {
+                if (asc)
+                    return await dbSet.OrderBy(keySelector).ToListAsync();
+                else
+                    return await dbSet.OrderByDescending(keySelector).ToListAsync();
+
+            }
+        }
+
         public async Task<IEnumerable<T>> FindAsync(Expression<Func<T, bool>> predicate)
         {
             return await dbSet.Where(predicate).ToListAsync();
         }
+        public async Task<IEnumerable<T>> FindAsync<TKey>(Expression<Func<T, bool>> predicate,Expression<Func<T, TKey>> keySelector = null, bool asc = true)
+        {
+            if (keySelector == null)
+            {
+                return await dbSet.Where(predicate).ToListAsync();
+            }
+            else
+            {
+                if (asc)
+                    return await dbSet.Where(predicate).OrderBy(keySelector).ToListAsync();
+                else
+                    return await dbSet.Where(predicate).OrderByDescending(keySelector).ToListAsync();
+
+            }
+        }
         public async Task<T> FirstOrDefaultAsync(Expression<Func<T, bool>> predicate = null)
         {
             if (predicate != null)
@@ -115,7 +147,12 @@ namespace DW5S.Repostory
 
         public async Task<int> DeleteAsync(Expression<Func<T, bool>> predicate = null)
         {
-           return await dbSet.Where(predicate).ExecuteDeleteAsync();
+            return await dbSet.Where(predicate).ExecuteDeleteAsync();
+        }
+
+        public async Task<bool> AnyAsync(Expression<Func<T, bool>> predicate = null)
+        {
+            return await dbSet.AnyAsync(predicate);
         }
     }
 

+ 14 - 2
DW5S.Repostory/Repository/XlRepository.cs

@@ -35,6 +35,18 @@ namespace DW5S.Repostory
             return count;
         }
 
+        public async Task<List<SatInfo>> GetAllSat()
+        {
+            var data =await dbSet.DistinctBy(p => p.SatCode).OrderByDescending(p => p.TimeUTC).ToListAsync();
+            var sats = data.Select(p => new SatInfo()
+            {
+                SatCode = p.SatCode,
+                SatName = p.SatName,
+                SatLon = p.Lon,
+            }).ToList();
+            return sats;
+        }
+
         /// <summary>
         /// 获取数据库双行根数
         /// </summary>
@@ -70,9 +82,9 @@ namespace DW5S.Repostory
         {
             try
             {
-                var max =await dbSet.Where(p => p.SatCode == satCode && p.TimeUTC >= sigTime)
+                var max = await dbSet.Where(p => p.SatCode == satCode && p.TimeUTC >= sigTime)
                     .OrderBy(p => p.TimeUTC).FirstOrDefaultAsync();
-                var min =await dbSet.Where(p => p.SatCode == satCode && p.TimeUTC <= sigTime)
+                var min = await dbSet.Where(p => p.SatCode == satCode && p.TimeUTC <= sigTime)
                     .OrderByDescending(p => p.TimeUTC).FirstOrDefaultAsync();
 
                 if (max == null && min == null)

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels