Ejemplo n.º 1
0
        /// <summary>
        /// 分页获取诊所的收支明细
        /// </summary>
        /// <param name="query">查询实体</param>
        /// <returns></returns>
        public static QueryPageModel <ShopAccountItem> GetShopAccountItem(ShopAccountItemQuery query)
        {
            var model = _iBillingService.GetShopAccountItem(query);

            return(new QueryPageModel <ShopAccountItem>()
            {
                Total = model.Total,
                Models = model.Models.Map <List <ShopAccountItem> >()
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 分页获取店铺的收支明细
        /// </summary>
        /// <param name="query">查询实体</param>
        /// <returns></returns>
        public static QueryPageModel <ShopAccountItem> GetShopAccountItem(ShopAccountItemQuery query)
        {
            var model = _iBillingService.GetShopAccountItem(query);
            QueryPageModel <ShopAccountItem> item = new QueryPageModel <ShopAccountItem>();

            item.Total = model.Total;

            List <ShopAccountItem> items = new List <ShopAccountItem>();

            foreach (var m in model.Models)
            {
                ShopAccountItem shopAccountItem = new ShopAccountItem();
                shopAccountItem.AccountNo       = m.AccountNo;
                shopAccountItem.ShopId          = m.ShopId;
                shopAccountItem.ShopAccountType = m.TradeType;
                shopAccountItem.Balance         = m.Balance.ToString();
                shopAccountItem.CreateTime      = m.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
                var detailLink = string.Empty;
                shopAccountItem.DetailId = m.DetailId;
                if (m.IsIncome)
                {
                    shopAccountItem.Income = m.Amount.ToString();
                }
                else
                {
                    shopAccountItem.Expenditure = m.Amount.ToString();
                }
                shopAccountItem.Id = m.Id;
                items.Add(shopAccountItem);
            }
            item.Models = items;
            return(item);
        }