From c3d46b40f06b8ffceec4cb04fad4a9c3d748e6ad Mon Sep 17 00:00:00 2001 From: Mr_z <1047577696@qqcom> Date: Wed, 28 Jun 2023 10:34:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModel/RecipeControlViewModel.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/DosingSystem/ViewModel/RecipeControlViewModel.cs b/DosingSystem/ViewModel/RecipeControlViewModel.cs index 327133db..c47e61d9 100644 --- a/DosingSystem/ViewModel/RecipeControlViewModel.cs +++ b/DosingSystem/ViewModel/RecipeControlViewModel.cs @@ -732,13 +732,13 @@ namespace BPASmartClient.DosingSystem.ViewModel if (recIndex >= 0 && recIndex < recipeProcesses.Count) { int index = recipeProcesses.ElementAt(recIndex).RawMaterials.ToList().FindIndex(p => p.RawMaterialName == tempRawMaterialName); - - //if (index >= 0 && index < recipeProcesses.ElementAt(recIndex).RawMaterials.Count) - //{ - // //测试使用 - // recipeProcesses.ElementAt(recIndex).RawMaterials.ElementAt(index).RecipeStatus = RunStatus; - - //} + + if (index >= 0 && index < recipeProcesses.ElementAt(recIndex).RawMaterials.Count) + { + //测试使用 + recipeProcesses.ElementAt(recIndex).RawMaterials.ElementAt(index).RecipeStatus = RunStatus; + + } for (int j = 0; j < GlobalDevice.PlcData.IsAllowIngredients.Length; j++) { if (GlobalDevice.PlcData.IsAllowIngredients[j]) @@ -813,14 +813,14 @@ namespace BPASmartClient.DosingSystem.ViewModel { StockStatus.ElementAt(St_index).IssueStatus = 1; DeviceInquire.GetInstance.GetDevice(Recipes.ElementAt(i).RawMaterials.ElementAt(loc).DeviceIp).Start(weight); - recipeProcesses.ElementAt(recIndex).RawMaterials.ElementAt(loc).RecipeStatus = 2; + MessageNotify.GetInstance.ShowRunLog($"设备执行状态:{rrr}"); MessageNotify.GetInstance.ShowRunLog($"柔性味魔方{Recipes.ElementAt(i).RawMaterials.ElementAt(loc).DeviceIp},开始出料"); } if (recipeProcesses.ElementAt(recIndex).RawMaterials.ElementAt(loc).RecipeStatus == 3 && StockStatus.ElementAt(St_index).IssueStatus == 1) { //GlobalDevice.PlcData.IsAllowIngredients[j] = false;//测试使用 - recipeProcesses.ElementAt(recIndex).RawMaterials.ElementAt(loc).RecipeStatus = 3; + ComCount++; StockStatus.ElementAt(St_index).IssueStatus = 2; DeviceInquire.GetInstance.GetDevice(Recipes.ElementAt(i).RawMaterials.ElementAt(loc).DeviceIp).StatusReset();