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
d39a6719
Commit
d39a6719
authored
Jul 23, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改财务会计流水
parent
f2930b2a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
5 deletions
+63
-5
order_fee_value_amazon.cs
Bailun.DC.Models/DataWareHouse/order_fee_value_amazon.cs
+11
-0
PlatformOrderFeeServices.cs
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
+1
-1
PlatformOrderController.cs
...reas/DataWareHouse/Controllers/PlatformOrderController.cs
+39
-1
FinanceAccount_OrderBilling.cshtml
...se/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
+12
-3
No files found.
Bailun.DC.Models/DataWareHouse/order_fee_value_amazon.cs
View file @
d39a6719
...
...
@@ -92,5 +92,16 @@ namespace Bailun.DC.Models.DataWareHouse
public
decimal
amountval
{
get
;
set
;
}
public
order_fee_config
fee_config
{
get
;
set
;
}
/// <summary>
/// 汇率
/// </summary>
public
decimal
?
exchange_rate
{
get
;
set
;
}
/// <summary>
/// 人民币金额
/// </summary>
public
decimal
?
amountval_rmb
{
get
;
set
;
}
}
}
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
View file @
d39a6719
...
...
@@ -117,7 +117,7 @@ namespace Bailun.DC.Services.DataWareHouse
public
List
<
order_fee_value_amazon
>
ListOrderFeeValue
(
int
page
,
int
pagesize
,
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
ref
int
total
)
{
var
sql
=
$@"select t1.* from order_fee_value_amazon t1
where
1=1
"
;
where
amountval!=0
"
;
var
sqlparam
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrEmpty
(
platform
))
...
...
Bailun.DC.Web/Areas/DataWareHouse/Controllers/PlatformOrderController.cs
View file @
d39a6719
...
...
@@ -439,6 +439,8 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
datacenter_col
=
a
.
fee_config
?.
datacenter_col
??
""
,
currency
=
a
.
fee_config
.
currency
,
exchange_rate
=
a
.
exchange_rate
.
HasValue
?
a
.
exchange_rate
.
Value
+
""
:
""
,
amountval_rmb
=
a
.
amountval_rmb
.
HasValue
?
a
.
amountval_rmb
.
Value
+
""
:
""
,
});
return
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
new
{
...
...
@@ -447,11 +449,47 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
});
}
/// <summary>
/// 导出财务会计流水
/// </summary>
/// <param name="platform"></param>
/// <param name="website"></param>
/// <param name="account"></param>
/// <param name="start"></param>
/// <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
)
{
var
total
=
0
;
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
0
,
0
,
platform
,
website
,
start
,
end
,
orderno
,
ref
total
);
var
colnames
=
new
List
<
string
>
{
"主体"
,
"平台"
,
"站点"
,
"账单时间"
,
"单号"
,
"费用字段说明"
,
"财务分类归集说明"
,
"数据中心费用类型"
,
"会计科目编码"
,
"项目编码"
,
"币种"
,
"原币金额"
,
"汇率"
,
"RMB金额"
};
var
list
=
new
List
<
string
>();
foreach
(
var
item
in
obj
)
{
list
.
Add
(
"公司主体|"
+
item
.
platform
+
"|"
+
item
.
website
+
"|"
+(
item
.
datatime
.
HasValue
?
item
.
datatime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
):
""
)+
"|"
+
item
.
orderno
+
"|"
+(
item
.
fee_config
?.
feetype
??
""
)
+
"|"
+(
item
.
fee_config
?.
financecategory
??
""
)+
"|"
+(
item
.
fee_config
?.
datacenter_col
??
""
)+
"|"
+(
item
.
fee_config
?.
subjectcode
??
""
)+
"|"
+(
item
.
fee_config
?.
projectcode
??
""
)+
"|"
+
item
.
fee_config
.
currency
+
"|"
+(
item
.
amountval
)+
"|"
+(
item
.
exchange_rate
.
HasValue
?
item
.
exchange_rate
.
Value
+
""
:
""
)+
"|"
+(
item
.
amountval_rmb
.
HasValue
?
item
.
amountval_rmb
.
Value
+
""
:
""
));
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filename
=
"财务会计流水"
+
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"
);
return
View
();
}
#
endregion
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
View file @
d39a6719
...
...
@@ -8,7 +8,7 @@
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning">
提示:1、没有会计科目编码和项目编码的是不参与会计统计的
提示:1、没有会计科目编码和项目编码的是不参与会计统计的
;2、数据中心费用类型缺失的是不参与
</div>
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
...
...
@@ -48,6 +48,7 @@
<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>
</div>
</div>
</form>
...
...
@@ -112,7 +113,9 @@
{
field: 'datatime', title: '账单时间', width: '160'
},
{ field: 'orderno', title: '单号', width: '160'},
{ field: 'orderno', title: '单号', width: '160' },
{ field: 'feetype', title: '费用字段说明', width: '160' },
{ field: 'financecategory', title: '财务分类归集说明', width: '180' },
{ field: 'datacenter_col', title: '数据中心费用类型', width: '180'},
/*{ field: 'financecategory', title: '会计科目分类', width: '130' },*/
{ field: 'subjectcode', title: '会计科目编码', width: '130' },
...
...
@@ -124,7 +127,7 @@
field: 'amountval', title: '原币金额', width: '120'
},
{
field: 'exchangerate', title: '汇率', width: '100'
field: 'exchange
_
rate', title: '汇率', width: '100'
},
{ field: 'amountval_rmb', title: 'RMB金额', width: '120' },
{ field: 'note', title: '备注', width: '160' },
...
...
@@ -157,5 +160,11 @@
}
}
function exportxls() {
if (confirm('确定要导出吗?')) {
window.open('@Url.Content("~/DataWareHouse/PlatformOrder/ExportFinanceAccount_OrderBilling")', '_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