Commit 0edd2831 by guanzhenshan

调整物流供应商往来统计算法

parent 38a3bf2e
...@@ -12,28 +12,28 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction ...@@ -12,28 +12,28 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
/// </summary> /// </summary>
/// <param name="args"></param> /// <param name="args"></param>
/// <returns></returns> /// <returns></returns>
//static async Task Main(string[] args) static async Task Main(string[] args)
//{
// Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
// var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// {
// services.AddHostedService<Services>();
// });
// await builder.RunConsoleAsync();
//}
static void Main(string[] args)
{ {
var _services = new Services(); Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
var start = DateTime.Parse("2020-09-01");
while (start.AddDays(1) < DateTime.Now)
{ {
Console.WriteLine(start); services.AddHostedService<Services>();
_services.Init(start); });
start = start.AddDays(1);
} await builder.RunConsoleAsync();
} }
//static void Main(string[] args)
//{
// var _services = new Services();
// var start = DateTime.Parse("2020-09-01");
// while (start.AddDays(1) < DateTime.Now)
// {
// Console.WriteLine(start);
// _services.Init(start);
// start = start.AddDays(1);
// }
//}
} }
} }
...@@ -80,7 +80,7 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction ...@@ -80,7 +80,7 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
//发生额 //发生额
var sql = $"select t1.company_name,sum(t1.merchant_shipment_cost_cny) as merchant_shipment_cost_cny from dc_base_logistics t1 where ((t1.reconciliation_type='跟踪号对账' and t1.diff_state_type!=0) or (t1.reconciliation_type='单独费用')) and t1.merchant_reconciliation_time>='{day.ToString("yyyy-MM-dd")}' and t1.merchant_reconciliation_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' and t1.company_name!='广州嘉和货运代理有限公司' group by t1.company_name"; var sql = $"select t1.company_name,sum(t1.amount_rmb) as merchant_shipment_cost_cny from dc_base_logistics t1 where ((t1.reconciliation_type='跟踪号对账' and t1.diff_state_type!=0) or (t1.reconciliation_type='单独费用')) and t1.merchant_reconciliation_time>='{day.ToString("yyyy-MM-dd")}' and t1.merchant_reconciliation_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' and t1.company_name!='广州嘉和货运代理有限公司' group by t1.company_name";
listHappen = cn.Query<Models.dc_base_logistics>(sql).AsList(); listHappen = cn.Query<Models.dc_base_logistics>(sql).AsList();
//付款额 //付款额
......
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