Quellcode durchsuchen

小料站新增手动下发订单后,需延时10S才可点击AGV送托盘完成功能。

master
ZhaoGang vor 1 Jahr
Ursprung
Commit
8fd6a1a209
3 geänderte Dateien mit 30 neuen und 8 gelöschten Zeilen
  1. +5
    -0
      BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs
  2. +24
    -8
      BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs
  3. +1
    -0
      BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs

+ 5
- 0
BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs Datei anzeigen

@@ -352,6 +352,11 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
/// 机器人的程序号
/// </summary>
public byte RobotProgramNum { get; set; } = 0;
/// <summary>
/// 手动下发订单。
/// </summary>
[VarComm("Global","手动下发订单")]
public bool ManualIssueRecipe { get; set; }=false;
#endregion
}
public enum IssueRecipeCondition


+ 24
- 8
BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs Datei anzeigen

@@ -37,8 +37,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
VisibilityBtn1 = Visibility.Hidden;
VisibilityBtn2 = Visibility.Visible;
VisibilityBtn3 = Visibility.Hidden;
GVL_SmallStation.GetInstance.ManualIssueRecipe = false;
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,AGV送托盘完成");
});
}, () => CanManualGetTray());
Test2Command = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX4.0", PlcVarType = PlcVarType.Bool, Value = true });
@@ -147,12 +148,16 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
//MessageNotify.GetInstance.ShowUserLog($"手动点击按钮,清除所有手动配料完成信号");
//NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"清除所有手动配料完成信号");
});
CancelRecipeCommand = new RelayCommand(() => {
CancelRecipeCommand = new RelayCommand(() =>
{
string cancelRecipeCode = CancelRecipeCode.Trim();
if (!String.IsNullOrEmpty(cancelRecipeCode) &&MessageNotify.GetInstance.ShowDialog($"请确认,是否进行删除订单【{cancelRecipeCode}】操作?")) {
if (Json<RemoteRecipeDataColl>.Data.Recipes != null) {
if (!String.IsNullOrEmpty(cancelRecipeCode) && MessageNotify.GetInstance.ShowDialog($"请确认,是否进行删除订单【{cancelRecipeCode}】操作?"))
{
if (Json<RemoteRecipeDataColl>.Data.Recipes != null)
{
int index = Array.FindIndex(Json<RemoteRecipeDataColl>.Data.Recipes.ToArray(), p => p.RecipeCode == cancelRecipeCode);
if (index >= 0) {
if (index >= 0)
{
GVL_SmallStation.GetInstance.Order_Cancel = true;
GVL_SmallStation.GetInstance.Order_CancelRecipeCode = cancelRecipeCode;
MessageNotify.GetInstance.ShowUserLog($"手动删除订单【{cancelRecipeCode}】。");
@@ -163,10 +168,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel

}
}
});
CompletedNumResetCommand = new RelayCommand(() => {
if (MessageNotify.GetInstance.ShowDialog("请确认,是否将配方完成数目清零?",DialogType.Warning))
CompletedNumResetCommand = new RelayCommand(() =>
{
if (MessageNotify.GetInstance.ShowDialog("请确认,是否将配方完成数目清零?", DialogType.Warning))
{
GVL_SmallStation.GetInstance.RecipeDosingCompleNum = 0;
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", "配方完成数目清零成功!");
@@ -368,5 +374,15 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
public string _CancelRecipeCode { get; set; }

private static Visibility _VisibilityBtn3 = Visibility.Hidden;

//延迟10s后才可以执行手动点击送托盘完成操作。
private bool CanManualGetTray()
{
if (Delay.GetInstance("CanManualGetTray").Start(GVL_SmallStation.GetInstance.ManualIssueRecipe,10))
{
return true;
}
return false;
}
}
}

+ 1
- 0
BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs Datei anzeigen

@@ -96,6 +96,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{res.RecipeName}配方下发成功!");
MessageNotify.GetInstance.ShowUserLog($"下发本地模拟配方——{res.RecipeName}");
}
GVL_SmallStation.GetInstance.ManualIssueRecipe = true;
}
}
}


Laden…
Abbrechen
Speichern