示例#1
0
        public PagedCashierList WebSiteCashier(SearchCashierRequest request)
        {
            //request.FormatDate();
            //_orderItemRepository.SetCurrentUser(_accountService.GetByUserID(UserId));
            if (!String.IsNullOrWhiteSpace(request.FinancialType))
            {
                var finacialItems = _enumService.All(DefinitionField.Financial);
                var item          = finacialItems.FirstOrDefault(v => String.Compare(v.Key, request.FinancialType, StringComparison.OrdinalIgnoreCase) == 0);
                if (item != null)
                {
                    switch (item.Key)
                    {
                    case "-1":    //全部
                        request.FinancialType = String.Empty;
                        break;

                    case "0":    //进账
                        request.FinancialType = DefinitionField.Sales;
                        break;

                    case "5":    //退帐
                        request.FinancialType = DefinitionField.Rma;
                        break;
                    }
                }
            }

            var lst = _orderItemRepository.WebSiteCashierPaged(request);

            lst.Stat();
            return(lst);
        }
示例#2
0
        public IHttpActionResult GetList4CashierDetailsReport([FromUri] SearchCashierRequest request, [UserProfile] UserProfile userProfile)
        {
            request.StoreId = CheckStoreId(request.StoreId);
            var result = CheckRole4Store(userProfile, request.StoreId);

            if (!result.Result)
            {
                return(BadRequest(result.Error));
            }

            request.DataRoleStores = userProfile.StoreIds == null ? null : userProfile.StoreIds.ToList();
            request.ArrangeParams();

            #region 参数调整


            if (!String.IsNullOrWhiteSpace(request.FinancialType))
            {
                var finacialItems = _enumService.All(DefinitionField.Financial);
                var item          = finacialItems.FirstOrDefault(v => String.Compare(v.Key, request.FinancialType, StringComparison.OrdinalIgnoreCase) == 0);
                if (item != null)
                {
                    switch (item.Key)
                    {
                    case "-1":    //全部
                        request.FinancialType = String.Empty;
                        break;

                    case "0":    //进账
                        request.FinancialType = DefinitionField.Sales;
                        break;

                    case "5":    //退帐
                        request.FinancialType = DefinitionField.Rma;
                        break;
                    }
                }
            }

            #endregion

            var pagedinfo = _orderItemRepository.GetPagedList4CashierStat(request);

            return(RetrunHttpActionResult(pagedinfo));
        }
示例#3
0
 public IHttpActionResult GetShippingTypeEnums()
 {
     return(DoFunction(() => { return _enumService.All("ShippingType"); }, "读取发货方式失败!"));
 }