From fa725c9595aa23eb88c484ac4d3c92c8cedf9d56 Mon Sep 17 00:00:00 2001 From: yahaha Date: Tue, 22 Nov 2022 13:12:34 +0800 Subject: [PATCH] 1 --- BPASmartClient.MorkF/Control_MorkF.cs | 31 +++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/BPASmartClient.MorkF/Control_MorkF.cs b/BPASmartClient.MorkF/Control_MorkF.cs index b5c2d38e..b3f2abee 100644 --- a/BPASmartClient.MorkF/Control_MorkF.cs +++ b/BPASmartClient.MorkF/Control_MorkF.cs @@ -154,6 +154,8 @@ namespace BPASmartClient.MorkF //FoodLibInit(); Task2ReadMaterialData(); + ScreenDataServer(); + //读取坐标系 MaterialCoordinate materialCoordinate = ReadMaterialCoordinate(); if(materialCoordinate != null) @@ -2350,11 +2352,35 @@ namespace BPASmartClient.MorkF private void ScreenDataServer() { - LocalMqtt.GetInstance.Init(ScreenDeviceType.大炒); + LocalMqtt.GetInstance.Init(ScreenDeviceType.小炒); ThreadManage.GetInstance().StartLong(new Action(() => { List statsModels = new List(); statsModels.Add(new StatsModel() { Name = "帝王蟹", Count = 666 }); + int i = new Random().Next(0, 100); + List processModels= new List(); + switch ((i / 5) % 6) + { + case 0: + processModels = new List() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } }; + break; + case 1: + processModels = new List() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } }; + break; + case 2: + processModels = new List() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } }; + break; + case 3: + processModels = new List() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } }; + break; + case 4: + processModels = new List() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.正在执行 } }; + break; + case 5: + processModels = new List() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.执行完成 } }; + break; + default: break; + } ScreenModelMinWok maxWok = new ScreenModelMinWok { IsRun = new Random().Next(0, 2) == 0 ? IsRun.运行 : IsRun.停止, //设备是否运行 @@ -2368,7 +2394,8 @@ namespace BPASmartClient.MorkF MinWok_Dishes_2 = "海鲜大餐", MinWok_Task_1 = "炒制菜品",//当前任务 MinWok_Task_2 = "热油", //当前任务 - MinWok_Process_1 = new List(), //炒锅当前任务流程 + //MinWok_Process_1 = new List() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } }, + MinWok_Process_1 = processModels, //炒锅当前任务流程 MinWok_Process_2 = new List(), //炒锅当前任务流程 MinWok_HeatGear_1 = new Random().Next(0, 5).ToString(), //炒锅加热档位 MinWok_HeatGear_2 = new Random().Next(0, 5).ToString(), //炒锅加热档位