Commit bc8cf544 by guanzhenshan

亚马逊广告费导出增加站点字段

parent 76adec1b
...@@ -225,5 +225,10 @@ namespace Bailun.DC.Models ...@@ -225,5 +225,10 @@ namespace Bailun.DC.Models
public decimal cost_rmb { get; set; } public decimal cost_rmb { get; set; }
public string account_name { get; set; } public string account_name { get; set; }
/// <summary>
/// 站点
/// </summary>
public string site_en { get; set; }
} }
} }
...@@ -4754,7 +4754,7 @@ namespace Bailun.DC.Services ...@@ -4754,7 +4754,7 @@ namespace Bailun.DC.Services
public List<dc_base_finance_amazon_ad_product> ListAmazonADSku(string account, DateTime? start, DateTime? end, int? companyid) public List<dc_base_finance_amazon_ad_product> ListAmazonADSku(string account, DateTime? start, DateTime? end, int? companyid)
{ {
var sqlparam = new DynamicParameters(); var sqlparam = new DynamicParameters();
var sql = "select t2.account_name,t1.sku,t1.currency,cost,(cost*exchange_rate) cost_rmb,report_date,asin from dc_base_finance_amazon_ad_product t1 join dc_base_company_account t2 on t1.account_id=t2.account_id "; var sql = "select t2.account_name,t1.sku,t1.currency,cost,(cost*exchange_rate) cost_rmb,report_date,asin,t2.site_en from dc_base_finance_amazon_ad_product t1 join dc_base_company_account t2 on t1.account_id=t2.account_id ";
if (!string.IsNullOrEmpty(account)) if (!string.IsNullOrEmpty(account))
{ {
......
...@@ -2213,10 +2213,11 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -2213,10 +2213,11 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
a.currency, a.currency,
cost_rmb = a.cost_rmb.ToString("N2"), cost_rmb = a.cost_rmb.ToString("N2"),
report_date = a.report_date.ToString("yyyy-MM-dd"), report_date = a.report_date.ToString("yyyy-MM-dd"),
a.site_en,
}); });
var colNames = new List<string> {"帐号","SKU","费用", "币种", "费用RMB", var colNames = new List<string> {"帐号","SKU","费用", "币种", "费用RMB",
"ASIN","报告日期" "ASIN","站点","报告日期"
}; };
var listVal = new List<string>(); var listVal = new List<string>();
...@@ -2224,7 +2225,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -2224,7 +2225,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
{ {
listVal.Add( listVal.Add(
item.account_name + "|" + item.sku + "|" + item.cost + "|" + item.currency + "|" + item.cost_rmb + "|" + item.account_name + "|" + item.sku + "|" + item.cost + "|" + item.currency + "|" + item.cost_rmb + "|" +
item.asin+"|"+item.report_date item.asin+"|"+item.site_en+"|"+item.report_date
); );
} }
......
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