diff --git a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs index ee6177cb..f0c793d8 100644 --- a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs +++ b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs @@ -647,10 +647,20 @@ namespace BPASmartClient.MorkSUpgradedVer if (mORKS.RBTakeNoodleTask.TryDequeue(out OrderLocInfo orderLocInfo)) { //写入煮面时间 - List values = new List(); - values.Add(Json.Data.parSets.ElementAt(loc).Minute); - values.Add(Json.Data.parSets.ElementAt(loc).Second); - WriteData($"VW{324 + (loc * 4)}", values.ToArray()); + //List values = new List(); + //values.Add(Json.Data.parSets.ElementAt(loc).Minute); + //values.Add(Json.Data.parSets.ElementAt(loc).Second); + //WriteData($"VW{324 + (loc * 4)}", values.ToArray()); + if (mORKS.CurrentFeedbackLoc >= 1 && mORKS.CurrentFeedbackLoc <= 5) { + var x = Json.Data.DishLibraryParSets.FirstOrDefault(p => p.TextBlockContext == mORKS.CurrentFeedbackLoc.ToString()); + if (x != null) { + List values = new List(); + values.Add(x.Minute); + values.Add(x.Second); + WriteData($"VW{324 + (loc * 4)}", values.ToArray()); + DeviceProcessLogShow($"转盘位置[{mORKS.CurrentFeedbackLoc}]:写入煮面时间{x.Minute}分{x.Second}秒。"); + } + } mORKS.CurrentLoc = 0; mORKS.CookNodelId[loc] = orderLocInfo.SuborderId; diff --git a/BPASmartClient.MorkSUpgradedVer/Model/MorksPar.cs b/BPASmartClient.MorkSUpgradedVer/Model/MorksPar.cs index ef2c0cb5..4b50dfa5 100644 --- a/BPASmartClient.MorkSUpgradedVer/Model/MorksPar.cs +++ b/BPASmartClient.MorkSUpgradedVer/Model/MorksPar.cs @@ -12,5 +12,6 @@ namespace BPASmartClient.MorkSUpgradedVer.Model internal class MorksPar { public ObservableCollection parSets { get; set; } = new ObservableCollection(); + public ObservableCollection DishLibraryParSets { get; set; } = new ObservableCollection(); } } diff --git a/BPASmartClient.MorkSUpgradedVer/View/ParSet.xaml b/BPASmartClient.MorkSUpgradedVer/View/ParSet.xaml index eb833a3a..d06c0166 100644 --- a/BPASmartClient.MorkSUpgradedVer/View/ParSet.xaml +++ b/BPASmartClient.MorkSUpgradedVer/View/ParSet.xaml @@ -76,12 +76,13 @@ - - - - - - + + + + + + - - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmartClient.MorkSUpgradedVer/ViewModel/ParSetViewModel.cs b/BPASmartClient.MorkSUpgradedVer/ViewModel/ParSetViewModel.cs index 0aa320c6..03a8c2b4 100644 --- a/BPASmartClient.MorkSUpgradedVer/ViewModel/ParSetViewModel.cs +++ b/BPASmartClient.MorkSUpgradedVer/ViewModel/ParSetViewModel.cs @@ -19,12 +19,24 @@ namespace BPASmartClient.MorkSUpgradedVer.ViewModel SaveInfoCommand = new RelayCommand(SaveSettingData); ActionManage.GetInstance.Register(SaveSettingData, "初始化设定煮面时间"); - + + if (Json.Data.DishLibraryParSets.Count < 5) { + Json.Data.DishLibraryParSets.Clear(); + for (int i = 0; i < 5; i++) { + Json.Data.DishLibraryParSets.Add(new ParSet() { + Minute = 2, + Second = 0, + TextBlockContext = $"{i + 1}" + }); + } + } + } public RelayCommand SaveInfoCommand { get; set; } public ObservableCollection parSets { get; set; } = Json.Data.parSets; + public ObservableCollection DishLibraryParSets { get; set; } = Json.Data.DishLibraryParSets; private void SaveSettingData() {