Inheritance: EntityBase
Beispiel #1
0
 protected override void SetBaseInfo(Resolver resolver)
 {
     if (resolver.BarcodeHead == BusinessConstants.BARCODE_HEAD_BIN)
     {
         setBaseMgr.FillResolverByBin(resolver);
     }
     else if (resolver.BarcodeHead == BusinessConstants.BARCODE_HEAD_LOCATION)
     {
         setBaseMgr.FillResolverByLocation(resolver);
     }
     else if (resolver.BarcodeHead == BusinessConstants.BARCODE_HEAD_FLOW)
     {
         setBaseMgr.FillResolverByFlow(resolver);
         if (resolver.OrderType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PROCUREMENT
             && resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPRETURN)
         {
             throw new BusinessErrorException("Flow.ShipReturn.Error.FlowTypeIsProcurement", resolver.OrderType);
         }
         if (resolver.OrderType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_DISTRIBUTION
             && resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVERETURN)
         {
             throw new BusinessErrorException("Flow.ReceiveReturn.Error.FlowTypeIsDistribution", resolver.OrderType);
         }
     }
     else
     {
         throw new BusinessErrorException("Common.Business.Error.BarCodeInvalid");
     }
 }
Beispiel #2
0
 protected override void GetReceiptNotes(Resolver resolver)
 {
 }
Beispiel #3
0
 protected override void GetDetail(Resolver resolver)
 {
     //setBaseMgr.FillDetailByFlow(resolver);
 }
Beispiel #4
0
 protected override void ExecuteSubmit(Resolver resolver)
 {
     executeMgr.OrderReturn(resolver);
 }
Beispiel #5
0
 protected override void ExecutePrint(Resolver resolver)
 {
 }
Beispiel #6
0
 protected override void ExecuteCancel(Resolver resolver)
 {
     executeMgr.CancelOperation(resolver);
 }
Beispiel #7
0
        protected override void SetDetail(Resolver resolver)
        {
            List<string> flowTypes = new List<string>();
            flowTypes.Add(BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_TRANSFER);
            flowTypes.Add(BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PROCUREMENT);
            flowTypes.Add(BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_DISTRIBUTION);
            flowTypes.Add(BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_CUSTOMERGOODS);
            Hu hu = huMgr.CheckAndLoadHu(resolver.Input);
            if (this.locationMgr.IsHuOcuppyByPickList(resolver.Input))
            {
                throw new BusinessErrorException("Order.Error.PickUp.HuOcuppied", resolver.Input);
            }

            FlowView flowView = null;
            //移库路线类型退货(退库)可以跟据库格和库位找出相对应的移库路线
            if (resolver.CodePrefix == null || resolver.CodePrefix.Trim() == string.Empty)
            {
                if (resolver.BinCode == null || resolver.BinCode.Trim() == string.Empty)
                {
                    throw new BusinessErrorException("Common.Business.Error.ScanFlowOrStorageBinFirst");
                }
                if (resolver.LocationFormCode == null || resolver.LocationFormCode.Trim() == string.Empty)
                {
                    throw new BusinessErrorException("Common.Business.Error.ScanFlowOrLocationFirst");
                }
                if (hu.Location != null)
                {
                    if (hu.Location != resolver.LocationFormCode)
                    {
                        throw new BusinessErrorException("Common.Business.Error.HuNoInventory", resolver.LocationFormCode, hu.HuId);
                    }
                }
                //确定flow和flowView
                List<string> transferType = new List<string>();
                transferType.Add(BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_TRANSFER);
                flowView = flowMgr.CheckAndLoadFlowView(null, resolver.UserCode, resolver.LocationToCode, resolver.LocationFormCode, hu, transferType);
                setBaseMgr.FillResolverByFlow(resolver, flowView.Flow);
                resolver.Result = resolver.LocationFormCode + " => " + resolver.LocationToCode;
            }

            //已经确定了Flow,匹配新的Hu
            if (resolver.CodePrefix != null && resolver.CodePrefix.Trim() != string.Empty)
            {
                flowView = flowMgr.CheckAndLoadFlowView(resolver.Code, null, null, null, hu, null);
                //退库检查库存
                if ((resolver.OrderType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_TRANSFER
                     || resolver.OrderType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PROCUREMENT
                     || resolver.OrderType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_CUSTOMERGOODS)
                    && flowView.Flow.IsReceiptScanHu
                    )
                {
                    LocationLotDetail locationLotDetail = locationLotDetailMgr.CheckLoadHuLocationLotDetail(hu.HuId);
                    hu.Qty = locationLotDetail.Qty / hu.UnitQty;
                }
            }
            else
            {
                throw new BusinessErrorException("Common.Business.Error.ScanFlowFirst");
            }
            setDetailMgr.MatchHuByFlowView(resolver, flowView, hu);
        }