Commit 45345f12 by guanzhenshan

修改借支单的服务

parent 41f84d37
...@@ -12,27 +12,27 @@ namespace Bailun.DC.DailyBorrowFee ...@@ -12,27 +12,27 @@ namespace Bailun.DC.DailyBorrowFee
/// </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")); Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
// var builder = new HostBuilder().ConfigureServices((hostContext, services) => var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// { {
// services.AddHostedService<Services>(); services.AddHostedService<Services>();
// }); });
// await builder.RunConsoleAsync(); await builder.RunConsoleAsync();
//} }
static void Main(string[] args) //static void Main(string[] args)
{ //{
var _services = new Services(); // var _services = new Services();
var start = DateTime.Now; // var start = DateTime.Now;
start = DateTime.Parse(start.AddDays(-1).ToShortDateString()); // start = DateTime.Parse(start.AddDays(-1).ToShortDateString());
_services.Init(start); // _services.Init(start);
} //}
} }
} }
...@@ -25,7 +25,7 @@ namespace Bailun.DC.DailyBorrowFee ...@@ -25,7 +25,7 @@ namespace Bailun.DC.DailyBorrowFee
{ {
var now = DateTime.Now; var now = DateTime.Now;
if (now.Hour == 0 && now.Minute == 01) //凌晨0:01分启动 if (now.Hour == 0 && now.Minute == 30) //凌晨0:30分启动
{ {
Console.WriteLine("开始启动 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Console.WriteLine("开始启动 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var start = DateTime.Parse(now.AddDays(-1).ToShortDateString()); var start = DateTime.Parse(now.AddDays(-1).ToShortDateString());
...@@ -73,6 +73,9 @@ namespace Bailun.DC.DailyBorrowFee ...@@ -73,6 +73,9 @@ namespace Bailun.DC.DailyBorrowFee
bj_create, bj_modified, '{day.ToString("yyyy-MM-dd")}' from dc_base_finance_fee where is_lend = 1 and cost_form = 3 and lend_status in (1, 2)"; bj_create, bj_modified, '{day.ToString("yyyy-MM-dd")}' from dc_base_finance_fee where is_lend = 1 and cost_form = 3 and lend_status in (1, 2)";
cn.Execute(sql); cn.Execute(sql);
var count = cn.QueryFirstOrDefault<int?>("select count(id) from dc_daily_fee where recoed_time='"+day.ToString("yyyy-MM-dd")+"'");
Console.WriteLine("借支单待还的订单数量:"+(count??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