|
- using BPA.Message;
- using BPA.Models;
- using BPASmartClient.Device;
- using System;
- using System.Collections.Concurrent;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.MorkF
- {
- internal class GVL_MorkF
- {
- /// <summary>
- /// 小炒队列
- /// </summary>
- public ConcurrentQueue<OrderLocInfo> StirFryGoodsQuenes { get; set; } = new ConcurrentQueue<OrderLocInfo>();
-
- public bool IsAuto = true;
-
- #region 炒锅
- /// <summary>
- /// 炒锅上一次搅拌档位
- /// </summary>
- public int Stir { set; get; }
- /// <summary>
- /// 炒锅上一次火力
- /// </summary>
- public int Fire { get; set; }
- /// <summary>
- /// 炒锅是否在工作状态中
- /// </summary>
- public bool FryWorking { get; set; }
- /// <summary>
- /// 炒锅自动模式
- /// </summary>
- [VariableMonitor("炒锅1锅低温度", "VW120", "160")]
- public bool AutoMode { get; set; }
- /// <summary>
- /// 炒锅1初始化完成
- /// </summary>
- public bool FryPot1_InitialComplete { get; set; }
- /// <summary>
- /// 炒锅1允许HBOT放盒
- /// </summary>
- public bool FryPot1_HOBTPut { get; set; }
- /// <summary>
- /// 炒锅1允许HBOT取盒
- /// </summary>
- public bool FryPot1_HOBTGet { get; set; }
- /// <summary>
- /// 往炒锅倒菜完成
- /// </summary>
- public bool FryPot1_MaterialIntoPot { get; set; }
- /// <summary>
- /// 出餐完成
- /// </summary>
- public bool OutFoodCompelete { get; set; }
- /// <summary>
- /// 允许出餐倒菜
- /// </summary>
- public bool CanOutFood { get; set; }
- /// <summary>
- /// 窗口取餐完成
- /// </summary>
- public bool GetFoodCompelete { set; get; }
- /// <summary>
- /// 允许倒洗锅水
- /// </summary>
- public bool CanOutPotWashingWater { get; set; }
- /// <summary>
- /// 搅拌臂在原点位
- /// </summary>
- public bool ArmOnOrigin { get; set; }
- /// <summary>
- /// 搅拌臂在工作位
- /// </summary>
- public bool ArmOnWorking { get; set; }
- /// <summary>
- /// 锅在原点位
- /// </summary>
- public bool PotOnOrigin { get; set; }
-
- /// <summary>
- /// 获取菜品是否完成
- /// </summary>
- public bool GetMaterialComplete { get; set; }
-
- #endregion
-
- #region 炒锅大屏相关
-
- /// <summary>
- /// 异常订单数量统计
- /// </summary>
- public int orderAbnormalCount { get; set; } = 0;
-
- /// <summary>
- /// 订单数量统计
- /// </summary>
- public int orderCount { get; set; } = 0;
-
- /// <summary>
- /// 当前炒制菜品
- /// </summary>
- public string GoodName { get; set; }
-
- /// <summary>
- /// 当前任务
- /// </summary>
- public string Task { get; set; }
-
- /// <summary>
- /// 当前加热档位
- /// </summary>
- public string FireNow { get; set; }
-
- /// <summary>
- /// 搅拌档位
- /// </summary>
- public string StirNow { get; set; }
-
- /// <summary>
- /// 炒锅当前锅底温度
- /// </summary>
- public string TempNow { get; set; }
-
- /// <summary>
- /// 当前炒锅进展
- /// </summary>
- public List<ProcessModel> processModels { get; set; } = new List<ProcessModel>();
-
- public void UpdateProcess(PotActions potActions)
- {
- switch (potActions.Actions)
- {
- case nameof(StirFryPotActionEnum.搅拌臂炒制位):
- //设置为开始
- SetState(0);
- Task = "开始";
- break;
- case nameof(StirFryPotActionEnum.加热开启):
- Task = "热油";
- //设置为热油
- SetState(1);
- break;
- ///以下为不处理,炒制菜品可能为热油阶段,不处理,取原料可能在开启后立即开始
- case nameof(StirFryPotActionEnum.取原料):
- case nameof(StirFryPotActionEnum.炒制菜品):
- break;
- case nameof(StirFryPotActionEnum.设置搅拌挡位1):
- StirNow = "1";
- break;
- case nameof(StirFryPotActionEnum.设置搅拌挡位2):
- StirNow = "2";
- break;
- case nameof(StirFryPotActionEnum.设置搅拌挡位3):
- StirNow = "3";
- break;
- case nameof(StirFryPotActionEnum.关闭搅拌):
- StirNow = "0";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位1):
- TempNow = "60";
- FireNow = "1";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位2):
- TempNow = "100";
- FireNow = "2";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位3):
- TempNow = "120";
- FireNow = "3";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位4):
- TempNow = "150";
- FireNow = "4";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位5):
- TempNow = "200";
- FireNow = "5";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位6):
- TempNow = "250";
- FireNow = "6";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位7):
- TempNow = "300";
- FireNow = "7";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位8):
- TempNow = "350";
- FireNow = "8";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位9):
- TempNow = "400";
- FireNow = "9";
- break;
- case nameof(StirFryPotActionEnum.设置加热挡位10):
- TempNow = "500";
- FireNow = "10";
- break;
- ///以下为待定
- case nameof(StirFryPotActionEnum.停止加热):
- break;
- case nameof(StirFryPotActionEnum.开启搅拌):
- break;
- case nameof(StirFryPotActionEnum.道菜启动):
- case nameof(StirFryPotActionEnum.加调料):
- Task = "炒制";
- //设置为炒制
- SetState(2);
- break;
- case nameof(StirFryPotActionEnum.出餐启动):
- Task = "出餐";
- SetState(3);
- break;
- ///设置为结束
- case nameof(StirFryPotActionEnum.搅拌臂原点位):
- case nameof(StirFryPotActionEnum.洗锅):
- Task = "完成";
- SetState(4);
- break;
- default:
- break;
-
- }
- }
-
- private void SetState(int c)
- {
- for (int i = 0; i < processModels.Count; i++)
- {
- if (i == c)
- {
- processModels[i].Status = ProcessStatus.正在执行;
- }
- else if (i < c) processModels[i].Status = ProcessStatus.执行完成;
- else if (i > c) processModels[i].Status = ProcessStatus.未执行;
- }
- }
-
- public void ScreenInit()
- {
- processModels.Clear();
- //初始化进度列表
- 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.未执行 });
- }
- #endregion
- #region 调料通道
- public bool PassWay1_1Compelete { get; set; }
- public bool PassWay1_2Compelete { get; set; }
- public bool PassWay1_3Compelete { get; set; }
- public bool PassWay1_4Compelete { get; set; }
- public bool PassWay1_5Compelete { get; set; }
- public bool PassWay1_6Compelete { get; set; }
- public bool PassWay1_7Compelete { get; set; }
- public bool PassWay1_8Compelete { get; set; }
- public bool PassWay1_9Compelete { get; set; }
- public bool PassWay1_10Compelete { get; set; }
- public bool PassWay1_11Compelete { get; set; }
- public bool PassWay1_12Compelete { get; set; }
- public bool PassWay1_13Compelete { get; set; }
- public bool PassWay1_14Compelete { get; set; }
- public Dictionary<int, bool> PassWay1_Compelete = new Dictionary<int, bool>();
- #endregion
-
- public GVL_MorkF()
- {
- PassWay1_Compelete.Add(1,PassWay1_1Compelete);
- PassWay1_Compelete.Add(2,PassWay1_2Compelete);
- PassWay1_Compelete.Add(3,PassWay1_3Compelete);
- PassWay1_Compelete.Add(4,PassWay1_4Compelete);
- PassWay1_Compelete.Add(5,PassWay1_5Compelete);
- PassWay1_Compelete.Add(6,PassWay1_6Compelete);
- PassWay1_Compelete.Add(7,PassWay1_7Compelete);
- PassWay1_Compelete.Add(8,PassWay1_8Compelete);
- PassWay1_Compelete.Add(9,PassWay1_9Compelete);
- PassWay1_Compelete.Add(10,PassWay1_10Compelete);
- PassWay1_Compelete.Add(11,PassWay1_11Compelete);
- PassWay1_Compelete.Add(12,PassWay1_12Compelete);
- PassWay1_Compelete.Add(13,PassWay1_13Compelete);
- PassWay1_Compelete.Add(14,PassWay1_14Compelete);
-
- //初始化进度列表
- ScreenInit();
- }
-
- /// <summary>
- /// 订单取配料队列
- /// </summary>
- public ConcurrentQueue<OrderLocInfo> TakeMaterialQueue = new ConcurrentQueue<OrderLocInfo>();
- /// <summary>
- /// 订单供盘队列
- /// </summary>
- public ConcurrentQueue<OrderLocInfo> TakePlateQueue = new ConcurrentQueue<OrderLocInfo>();
-
-
-
-
-
-
-
-
- #region 单口锅逻辑变量
- /// <summary>
- /// 订单唯一ID
- /// </summary>
- public string CurrentOrderId { get; set; }
- #endregion
-
-
- public Dictionary<int,string> StartPassWay { get; set; } = new Dictionary<int, string>()
- {
- {1,"LB24" },
- {2,"LB25" },
- {3,"LB26" },
- {4,"LB27" },
- {5,"LB28" },
- {6,"LB29" },
- {7,"LB30" },
- {8,"LB31" },
- {9,"LB32" },
- {10,"LB33" },
- {11,"LB34" },
- {12,"LB35" },
- {13,"LB36" },
- {14,"LB37" },
-
- };
-
- public Dictionary<int, string> PassWayValue { get; set; } = new Dictionary<int, string>()
- {
- {1,"LW0" },
- {2,"LW1" },
- {3,"LW2" },
- {4,"LW3" },
- {5,"LW4" },
- {6,"LW5" },
- {7,"LW6" },
- {8,"LW7" },
- {9,"LW8" },
- {10,"LW9" },
- {11,"LW10" },
- {12,"LW11" },
- {13,"LW12" },
- {14,"LW13" },
- };
- }
- }
|