Esempio n. 1
0
 protected override void SetDetail(Resolver resolver)
 {
     LocationLotDetail locationLotDetail = locationLotDetailMgr.CheckLoadHuLocationLotDetail(resolver.Input, resolver.UserCode);
     TransformerDetail transformerDetail = TransformerHelper.ConvertLocationLotDetailToTransformerDetail(locationLotDetail, false);
     resolver.AddTransformerDetail(transformerDetail);
     resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMERDETAIL;
 }
Esempio n. 2
0
        protected override void SetDetail(Resolver resolver)
        {
            //setDetailMgr.CheckHuInTransformerDetails(resolver);
            LocationLotDetail locationLotDetail = locationLotDetailMgr.CheckLoadHuLocationLotDetail(resolver.Input, resolver.UserCode);

            //Hu hu = locationLotDetail.Hu;
            //hu.Qty = locationLotDetail.Qty / hu.UnitQty;
            if (this.locationMgr.IsHuOcuppyByPickList(resolver.Input))
            {
                throw new BusinessErrorException("Order.Error.PickUp.HuOcuppied", resolver.Input);
            }

            //已经下架
            if (locationLotDetail.StorageBin == null)
            {
                throw new BusinessErrorException("Warehouse.PickUp.Error.IsAlreadyPickUp", resolver.Input);
            }
            TransformerDetail transformerDetail = TransformerHelper.ConvertLocationLotDetailToTransformerDetail(locationLotDetail, false);

            resolver.AddTransformerDetail(transformerDetail);
            //transformerDetail.CurrentQty = transformerDetail.Qty;
            //int maxSeq = setDetailMgr.FindMaxSeq(resolver.Transformers);
            //transformerDetail.Sequence = maxSeq + 1;
            //resolver.Transformers[0].TransformerDetails.Add(transformerDetail);
            //resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMERDETAIL;
        }
Esempio n. 3
0
        protected override void SetDetail(Resolver resolver)
        {
            Hu hu = huMgr.CheckAndLoadHu(resolver.Input);

            if (this.locationMgr.IsHuOcuppyByPickList(resolver.Input))
            {
                throw new BusinessErrorException("Order.Error.PickUp.HuOcuppied", resolver.Input);
            }
            if (resolver.BinCode == string.Empty || resolver.BinCode == null)
            {
                throw new BusinessErrorException("Warehouse.PutAway.PlzScanBin");
            }
            if (hu.StorageBin != null && hu.StorageBin.Trim() != string.Empty && hu.StorageBin == resolver.BinCode)
            {
                throw new BusinessErrorException("Warehouse.PutAway.AlreadyInThisBin");
            }
            //校验Bin
            StorageBin        bin = storageBinMgr.CheckAndLoadStorageBin(resolver.BinCode);
            LocationLotDetail locationLotDetail = locationLotDetailMgr.CheckLoadHuLocationLotDetail(resolver.Input, string.Empty, bin.Area.Location.Code);

            locationLotDetail.NewStorageBin = bin;
            TransformerDetail transformerDetail = TransformerHelper.ConvertLocationLotDetailToTransformerDetail(locationLotDetail, true);

            resolver.AddTransformerDetail(transformerDetail);
        }
Esempio n. 4
0
        /// <summary>
        /// 仅校验投料的物料号,库位是否一致,不校验单位单包装等信息
        /// todo:不允许投入的又有数量又有Hu //可以前台控制
        /// </summary>
        /// <param name="resolver"></param>
        protected override void SetDetail(Resolver resolver)
        {
            if (resolver.CodePrefix == string.Empty)
            {
                throw new BusinessErrorException("Common.Business.Error.ScanProductLineFirst");
            }
            LocationLotDetail locationLotDetail = locationLotDetailMgr.CheckLoadHuLocationLotDetail(resolver.Input, resolver.UserCode);
            TransformerDetail transformerDetail = TransformerHelper.ConvertLocationLotDetailToTransformerDetail(locationLotDetail, false);
            var query = resolver.Transformers.Where
                            (t => (t.ItemCode == transformerDetail.ItemCode && t.LocationCode == transformerDetail.LocationCode));

            if (query.Count() < 1)
            {
                throw new BusinessErrorException("Warehouse.HuMatch.NotMatch", transformerDetail.HuId);
            }

            #region 先进先出校验
            Flow flow = flowMgr.CheckAndLoadFlow(resolver.Code);
            if (flow.IsGoodsReceiveFIFO)
            {
                Hu             hu       = huMgr.CheckAndLoadHu(resolver.Input);
                IList <string> huIdList = new List <string>();
                if (resolver.Transformers != null && resolver.Transformers.Count > 0)
                {
                    foreach (Transformer transformer in resolver.Transformers)
                    {
                        if (transformer.TransformerDetails != null && transformer.TransformerDetails.Count > 0)
                        {
                            foreach (TransformerDetail det in transformer.TransformerDetails)
                            {
                                if (det.CurrentQty != decimal.Zero)
                                {
                                    huIdList.Add(det.HuId);
                                }
                            }
                        }
                    }
                }
                string maxLot = setDetailMgr.CheckFIFO(hu, huIdList);
                if (maxLot != string.Empty && maxLot != null)
                {
                    throw new BusinessErrorException("FIFO.ERROR", hu.HuId, maxLot);
                }
            }
            #endregion

            resolver.AddTransformerDetail(transformerDetail);
        }
Esempio n. 5
0
 protected override void SetDetail(Resolver resolver)
 {
     if (resolver.CodePrefix == string.Empty)
     {
         throw new BusinessErrorException("Common.Business.Error.ScanFlowFirst");
     }
     if (resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_PRODUCTIONRECEIVE)
     {
         LocationLotDetail locationLotDetail    = locationLotDetailMgr.CheckLoadHuLocationLotDetail(resolver.Input, resolver.UserCode);
         TransformerDetail newTransformerDetail = TransformerHelper.ConvertLocationLotDetailToTransformerDetail(locationLotDetail, false);
         resolver.AddTransformerDetail(newTransformerDetail);
     }
     else
     {
         setDetailMgr.MatchReceive(resolver);
         if (resolver.BinCode != null && resolver.BinCode != string.Empty)
         {
             resolver.Result = languageMgr.TranslateMessage("Warehouse.CurrentBinCode", resolver.UserCode, resolver.BinCode);
         }
     }
 }