using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Threading.Tasks;
using System.Collections;


namespace Bailun.DC.HappenAmount
{
    class Program
    {
        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 start = DateTime.Parse("2020-06-01");
        //    while (start.AddDays(1) < DateTime.Now)
        //    {
        //        Console.WriteLine(start);
        //        new Services().Init(start, start.AddDays(1));
        //        //new Bailun.DC.Services.FinanceReportServices().AddLogisticsWaitPay(start, 0);
        //        start = start.AddDays(1);

        //    }

        //    //new Bailun.DC.Services.FinanceReportServices().UpdateLogisticsWaitPay(start, 0, "admin", null);

        //}
    }
}
