|
@@ -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);
|
|
|
}
|
|
|
}
|
|
|
}
|