public ActionResult GetOrderList(QueryOrderViewModel queryModel, JqGridParam jqgridparam) { try { Stopwatch watch = CommonHelper.TimerStart(); List <SaleOrderViewModel> listData = null; if (queryModel.QueryType == "PrintBatch") { if (string.IsNullOrWhiteSpace(queryModel.PrintBatchId)) { throw new Exception("打印批次号为空"); } listData = _orderBll.GetOrderListByPrintBatch(queryModel.PrintBatchId, jqgridparam); } else if (!string.IsNullOrWhiteSpace(queryModel.QueryType)) { queryModel.Status = (int)OrderStatus.WaitPick; listData = _orderBll.GetOrderList(queryModel, jqgridparam); } else { listData = new List <SaleOrderViewModel>(); } var jsonData = new { total = jqgridparam.total, page = jqgridparam.page, records = jqgridparam.records, costtime = CommonHelper.TimerEnd(watch), rows = listData, }; return(Content(jsonData.ToJson())); } catch (Exception ex) { BaseSysLogBll.Instance.WriteLog("", OperationType.Query, "-1", "异常错误:" + ex.Message); return(null); } }