Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
0ecf8f3b
Commit
0ecf8f3b
authored
Mar 31, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产负债表增加环比图和导出
parent
82af317e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
282 additions
and
2 deletions
+282
-2
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+140
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+0
-0
Index2.cshtml
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2.cshtml
+6
-0
Index2Chart.cshtml
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2Chart.cshtml
+134
-0
Index.cshtml
Bailun.DC.Web/Pages/Index.cshtml
+2
-2
No files found.
Bailun.DC.Services/FinanceReportServices.cs
View file @
0ecf8f3b
...
@@ -438,6 +438,146 @@ namespace Bailun.DC.Services
...
@@ -438,6 +438,146 @@ namespace Bailun.DC.Services
}
}
/// <summary>
/// 获取固定时间的资产负债表明细
/// </summary>
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns></returns>
public
List
<
dc_balance_sheet
>
ListBalanceSheet
(
DateTime
start
,
DateTime
end
)
{
var
dt
=
new
List
<
string
>();
dt
.
Add
(
start
.
ToString
(
"yyyy-MM-dd"
));
dt
.
Add
(
end
.
ToString
(
"yyyy-MM-dd"
));
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
sql
=
$"select * from dc_balance_sheet where statistical_time in ('
{
start
.
ToString
(
"yyyy-MM-dd"
)}
','
{
end
.
ToString
(
"yyyy-MM-dd"
)}
') order by statistical_time"
;
var
list
=
new
List
<
dc_balance_sheet
>();
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
list
=
cn
.
Query
<
dc_balance_sheet
>(
sql
).
AsList
();
if
(
list
.
Count
<
2
)
{
if
(
list
.
Count
==
0
)
{
list
=
new
List
<
dc_balance_sheet
>();
}
foreach
(
var
item
in
dt
)
{
var
m
=
list
.
Where
(
a
=>
a
.
statistical_time
.
ToString
(
"yyyy-MM-dd"
)
==
item
).
FirstOrDefault
();
if
(
m
==
null
)
{
m
=
new
dc_balance_sheet
()
{
accounts_payable
=
0
,
accounts_receivable
=
0
,
advance_received
=
0
,
cl_count
=
0
,
cl_dividends_payable
=
0
,
cl_notes_payable
=
0
,
cl_oneyear_noncurrent_liabilities
=
0
,
cl_other_liabilities
=
0
,
cl_payable_interest
=
0
,
cl_trading_financ_liabilities
=
0
,
company_name
=
""
,
company_value
=
0
,
count_assets
=
0
,
count_liabilities
=
0
,
count_liabilities_and_oe
=
0
,
fa_bill_receivable
=
0
,
fa_count
=
0
,
fa_dividends_receivable
=
0
,
fa_interest_receivable
=
0
,
fa_oneyear_noncurrent_assets
=
0
,
fa_other_assets
=
0
,
fa_trading_finan_asset
=
0
,
fixed_assets
=
0
,
inventory_amount
=
0
,
long_term_accounts_payable
=
0
,
monetary_fund
=
0
,
nca_avai_for_sale_fassets
=
0
,
nca_construction_in_process
=
0
,
nca_count
=
0
,
nca_deferred_tax_assets
=
0
,
nca_development_expenditure
=
0
,
nca_disposal_of_fixed_assets
=
0
,
nca_engineering_material
=
0
,
nca_goodwill
=
0
,
nca_heldon_investment
=
0
,
nca_intangible_assets
=
0
,
nca_investment_property
=
0
,
nca_longterm_equity_investment
=
0
,
nca_longterm_receivable
=
0
,
nca_longterm_unamortized_expenses
=
0
,
nca_oil_and_gas_assets
=
0
,
nca_other_assets
=
0
,
nca_productive_biological_asset
=
0
,
ncl_anticipation_liabilities
=
0
,
ncl_bonds_payable
=
0
,
ncl_count
=
0
,
ncl_deferred_income_tax_liabilities
=
0
,
ncl_longterm_loan
=
0
,
ncl_other_liabilities
=
0
,
ncl_special_payable
=
0
,
oe_capital_reserve
=
0
,
oe_count
=
0
,
oe_inventory_amount
=
0
,
oe_paicl_up_capital
=
0
,
oe_surplus_public_accumulation
=
0
,
oe_undistributed_profit
=
0
,
other_accounts_payable
=
0
,
other_accounts_receivable
=
0
,
payable_remuneration
=
0
,
prepayment
=
0
,
short_term_borrow
=
0
,
statistical_time
=
DateTime
.
Parse
(
item
),
taxes_payable
=
0
,
update_time
=
DateTime
.
Now
,
bank_account_balance
=
0
,
withdraw_amount
=
0
,
platform_balance
=
0
,
logistics_prepayment
=
0
,
finished_prepayment
=
0
,
semi_prepayment
=
0
,
fba_inventory_amount
=
0
,
not_fba_inventory_amount
=
0
,
fba_transfer_amount
=
0
,
not_fba_transfer_amount
=
0
,
semi_inventory_amount
=
0
,
semi_transfer_amount
=
0
,
logistics_accounts_payable
=
0
,
finished_accounts_payable
=
0
,
semi_accounts_payable
=
0
,
amount_borrowed
=
0
};
list
.
Add
(
m
);
}
}
}
return
list
.
OrderBy
(
a
=>
a
.
statistical_time
).
ToList
();
}
}
#
endregion
#
endregion
...
...
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
0ecf8f3b
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2.cshtml
View file @
0ecf8f3b
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
</select>
</select>
<button type="button" class="btn btn-sm btn-primary" onclick="GetData();"><i class="fa fa-search"></i> 查询</button>
<button type="button" class="btn btn-sm btn-primary" onclick="GetData();"><i class="fa fa-search"></i> 查询</button>
<button id="btnexport" style="display:none;" type="button" class="btn btn-sm btn-success" onclick="ExportXsl();">导出</button>
<button id="btnexport" style="display:none;" type="button" class="btn btn-sm btn-success" onclick="ExportXsl();">导出</button>
<button type="button" class="btn btn-sm btn-warning" onclick="showchart();">环比图表</button>
</div>
</div>
</div>
</div>
</form>
</form>
...
@@ -1635,6 +1637,10 @@
...
@@ -1635,6 +1637,10 @@
window.open('@Url.Content("~/Reports/Finance/ExportIndex?")' + 'type=' + type + '&paycompanyvalue=' + paycompany, '_blank');
window.open('@Url.Content("~/Reports/Finance/ExportIndex?")' + 'type=' + type + '&paycompanyvalue=' + paycompany, '_blank');
}
}
function showchart() {
layer_show('资产负债表环比图', '@Url.Content("~/Reports/Finance/Index2Chart")', '90%', '90%');
}
</script>
</script>
}
}
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2Chart.cshtml
0 → 100644
View file @
0ecf8f3b
@{
ViewData["Title"] = "资产负债表环比";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
ViewBag.Nav = new string[] { "报表管理", "资产负债表", "资产负债表环比表" };
}
<div class="row">
<div class="col-sm-12">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<input id="start" class="form-control" name="start" type="text" style="width:120px;" value="@ViewBag.start" />
<input id="end" name="end" class="form-control" type="text" style="width:120px;" value="@ViewBag.end" />
<button type="button" class="btn btn-sm btn-primary" onclick="init();"><i class="fa fa-search"></i> 查询</button>
<button id="btnexport" type="button" class="btn btn-sm btn-success" onclick="ExportXsl();">导出</button>
</div>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<div id="chart_content" style="height:600px;width:100%;">
</div>
</div>
</div>
</div>
@section scripts{
<script src="https://cdn.bootcss.com/echarts/3.6.2/echarts.min.js"></script>
<script>
var myChart;
$(document).ready(function () {
laydate.render({ elem: '#start' });
laydate.render({ elem: '#end' });
myChart = echarts.init(document.getElementById('chart_content'));
init();
})
function init() {
var start = $('#start').val();
var end = $('#end').val();
if (start == '' || end == '') {
alert('开始和结束日期必须填写');
return false;
}
$.submit({
type:'POST',
url: '@Url.Content("~/Reports/Finance/FinanceDebtChainChartJson")',
paramData: 'start=' + start + '&end=' + end,
func: function (result) {
if (result.success) {
//var option = {
// color: ['#3398DB'],
// tooltip: {
// trigger: 'axis',
// axisPointer: { // 坐标轴指示器,坐标轴触发有效
// type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
// }
// },
// grid: {
// left: '3%',
// right: '4%',
// bottom: '3%',
// containLabel: true
// },
// xAxis: [
// {
// type: 'category',
// data: result.data.s,
// axisTick: {
// alignWithLabel: true
// }
// }
// ],
// yAxis: [
// {
// type: 'value'
// }
// ],
// series: [
// {
// name: '数值项',
// type: 'bar',
// barWidth: '60%',
// data: result.data.val
// }
// ]
//};
var option = {
title: {
text: ''
},
tooltip: {},
legend: {
data: ['环比%']
},
xAxis: {
data: result.data.col
},
yAxis: {},
series: [{
name: '环比',
type: 'bar',
barWidth: '60%',
data: result.data.val
}]
};
myChart.setOption(option);
}
}
})
}
function ExportXsl() {
var start = $('#start').val();
var end = $('#end').val();
if (start == '' || end == '') {
alert('开始和结束日期必须填写');
return false;
}
window.open('@Url.Content("~/Reports/Finance/ExportFinanceDebtChainChart?start=")'+start+'&end='+end, "_blank");
}
</script>
}
Bailun.DC.Web/Pages/Index.cshtml
View file @
0ecf8f3b
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
<body
class=
"fixed-sidebar full-height-layout gray-bg"
style=
"overflow:hidden"
>
<body
class=
"fixed-sidebar full-height-layout gray-bg"
style=
"overflow:hidden"
>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
//
login_localhost();
login_localhost
();
login
();
//
login();
window
.
location
=
"@Url.Content("
~
/Home/
Main
")"
;
window
.
location
=
"@Url.Content("
~
/Home/
Main
")"
;
</script>
</script>
</body>
</body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment