Esempio n. 1
0
        public virtual string BatchApproveVirtualRequest(List <VirtualRequestInfo> infoList)
        {
            List <BatchActionItem <VirtualRequestInfo> > items = infoList.Select(x => new BatchActionItem <VirtualRequestInfo>()
            {
                ID   = x.SysNo.ToString(),
                Data = x
            }).ToList();

            var resutl = BatchActionManager.DoBatchAction <VirtualRequestInfo, BizException>(items, (p) =>
            {
                VirtualRequestProcessor.ApproveRequest(p);
            });

            return(resutl.PromptMessage);
        }
Esempio n. 2
0
        /// <summary>
        /// 批量激活
        /// </summary>
        /// <param name="sysNoList"></param>
        /// <returns></returns>
        public virtual string BatchActiveGiftCard(List <int> sysNoList)
        {
            List <BatchActionItem <int> > items = sysNoList.Select(x => new BatchActionItem <int>()
            {
                ID   = x.ToString(),
                Data = x
            }).ToList();

            var bl = ObjectFactory <GiftCardProcessor> .Instance;

            var result = BatchActionManager.DoBatchAction <int, BizException>(items, (sysno) =>
            {
                bl.ActiveGiftCard(sysno);
            });

            return(result.PromptMessage);
        }
Esempio n. 3
0
        public string BatchVoidGroupBuyingTicket(List <int> sysNoList)
        {
            List <BatchActionItem <int> > items = sysNoList.Select(x => new BatchActionItem <int>()
            {
                ID   = x.ToString(),
                Data = x
            }).ToList();

            var bl = ObjectFactory <GroupBuyingProcessor> .Instance;

            var resutl = BatchActionManager.DoBatchAction <int, BizException>(items, (p) =>
            {
                bl.VoidGroupBuyingTicket(p);
            });

            return(resutl.PromptMessage);
        }
Esempio n. 4
0
        public virtual string BatchHandleGroupbuyingBusinessCooperation(List <int> sysNoList)
        {
            List <BatchActionItem <int> > items = sysNoList.Select(x => new BatchActionItem <int>()
            {
                ID   = x.ToString(),
                Data = x
            }).ToList();

            var bl = ObjectFactory <GroupBuyingProcessor> .Instance;

            var resutl = BatchActionManager.DoBatchAction <int, BizException>(items, (p) =>
            {
                bl.HandleGroupbuyingBusinessCooperation(p);
            });

            return(resutl.PromptMessage);
        }
Esempio n. 5
0
        /// <summary>
        /// 审核礼品券商品
        /// </summary>
        /// <param name="sysNoList"></param>
        /// <returns></returns>
        public virtual string BatchAuditVoucherProduct(List <int> sysNoList)
        {
            List <BatchActionItem <GiftVoucherProduct> > items = sysNoList.Select(x => new BatchActionItem <GiftVoucherProduct>()
            {
                ID   = x.ToString(),
                Data = new GiftVoucherProduct()
                {
                    SysNo = x
                }
            }).ToList();

            var bl = ObjectFactory <GiftCardProcessor> .Instance;

            var resutl = BatchActionManager.DoBatchAction <GiftVoucherProduct, BizException>(items, (p) =>
            {
                bl.AuditVoucherProduct(p);
            });

            return(resutl.PromptMessage);
        }
Esempio n. 6
0
        public void ProductBatchEntry(List <int> productSysNoList, string Note, ProductEntryStatus entryStatus, ProductEntryStatusEx entryStatusEx)
        {
            if (productSysNoList == null || productSysNoList.Count < 1)
            {
                return;
            }
            else
            {
                List <BatchActionItem <int> > actionItemList = new List <BatchActionItem <int> >();
                foreach (int productsysno in productSysNoList)
                {
                    BatchActionItem <int> item = new BatchActionItem <int>();
                    item.Data = productsysno;
                    item.ID   = productsysno.ToString();
                    actionItemList.Add(item);
                }

                var resutl = BatchActionManager.DoBatchAction <int, BizException>(actionItemList, (productsysno) =>
                {
                    ProductEntryInfo entryInfo = new ProductEntryInfo();
                    entryInfo.ProductSysNo     = productsysno;
                    entryInfo.AuditNote        = Note;
                    switch (entryStatus)
                    {
                    case ProductEntryStatus.AuditFail:
                        {
                            ObjectFactory <ProductEntryInfoProcessor> .NewInstance().AuditFail(entryInfo);
                            break;
                        }

                    case ProductEntryStatus.AuditSucess:
                        {
                            ObjectFactory <ProductEntryInfoProcessor> .NewInstance().AuditSucess(entryInfo);
                            break;
                        }

                    default:
                        {
                            switch (entryStatusEx)
                            {
                            case ProductEntryStatusEx.Inspection:
                                {
                                    ObjectFactory <ProductEntryInfoProcessor> .NewInstance().ToInspection(entryInfo);
                                    break;
                                }

                            case ProductEntryStatusEx.InspectionFail:
                                {
                                    ObjectFactory <ProductEntryInfoProcessor> .NewInstance().InspectionFail(entryInfo);
                                    break;
                                }

                            case ProductEntryStatusEx.InspectionSucess:
                                {
                                    ObjectFactory <ProductEntryInfoProcessor> .NewInstance().InspectionSucess(entryInfo);
                                    break;
                                }

                            case ProductEntryStatusEx.Customs:
                                {
                                    ObjectFactory <ProductEntryInfoProcessor> .NewInstance().ToCustoms(entryInfo);
                                    break;
                                }

                            case ProductEntryStatusEx.CustomsFail:
                                {
                                    ObjectFactory <ProductEntryInfoProcessor> .NewInstance().CustomsFail(entryInfo);
                                    break;
                                }

                            case ProductEntryStatusEx.CustomsSuccess:
                                {
                                    ObjectFactory <ProductEntryInfoProcessor> .NewInstance().CustomsSuccess(entryInfo);
                                    break;
                                }
                            }
                            break;
                        }
                    }
                });
                if (string.IsNullOrWhiteSpace(resutl.PromptMessage))
                {
                    return;
                }
                else
                {
                    throw new BizException(resutl.PromptMessage);
                }
            }
        }