Commit b62f85a6 by guanzhenshan

调整物流往来供应商报表服务

parent 3b070cba
......@@ -12,28 +12,28 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
//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)
static async Task Main(string[] args)
{
var _services = new Services();
var start = DateTime.Parse("2020-04-01");
while (start.AddDays(1) < DateTime.Now)
Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
{
Console.WriteLine(start);
_services.Init(start);
start = start.AddDays(1);
}
services.AddHostedService<Services>();
});
await builder.RunConsoleAsync();
}
//static void Main(string[] args)
//{
// var _services = new Services();
// var start = DateTime.Parse("2020-04-01");
// while (start.AddDays(1) < DateTime.Now)
// {
// Console.WriteLine(start);
// _services.Init(start);
// start = start.AddDays(1);
// }
//}
}
}
......@@ -84,23 +84,11 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
listHappen = cn.Query<Models.dc_base_logistics>(sql).AsList();
//付款额
sql = $@"select t1.receive_unit as company_name,sum(t1.amount_rmb) as merchant_shipment_cost_cny from dc_base_finance_logistics t1
join dc_base_finance_fee t2 on t1.no=t2.cost_no and t2.logistics_supplier_id is not null
where
t1.pay_time>='{day.ToString("yyyy-MM-dd")}'
and t1.pay_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}'
and t1.amount_rmb>=0
group by t1.receive_unit";
sql = $@"select sum(cashier_paymoneyrmb) as merchant_shipment_cost_cny,tradeb_bjectname as company_name from dc_base_finance_cashier t1 where t1.cashier_status=1 and t1.cashier_type=1 and t1.type_name='销售费用/物流费' and t1.sourcecode='newCost' and t1.cashier_time>='{day.ToString("yyyy-MM-dd")}' and t1.cashier_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' group by tradeb_bjectname";
listPay = cn.Query<dc_base_logistics>(sql).AsList();
//收款额
sql = $@"select t1.receive_unit as company_name,sum(t1.amount_rmb) as merchant_shipment_cost_cny from dc_base_finance_logistics t1
join dc_base_finance_fee t2 on t1.no=t2.cost_no and t2.logistics_supplier_id is not null
where
t1.pay_time>='{day.ToString("yyyy-MM-dd")}'
and t1.pay_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}'
and t1.amount_rmb<0
group by t1.receive_unit";
sql = $@"select sum(cashier_paymoneyrmb) as merchant_shipment_cost_cny,tradeb_bjectname as company_name from dc_base_finance_cashier t1 where t1.cashier_status=1 and t1.cashier_type=2 and t1.type_name='销售费用/物流费' and t1.sourcecode='newCost' and t1.cashier_time>='{day.ToString("yyyy-MM-dd")}' and t1.cashier_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' group by tradeb_bjectname";
listRecevice = cn.Query<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