using BPA.Models;
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 bool InitialComplete { get; set; }
        /// <summary>
        /// 供盘 模组状态 忙碌1 空闲0
        /// </summary>
        public bool ProvidePlateModule { get; set; }
        /// <summary>
        /// 供盘完成状态
        /// </summary>
        public bool ProvidePlateComplete { get; set; }
        /// <summary>
        /// 清洗模组1状态 忙碌1 空闲0
        /// </summary>
        public bool CleanModule { get; set; }

        /// <summary>
        /// 清洗模组2状态 忙碌1 空闲0
        /// </summary>
        public bool SecondCleanModule { get; set; }
        /// <summary>
        /// 清洗模组1完成状态
        /// </summary>
        public bool CleanComplete { get; set; }

        // <summary>
        /// 清洗模组2完成状态
        /// </summary>
        public bool SecondCleanComplete { get; set; }
        /// <summary>
        /// 锅灶1状态  忙碌1  空闲0
        /// </summary>
        public bool KitchenOneStatus { get; set; }

        /// <summary>
        /// 锅灶1状态  忙碌1  空闲0
        /// </summary>
        public bool KitchenSecondStatus { get; set; }
        /// <summary>
        /// 锅灶1注油完成状态
        /// </summary>
        public bool FallOilComplete { get; set; }
        /// <summary>
        /// 锅灶2注油完成状态
        /// </summary>
        public bool SecondOilComplete { get; set; }
        /// <summary>
        /// 锅灶1翻转机上升完成状态
        /// </summary>
        public bool TurnMachineUpComplete { get; set; }
        /// <summary>
        /// 锅灶2翻转机上升完成状态
        /// </summary>
        public bool SecondTurnMachineUpComplete { get; set; }
        /// <summary>
        /// 锅灶1翻转机下降完成状态
        /// </summary>
        public bool TurnMachineDownComplete { get; set; }

        /// <summary>
        /// 锅灶2翻转机下降完成状态
        /// </summary>
        public bool SecondTurnMachineDownComplete { get; set; }
        /// <summary>
        /// 料仓旋转到位状态
        /// </summary>
        public bool MaterialArriveComplete { get; set; }
        /// <summary>
        /// 机器人空闲状态
        /// </summary>
        public bool RoobotIdle { get; set; }
        /// <summary>
        /// 放锅至灶台1完成状态
        /// </summary>
        public bool PutPotToKitchenComlete { get; set; }

        /// <summary>
        /// 放锅至灶台2完成状态
        /// </summary>
        public bool PutPotToSecondKitchenComlete { get; set; }
        /// <summary>
        /// 机器人取料完成状态
        /// </summary>
        public bool TakeMaterialComplete { get; set; }
        /// <summary>
        /// 机器人放锅至清洗台1完成状态
        /// </summary>
        public bool PlaceRinseTableComplete { get; set; }
        /// <summary>
        /// 机器人放锅至清洗台2完成状态
        /// </summary>
        public bool PlaceRinseSecondTableComplete { get; set; }
        /// <summary>
        /// 订单取配料队列
        /// </summary>
        public ConcurrentQueue<OrderLocInfo> TakeMaterialQueue = new ConcurrentQueue<OrderLocInfo>();
        /// <summary>
        /// 订单供盘队列
        /// </summary>
        public ConcurrentQueue<OrderLocInfo> TakePlateQueue = new ConcurrentQueue<OrderLocInfo>();
        /// <summary>
        /// 存放主流程当前订单唯一ID
        /// </summary>
        public string MainCurrentOrderId { get; set; }
        /// <summary>
        /// 存放辅流程当前订单唯一ID
        /// </summary>
        public string MinorCurrentOrderId { get; set; }
        /// <summary>
        /// PLC上升沿初始化触发信号
        /// </summary>
        public bool DevicDataInite { set; get; }
        /// <summary>
        /// 取素菜A料完成
        /// </summary>
        public bool TakeVegBurdenAComplete { get; set; }
        /// <summary>
        /// 取荤菜A料完成
        /// </summary>
        public bool TakeMeatBurdenAComplete { get; set; }

        /// <summary>
        /// 所有A料下锅完成
        /// </summary>
        public bool TakeAllBurdenAComplete { get; set; }
        /// <summary>
        /// 取素菜B料完成
        /// </summary>
        public bool TakeVegBurdenBComplete { get; set; }
        /// <summary>
        /// 所有B料下锅完成
        /// </summary>
        public bool TakeAllBurdenBComplete { get; set; }
        /// <summary>
        /// 取C料完成
        /// </summary>
        public bool TakeBurdenCComplete { get; set; }
        /// <summary>
        /// 除C料外，所有配料下锅标志
        /// </summary>
        public bool TakeAllBurdenComplete { get; set; }
        /// <summary>
        /// 锅1到位 true：到位  false:未到位
        /// </summary>
        public bool PotInPlace { get; set; }
        /// <summary>
        /// 锅2到位 true：到位  false:未到位
        /// </summary>
        public bool SecondPotInPlace { get; set; }
        /// <summary>
        /// true:烹饪完成  
        /// </summary>
        public bool CookingComplete { get; set; }
        /// <summary>
        /// 注油完成
        /// </summary>
        public bool AddOilComplete { get; set; }
        /// <summary>
        /// 1号锅倒料完成
        /// </summary>
        public bool FallMaterialComplete { get; set; }
        /// <summary>
        /// 2号锅倒料完成
        /// </summary>
        public bool SecondFallMaterialComplete { get; set; }
        /// <summary>
        /// 供盘互锁
        /// </summary>
        public bool TakePlateLock { get; set; }
        /// <summary>
        /// 取锅互锁
        /// </summary>
        public bool TakePotLock { get; set; }
        /// <summary>
        /// 取素菜A料互锁
        /// </summary>
        public bool TakeVegALock { get; set; }
        /// <summary>
        /// 取荤菜A料互锁
        /// </summary>
        public bool TakeMeatALock { get; set; }
        /// <summary>
        /// 取素菜B料互锁
        /// </summary>
        public bool TakeVegBLock { get; set; }
        /// <summary>
        /// 取C料互锁
        /// </summary>
        public bool TakeBurdenCLcok { get; set; }
        /// <summary>
        /// 烹饪任务互锁
        /// </summary>
        public bool CookingLock { get; set; }
        /// <summary>
        /// 转台互锁
        /// </summary>
        public bool TurnTableLock { get; set; }
        /// <summary>
        /// 主流程自锁
        /// </summary>
        public bool MainProcessExcuteLock { get; set; }
        /// <summary>
        /// 辅流程自锁
        /// </summary>
        public bool MinorProcessExcuteLock { get; set; }
        /// <summary>
        /// 开始取料标志
        /// </summary>
        public bool AllowTakeMaterial { get; set; }
        /// <summary>
        /// 主流程订单完成标志
        /// </summary>
        public bool MainOutMealComplete { get; set; }
        /// <summary>
        /// 辅流程订单完成标志
        /// </summary>
        public bool MinorOutMealComplete { get; set; }
        /// <summary>
        /// 主流程订单取料结束
        /// </summary>
        public bool MainOrderMaterialCom { get; set; } 
        /// <summary>
        /// 主流程是否取料判断
        /// </summary>
        public bool MainHasTakeMaterial { get; set; }
        /// <summary>
        /// 主流程等待
        /// </summary>
        public bool MainProcessWait { get; set; }
        /// <summary>
        /// 辅流程等待
        /// </summary>
        public bool MinorProcessWait { get; set; }
        /// <summary>
        /// 辅流程订单取料结束
        /// </summary>
        public bool MinorOrderMaterialCom { get; set; }
        /// <summary>
        /// 辅流程是否取料判断
        /// </summary>
        public bool MinorHasTakeMaterial { get; set; }
        /// <summary>
        /// 存储订单对应流程对象
        /// </summary>
        public List<StirFryBom> listStirBom=new List<StirFryBom>();

        
        /// <summary>
        /// 下配料次数
        /// </summary>
        public int MaterialCount { get; set; }
        /// <summary>
        /// 允许执行辅流程标识
        /// </summary>
        public bool MinorProcessFlag { get; set; }
        /// <summary>
        /// 辅流程执行状态
        /// </summary>
        public bool MinorProessStatus { get; set; }
        /// <summary>
        /// 允许执行主流程标识
        /// </summary>
        public bool MainProcessFlag { get; set; } = true;
        /// <summary>
        /// 主流程执行状态
        /// </summary>
        public bool MainProcessStatus { get; set; } = true;
        /// <summary>
        /// 当前放锅位置 1：1号锅  2:  2号锅
        /// </summary>
        public int CurrentPutPotLoc { get; set; }
        /// <summary>
        /// 主流程所执行的锅位置
        /// </summary>
        public int MainProcessPotLoc { get; set; }
        /// <summary>
        /// 辅流程所执行的锅位置
        /// </summary>
        public int MinorProcessPotLoc { get; set; }
    }
}

