diff --git a/BPASmartClient.Tourism/BPASmartClient.MorkCL.csproj b/BPASmartClient.Tourism/BPASmartClient.MorkCL.csproj index 5cf2eeff..c8e31cf8 100644 --- a/BPASmartClient.Tourism/BPASmartClient.MorkCL.csproj +++ b/BPASmartClient.Tourism/BPASmartClient.MorkCL.csproj @@ -7,6 +7,7 @@ + diff --git a/BPASmartClient.Tourism/Control_MorkCL.cs b/BPASmartClient.Tourism/Control_MorkCL.cs index cbce75a0..3fa9a092 100644 --- a/BPASmartClient.Tourism/Control_MorkCL.cs +++ b/BPASmartClient.Tourism/Control_MorkCL.cs @@ -1,5 +1,6 @@ using BPA.Message.Enum; using BPASmartClient.Device; +using BPASmartClient.MorkCL.Model.Json; using BPASmartClient.MorkCL.Server; using SqlSugar; using System; @@ -48,6 +49,11 @@ namespace BPASmartClient.MorkCL devices[EDeviceType.机器人].Init(ConnectPar.RobotIP); devices[EDeviceType.压力锅].Init(ConnectPar.PressureCookerIP); devices[EDeviceType.外部设备].Init(ConnectPar.PPortName); + + #region 读取本地文件数据 + Json.Read(); + Json.Read(); + #endregion } public override void MainTask() diff --git a/BPASmartClient.Tourism/HelpClass/FuncSet.cs b/BPASmartClient.Tourism/HelpClass/FuncSet.cs index 92d5e768..0ce9e940 100644 --- a/BPASmartClient.Tourism/HelpClass/FuncSet.cs +++ b/BPASmartClient.Tourism/HelpClass/FuncSet.cs @@ -13,7 +13,16 @@ namespace BPASmartClient.MorkCL.HelpClass public class FuncSet { public int Step { get; set; } - public string FuncName { get; set; } + + private string _FuncName; + public string FuncName + { + get { return _FuncName; } + set { _FuncName = value; + FuncPars = InitData.FunParInit[(EFunc)Enum.Parse(typeof(EFunc),value)]?.ToList(); + } + } + public List FuncPars { get; set; } } } diff --git a/BPASmartClient.Tourism/Model/Json/MaterialsInfo.cs b/BPASmartClient.Tourism/Model/Json/MaterialsInfo.cs new file mode 100644 index 00000000..a3364616 --- /dev/null +++ b/BPASmartClient.Tourism/Model/Json/MaterialsInfo.cs @@ -0,0 +1,25 @@ +using BPASmartClient.MorkCL.Model.DataInfo; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.MorkCL.Model.Json +{ + public class MaterialsInfo + { + /// + /// 辅料信息集合 + /// + public ObservableCollection Accessories { get; set; }=new ObservableCollection(); + /// + /// 主料信息集合 + /// + public ObservableCollection Ingredients { get; set; }=new ObservableCollection(); + /// + /// 调料信息集合 + /// + public ObservableCollection Seasonings { get; set; }=new ObservableCollection(); + } +} diff --git a/BPASmartClient.Tourism/Model/Json/RecipesInfo.cs b/BPASmartClient.Tourism/Model/Json/RecipesInfo.cs new file mode 100644 index 00000000..0bc7e8f1 --- /dev/null +++ b/BPASmartClient.Tourism/Model/Json/RecipesInfo.cs @@ -0,0 +1,14 @@ +using BPASmartClient.MorkCL.Model.Recipe; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.MorkCL.Model.Json +{ + public class RecipesInfo + { + public ObservableCollection LocalRecipes { get; set; }=new ObservableCollection(); + } +} diff --git a/BPASmartClient.Tourism/Model/Recipe/TempRecipe.cs b/BPASmartClient.Tourism/Model/Recipe/TempRecipe.cs new file mode 100644 index 00000000..1d3cf005 --- /dev/null +++ b/BPASmartClient.Tourism/Model/Recipe/TempRecipe.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.MorkCL.Model.Recipe +{ + public class TempRecipeData:NotifyBase + { + private string _Name; + + public string Name + { + get { return _Name; } + set { _Name = value; OnPropertyChanged(); } + } + private string _ID; + + public string ID + { + get { return _ID; } + set { _ID = value; OnPropertyChanged(); } + } + private string _Remark; + + public string Remark + { + get { return _Remark; } + set { _Remark = value; OnPropertyChanged(); } + } + private Dictionary _Functions; + + public Dictionary Functions + { + get { return _Functions; } + set { _Functions = value; OnPropertyChanged(); } + } + + + + } +} diff --git a/BPASmartClient.Tourism/View/AddRawMaterialView.xaml b/BPASmartClient.Tourism/View/AddRawMaterialView.xaml index c76f1023..feff48b3 100644 --- a/BPASmartClient.Tourism/View/AddRawMaterialView.xaml +++ b/BPASmartClient.Tourism/View/AddRawMaterialView.xaml @@ -48,12 +48,12 @@