Exemple #1
0
        public bool AsrsInputEnabled(ref SysCfg.EnumAsrsTaskType asrsTaskType)
        {
            lock (portBufLock)
            {
                if (this.portCata == 2)
                {
                    return(false);
                }
                if (this.db1ValsToSnd[0] == 2)
                {
                    return(false);
                }

                if (asrsTaskType == SysCfg.EnumAsrsTaskType.产品入库)
                {
                    if (this.PortinBufCapacity > 1)
                    {
                        //缓存满,并且入口有料,并且手动强制入库
                        if (this.db2Vals[this.PortinBufCapacity] == 2)
                        {
                            if ((this.palletBuffer.Count() > 0) && (this.db2Vals[0] == 2 || this.db2Vals[1] == 2))
                            {
                                return(true);
                            }
                            else
                            {
                                return(false);
                            }
                        }
                        else if (this.palletBuffer.Count() >= this.PortinBufCapacity)
                        {
                            for (int j = 0; j < Math.Min(PalletBuffer.Count(), PortinBufCapacity); j++)
                            {
                                if (this.Db2Vals[j] != 2)
                                {
                                    return(false);
                                }
                            }
                            return(true);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                    else
                    {
                        if (this.palletBuffer.Count() > 0 && this.db2Vals[0] == 2)
                        {
                            return(true);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
                else
                {
                    if (this.PortinBufCapacity > 1)
                    {
                        if ((this.db2Vals[this.PortinBufCapacity] == 2))
                        {
                            return(true);
                        }
                        else
                        {
                            for (int j = 0; j < PortinBufCapacity; j++)
                            {
                                if (this.Db2Vals[j] != 2)
                                {
                                    return(false);
                                }
                            }
                            return(true);
                        }
                    }
                    else
                    {
                        if (this.db2Vals[0] == 2)
                        {
                            return(true);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
            }
        }
Exemple #2
0
        public bool AsrsInputEnabled(ref SysCfg.EnumAsrsTaskType asrsTaskType)
        {
            lock (portBufLock)
            {
                if (this.portCata == 2)
                {
                    return(false);
                }
                if (this.db1ValsToSnd[0] == 2)
                {
                    return(false);
                }

                if (asrsTaskType == SysCfg.EnumAsrsTaskType.产品入库)
                {
                    if (this.PortinBufCapacity > 1)
                    {
                        //并且入口有料,并且手动强制入库
                        if (this.db2Vals[this.PortinBufCapacity] == 2)
                        {
                            if ((this.palletBuffer.Count() > 0) && (this.db2Vals[0] == 2 || this.db2Vals[1] == 2))
                            {
                                return(true);
                            }
                            else
                            {
                                return(false);
                            }
                        }
                        else if (this.palletBuffer.Count() >= this.PortinBufCapacity) //缓存满
                        {
                            /* 屏蔽条码校验
                             * if (PalletBuffer.Count() >= PortinBufCapacity && dlgtBarcodeCheck != null)//条码校验
                             * {
                             *  string reStr = "";
                             *  if (!dlgtBarcodeCheck(this, ref reStr))
                             *  {
                             *      CurrentTaskDescribe = reStr;
                             *      return false;
                             *  }
                             * }*/
                            for (int j = 0; j < Math.Min(PalletBuffer.Count(), PortinBufCapacity); j++)
                            {
                                if (this.Db2Vals[j] != 2)
                                {
                                    return(false);
                                }
                            }
                            return(true);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                    else
                    {
                        if (this.palletBuffer.Count() > 0 && this.db2Vals[0] == 2)
                        {
                            return(true);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
                else
                {
                    if (this.PortinBufCapacity > 1)
                    {
                        if ((this.db2Vals[this.PortinBufCapacity] == 2))
                        {
                            return(true);
                        }
                        else
                        {
                            for (int j = 0; j < PortinBufCapacity; j++)
                            {
                                if (this.Db2Vals[j] != 2)
                                {
                                    return(false);
                                }
                            }
                            return(true);
                        }
                    }
                    else
                    {
                        if (this.db2Vals[0] == 2)
                        {
                            return(true);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
            }
        }