Exemplo n.º 1
0
        protected override void SetDetail(Resolver resolver)
        {
            List <string> flowTypes = new List <string>();

            flowTypes.Add(BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION);
            bool isHaslocationLotDetail = locationLotDetailMgr.CheckHuLocationExist(resolver.Input);

            if (!isHaslocationLotDetail)
            {
                throw new BusinessErrorException("Hu.Error.NoInventory", resolver.Input);
            }
            Hu       hu       = huMgr.CheckAndLoadHu(resolver.Input);
            FlowView flowView = null;

            //如果是扫描Bin,根据Hu和Bin匹配出flow
            if (resolver.CodePrefix == null || resolver.CodePrefix.Trim() == string.Empty)
            {
                //确定flow和flowView
                flowView = flowMgr.CheckAndLoadFlowView(null, resolver.UserCode, string.Empty, null, hu, flowTypes);
                setBaseMgr.FillResolverByFlow(resolver, flowView.Flow);
            }
            //如果已经确定了Flow
            else
            {
                //根据Flow和Hu匹配出flowView
                flowView = flowMgr.CheckAndLoadFlowView(resolver.Code, null, null, null, hu, flowTypes);
            }
            setDetailMgr.MatchHuByFlowView(resolver, flowView, hu);
        }