|
|
@@ -484,7 +484,7 @@ namespace BPASmartClient.DosingSystem |
|
|
|
recipeProcesses.ElementAt(s).RawMaterials.ElementAt(t).RecipeStatus = 2; |
|
|
|
recipeProcesses.ElementAt(s).RawMaterials.ElementAt(t).Status = (Status)1; |
|
|
|
MessageNotify.GetInstance.ShowRunLog($"设备{DeviceInquire.GetInstance.DeviceLists[ip].DeviceName}配料状态:正在配料"); |
|
|
|
|
|
|
|
DeviceInquire.GetInstance.DeviceLists[ip].recipeC = -1; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@@ -638,19 +638,18 @@ namespace BPASmartClient.DosingSystem |
|
|
|
ActionManage.GetInstance.Send("配料完成", UserTreeCompelete); |
|
|
|
ActionManage.GetInstance.Send("历史记录", Json<OldRecipe>.Data.Recipes); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
int recipecount = recipeProcesses.Count - (recipeNameNum - UserTreeCompelete.Count); |
|
|
|
int re =0; |
|
|
|
int re =-1; |
|
|
|
if (recipecount < recipeProcesses.Count && recipecount >= 0) |
|
|
|
{ |
|
|
|
re = recipeProcesses.ElementAt(recipecount).RawMaterials.ToList().FindIndex(a => a.RawMaterialName == DeviceInquire.GetInstance.DeviceLists[ip].DeviceName && a.Loc == DeviceInquire.GetInstance.DeviceLists[ip].deviceStatus.PassPail && a.RecipeStatus != 3); |
|
|
|
|
|
|
|
} |
|
|
|
if (maxPail <= passPail && (recipeNameNum-1) < RecipeNames.Count && !DeviceInquire.GetInstance.DeviceLists[ip].deviceStatus.PailArrive&&re<0&& recipNameNum_1==recipeNameNum) |
|
|
|
if (maxPail <= passPail && recipeNameNum < RecipeNames.Count && !DeviceInquire.GetInstance.DeviceLists[ip].deviceStatus.PailArrive&&re<0&& recipNameNum_1==recipeNameNum) |
|
|
|
{ |
|
|
|
SimensSend.GetInstance.SendSimens.Write<ushort>($"DB1.DBW{810 + 2 * (dnum - 1)}", 0); |
|
|
|
MessageNotify.GetInstance.ShowRunLog($"设备{dnum}桶数已清零"); |
|
|
@@ -694,7 +693,7 @@ namespace BPASmartClient.DosingSystem |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (DeviceInquire.GetInstance.DeviceLists[ip].deviceStatus.PailArrive) |
|
|
|
if (DeviceInquire.GetInstance.DeviceLists[ip].deviceStatus.PailArrive&& recipeNameNum - 1< RecipeNames.Count) |
|
|
|
{ |
|
|
|
if (recipeNameNum > 0) |
|
|
|
{ |
|
|
@@ -706,7 +705,16 @@ namespace BPASmartClient.DosingSystem |
|
|
|
int re = 0; |
|
|
|
if (recipecount < recipeProcesses.Count && recipecount >= 0) |
|
|
|
{ |
|
|
|
DeviceInquire.GetInstance.DeviceLists[ip].UpdateState(recipeProcesses, recipecount, out re); |
|
|
|
re = recipeProcesses.ElementAt(recipecount).RawMaterials.ToList().FindIndex(a => a.RawMaterialName == DeviceInquire.GetInstance.DeviceLists[ip].DeviceName && a.Loc == DeviceInquire.GetInstance.DeviceLists[ip].deviceStatus.PassPail && a.RecipeStatus == 1); |
|
|
|
if (re>=0) |
|
|
|
{ |
|
|
|
float weight= recipeProcesses.ElementAt(recipecount).RawMaterials.ElementAt(re).RawMaterialWeight; |
|
|
|
DeviceInquire.GetInstance.DeviceLists[ip].UpdateState(weight); |
|
|
|
recipeProcesses.ElementAt(recipecount).RawMaterials.ElementAt(re).RecipeStatus = 2; |
|
|
|
recipeProcesses.ElementAt(recipecount).RawMaterials.ElementAt(re).Status = (Status)1; |
|
|
|
MessageNotify.GetInstance.ShowRunLog($"设备{dnum}配料状态:正在配料"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@@ -774,7 +782,7 @@ namespace BPASmartClient.DosingSystem |
|
|
|
if ( rep== DeviceInquire.GetInstance.devices.Count&&!allowStart) |
|
|
|
{ |
|
|
|
App.Current.Dispatcher.Invoke(() => { NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"可以开始放入配料桶!"); }); |
|
|
|
Mr_state(); |
|
|
|
/*Mr_state();*/ |
|
|
|
allowStart = true; |
|
|
|
} |
|
|
|
} |
|
|
@@ -786,7 +794,7 @@ namespace BPASmartClient.DosingSystem |
|
|
|
TaskManage.GetInstance.StartLong(() => |
|
|
|
{ |
|
|
|
string ip = "192.168.2.10"; |
|
|
|
if (DeviceInquire.GetInstance.DeviceLists.ContainsKey(ip) && doDeviceCount.ContainsKey(ip)&& RecipeNames.Count>0) |
|
|
|
if (DeviceInquire.GetInstance.DeviceLists.ContainsKey(ip) && doDeviceCount.ContainsKey(ip)&& RecipeNames.Count>0&& doDeviceCount[ip] >0) |
|
|
|
{ |
|
|
|
|
|
|
|
int maxPail = 0; |
|
|
|