//订单扣费明细封装方法 private InFeeInfoListViewModel List(InFeeListFilterModel filter) { if (IsPostRequest) { filter.Page = 1; } var viewModels = new InFeeInfoListViewModel { FilterModel = filter }; var param = new InFeeListParam //B_LMS.Data { CustomerCode = _workContext.User.UserUame, CountryCode = filter.CountryCode, EndTime = (filter.EndTime.HasValue ? filter.EndTime.Value.ToString("yyyy-MM-dd 23:59:59") : null).ConvertTo <DateTime?>(), SearchContext = filter.SearchContext, ShippingMethodId = filter.ShippingMethodId, SearchWhere = filter.SearchWhere, StartTime = filter.StartTime, Page = filter.Page, PageSize = filter.PageSize }; decimal alltotalfee = 0; var list = _feeManageService.GetInFeeInfoPagedList(param, out alltotalfee); viewModels.PagedList = list.ToModelAsPageCollection <InFeeInfoExt, InFeeInfoModel>();//LMS_Db.Entities与LMS.UserCenter.Controllers.BillingController映射 viewModels.AllTotalFee = alltotalfee; InitAdd(); return(viewModels); }
//public ValuesController(){} // GET api/orders/5 public FeeInfoModel Get(string id) { decimal alltotalfee = 0; var lst = _feeManageService.GetInFeeInfoPagedList(new InFeeListParam() { CustomerCode = "C14169", //代购帐号 DG SearchWhere = 2, SearchContext = id, CountryCode = null, Page = 1, PageSize = 20 }, out alltotalfee); if (lst.InnerList != null) { if (lst.InnerList.Count > 0) { var obj = new FeeInfoModel() { CustomerOrderNumber = id, SettleWeight = lst.InnerList[0].SettleWeight ?? 0, TotalFee = lst.InnerList[0].TotalFee ?? 0, TrackingNumber = lst.InnerList[0].TrackingNumber }; return(obj); } } return(null); // return _orderService. }