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
37dcbea8
Commit
37dcbea8
authored
Aug 24, 2021
by
zhouminghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.bailuntec.com/bltdc/DataCenter_Core2.1_20190520
parents
e320b994
7b22540c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
16 deletions
+84
-16
PlatformOrderFeeServices.cs
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
+43
-4
PlatformOrderController.cs
...reas/DataWareHouse/Controllers/PlatformOrderController.cs
+11
-7
FinanceAccount_OrderBilling.cshtml
...se/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
+29
-5
OrderBillings.cshtml
...as/DataWareHouse/Views/PlatformOrder/OrderBillings.cshtml
+1
-0
No files found.
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
View file @
37dcbea8
...
...
@@ -111,6 +111,25 @@ namespace Bailun.DC.Services.DataWareHouse
}
}
/// <summary>
/// 获取费用解析财务流水配置
/// </summary>
/// <param name="datatype"></param>
/// <returns></returns>
public
List
<
order_fee_config
>
ListOrderFeeConfig
()
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
return
cn
.
Query
<
order_fee_config
>(
"select * from order_fee_config"
).
ToList
();
}
}
#
endregion
public
List
<
order_fee_col
>
ListOrderFeeCol
()
...
...
@@ -139,12 +158,22 @@ namespace Bailun.DC.Services.DataWareHouse
/// <param name="orderno"></param>
/// <param name="total"></param>
/// <returns></returns>
public
List
<
order_fee_value_amazon
>
ListOrderFeeValue
(
int
page
,
int
pagesize
,
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
ref
int
total
,
int
?
datatype
)
public
List
<
order_fee_value_amazon
>
ListOrderFeeValue
(
int
page
,
int
pagesize
,
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
ref
int
total
,
int
?
datatype
,
string
datacenter_col
)
{
var
sql
=
$@"select t1.* from order_fee_value_amazon t1
where t1.amountval!=0 "
;
join order_fee_config t2 on t1.order_fee_config_id=t2.id
"
;
var
sqlparam
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrEmpty
(
datacenter_col
))
{
sql
+=
$" and t2.datacenter_col=@datacenter_col"
;
sqlparam
.
Add
(
"datacenter_col"
,
datacenter_col
);
}
sql
+=
" where t1.amountval!=0 "
;
if
(
datatype
.
HasValue
)
{
sql
+=
" and t1.datatype="
+
datatype
.
Value
;
...
...
@@ -191,6 +220,7 @@ namespace Bailun.DC.Services.DataWareHouse
sqlparam
.
Add
(
"month"
,
month
);
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
...
...
@@ -232,12 +262,21 @@ namespace Bailun.DC.Services.DataWareHouse
/// <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
)
public
order_fee_value_amazon
ListOrderFeeValueCount
(
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
int
?
datatype
,
string
datacenter_col
)
{
var
sql
=
$@"select sum(amountval) as amountval,sum(amountval_rmb) amountval_rmb from order_fee_value_amazon t1
where t1.amountval!=0 "
;
join order_fee_config t2 on t1.order_fee_config_id=t2.id
"
;
var
sqlparam
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrEmpty
(
datacenter_col
))
{
sql
+=
$" and t2.datacenter_col=@datacenter_col"
;
sqlparam
.
Add
(
"datacenter_col"
,
datacenter_col
);
}
sql
+=
" where t1.amountval!=0 "
;
if
(
datatype
.
HasValue
)
{
sql
+=
" and t1.datatype="
+
datatype
.
Value
;
...
...
Bailun.DC.Web/Areas/DataWareHouse/Controllers/PlatformOrderController.cs
View file @
37dcbea8
...
...
@@ -448,21 +448,25 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
{
var
listPlatform
=
new
List
<
string
>();
var
listFeeCol
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeCol
();
var
_service
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
();
var
listFeeCol
=
_service
.
ListOrderFeeCol
();
var
listFeeConfig
=
_service
.
ListOrderFeeConfig
();
ViewBag
.
platform
=
listPlatform
=
listFeeCol
.
Select
(
a
=>
a
.
platform
).
Distinct
().
ToList
();
ViewBag
.
website
=
listFeeCol
.
Where
(
a
=>
a
.
platform
==
listPlatform
.
FirstOrDefault
()).
Select
(
a
=>
a
.
website
).
Distinct
().
ToList
();
ViewBag
.
feeconfigs
=
listFeeConfig
.
Select
(
a
=>
a
.
datacenter_col
).
Distinct
().
ToList
();
return
View
();
}
public
string
FinanceAccount_OrderBillingJson
(
Models
.
BtTableParameter
request
,
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
int
?
datatype
)
public
string
FinanceAccount_OrderBillingJson
(
Models
.
BtTableParameter
request
,
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
int
?
datatype
,
string
datacentercol
)
{
var
total
=
0
;
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
request
.
pageIndex
,
request
.
limit
,
platform
,
website
,
start
,
end
,
orderno
,
month
,
ref
total
,
datatype
);
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
request
.
pageIndex
,
request
.
limit
,
platform
,
website
,
start
,
end
,
orderno
,
month
,
ref
total
,
datatype
,
datacentercol
);
var
objCount
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValueCount
(
platform
,
website
,
start
,
end
,
orderno
,
month
,
datatype
);
var
objCount
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValueCount
(
platform
,
website
,
start
,
end
,
orderno
,
month
,
datatype
,
datacentercol
);
var
list
=
obj
.
Select
(
a
=>
new
{
...
...
@@ -523,11 +527,11 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
/// <param name="end"></param>
/// <param name="orderno"></param>
/// <returns></returns>
public
ActionResult
ExportFinanceAccount_OrderBilling
(
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
int
?
datatype
)
public
ActionResult
ExportFinanceAccount_OrderBilling
(
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
int
?
datatype
,
string
datacentercol
)
{
var
total
=
0
;
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
0
,
0
,
platform
,
website
,
start
,
end
,
orderno
,
month
,
ref
total
,
datatype
);
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
0
,
0
,
platform
,
website
,
start
,
end
,
orderno
,
month
,
ref
total
,
datatype
,
datacentercol
);
var
colnames
=
new
List
<
string
>
{
"主体"
,
"平台"
,
"站点"
,
"账单时间"
,
"单号"
,
"费用字段说明"
,
"财务分类归集说明"
,
"数据中心费用类型"
,
"会计科目编码"
,
"项目编码"
,
"币种"
,
"原币金额"
,
"汇率"
,
"RMB金额"
,
"月份"
...
...
@@ -541,7 +545,7 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filename
=
"财务会计流水"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)
;
var
filename
=
month
+
" "
+
platform
+
"-"
+
website
+
"财务会计流水"
;
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
ToCSV
(
list
,
colnames
,
guid
,
filepath
);
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
View file @
37dcbea8
...
...
@@ -14,6 +14,10 @@
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>账单月份</label>
<input id="month" name="month" type="text" class="form-control" style="width:120px;" value="" placeholder="请输入月份" />
</div>
<div class="form-group">
<label>数据来源类型:</label>
<select id="datatype" name="datatype" class="form-control" style="width:160px;">
<option value="">请选择数据类型</option>
...
...
@@ -48,16 +52,25 @@
</select>
</div>
<div class="form-group">
<label>账单月份</label>
<input id="month" name="month" type="text" class="form-control" style="width:120px;" value="" placeholder="请输入月份" />
</div>
<div class="form-group">
<label>时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="" placeholder="开始时间" />
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="" placeholder="结束时间" />
</div>
<div class="form-group">
<label>数据中心费用类型</label>
<select id="datacentercol" name="datacentercol" class="form-control" style="width:180px;">
<option value="">请选择费用类型</option>
@if (ViewBag.feeconfigs.Count > 0)
{
foreach (var item in ViewBag.feeconfigs)
{
<option value="@item">@item</option>
}
}
</select>
</div>
<div class="form-group">
<label> </label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
<button type="button" class="btn btn-success" onclick="exportxls();">导出</button>
...
...
@@ -121,7 +134,7 @@
var height = document.body.clientHeight;
$("#roletable").attr("data-height", (height - 170));
list();
//
list();
$('#platform').change(function () {
//获取平台站点
...
...
@@ -138,6 +151,11 @@
})
function list() {
if ($('#month').val() == '') {
alert('请选择月份');
return false;
}
var columns = [
{ field: 'company', title: '主体', width: '160'},
{ field: 'platform', title: '平台', width: '130' },
...
...
@@ -197,6 +215,12 @@
}
function exportxls() {
if ($('#month').val() == '') {
alert('请选择月份');
return false;
}
if (confirm('确定要导出吗?')) {
window.open('@Url.Content("~/DataWareHouse/PlatformOrder/ExportFinanceAccount_OrderBilling")' + '?' + $("#toolbar").serialize(), '_blank');
}
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/OrderBillings.cshtml
View file @
37dcbea8
...
...
@@ -551,6 +551,7 @@
uploader.on('uploadSuccess', function () {
$('#txt_tip').html('上传成功,待保存数据');
});
uploader.on('uploadError', function (file) {
...
...
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