Commit cb207a6c by guanzhenshan

调整每日发生额的统计时间

parent 1512d1f4
......@@ -22,7 +22,7 @@ namespace Bailun.DC.HappenAmount
//static void Main(string[] args)
//{
// var start = DateTime.Parse("2020-04-19");
// var start = DateTime.Parse("2020-04-22");
// while (start.AddDays(1) < DateTime.Now)
// {
// new Services().Init(start, start.AddDays(1));
......
......@@ -35,7 +35,7 @@ namespace Bailun.DC.HappenAmount
var day = now;
Console.WriteLine("开始启动 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
Init(DateTime.Parse(now.ToShortDateString()), DateTime.Parse(now.AddDays(1).ToShortDateString()));
Init(DateTime.Parse(now.AddDays(-1).ToShortDateString()), DateTime.Parse(now.ToShortDateString()));
Console.WriteLine("任务运行完成 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
......@@ -196,7 +196,7 @@ namespace Bailun.DC.HappenAmount
#endregion
#region 一级供应商
//select sum(cashier_paymoneyrmb) cashier_paymoneyrmb from dc_base_finance_cashier where cashier_type = 1 and cashier_status = 1 and sourcecode = 'Buy' and cashier_time>= '{start.ToString("yyyy-MM-dd HH:mm:ss")}' and cashier_time<'{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}'
//付款额
sqlpay = $"select sum(cashier_paymoneyrmb) cashier_paymoneyrmb from dc_base_finance_cashier where cashier_type=1 and cashier_status=1 and sourcecode ='Buy' and cashier_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and cashier_time<'{end.ToString("yyyy-MM-dd HH:mm:ss")}'";
m.tos_amount_pay += cn.QueryFirstOrDefault<decimal?>(sqlpay, null, null, 2 * 60)??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