wyq 1 년 전
부모
커밋
3677ddb2e5
1개의 변경된 파일12개의 추가작업 그리고 7개의 파일을 삭제
  1. 12 7
      XdCxRhDW.App/UserControl/CtrlHome.cs

+ 12 - 7
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -165,7 +165,7 @@ namespace XdCxRhDW.App.UserControl
             this.svgImageCollection1.Add("Running", SvgHelper.CreateCycle("#2E8B57"));
             gridView1.CustomDrawCell += GridView1_CustomDrawCell;
             gridView1.DoubleClick += GridView1_DoubleClick;
-            txtTimeCho_SelectedIndexChanged(null, null);            
+            txtTimeCho_SelectedIndexChanged(null, null);
             WaitHelper.CloseForm();
         }
 
@@ -494,7 +494,7 @@ namespace XdCxRhDW.App.UserControl
                         List<TaskSigDto> tskSigsDto = new List<TaskSigDto>();
                         using (RHDWContext db = new RHDWContext())
                         {
-                            var dbSigs = await db.TaskSigs.Where(w => w.TaskInfoID == tsk.ID).Include(p=>p.SigInfo).ToListAsync();
+                            var dbSigs = await db.TaskSigs.Where(w => w.TaskInfoID == tsk.ID).Include(p => p.SigInfo).ToListAsync();
                             if (!dbSigs.Any())
                             {
                                 DxHelper.MsgBoxHelper.ShowWarning($"请添加任务信号");
@@ -1101,9 +1101,13 @@ namespace XdCxRhDW.App.UserControl
             }
         }
 
-        public void RePosition(List<RePosRes> items)
+        public void RePosition(List<RePosRes> items, PosRequestByTimeRangeDto dto)
         {
-            if (items.Count == 0) return;
+            if (items.Count == 0)
+            {
+                MsgBoxHelper.ShowWarning($"查询任务[{dto.TaskInfoID}]开始时间:{dto.BeginTime:yyyy-MM-dd HH:mm:ss} 结束时间:{dto.EndTime:yyyy-MM-dd HH:mm:ss}无定位结果数据");
+                return;
+            }
             Task.Run(async () =>
             {
                 foreach (var item in items)
@@ -1356,7 +1360,7 @@ namespace XdCxRhDW.App.UserControl
                 var res = await HttpHelper.PostRequestAsync<List<RePosRes>>(baseUrl + "Pos/GetPosCgResByTimeRangeObsolete", dto, token: ct.Token);
                 if (res.code == 200)
                 {
-                    RePosition(res.data);
+                    RePosition(res.data, dto);
                 }
                 else
                 {
@@ -1365,8 +1369,9 @@ namespace XdCxRhDW.App.UserControl
             }
             catch (Exception ex)
             {
-                Serilog.Log.Error(ex, "重新定位结果查询异常");
-                MsgBoxHelper.ShowError("重新定位结果查询异常");
+                string msg = $"任务[{dto.TaskInfoID}]重新定位结果查询开始时间:{dto.BeginTime:yyyy-MM-dd HH:mm:ss} 结束时间:{dto.EndTime:yyyy-MM-dd HH:mm:ss}异常";
+                Serilog.Log.Error(ex, msg);
+                MsgBoxHelper.ShowError(msg);
             }