Exemplo n.º 1
0
        public DivertCmd HanderReq(DivertReq divertReq)
        {
            int index;

            try
            {
                index = boxList.FindIndex((Box mBox) =>
                {
                    if (mBox.barcode == divertReq.codeStr)
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                });
            }
            catch
            {
                return(null);
            }

            int number;

            try
            {
                number = boxList.FindIndex((Box mBox) =>
                {
                    if (mBox.status == Box.BoxStatus.Missing)
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                });
            }

            catch (Exception e)
            {
                Log.log.Error("find another same box or the previous box was not be sorting success", e);
                throw e;
            }

            if (number == index)
            {
                boxList[index].status = Box.BoxStatus.Sorting;
                return(new DivertCmd(divertReq, boxList[index].exLane));
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
 public DivertCmd HanderReq(DivertReq divertReq)
 {
     foreach (LaneSeq laneSeq in laneSeqList)
     {
         DivertCmd divertCmd = laneSeq.HanderReq(divertReq);
         if (divertCmd != null)
         {
             return(divertCmd);
         }
     }
     return(null);
 }
Exemplo n.º 3
0
        public DivertCmd HanderReq(DivertReq divertReq)
        {
            int index = LocationBox(divertReq.codeStr, true);

            if (index < 0)
            {
                return(null);
            }
            foreach (NodeSeq nodeSeq in nodeSeqList)
            {
                if (nodeSeq.node == divertReq.nodeId)
                {
                    return(nodeSeq.HanderReq(divertReq));
                }
            }
            Log.log.Error("Find illegal node");
            throw new Exception();             //can not reach here
        }