Commit 8acfaed8 by guanzhenshan

1

parent dd00da55
......@@ -10,14 +10,15 @@ namespace Bailun.DC.Common
{
#if DEBUG
public static string ConnectionString = "server=gz-cdb-kp7s5i79.sql.tencentcdb.com;port=61691;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;";
public static string ConnectionString_read = "server=gz-cdbrg-qdyec2j3.sql.tencentcdb.com;port=59667;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;";
//public static string ConnectionString_read = "server=gz-cdbrg-qdyec2j3.sql.tencentcdb.com;port=59667;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;";
public static string ConnectionString_read = "server=gz-cdb-kp7s5i79.sql.tencentcdb.com;port=61691;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;";
/// <summary>
/// sku分类url
/// </summary>
public static string SkumsCategory = "http://api.sku.bailuntec.com/api/BailunCateData/GetAllCategoryList";
#else
public static string ConnectionString = "server=10.0.8.15;port=3306;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;";
//public static string ConnectionString_read = "server=10.0.8.21;port=3306;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;";
public static string ConnectionString_read = "server=10.0.8.21;port=3306;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;";
/// <summary>
/// sku分类url
......
......@@ -504,6 +504,14 @@ namespace Bailun.DC.MonthSaleProfit
cn.Open();
}
//利息支出
var cwurl = "http://cw.bailuntec.com/api/api/GetRepayPlanDetails?" + "BeginRepayTime=" + day.ToString("yyyy-MM-dd") + "&EndRepayTime=" + day.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"); ;
var listInterest = new Bailun.DC.Services.FinanceReportServices().ListInterestExpense(cwurl);
//管理成本
var list = new Bailun.DC.Services.FinanceReportServices().ListFinanceManageCost(day, day.AddMonths(1).AddDays(-1), "", "", "", null);
//手续费
var listHandleFee = new Bailun.DC.Services.FinanceReportServices().ListFinanceHandleFee(day, day.AddMonths(1).AddDays(-1), 1);
sql = $@"select sum(t2.amount_sales*t1.quantity_shipped*t2.seller_order_exchange_rate) as amount_sales,sum(t2.cost_product*t1.quantity_shipped) as cost_product,sum(t2.cost_platform_fee*(if(t2.platform_type='Ebay',t2.seller_other_exchange_rate,t2.seller_order_exchange_rate))*t1.quantity_shipped) as cost_platform_fee,sum(t2.cost_paypal_fee*t2.seller_order_exchange_rate*t1.quantity_shipped) as cost_paypal_fee,sum(t2.cost_first*t1.quantity_shipped) as cost_first,sum(t2.cost_logistics*t1.quantity_shipped) as cost_logistics,sum(t2.cost_handle_platform*t1.quantity_shipped) as cost_handle_platform,if(t6.financecategoryname is null,'',t6.financecategoryname) as financecategoryname,((t2.total_fee-t2.shipping)*t2.wms_to_cny_exchange_rate*t1.quantity_shipped) as total_fee from dc_base_oms_pick t1
join dc_base_oms_sku t2 on t1.bailun_order_id = t2.bailun_order_id and t1.bailun_sku=t2.bailun_sku and t2.bailun_order_status != 'Canceled' and t2.has_scalp = 0 and ((t2.platform_type!='FBA' and t2.bailun_order_status!='CantHandle') or t2.platform_type='FBA') and t2.has_scalp = 0 and t2.has_innersale = 0 and t2.has_delete=0 and t2.company_id=1
left join dc_base_sku t5 on t2.bailun_sku=t5.bailun_sku
......@@ -603,15 +611,6 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
m.fee_logistics_storage = m.fee_logistics_first + m.fee_logistics_direct+m.fee_logistics_tail + m.fee_storage;
//利息支出
var cwurl = "http://cw.bailuntec.com/api/api/GetRepayPlanDetails?" + "BeginRepayTime=" + day.ToString("yyyy-MM-dd") + "&EndRepayTime=" + day.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"); ;
var listInterest = new Bailun.DC.Services.FinanceReportServices().ListInterestExpense(cwurl);
//管理成本
var list = new Bailun.DC.Services.FinanceReportServices().ListFinanceManageCost(day, day.AddMonths(1).AddDays(-1), "", "", "", 1);
//手续费
var listHandleFee = new Bailun.DC.Services.FinanceReportServices().ListFinanceHandleFee(day, day.AddMonths(1).AddDays(-1), 1);
//付现销售费用
m.fee_paycash_sales = list.Where(a => a.fee_super_type == "推广费" || a.fee_super_type == "物流费用")?.Sum(a => a.amount_rmb) ?? 0;
......
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