From 82542aaaec6463fc15d69b17f57c18646363b415 Mon Sep 17 00:00:00 2001 From: "liulb@mesnac.com" Date: Sun, 3 Mar 2024 12:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AE=B1=E9=97=A8=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E8=BE=93=E5=87=BA=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/RealTimePageViewModel.cs | 23 +++++++++++++++---- Aucma.Core.DoorFoam/appsettings.json | 2 +- 2 files changed, 19 insertions(+), 6 deletions(-) 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" } ],