public LocationLotDetail CheckLoadHuLocationLotDetail(string huId, string userCode, string locationCode)
        {
            User user = null;

            if (userCode != string.Empty)
            {
                user = userMgr.CheckAndLoadUser(userCode);
            }
            return(CheckLoadHuLocationLotDetail(huId, user, locationCode));
        }
 private void StartPickList(Resolver resolver)
 {
     if (resolver.BarcodeHead == BusinessConstants.CODE_PREFIX_PICKLIST)
     {
         //setBaseMgr.FillResolverByPickList(resolver);
         pickListMgr.StartPickList(resolver.Input, userMgr.CheckAndLoadUser(resolver.UserCode));
         resolver.Result = DateTime.Now.ToString("HH:mm:ss");
         resolver.Code   = resolver.Input;
     }
     else
     {
         throw new BusinessErrorException("Common.Business.Error.BarCodeInvalid");
     }
 }
        private void CreateRepack(Resolver resolver)
        {
            string[]           huIdArr      = resolver.Input.Split(',');
            List <ReceiptNote> receiptNotes = new List <ReceiptNote>();

            foreach (string huId in huIdArr)
            {
                try
                {
                    IList <RepackDetail> repackDetailList  = new List <RepackDetail>();
                    LocationLotDetail    locationLotDetail = locationLotDetailMgr.CheckLoadHuLocationLotDetail(huId);
                    RepackDetail         inRepackDetail    = new RepackDetail();
                    inRepackDetail.LocationLotDetail = locationLotDetail;
                    inRepackDetail.Hu     = locationLotDetail.Hu;
                    inRepackDetail.IOType = BusinessConstants.IO_TYPE_IN;
                    inRepackDetail.Qty    = inRepackDetail.Hu.Qty * inRepackDetail.Hu.UnitQty;
                    repackDetailList.Add(inRepackDetail);

                    RepackDetail outRepackDetail = new RepackDetail();
                    outRepackDetail.itemCode = inRepackDetail.Hu.Item.Code;
                    outRepackDetail.IOType   = BusinessConstants.IO_TYPE_OUT;
                    outRepackDetail.Qty      = inRepackDetail.Qty;
                    repackDetailList.Add(outRepackDetail);

                    Repack repack = repackMgr.CreateDevanning(repackDetailList, userMgr.CheckAndLoadUser(resolver.UserCode));

                    ReceiptNote receiptNote = Repack2ReceiptNote(repack);
                    receiptNotes.Add(receiptNote);
                }

                catch (Exception ex)
                {
                    continue;
                }
            }
            if (resolver.ReceiptNotes == null)
            {
                resolver.ReceiptNotes = receiptNotes;
            }
            else
            {
                IListHelper.AddRange <ReceiptNote>(resolver.ReceiptNotes, receiptNotes);
            }
        }
示例#4
0
        public void FillResolverByOrder(Resolver resolver)
        {
            User      user      = userMgr.CheckAndLoadUser(resolver.UserCode);
            OrderHead orderHead = orderHeadMgr.CheckAndLoadOrderHead(resolver.Input);
            Flow      flow      = this.flowMgr.LoadFlow(orderHead.Flow);

            //if (!user.HasPermission(orderHead.PartyFrom.Code) ||
            //    !user.HasPermission(orderHead.PartyTo.Code))
            //{
            //    throw new BusinessErrorException("Common.Business.Error.NoPermission");
            //}
            #region CopyProperty from OrderHead
            resolver.Code             = orderHead.OrderNo;
            resolver.Description      = flow.Description;
            resolver.Status           = orderHead.Status;
            resolver.OrderType        = orderHead.Type;
            resolver.NeedPrintAsn     = orderHead.NeedPrintAsn;
            resolver.NeedPrintReceipt = orderHead.NeedPrintReceipt;
            resolver.AutoPrintHu      = orderHead.AutoPrintHu && (orderHead.CreateHuOption != BusinessConstants.CODE_MASTER_CREATE_HU_OPTION_VALUE_NONE);
            resolver.AllowExceed      = orderHead.AllowExceed;
            resolver.OrderType        = orderHead.Type;
            resolver.AntiResolveHu    = orderHead.AntiResolveHu;
            resolver.IsOddCreateHu    = orderHead.IsOddCreateHu;
            resolver.IsPickFromBin    = orderHead.IsPickFromBin;
            resolver.FulfillUnitCount = orderHead.FulfillUnitCount;
            resolver.IsShipByOrder    = orderHead.IsShipByOrder;
            if (resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVE)
            {
                resolver.IsScanHu = orderHead.IsReceiptScanHu;
            }
            else if (resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIP ||
                     resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPORDER)
            {
                resolver.IsScanHu = orderHead.IsShipScanHu;
            }
            #endregion
        }
示例#5
0
        protected override void ExecuteSubmit(Resolver resolver)
        {
            IList <MaterialIn> materialInList = executeMgr.ConvertTransformersToMaterialIns(resolver.Transformers);

            productLineInProcessLocationDetailMgr.RawMaterialIn(resolver.Code, materialInList, userMgr.CheckAndLoadUser(resolver.UserCode));
            resolver.Transformers = null;
            resolver.Result       = languageMgr.TranslateMessage("MasterData.MaterialIn.Successfully", resolver.UserCode, resolver.Code);
            resolver.Command      = BusinessConstants.CS_BIND_VALUE_TRANSFORMER;
        }
 public TransportationOrder CreateTransportationOrder(string expenseCode, string userCode)
 {
     return(CreateTransportationOrder(expenseMgr.LoadExpense(expenseCode), userMgr.CheckAndLoadUser(userCode)));
 }
示例#7
0
 public void PendInspectOrder(IList <InspectOrderDetail> inspectOrderDetailList, string userCode)
 {
     PendInspectOrder(inspectOrderDetailList, userMgr.CheckAndLoadUser(userCode));
 }
示例#8
0
 public void DoPick(PickList pickList, string userCode)
 {
     DoPick(pickList, userMgr.CheckAndLoadUser(userCode));
 }