|
@@ -57,7 +57,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -174,7 +174,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
Serilog.Log.Error($"推算卫星{dto.MainCode}的ECEF星历出错.{ephMain.msg}");
|
|
|
return Error<PosResDto>($"推算卫星{dto.MainCode}的ECEF星历出错");
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -283,7 +283,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
}
|
|
|
settings = await db.SysSetings.FirstOrDefaultAsync();
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -423,7 +423,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
Serilog.Log.Error($"推算卫星{dto.AdjaCode}的ECEF星历出错.{ephAdja.msg}");
|
|
|
return Error<PosResDto>($"推算卫星{dto.AdjaCode}的ECEF星历出错");
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -535,7 +535,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
}
|
|
|
settings = await db.SysSetings.FirstOrDefaultAsync();
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -670,7 +670,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
Serilog.Log.Error($"推算卫星{dto.AdjaCode}的ECEF星历出错.{ephAdja.msg}");
|
|
|
return Error<PosResDto>($"推算卫星{dto.AdjaCode}的ECEF星历出错");
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -780,7 +780,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
}
|
|
|
settings = await db.SysSetings.FirstOrDefaultAsync();
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -923,7 +923,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
Serilog.Log.Error($"推算卫星{dto.AdjaCode}的ECEF星历出错.{ephAdja.msg}");
|
|
|
return Error<PosResDto>($"推算卫星{dto.AdjaCode}的ECEF星历出错");
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -1044,7 +1044,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
}
|
|
|
settings = await db.SysSetings.FirstOrDefaultAsync();
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -1204,7 +1204,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
Serilog.Log.Error($"推算卫星{dto.Adja2Code}的ECEF星历出错.{ephAdja2.msg}");
|
|
|
return Error<PosResDto>($"推算卫星{dto.Adja2Code}的ECEF星历出错");
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -1322,7 +1322,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
}
|
|
|
settings = await db.SysSetings.FirstOrDefaultAsync();
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -1476,7 +1476,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
Serilog.Log.Error($"推算卫星{dto.Adja2Code}的ECEF星历出错.{ephAdja2.msg}");
|
|
|
return Error<PosResDto>($"推算卫星{dto.Adja2Code}的ECEF星历出错");
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -1591,7 +1591,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
}
|
|
|
settings = await db.SysSetings.FirstOrDefaultAsync();
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -1753,7 +1753,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
Serilog.Log.Error($"推算卫星{dto.Adja2Code}的ECEF星历出错.{ephAdja2.msg}");
|
|
|
return Error<PosResDto>($"推算卫星{dto.Adja2Code}的ECEF星历出错");
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -1875,7 +1875,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
}
|
|
|
settings = await db.SysSetings.FirstOrDefaultAsync();
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -2014,7 +2014,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
Serilog.Log.Error($"推算卫星{dto.AdjaCode}的ECEF星历出错.{ephAdja.msg}");
|
|
|
return Error<PosResDto>($"推算卫星{dto.AdjaCode}的ECEF星历出错");
|
|
|
}
|
|
|
- using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime))
|
|
|
+ using (RHDWPartContext db = RHDWPartContext.GetContext(dto.SigTime,true))
|
|
|
{
|
|
|
var StationRes = db.StationRes.Add(new StationRes()
|
|
|
{
|
|
@@ -2172,9 +2172,9 @@ namespace XdCxRhDW.App.Controllers
|
|
|
foreach (var item in list)
|
|
|
{
|
|
|
var dayFile = Path.Combine(dir, item);
|
|
|
- if (!File.Exists(dayFile)) continue;
|
|
|
using (RHDWPartContext db = RHDWPartContext.GetContext(dayFile))
|
|
|
{
|
|
|
+ if (!db.DatabaseExist) continue;
|
|
|
var query = db.PosRes.Where(p => p.SigTime >= start && p.SigTime <= end && p.TaskInfoID == dto.TaskInfoID);
|
|
|
if (!dto.IncludeInvalidate)
|
|
|
query = query.Where(p => p.PosLon != 999);
|
|
@@ -2239,9 +2239,9 @@ namespace XdCxRhDW.App.Controllers
|
|
|
foreach (var item in list)
|
|
|
{
|
|
|
var dayFile = Path.Combine(dir, item);
|
|
|
- if (!File.Exists(dayFile)) continue;
|
|
|
using (RHDWPartContext db = RHDWPartContext.GetContext(dayFile))
|
|
|
{
|
|
|
+ if (!db.DatabaseExist) continue;
|
|
|
var query = db.PosRes.Where(p => p.SigTime >= start && p.SigTime <= end && p.TaskInfoID == dto.TaskInfoID);
|
|
|
if (!dto.IncludeInvalidate)
|
|
|
query = query.Where(p => p.PosLon != 999);
|
|
@@ -2317,6 +2317,7 @@ namespace XdCxRhDW.App.Controllers
|
|
|
{
|
|
|
using (RHDWPartContext db = RHDWPartContext.GetContext(dayFile))
|
|
|
{
|
|
|
+ if (!db.DatabaseExist) continue;
|
|
|
var query = db.PosRes.Where(p => p.TaskInfoID == dto.TaskInfoID);
|
|
|
if (!dto.IncludeInvalidate)
|
|
|
{
|