Commit 88894eff by 泽锋 李

fix

parent a08828e4
......@@ -54,19 +54,13 @@ namespace AutoTurnOver.Services
return DB.daily.ShortagePushList(platform, bailun_sku, offset, limit,ref total, start_date, end_date);
}
private static int export_shortage_count = 0;
public MemoryStream ExportShortagePush(string platform, string bailun_sku, DateTime? start_date, DateTime? end_date, UserData user)
{
try
{
export_shortage_count++;
var fileName = AppContext.BaseDirectory + $@"Result\RealtimeStock\{user.UserAccount}修改在线数量日志-{DateTime.Now.ToString("yyyyMMddHHmmss")}.csv";
int page = 1;
int rows = 50000;
if (export_shortage_count == 1)
{
rows = 250000;
}
while (true)
{
......@@ -106,12 +100,10 @@ namespace AutoTurnOver.Services
stream.CopyTo(memory);
}
memory.Position = 0;
export_shortage_count--;
return memory;
}
catch (Exception)
{
export_shortage_count--;
throw;
}
......
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