Browse Source

更新

JXJAgvReake
Mr_z 1 year ago
parent
commit
c3d46b40f0
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      DosingSystem/ViewModel/RecipeControlViewModel.cs

+ 9
- 9
DosingSystem/ViewModel/RecipeControlViewModel.cs View File

@@ -732,13 +732,13 @@ namespace BPASmartClient.DosingSystem.ViewModel
if (recIndex >= 0 && recIndex < recipeProcesses.Count) if (recIndex >= 0 && recIndex < recipeProcesses.Count)
{ {
int index = recipeProcesses.ElementAt(recIndex).RawMaterials.ToList().FindIndex(p => p.RawMaterialName == tempRawMaterialName); 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++) for (int j = 0; j < GlobalDevice.PlcData.IsAllowIngredients.Length; j++)
{ {
if (GlobalDevice.PlcData.IsAllowIngredients[j]) if (GlobalDevice.PlcData.IsAllowIngredients[j])
@@ -813,14 +813,14 @@ namespace BPASmartClient.DosingSystem.ViewModel
{ {
StockStatus.ElementAt(St_index).IssueStatus = 1; StockStatus.ElementAt(St_index).IssueStatus = 1;
DeviceInquire.GetInstance.GetDevice(Recipes.ElementAt(i).RawMaterials.ElementAt(loc).DeviceIp).Start(weight); 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($"设备执行状态:{rrr}");
MessageNotify.GetInstance.ShowRunLog($"柔性味魔方{Recipes.ElementAt(i).RawMaterials.ElementAt(loc).DeviceIp},开始出料"); 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) if (recipeProcesses.ElementAt(recIndex).RawMaterials.ElementAt(loc).RecipeStatus == 3 && StockStatus.ElementAt(St_index).IssueStatus == 1)
{ {
//GlobalDevice.PlcData.IsAllowIngredients[j] = false;//测试使用 //GlobalDevice.PlcData.IsAllowIngredients[j] = false;//测试使用
recipeProcesses.ElementAt(recIndex).RawMaterials.ElementAt(loc).RecipeStatus = 3;
ComCount++; ComCount++;
StockStatus.ElementAt(St_index).IssueStatus = 2; StockStatus.ElementAt(St_index).IssueStatus = 2;
DeviceInquire.GetInstance.GetDevice(Recipes.ElementAt(i).RawMaterials.ElementAt(loc).DeviceIp).StatusReset(); DeviceInquire.GetInstance.GetDevice(Recipes.ElementAt(i).RawMaterials.ElementAt(loc).DeviceIp).StatusReset();


Loading…
Cancel
Save