Sfoglia il codice sorgente

morkBF

样式分支
NXX 2 anni fa
parent
commit
bed12edef2
12 ha cambiato i file con 120 aggiunte e 13 eliminazioni
  1. +1
    -1
      BPASmartClient.Business/BPASmartClient.Business.csproj
  2. +1
    -1
      BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
  3. +1
    -1
      BPASmartClient.Device/BPASmartClient.Device.csproj
  4. +1
    -1
      BPASmartClient.JXJFoodSmallStation/BPASmartClient.JXJFoodSmallStation.csproj
  5. +1
    -1
      BPASmartClient.Model/BPASmartClient.Model.csproj
  6. +60
    -3
      BPASmartClient.MorkBF/Control_MorkBF.cs
  7. +1
    -0
      BPASmartClient.MorkBF/GVL_MorkBF.cs
  8. +49
    -0
      BPASmartClient.MorkBF/Model/DataReport.cs
  9. +1
    -1
      BPASmartClient.MorkF/BPASmartClient.MorkF.csproj
  10. +2
    -2
      BPASmartClient.MorkS/BPASmartClient.MorkS.csproj
  11. +1
    -1
      BPASmartClient.MorkT_HQ/BPASmartClient.MorkTHQ.csproj
  12. +1
    -1
      DosingSystem/BPASmartClient.DosingSystem.csproj

+ 1
- 1
BPASmartClient.Business/BPASmartClient.Business.csproj Vedi File

@@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="BPA.ApolloClient" Version="1.0.12" />
<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.FileExtensions" Version="6.0.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />


+ 1
- 1
BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj Vedi File

@@ -410,7 +410,7 @@

<ItemGroup>
<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="Microsoft.Toolkit.Mvvm" Version="7.1.2" />
</ItemGroup>


+ 1
- 1
BPASmartClient.Device/BPASmartClient.Device.csproj Vedi File

@@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BPA.Message" Version="1.0.74" />
<PackageReference Include="BPA.Message" Version="1.0.82" />
</ItemGroup>

<ItemGroup>


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/BPASmartClient.JXJFoodSmallStation.csproj Vedi File

@@ -8,7 +8,7 @@
</PropertyGroup>

<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="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>


+ 1
- 1
BPASmartClient.Model/BPASmartClient.Model.csproj Vedi File

@@ -17,7 +17,7 @@
</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" />
</ItemGroup>



+ 60
- 3
BPASmartClient.MorkBF/Control_MorkBF.cs Vedi File

@@ -23,6 +23,7 @@ namespace BPASmartClient.MorkBF
public class Control_MorkBF : BaseDevice
{
GVL_MorkBF morkBF = new GVL_MorkBF();
DataReport dataReport = new DataReport();

public override DeviceClientType DeviceType => DeviceClientType.MORKCS;

@@ -549,6 +550,23 @@ namespace BPASmartClient.MorkBF
}
}), 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()
@@ -1104,9 +1122,10 @@ namespace BPASmartClient.MorkBF
StatsCount = statsModels,
MaxWok_Dishes_1 = "满汉全席",
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_2 = morkBF.FirePot2_FireGear.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.未执行;
}
}
}
}

+ 1
- 0
BPASmartClient.MorkBF/GVL_MorkBF.cs Vedi File

@@ -388,3 +388,4 @@ namespace BPASmartClient.MorkBF
public DateTime FirePan2_Date;
}
}
#endregion

+ 49
- 0
BPASmartClient.MorkBF/Model/DataReport.cs Vedi File

@@ -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,
}
}

+ 1
- 1
BPASmartClient.MorkF/BPASmartClient.MorkF.csproj Vedi File

@@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BPA.Message" Version="1.0.74" />
<PackageReference Include="BPA.Message" Version="1.0.82" />
</ItemGroup>

<ItemGroup>


+ 2
- 2
BPASmartClient.MorkS/BPASmartClient.MorkS.csproj Vedi File

@@ -9,8 +9,8 @@
</PropertyGroup>

<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="System.Speech" Version="6.0.0" />
</ItemGroup>


+ 1
- 1
BPASmartClient.MorkT_HQ/BPASmartClient.MorkTHQ.csproj Vedi File

@@ -9,7 +9,7 @@
</PropertyGroup>

<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" />
</ItemGroup>



+ 1
- 1
DosingSystem/BPASmartClient.DosingSystem.csproj Vedi File

@@ -22,7 +22,7 @@

<ItemGroup>
<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" />
</ItemGroup>



Caricamento…
Annulla
Salva