zoulei 1 年之前
父節點
當前提交
a9a483f7a3
共有 3 個文件被更改,包括 27 次插入19 次删除
  1. 11 3
      Service/X2D1NoRefTaskServer/Service/TaskService.cs
  2. 1 1
      XdCxRhDW.App/App.config
  3. 15 15
      XdCxRhDW.App/Controllers/PosController.cs

+ 11 - 3
Service/X2D1NoRefTaskServer/Service/TaskService.cs

@@ -436,7 +436,7 @@ namespace X2D1NoRefTaskServer.Service
                             }
                             if (capTime == lastTime)
                             {
-                               await WaitFileEnd(dto.ID, sameTimeFiles.First(), capSeconds, cts);
+                                await WaitFileEnd(dto.ID, sameTimeFiles.First(), capSeconds, cts);
                             }
                             LogHelper.Info($"【任务{dto.ID}】[{capTime:yyyyMMddHHmmss}]时刻文件采集完成");
                             if (!CanOpenFile(dto.ID, sameTimeFiles.First()))
@@ -623,15 +623,23 @@ namespace X2D1NoRefTaskServer.Service
                             }
                             ResetTime(formatFlag, ref preTime);
                             preTime = capTime;
-                            LogHelper.Info($"【任务{dto.ID}】目录[{filesDir}]中的数据处理完成");
 
                         }
                         if (!hasFile)
                         {
                             LogHelper.Info($"【任务{dto.ID}】缺少最新的采集文件,等待5秒...");
-                            preTime = DateTime.Now;
+                            var time = new DateTime(preTime.Year, preTime.Month, preTime.Day, preTime.Hour, 0, 0);
+                            var now = DateTime.Now;
+                            if ((int)(now - time).TotalHours != 0)
+                            {
+                                preTime = new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0);
+                            }
                             await Task.Delay(5000, cts.Token);
                         }
+                        else
+                        {
+                            LogHelper.Info($"【任务{dto.ID}】目录[{filesDir}]本次扫描的数据处理完成");
+                        }
                     }
                     catch (Exception ex)
                     {

+ 1 - 1
XdCxRhDW.App/App.config

@@ -5,7 +5,7 @@
 	</connectionStrings>
 	<appSettings>
 		<!--54专用-->
-		<add key="UseFor54" value="0"/>
+		<!--<add key="UseFor54" value="0"/>-->
 		
 		<!--程序标题-->
 		<add key="SystemName" value="多模式融合定位平台" />

+ 15 - 15
XdCxRhDW.App/Controllers/PosController.cs

@@ -79,7 +79,7 @@ namespace XdCxRhDW.App.Controllers
                     ModRate = dto.CheckRes?.ModRate,
                     ModType = dto.CheckRes?.ModType,
                     UserName = dto.CheckRes?.UserName,
-                    FfcHz= dto.CheckRes?.FfcHz,
+                    FfcHz = dto.CheckRes?.FfcHz,
                 };
                 db.CheckRes.Add(ckRes);
 
@@ -355,7 +355,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X2D1,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 if (dto.CalcConfidence)
                 {
@@ -500,7 +500,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X2D1,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -607,7 +607,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X2D1NoRef,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -744,7 +744,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X2D1NoRef,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -861,7 +861,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.RH,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -1009,7 +1009,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.RH,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -1129,7 +1129,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X3,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -1291,7 +1291,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X3,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -1403,7 +1403,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X3NoRef,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -1560,7 +1560,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X3NoRef,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -1682,7 +1682,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X3TwoDfo,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -1846,7 +1846,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X3TwoDfo,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -1961,7 +1961,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X2Dfo,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -2100,7 +2100,7 @@ namespace XdCxRhDW.App.Controllers
                     Confidence = (int)res[6],
                     PosResType = EnumPosResType.X2Dfo,
                 };
-                if (dto.TheoryDfoCalc)
+                if (dto.TheoryDfoCalc && posRes.PosLon != 999)
                     posRes.TargetState = TheoryDtoDfoApi.TheoryDfo(cgRes, StationRes, posRes, SysConfig.Config.YDPZThreshold);
                 posRes = db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();