@@ -9,7 +9,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.ApolloClient" Version="1.0.12" /> | <PackageReference Include="BPA.ApolloClient" Version="1.0.12" /> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | <PackageReference Include="BPA.Helper" Version="1.0.28" /> | ||||
<PackageReference Include="BPA.Message" Version="1.0.74" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.82" /> | |||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" /> | <PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | ||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" /> | <PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" /> | ||||
@@ -410,7 +410,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | <PackageReference Include="BPA.Helper" Version="1.0.28" /> | ||||
<PackageReference Include="BPA.Message" Version="1.0.74" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.82" /> | |||||
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" /> | <PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" /> | ||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -7,7 +7,7 @@ | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Message" Version="1.0.74" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.82" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -8,7 +8,7 @@ | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Message" Version="1.0.74" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.82" /> | |||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | ||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -17,7 +17,7 @@ | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Message" Version="1.0.74" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.82" /> | |||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -23,6 +23,7 @@ namespace BPASmartClient.MorkBF | |||||
public class Control_MorkBF : BaseDevice | public class Control_MorkBF : BaseDevice | ||||
{ | { | ||||
GVL_MorkBF morkBF = new GVL_MorkBF(); | GVL_MorkBF morkBF = new GVL_MorkBF(); | ||||
DataReport dataReport = new DataReport(); | |||||
public override DeviceClientType DeviceType => DeviceClientType.MORKCS; | public override DeviceClientType DeviceType => DeviceClientType.MORKCS; | ||||
@@ -549,6 +550,23 @@ namespace BPASmartClient.MorkBF | |||||
} | } | ||||
}), 1); | }), 1); | ||||
GetStatus("VW2250", new Action<object>((o) => | |||||
{ | |||||
if (o == null) return; | |||||
if (o is int[] values && values.Length == 1) | |||||
{ | |||||
dataReport.FirePot1_PotState = values[0]; | |||||
} | |||||
}), 1); | |||||
GetStatus("VW2350", new Action<object>((o) => | |||||
{ | |||||
if (o == null) return; | |||||
if (o is int[] values && values.Length == 1) | |||||
{ | |||||
dataReport.FirePot2_PotState = values[0]; | |||||
} | |||||
}), 1); | |||||
} | } | ||||
public override void ResetProgram() | public override void ResetProgram() | ||||
@@ -1104,9 +1122,10 @@ namespace BPASmartClient.MorkBF | |||||
StatsCount = statsModels, | StatsCount = statsModels, | ||||
MaxWok_Dishes_1 = "满汉全席", | MaxWok_Dishes_1 = "满汉全席", | ||||
MaxWok_Dishes_2 = "海鲜大餐", | MaxWok_Dishes_2 = "海鲜大餐", | ||||
MaxWok_Task_1 = "无", | |||||
MaxWok_Task_2 = "无", | |||||
MaxWok_Process_1 = new List<ProcessModel>(), | |||||
MaxWok_Task_1 = ((PotState)dataReport.FirePot1_PotState).ToString(), | |||||
MaxWok_Task_2 = ((PotState)dataReport.FirePot2_PotState).ToString(), | |||||
MaxWok_Process_1 = SetFirePotPorcess(new Random().Next(0,6)), | |||||
MaxWok_Process_2 = SetFirePotPorcess(dataReport.FirePot2_PotState), | |||||
MaxWok_HeatGear_1 = morkBF.FirePot1_FireGear.ToString(), | MaxWok_HeatGear_1 = morkBF.FirePot1_FireGear.ToString(), | ||||
MaxWok_HeatGear_2 = morkBF.FirePot2_FireGear.ToString(), | MaxWok_HeatGear_2 = morkBF.FirePot2_FireGear.ToString(), | ||||
MaxWok_StirGear_1 = morkBF.FirePot1_StirGear.ToString(), | MaxWok_StirGear_1 = morkBF.FirePot1_StirGear.ToString(), | ||||
@@ -1127,5 +1146,43 @@ namespace BPASmartClient.MorkBF | |||||
}), "大屏数据上报"); | }), "大屏数据上报"); | ||||
} | } | ||||
private List<ProcessModel> SetFirePotPorcess(int potState) | |||||
{ | |||||
if (potState > 0) | |||||
{ | |||||
if(potState <=3) | |||||
{ | |||||
SetState(2); | |||||
} | |||||
else if(potState>3&&potState < 9) SetState(3); | |||||
else if(potState == 9) SetState(4); | |||||
else if (potState == 10) SetState(5); | |||||
} | |||||
else | |||||
{ | |||||
foreach(var item in dataReport.processModels) | |||||
{ | |||||
item.Status = ProcessStatus.未执行; | |||||
} | |||||
} | |||||
return dataReport.processModels; | |||||
} | |||||
public void SetState(int c ) | |||||
{ | |||||
for (int i = 0; i < dataReport.processModels.Count; i++) | |||||
{ | |||||
if (i == c - 1) | |||||
{ | |||||
dataReport.processModels[i].Status = ProcessStatus.正在执行; | |||||
} | |||||
else if( i<c-1) dataReport.processModels[i].Status = ProcessStatus.执行完成; | |||||
else if (i > c - 1) dataReport.processModels[i].Status = ProcessStatus.未执行; | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -388,3 +388,4 @@ namespace BPASmartClient.MorkBF | |||||
public DateTime FirePan2_Date; | public DateTime FirePan2_Date; | ||||
} | } | ||||
} | } | ||||
#endregion |
@@ -0,0 +1,49 @@ | |||||
using BPA.Message; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace BPASmartClient.MorkBF.Model | |||||
{ | |||||
public class DataReport | |||||
{ | |||||
/// <summary> | |||||
/// 炒锅1工艺状态 | |||||
/// </summary> | |||||
public int FirePot1_PotState { get; set; } = 0; | |||||
/// <summary> | |||||
/// 炒锅2工艺状态 | |||||
/// </summary> | |||||
public int FirePot2_PotState { get; set; } = 0; | |||||
public List<ProcessModel> processModels = new List<ProcessModel>(); | |||||
public DataReport() | |||||
{ | |||||
processModels.Add( new ProcessModel() { Id = 1, Name = "开始制作", Status = ProcessStatus.未执行 }); | |||||
processModels.Add(new ProcessModel() { Id = 2, Name = "热油", Status = ProcessStatus.未执行 }); | |||||
processModels.Add(new ProcessModel() { Id = 3, Name = "炒制中", Status = ProcessStatus.未执行 }); | |||||
processModels.Add(new ProcessModel() { Id = 4, Name = "制作完成", Status = ProcessStatus.未执行 }); | |||||
processModels.Add(new ProcessModel() { Id = 5, Name = "出餐完成", Status = ProcessStatus.未执行 }); | |||||
} | |||||
} | |||||
public enum PotState | |||||
{ | |||||
无任务=0, | |||||
炒锅预热中 =1, | |||||
开始抽油=2, | |||||
油预热中=3, | |||||
荤菜炒制中 =4, | |||||
调料炒制中=5, | |||||
素菜炒制中=6, | |||||
辅料炒制中=7, | |||||
关火焖制中=8, | |||||
炒制完成=9, | |||||
出餐完成=10, | |||||
} | |||||
} |
@@ -10,7 +10,7 @@ | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Message" Version="1.0.74" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.82" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -9,8 +9,8 @@ | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Message" Version="1.0.77" /> | |||||
<PackageReference Include="BPA.Models" Version="1.0.34" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.82" /> | |||||
<PackageReference Include="BPA.Models" Version="1.0.37" /> | |||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | ||||
<PackageReference Include="System.Speech" Version="6.0.0" /> | <PackageReference Include="System.Speech" Version="6.0.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -9,7 +9,7 @@ | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Models" Version="1.0.34" /> | |||||
<PackageReference Include="BPA.Models" Version="1.0.37" /> | |||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -22,7 +22,7 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | <PackageReference Include="BPA.Helper" Version="1.0.28" /> | ||||
<PackageReference Include="BPA.Message" Version="1.0.74" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.82" /> | |||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||||
</ItemGroup> | </ItemGroup> | ||||