|
|
@@ -59,7 +59,7 @@ namespace BPASmartClient.DosingSystem.ViewModel |
|
|
|
RecipeNames.Enqueue(deviceName); |
|
|
|
var t = RecipeNames.GetHashCode(); |
|
|
|
var res = Recipes.FirstOrDefault(p => p.RecipeName == deviceName); |
|
|
|
UserTreeWait.Add(new RecipeModel { SerialNum = UserTreeWait.Count + 1, RecipeName = deviceName, RawMaterials = res.RawMaterials }); |
|
|
|
UserTreeWait.Add(new RecipeModel { RecipStatus = "等待制作", SerialNum = UserTreeWait.Count + 1, RecipeName = deviceName, RawMaterials = res.RawMaterials }); |
|
|
|
} |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方下发成功!"); |
|
|
|
MessageNotify.GetInstance.ShowUserLog($"下发工单 {Guid.NewGuid().ToString()}"); |
|
|
@@ -107,7 +107,7 @@ namespace BPASmartClient.DosingSystem.ViewModel |
|
|
|
if (tempDevice != null) |
|
|
|
{ |
|
|
|
/*data = data.SetBitValue((byte)tempDevice.DeviceNum, true);*/ |
|
|
|
if (tempDevice.DeviceNum > 0) |
|
|
|
if (tempDevice.DeviceNum > 0) |
|
|
|
{ |
|
|
|
int a = data.SetBitValue((byte)tInfo.ElementAt(i).ElementAt(m).Loc, true); |
|
|
|
byte[] test1 = a.ToBytes(BPA.Helper.DataFormat.ABCD); |
|
|
@@ -116,9 +116,9 @@ namespace BPASmartClient.DosingSystem.ViewModel |
|
|
|
MessageNotify.GetInstance.ShowRunLog($"下发配方DB4.DBD{2 + (tempDevice.DeviceNum - 1) * 4} :{item.ToBinString()}"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (tInfo.ElementAt(i).ElementAt(m).Loc >0) |
|
|
|
if (tInfo.ElementAt(i).ElementAt(m).Loc > 0) |
|
|
|
{ |
|
|
|
if (!BarrelNum.Contains(tInfo.ElementAt(i).ElementAt(m).Loc)) |
|
|
|
if (!BarrelNum.Contains(tInfo.ElementAt(i).ElementAt(m).Loc)) |
|
|
|
{ |
|
|
|
BarrelNum.Add(tInfo.ElementAt(i).ElementAt(m).Loc); |
|
|
|
} |
|
|
@@ -232,6 +232,7 @@ namespace BPASmartClient.DosingSystem.ViewModel |
|
|
|
RecipeName = recipeComple.RecipeName, |
|
|
|
SerialNum = UserTreeCompelete.Count + 1, |
|
|
|
RecipCode = recipeComple.RecipCode, |
|
|
|
RecipStatus = "制作完成" |
|
|
|
}); |
|
|
|
}); |
|
|
|
App.Current.Dispatcher.Invoke(new Action(() => |
|
|
@@ -283,14 +284,14 @@ namespace BPASmartClient.DosingSystem.ViewModel |
|
|
|
MessageNotify.GetInstance.ShowRunLog("错误"); |
|
|
|
return; |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
switch (cnt) |
|
|
|
{ |
|
|
|
case 1: |
|
|
|
int a1 = Array.FindIndex(DeviceInquire.GetInstance.devices.ToArray(), p => p.DeviceNum == 1); |
|
|
|
int b1 = Array.FindIndex(DeviceInquire.GetInstance.devices.ToArray(), p => p.DeviceNum == 2); |
|
|
|
if (a1 >= 0) |
|
|
|
if (a1 >= 0) |
|
|
|
{ |
|
|
|
Location1 = Array.FindIndex(Recipes.ElementAt(i).RawMaterials.ToArray(), p => p.RawMaterialName == DeviceInquire.GetInstance.devices.ElementAt(a1).DeviceName && p.Loc == barrel); |
|
|
|
} |
|
|
@@ -461,7 +462,7 @@ namespace BPASmartClient.DosingSystem.ViewModel |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
if (Location2 >= 0) |
|
|
|
{ |
|
|
|