|
|
@@ -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.未执行; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |