Commit 2cb0d1e5 by 泽锋 李

fix

parent 77bef398
...@@ -494,7 +494,7 @@ from dc_auto_turnover as dat ...@@ -494,7 +494,7 @@ from dc_auto_turnover as dat
var init_now = DateTime.Now.ToDayHome(); var init_now = DateTime.Now.ToDayHome();
var end_date = DateTime.Parse(now.ToString("yyyy-MM-dd 23:00:00")); var end_date = DateTime.Parse(now.ToString("yyyy-MM-dd 23:00:00"));
var total = _connection.QueryFirstOrDefault<int>(" select count(1) from dc_auto_turnover where gmt_modified<@init_now ",new { init_now }); var total = _connection.QueryFirstOrDefault<int>(" select count(1) from dc_auto_turnover where gmt_modified<@init_now ",new { init_now });
var rows = (int)Math.Floor(total / ((end_date- init_now).TotalMinutes / 11 )); var rows = (int)Math.Floor(total / ((end_date- now).TotalMinutes / 11 ));
var datas = _connection.Query<ResetHistoryDto>(" select bailun_sku,warehouse_code from dc_auto_turnover where gmt_modified<@init_now limit @rows ", new { init_now,rows }).ToList(); var datas = _connection.Query<ResetHistoryDto>(" select bailun_sku,warehouse_code from dc_auto_turnover where gmt_modified<@init_now limit @rows ", new { init_now,rows }).ToList();
if (datas != null) if (datas != null)
{ {
......
...@@ -4503,9 +4503,19 @@ truncate table dc_report_goods_platform_temp; ...@@ -4503,9 +4503,19 @@ truncate table dc_report_goods_platform_temp;
} }
if (!string.IsNullOrWhiteSpace(searchData.platform_type)) if (!string.IsNullOrWhiteSpace(searchData.platform_type))
{ {
sql += " and t1.platform_type=@platform_type "; if ("amzon".Equals(searchData.platform_type,StringComparison.OrdinalIgnoreCase))
countSql += " and t1.platform_type=@platform_type "; {
parameters.Add("platform_type", searchData.platform_type); sql += " and t1.platform_type in @platform_types ";
countSql += " and t1.platform_type in @platform_types ";
parameters.Add("platform_types", new List<string> { "Amazon","FBA"});
}
else
{
sql += " and t1.platform_type=@platform_type ";
countSql += " and t1.platform_type=@platform_type ";
parameters.Add("platform_type", searchData.platform_type);
}
} }
if (!string.IsNullOrEmpty(sort)) if (!string.IsNullOrEmpty(sort))
{ {
......
...@@ -34,7 +34,7 @@ namespace ResetOutofstock ...@@ -34,7 +34,7 @@ namespace ResetOutofstock
//report.PurchaseWeekBackUp(); //report.PurchaseWeekBackUp();
//report.GenerateReportPlatformGoods(); //report.GenerateReportPlatformGoods();
//dc_auto_turnover.ResetHistory(); dc_auto_turnover.ResetHistory();
} }
catch (Exception ex) catch (Exception ex)
{ {
......
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