Commit fbe2b6d5 by guanzhenshan

解决现金流量表明细和汇总不一致的问题

parent 7510e8a0
...@@ -12,29 +12,29 @@ namespace Bailun.DC.DailyPayAndIncoming ...@@ -12,29 +12,29 @@ namespace Bailun.DC.DailyPayAndIncoming
/// </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"));
// var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// {
// services.AddHostedService<Services>();
// });
// await builder.RunConsoleAsync();
//}
static void Main(string[] args)
{ {
var _services = new Services(); Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
var start = DateTime.Parse("2020-06-01");
while (start.AddDays(1) < DateTime.Now)
{ {
Console.WriteLine(start); services.AddHostedService<Services>();
_services.Init(start, start.AddDays(1)); });
_services.SaveMoneyFlowCount(start, start.AddDays(1));
start = start.AddDays(1); await builder.RunConsoleAsync();
}
} }
//static void Main(string[] args)
//{
// var _services = new Services();
// var start = DateTime.Parse("2020-06-01");
// while (start.AddDays(1) < DateTime.Now)
// {
// Console.WriteLine(start);
// _services.Init(start, start.AddDays(1));
// _services.SaveMoneyFlowCount(start, start.AddDays(1));
// start = start.AddDays(1);
// }
//}
} }
} }
...@@ -83,7 +83,7 @@ namespace Bailun.DC.DailyPayAndIncoming ...@@ -83,7 +83,7 @@ namespace Bailun.DC.DailyPayAndIncoming
//管理成品 //管理成品
var list = ListFinanceManageCost(start, start, "", "", "", null);//ListOtherCost(url); var list = ListFinanceManageCost(start, start, "", "", "", null);//ListOtherCost(url);
//物流费支出 //物流费支出
var listlg = ListLogisticFee(start,start);//ListLogisticFee(lgurl); var listlg = ListLogisticFee(lgurl); //ListLogisticFee(start, start); //
decimal costTotal = 0; decimal costTotal = 0;
...@@ -99,7 +99,7 @@ namespace Bailun.DC.DailyPayAndIncoming ...@@ -99,7 +99,7 @@ namespace Bailun.DC.DailyPayAndIncoming
//支出 物流费支出 //支出 物流费支出
if (listlg!=null && listlg.Count() > 0) if (listlg!=null && listlg.Count() > 0)
{ {
costTotal += listlg.Sum(a => a.amount_rmb); costTotal += listlg.Sum(a => a.amountRmb);
} }
...@@ -156,7 +156,7 @@ namespace Bailun.DC.DailyPayAndIncoming ...@@ -156,7 +156,7 @@ namespace Bailun.DC.DailyPayAndIncoming
//管理成品 //管理成品
var list = ListFinanceManageCost(start,start,"","","",null);//ListOtherCost(url); var list = ListFinanceManageCost(start,start,"","","",null);//ListOtherCost(url);
//物流费支出 //物流费支出
var listlg = ListLogisticFee(start, start); //ListLogisticFee(lgurl); var listlg = ListLogisticFee(lgurl); //ListLogisticFee(start, start); //
decimal costTotal = 0; decimal costTotal = 0;
costTotal = listInterest.Count > 0 ? listInterest.Sum(a => a.RepayInterestRMB) : 0; costTotal = listInterest.Count > 0 ? listInterest.Sum(a => a.RepayInterestRMB) : 0;
...@@ -171,7 +171,7 @@ namespace Bailun.DC.DailyPayAndIncoming ...@@ -171,7 +171,7 @@ namespace Bailun.DC.DailyPayAndIncoming
//支出 物流费支出 //支出 物流费支出
if (listlg != null && listlg.Count() > 0) if (listlg != null && listlg.Count() > 0)
{ {
costTotal += listlg.Sum(a => a.amount_rmb); costTotal += listlg.Sum(a => a.amountRmb);
} }
//采购下单 //采购下单
......
...@@ -22,11 +22,12 @@ namespace Bailun.DC.DailyPlatformAccountBalance ...@@ -22,11 +22,12 @@ namespace Bailun.DC.DailyPlatformAccountBalance
await builder.RunConsoleAsync(); await builder.RunConsoleAsync();
} }
//static void Main(string[] args) // static void Main(string[] args)
//{ // {
// var _services = new Services(); // var _services = new Services();
// _services.Init(DateTime.Parse("2020-01-01"), DateTime.Parse("2020-06-24 15:30")); // //_services.Init(DateTime.Parse("2020-01-01"), DateTime.Parse("2020-06-29 15:30"));
//} // //_services.UpdateBalanceSheet(DateTime.Now.AddDays(-1))
//; }
} }
} }
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