Commit f1bb3f7c by lizefeng

fix

parent 0c04ec33
...@@ -18,6 +18,7 @@ namespace AutoTurnOver.Models ...@@ -18,6 +18,7 @@ namespace AutoTurnOver.Models
public string asin { get; set; } public string asin { get; set; }
public string site { get; set; } public string site { get; set; }
public decimal fee { get; set; } public decimal fee { get; set; }
public decimal? exchange_cny { get; set; }
public string fee_type { get; set; } public string fee_type { get; set; }
public string currency { get; set; } public string currency { get; set; }
public string fulfillment_center { get; set; } public string fulfillment_center { get; set; }
......
...@@ -873,6 +873,8 @@ namespace AutoTurnOver.Services ...@@ -873,6 +873,8 @@ namespace AutoTurnOver.Services
// 多份报表都出现同一份数据。已报表实际较晚的为准 // 多份报表都出现同一份数据。已报表实际较晚的为准
if (oldData.report_end_date <= storageFee.report_end_date) if (oldData.report_end_date <= storageFee.report_end_date)
{ {
storageFee._project = oldData._project;
storageFee.exchange_cny = oldData.exchange_cny;
MyMySqlConnection._connection.Update(storageFee); MyMySqlConnection._connection.Update(storageFee);
} }
...@@ -979,7 +981,7 @@ namespace AutoTurnOver.Services ...@@ -979,7 +981,7 @@ namespace AutoTurnOver.Services
report_end_date = reportData.DataEndTime ?? new DateTime(1991, 1, 1) report_end_date = reportData.DataEndTime ?? new DateTime(1991, 1, 1)
}; };
storageFee.fee = row.DataRowToNumber("estimated-ltsf-next-charge") ?? 0; storageFee.fee = row.DataRowToNumber("estimated-ltsf-next-charge") ?? 0;
storageFee._date = reportData.DataStartTime.Value.AddHours(-8).ToDayHome(); storageFee._date = reportData.DataStartTime.Value.ToDayHome();
//storageFee.site = row.DataRowToString("country_code"); //storageFee.site = row.DataRowToString("country_code");
if ("GB".Equals(storageFee.site, StringComparison.CurrentCultureIgnoreCase)) if ("GB".Equals(storageFee.site, StringComparison.CurrentCultureIgnoreCase))
{ {
...@@ -991,12 +993,9 @@ namespace AutoTurnOver.Services ...@@ -991,12 +993,9 @@ namespace AutoTurnOver.Services
var oldData = MyMySqlConnection._connection.QueryFirstOrDefault<dc_profit_business_amazon_storage_fee>(" select * from dc_profit_business_amazon_storage_fee where _unique_id=@unique_id ", new { unique_id = storageFee._unique_id }); var oldData = MyMySqlConnection._connection.QueryFirstOrDefault<dc_profit_business_amazon_storage_fee>(" select * from dc_profit_business_amazon_storage_fee where _unique_id=@unique_id ", new { unique_id = storageFee._unique_id });
if (oldData != null) if (oldData != null)
{ {
// 多份报表都出现同一份数据。已报表实际较晚的为准 storageFee._project = oldData._project;
if (oldData.report_end_date <= storageFee.report_end_date) storageFee.exchange_cny = oldData.exchange_cny;
{ MyMySqlConnection._connection.Update(storageFee);
MyMySqlConnection._connection.Update(storageFee);
}
} }
else else
{ {
......
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