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
88813d78
Commit
88813d78
authored
Aug 06, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加汇总字段,和页面底部汇总显示
parent
ebb575d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
5 deletions
+108
-5
PlatformOrderFeeServices.cs
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
+79
-0
PlatformOrderController.cs
...reas/DataWareHouse/Controllers/PlatformOrderController.cs
+25
-1
FinanceAccount_OrderBilling.cshtml
...se/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
+4
-4
No files found.
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
View file @
88813d78
...
...
@@ -220,6 +220,85 @@ namespace Bailun.DC.Services.DataWareHouse
}
}
/// <summary>
/// 获取财务会计流水明细汇总
/// </summary>
/// <param name="page"></param>
/// <param name="pagesize"></param>
/// <param name="platform"></param>
/// <param name="website"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="orderno"></param>
/// <param name="total"></param>
/// <returns></returns>
public
order_fee_value_amazon
ListOrderFeeValueCount
(
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
int
?
datatype
)
{
var
sql
=
$@"select sum(amountval) as amountval,sum(amountval_rmb) amountval_rmb from order_fee_value_amazon t1
where t1.amountval!=0 "
;
var
sqlparam
=
new
DynamicParameters
();
if
(
datatype
.
HasValue
)
{
sql
+=
" and t1.datatype="
+
datatype
.
Value
;
}
if
(!
string
.
IsNullOrEmpty
(
platform
))
{
sql
+=
" and t1.platform=@platform"
;
sqlparam
.
Add
(
"platform"
,
platform
);
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" and t1.website=@website"
;
sqlparam
.
Add
(
"website"
,
website
);
}
//if(!string.IsNullOrEmpty(month))
//{
// sql += " and t1.month=@month";
// sqlparam.Add("month", month);
//}
if
(!
string
.
IsNullOrEmpty
(
orderno
))
{
sql
+=
" and t1.orderno=@orderno"
;
sqlparam
.
Add
(
"orderno"
,
orderno
);
}
if
(
start
.
HasValue
)
{
sql
+=
$" and t1.datatime>='
{
start
.
Value
.
ToString
(
"yyyy-MM-dd"
)}
'"
;
}
if
(
end
.
HasValue
)
{
sql
+=
$" and t1.datatime<'
{
end
.
Value
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd"
)}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
month
))
{
sql
+=
$" and t1.month=@month"
;
sqlparam
.
Add
(
"month"
,
month
);
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
obj
=
cn
.
QueryFirstOrDefault
<
order_fee_value_amazon
>(
sql
);
return
obj
;
}
}
}
}
Bailun.DC.Web/Areas/DataWareHouse/Controllers/PlatformOrderController.cs
View file @
88813d78
...
...
@@ -460,6 +460,8 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
request
.
pageIndex
,
request
.
limit
,
platform
,
website
,
start
,
end
,
orderno
,
month
,
ref
total
,
datatype
);
var
objCount
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValueCount
(
platform
,
website
,
start
,
end
,
orderno
,
month
,
datatype
);
var
list
=
obj
.
Select
(
a
=>
new
{
company
=
"香港百伦"
,
...
...
@@ -481,9 +483,31 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
a
.
month
,
});
var
countRow
=
new
{
company
=
"香港百伦"
,
platform
=
""
,
website
=
""
,
orderno
=
""
,
datatime
=
""
,
amountval
=
objCount
.
amountval
.
ToString
(
"N2"
),
feetype
=
""
,
subjectcode
=
""
,
projectcode
=
""
,
financecategory
=
""
,
datacenter_col
=
""
,
currency
=
"合计"
,
exchange_rate
=
""
,
amountval_rmb
=
objCount
.
amountval_rmb
.
HasValue
?
objCount
.
amountval_rmb
.
Value
.
ToString
(
"N2"
)
:
""
,
month
=
""
,
};
return
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
new
{
rows
=
list
,
total
=
total
total
=
total
,
count_row
=
countRow
});
}
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
View file @
88813d78
...
...
@@ -148,15 +148,15 @@
{ field: 'subjectcode', title: '会计科目编码', width: '130' },
{ field: 'projectcode', title: '项目编码', width: '120' },
{
field: 'currency', title: '币种', width: '100'
field: 'currency', title: '币种', width: '100'
,iscount:true
},
{
field: 'amountval', title: '原币金额', width: '120'
field: 'amountval', title: '原币金额', width: '120'
,iscount:true
},
{
field: 'exchange_rate', title: '汇率', width: '100'
},
{ field: 'amountval_rmb', title: 'RMB金额', width: '120' },
{ field: 'amountval_rmb', title: 'RMB金额', width: '120'
, iscount: true
},
{ field: 'note', title: '备注', width: '160' },
];
...
...
@@ -164,7 +164,7 @@
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {
showfooter:
fals
e, loadsuccess: function (d) {
showfooter:
tru
e, loadsuccess: function (d) {
//替换汇总行的相关列值
var tr = $('.fixed-table-footer').find('tr');
for (var c in columns) {
...
...
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