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
bbb8614f
Commit
bbb8614f
authored
Oct 10, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短期借款增加导出功能
parent
5a53aa30
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
3 deletions
+61
-3
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+11
-2
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+1
-1
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+35
-0
ShortBorrow.cshtml
Bailun.DC.Web/Areas/Reports/Views/Finance/ShortBorrow.cshtml
+14
-0
No files found.
Bailun.DC.Services/FinanceReportServices.cs
View file @
bbb8614f
...
...
@@ -1864,10 +1864,19 @@ namespace Bailun.DC.Services
sql
+=
" order by "
+
request
.
sort
+
" "
+
request
.
order
;
}
if
(
request
.
limit
>
0
)
{
var
list
=
cn
.
Page
<
dc_short_term_borrow
>(
request
.
pageIndex
,
request
.
limit
,
sql
,
ref
total
);
// and 1=" + payid); //短期借款都指定广州百伦的
var
list
=
cn
.
Page
<
dc_short_term_borrow
>(
request
.
pageIndex
,
request
.
limit
,
sql
,
ref
total
);
// and 1=" + payid); //短期借款都指定广州百伦的
return
list
.
ToList
();
}
else
{
var
list
=
cn
.
Query
<
dc_short_term_borrow
>(
sql
);
// and 1=" + payid); //短期借款都指定广州百伦的
return
list
.
ToList
();
return
list
.
ToList
();
}
}
}
...
...
Bailun.DC.Services/OrdersServices.cs
View file @
bbb8614f
...
...
@@ -7463,7 +7463,7 @@ namespace Bailun.DC.Services
}
else
{
sql
+=
" order by
change_rat
e desc"
;
sql
+=
" order by
operation_tim
e desc"
;
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
...
...
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
bbb8614f
...
...
@@ -2377,6 +2377,41 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
});
}
public
ActionResult
ExportShortBorrow
(
DateTime
date
,
int
paycompanyid
)
{
var
total
=
0
;
var
_services
=
new
Services
.
FinanceReportServices
();
var
paycompany
=
_services
.
GetPayCompany
(
paycompanyid
);
var
obj
=
_services
.
ListShorBorrow
(
new
BtTableParameter
{
offset
=
1
,
limit
=
0
},
date
,
paycompanyid
,
ref
total
);
var
colNames
=
new
List
<
string
>
{
"借入公司主体名称"
,
"借款帐号"
,
"借款银行名称"
,
"借款银行持卡人"
,
"债权方"
,
"借款余额"
,
"日期"
};
var
list
=
new
List
<
string
>();
foreach
(
var
item
in
obj
)
{
list
.
Add
(
item
.
company_name
+
"|"
+
item
.
bank_card
+
"|"
+
item
.
bank_name
+
"|"
+
item
.
bank_card_user
+
"|"
+
item
.
creditor
+
"|"
+
item
.
balance_rmb
+
"|"
+
item
.
statistical_time
.
ToString
(
"yyyy-MM-dd"
));
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filename
=
date
.
ToString
(
"yyyy-MM-dd"
)
+
" 短期借款明细"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
);
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
ToCSV
(
list
,
colNames
,
guid
,
filepath
);
var
ms
=
new
System
.
IO
.
MemoryStream
();
using
(
var
f
=
new
System
.
IO
.
FileStream
(
filepath
+
guid
+
".csv"
,
System
.
IO
.
FileMode
.
Open
))
{
f
.
CopyTo
(
ms
);
}
ms
.
Position
=
0
;
return
File
(
ms
,
"text/csv"
,
filename
+
".csv"
);
}
public
ActionResult
PrePayCount
(
DateTime
date
,
int
paycompanyid
)
{
var
_services
=
new
Services
.
FinanceReportServices
();
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/ShortBorrow.cshtml
View file @
bbb8614f
...
...
@@ -38,6 +38,15 @@
<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">
<button type="button" class="btn btn-primary" onclick="exportFile();">导出</button>
</div>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
</div>
</div>
...
...
@@ -101,6 +110,11 @@
tb.bootstrapTable('refresh', { url: url });
}
}
function exportFile() {
window.open('@Url.Content("~/Reports/Finance/ExportShortBorrow?date=")' + '@(ViewBag.date)&paycompanyid=@(ViewBag.paycompanyid)', "_blank");
}
</script>
}
...
...
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