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

namespace Bailun.DC.DailyPurchaseOnWay
{
    /// <summary>
    /// 采购每日在途明细
    /// </summary>
    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 _services = new Services();

            var start = DateTime.Now;

            start = DateTime.Parse("2019-04-01");

            //_services.Init(start);

            while(start<DateTime.Parse("2020-01-01"))
            {
                _services.temp(start);

                start = start.AddDays(1);
            }
        }
    }
}
