diff --git a/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs b/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs index d066c02b..10006fce 100644 --- a/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs +++ b/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs @@ -236,12 +236,25 @@ namespace Aucma.Core.DoorFoam.ViewModels if (string.IsNullOrEmpty(code)) return; var plan = _productPlanInfoServices.QueryAsync(d => d.ProductLineCode == stationCode && d.PlanAmount > d.CompleteAmount).Result; //var plan = _baseOrderInfoServices.QueryAsync().Result; - if (plan == null) return; + if (plan == null) + { + Console.WriteLine("未查询到计划信息"); + return; + } var obj = _printBarCodeServices.FirstAsync(d => d.MaterialBarcode == code).Result; - if (obj == null) return; + if (obj == null) + { + Console.WriteLine("未查询到条码打印信息"); + return; + } //string materialCode = "11239723"; ProductPlanInfo stationPlan = plan.FirstOrDefault(d =>d.OrderCode == obj.OrderCode); - if (stationPlan == null) return; + if (stationPlan == null) + { + Console.WriteLine($"未查询到该条码订单信息;条码【{code}】"); + log.Error($"未查询到该条码订单信息;条码【{code}】"); + return; + } DoorMateHistory model = new DoorMateHistory(); if (planInfoDataGrid.Count() == 0) model.ObjId = 1; @@ -253,13 +266,13 @@ namespace Aucma.Core.DoorFoam.ViewModels model.MaterialName = stationPlan.MaterialName; model.ScanTime = DateTime.Now; SaveMateHistory(code,obj, productLineCode, plan, model); - + Console.WriteLine($"箱门匹配信息记录成功!"); model.MaterialName = this.FormatMaterialType(stationPlan.MaterialName); model.ObjId = i+1; planInfoDataGrid.Insert(0, model); InitEveryDayMethodAsync();//刷新型号统计图表 - + Console.WriteLine($"箱门匹配信息记录成功!刷新型号统计图表"); } #region 记录历史 diff --git a/Aucma.Core.DoorFoam/appsettings.json b/Aucma.Core.DoorFoam/appsettings.json index 207577e8..270a181e 100644 --- a/Aucma.Core.DoorFoam/appsettings.json +++ b/Aucma.Core.DoorFoam/appsettings.json @@ -195,7 +195,7 @@ "ScannerServer": [ { "Id": 1, - "Ip": "10.10.92.134", + "Ip": "10.10.92.121", //测试:10.10.92.121 "Name": "扫码器1" } ],