Beispiel #1
0
        /// <summary>
        /// 订单列表数据
        /// </summary>
        /// <param name="requestModel"></param>
        /// <returns></returns>
        public async Task <string> LoadData([FromQuery] SalesOrderRequestModel requestModel)
        {
            Expression <Func <SalesOrder, bool> > exp = w => w.BillCode != "";
            var count = await salesOrderService.CountAsync(exp);

            var orders = await salesOrderService.LoadDataAsync(exp, requestModel.Page, requestModel.Limit);

            var            data      = mapper.Map <List <SalesOrderDto> >(orders);
            TableDataModel tableData = new TableDataModel()
            {
                count = count,
                data  = mapper.Map <List <SalesOrderDto> >(orders)
            };

            return(JsonHelper.ObjectToJSON(tableData));
        }