Commit 88894eff by 泽锋 李

fix

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