Commit 8f590d2d by guanzhenshan

1

parent bfa47516
...@@ -18,7 +18,7 @@ namespace Bailun.DC.BalanceSheet4K ...@@ -18,7 +18,7 @@ namespace Bailun.DC.BalanceSheet4K
//await builder.RunConsoleAsync(); //await builder.RunConsoleAsync();
var _service = new Services(); var _service = new Services();
var day = DateTime.Parse("2020-11-30"); var day = DateTime.Parse("2020-11-01");
_service.Init(day); _service.Init(day);
} }
......
...@@ -17,7 +17,7 @@ namespace Bailun.DC.BalanceSheet4K ...@@ -17,7 +17,7 @@ namespace Bailun.DC.BalanceSheet4K
public void Init(DateTime day) public void Init(DateTime day)
{ {
var m = new dc_balance_sheet_4k { var m = new dc_balance_sheet_4k {
day = day, day = day.AddMonths(1).AddDays(-1),
cl_count = 0, cl_count = 0,
cl_dividends_payable = 0, cl_dividends_payable = 0,
cl_oneyear_noncurrent_liabilities = 0, cl_oneyear_noncurrent_liabilities = 0,
...@@ -125,7 +125,7 @@ namespace Bailun.DC.BalanceSheet4K ...@@ -125,7 +125,7 @@ namespace Bailun.DC.BalanceSheet4K
} }
cn.Execute($"delete from dc_balance_sheet_4k where day='{day.ToString("yyyy-MM-dd")}' and isedit=0 "); cn.Execute($"delete from dc_balance_sheet_4k where day='{day.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd")}' and isedit=0 ");
var sql = $@"insert dc_balance_sheet_4k (day,cl_count,cl_dividends_payable,cl_oneyear_noncurrent_liabilities,cl_other_liabilities,cl_payable_interest,count_assets,count_liabilities,count_liabilities_and_oe,createtime,fa_count,nca_count,ncl_count,oe_capital_reserve,oe_count,oe_paicl_up_capital,oe_parentcompany_count,accounts_payable,accounts_receivable,advance_received,fixed_assets,fa_interest_receivable,isedit,lastupdatetime,lastupdateuserid,lastupdateusername,ncl_longterm_loan,ncl_other_liabilities,monetary_fund,oe_minority_equity,oe_surplus_public_accumulation,oe_undistributed_profit,other_accounts_payable,other_accounts_receivable,payable_remuneration,short_term_borrow,prepayment,taxes_payable) value ('{m.day.ToString("yyyy-MM-dd")}',{m.cl_count},{m.cl_dividends_payable},{m.cl_oneyear_noncurrent_liabilities},{m.cl_other_liabilities},{m.cl_payable_interest},{m.count_assets},{m.count_liabilities},{m.count_liabilities_and_oe},'{m.createtime.ToString("yyyy-MM-dd HH:mm:ss")}',{m.fa_count},{m.nca_count},{m.ncl_count},{m.oe_capital_reserve},{m.oe_count},{m.oe_paicl_up_capital},{m.oe_parentcompany_count},{m.accounts_payable},{m.accounts_receivable},{m.advance_received},{m.fixed_assets},{m.fa_interest_receivable},{m.isedit},'{m.lastupdatetime.ToString("yyyy-MM-dd HH:mm:ss")}',{m.lastupdateuserid},'{m.lastupdateusername}',{m.ncl_longterm_loan},{m.ncl_other_liabilities},{m.monetary_fund},{m.oe_minority_equity},{m.oe_surplus_public_accumulation},{m.oe_undistributed_profit},{m.other_accounts_payable},{m.other_accounts_receivable},{m.payable_remuneration},{m.short_term_borrow},{m.prepayment},{m.taxes_payable})"; var sql = $@"insert dc_balance_sheet_4k (day,cl_count,cl_dividends_payable,cl_oneyear_noncurrent_liabilities,cl_other_liabilities,cl_payable_interest,count_assets,count_liabilities,count_liabilities_and_oe,createtime,fa_count,nca_count,ncl_count,oe_capital_reserve,oe_count,oe_paicl_up_capital,oe_parentcompany_count,accounts_payable,accounts_receivable,advance_received,fixed_assets,fa_interest_receivable,isedit,lastupdatetime,lastupdateuserid,lastupdateusername,ncl_longterm_loan,ncl_other_liabilities,monetary_fund,oe_minority_equity,oe_surplus_public_accumulation,oe_undistributed_profit,other_accounts_payable,other_accounts_receivable,payable_remuneration,short_term_borrow,prepayment,taxes_payable) value ('{m.day.ToString("yyyy-MM-dd")}',{m.cl_count},{m.cl_dividends_payable},{m.cl_oneyear_noncurrent_liabilities},{m.cl_other_liabilities},{m.cl_payable_interest},{m.count_assets},{m.count_liabilities},{m.count_liabilities_and_oe},'{m.createtime.ToString("yyyy-MM-dd HH:mm:ss")}',{m.fa_count},{m.nca_count},{m.ncl_count},{m.oe_capital_reserve},{m.oe_count},{m.oe_paicl_up_capital},{m.oe_parentcompany_count},{m.accounts_payable},{m.accounts_receivable},{m.advance_received},{m.fixed_assets},{m.fa_interest_receivable},{m.isedit},'{m.lastupdatetime.ToString("yyyy-MM-dd HH:mm:ss")}',{m.lastupdateuserid},'{m.lastupdateusername}',{m.ncl_longterm_loan},{m.ncl_other_liabilities},{m.monetary_fund},{m.oe_minority_equity},{m.oe_surplus_public_accumulation},{m.oe_undistributed_profit},{m.other_accounts_payable},{m.other_accounts_receivable},{m.payable_remuneration},{m.short_term_borrow},{m.prepayment},{m.taxes_payable})";
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
var m = '<tr><th style="height:40px;text-align: center;line-height: 40px;" rowspan="2">项目</th>'; var m = '<tr><th style="height:40px;text-align: center;line-height: 40px;" rowspan="2">项目</th>';
var m2 = '<tr>'; var m2 = '<tr>';
for (var i in result.data) { for (var i in result.data) {
m += ('<th style="height:40px;text-align: center;line-height: 40px;" colspan="3">' + result.data[i]['day'] + '</th>'); m += ('<th style="height:40px;text-align: center;line-height: 40px;" colspan="3">' + result.data[i]['day'].split('T')[0] + '</th>');
m2 += '<td>基础数据</td><td>调整数据</td><td>合计数据</td>'; m2 += '<td>基础数据</td><td>调整数据</td><td>合计数据</td>';
......
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