Commit d7edeeb4 by lizefeng

优化周转导出,分页算法

parent e544d356
......@@ -122,11 +122,11 @@ namespace AutoTurnOver.Controllers
var service = new Services.SkuAutoTurnServices();
int page = 0;
int page = 1;
int rows = 10000;
while (true)
{
var list = service.List(m, page, rows, ref total, order, sort);
var list = service.List(m, (page-1)* rows, rows, ref total, order, sort);
if (list == null || list.Count <= 0) break;
DataTable table = new DataTable();
string[] cols = new string[] { "Sku","商品编码", "内部编码", "sku标题", "仓库编码", "仓库名称", "MOQ",
......@@ -186,7 +186,7 @@ namespace AutoTurnOver.Controllers
}
DataTableHelper.SaveCSV(table, fileName,page>0);
DataTableHelper.SaveCSV(table, fileName,page>1);
page++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment