Commit 3275fc3d by 泽锋 李

fix

parent 6d582c77
...@@ -121,12 +121,12 @@ namespace AutoTurnOver.Services ...@@ -121,12 +121,12 @@ namespace AutoTurnOver.Services
return purchase_advise.DetailList(m, offset, limit, ref total, order, sort); return purchase_advise.DetailList(m, offset, limit, ref total, order, sort);
} }
public string Export(dc_auto_purchase_advise_detailed_search_dto searchData) public string Export(dc_auto_purchase_advise_detailed_search_dto searchData, out int orows)
{ {
var fileName = AppContext.BaseDirectory + $@"采购建议-{DateTime.Now.ToString("yyyyMMddHHmmss")}{Guid.NewGuid()}.csv"; var fileName = AppContext.BaseDirectory + $@"采购建议-{DateTime.Now.ToString("yyyyMMddHHmmss")}{Guid.NewGuid()}.csv";
var total = 0; var total = 0;
var list = PurchaseAdviseServices.DetailList(searchData, 0, int.MaxValue, ref total); var list = PurchaseAdviseServices.DetailList(searchData, 0, int.MaxValue, ref total);
orows = list.Count;
DataTable table = new DataTable(); DataTable table = new DataTable();
string[] cols = new string[] { "初始建议数", "系统建议数", "采购数量", "是否已推送","jit备货类型", "时间", "sku", "产品名称", "产品14日日均", "仓库编码","仓库名称","源仓库", string[] cols = new string[] { "初始建议数", "系统建议数", "采购数量", "是否已推送","jit备货类型", "时间", "sku", "产品名称", "产品14日日均", "仓库编码","仓库名称","源仓库",
"内部商品编码", "商品建议采购", "商品14日日均", "商品moq", "日均加权销量", "缺货","实时缺货", "调拨在途", "调拨单在途", "调拨在途(采购临时数据)", "调拨在途(暂存)", "采购在途", "库存数", "内部商品编码", "商品建议采购", "商品14日日均", "商品moq", "日均加权销量", "缺货","实时缺货", "调拨在途", "调拨单在途", "调拨在途(采购临时数据)", "调拨在途(暂存)", "采购在途", "库存数",
......
...@@ -242,7 +242,9 @@ namespace AutoTurnOver.Services ...@@ -242,7 +242,9 @@ namespace AutoTurnOver.Services
} }
Console.WriteLine("DownloadStock - 开始生成文件"); Console.WriteLine("DownloadStock - 开始生成文件");
var memory = new PurchaseAdviseServices().Export(search_data); int rows = 0;
var memory = new PurchaseAdviseServices().Export(search_data,out rows);
download_data.rows = rows;
Console.WriteLine("DownloadStock - 开始生成上传文件"); Console.WriteLine("DownloadStock - 开始生成上传文件");
var fileData = await AutoTurnOver.Utility.QiNiuCloudHelper.UploadSectioningAsync(memory); var fileData = await AutoTurnOver.Utility.QiNiuCloudHelper.UploadSectioningAsync(memory);
Console.WriteLine("DownloadStock - 上传完毕"); Console.WriteLine("DownloadStock - 上传完毕");
......
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