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
c23b105b
Commit
c23b105b
authored
Aug 18, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出财务会计流水优先匹配流水上的币种
parent
212c5f2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
3 deletions
+83
-3
order_fee_value_amazon.cs
Bailun.DC.Models/DataWareHouse/order_fee_value_amazon.cs
+6
-0
PlatformOrderController.cs
...reas/DataWareHouse/Controllers/PlatformOrderController.cs
+77
-3
No files found.
Bailun.DC.Models/DataWareHouse/order_fee_value_amazon.cs
View file @
c23b105b
...
@@ -92,6 +92,7 @@ namespace Bailun.DC.Models.DataWareHouse
...
@@ -92,6 +92,7 @@ namespace Bailun.DC.Models.DataWareHouse
/// </summary>
/// </summary>
public
decimal
amountval
{
get
;
set
;
}
public
decimal
amountval
{
get
;
set
;
}
[
NotMapped
]
public
order_fee_config
fee_config
{
get
;
set
;
}
public
order_fee_config
fee_config
{
get
;
set
;
}
/// <summary>
/// <summary>
...
@@ -106,5 +107,10 @@ namespace Bailun.DC.Models.DataWareHouse
...
@@ -106,5 +107,10 @@ namespace Bailun.DC.Models.DataWareHouse
public
string
month
{
get
;
set
;
}
public
string
month
{
get
;
set
;
}
/// <summary>
/// 币种
/// </summary>
public
string
currency
{
get
;
set
;
}
}
}
}
}
Bailun.DC.Web/Areas/DataWareHouse/Controllers/PlatformOrderController.cs
View file @
c23b105b
...
@@ -478,7 +478,7 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
...
@@ -478,7 +478,7 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
projectcode
=
a
.
fee_config
?.
projectcode
??
""
,
projectcode
=
a
.
fee_config
?.
projectcode
??
""
,
financecategory
=
a
.
fee_config
?.
financecategory
??
""
,
financecategory
=
a
.
fee_config
?.
financecategory
??
""
,
datacenter_col
=
a
.
fee_config
?.
datacenter_col
??
""
,
datacenter_col
=
a
.
fee_config
?.
datacenter_col
??
""
,
currency
=
a
.
fee_config
.
currency
,
currency
=
(!
string
.
IsNullOrEmpty
(
a
.
currency
)?
a
.
currency
:
a
.
fee_config
.
currency
)
,
exchange_rate
=
a
.
exchange_rate
.
HasValue
?
a
.
exchange_rate
.
Value
+
""
:
""
,
exchange_rate
=
a
.
exchange_rate
.
HasValue
?
a
.
exchange_rate
.
Value
+
""
:
""
,
amountval_rmb
=
a
.
amountval_rmb
.
HasValue
?
a
.
amountval_rmb
.
Value
+
""
:
""
,
amountval_rmb
=
a
.
amountval_rmb
.
HasValue
?
a
.
amountval_rmb
.
Value
+
""
:
""
,
...
@@ -537,7 +537,7 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
...
@@ -537,7 +537,7 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
foreach
(
var
item
in
obj
)
foreach
(
var
item
in
obj
)
{
{
list
.
Add
(
"公司主体|"
+
item
.
platform
+
"|"
+(
item
.
website
??
"global"
)+
"|"
+(
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
+
""
:
""
)+
"|"
+
item
.
month
);
list
.
Add
(
"公司主体|"
+
item
.
platform
+
"|"
+(
item
.
website
??
"global"
)+
"|"
+(
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
??
""
)+
"|"
+
(!
string
.
IsNullOrEmpty
(
item
.
currency
)
?
item
.
currency
:
item
.
fee_config
.
currency
)
+
"|"
+(
item
.
amountval
)+
"|"
+(
item
.
exchange_rate
.
HasValue
?
item
.
exchange_rate
.
Value
+
""
:
""
)+
"|"
+(
item
.
amountval_rmb
.
HasValue
?
item
.
amountval_rmb
.
Value
+
""
:
""
)+
"|"
+
item
.
month
);
}
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
guid
=
Guid
.
NewGuid
().
ToString
();
...
@@ -608,8 +608,82 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
...
@@ -608,8 +608,82 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
public
JsonResult
UploadFinanceAccount
()
public
JsonResult
UploadFinanceAccount
()
{
{
var
file
=
Request
.
Form
.
Files
[
0
];
var
errmsg
=
""
;
Dictionary
<
string
,
DataTable
>
dic
=
Base
.
NpolHelper
.
ExcelToDataTable
(
file
.
OpenReadStream
(),
file
.
FileName
,
true
,
ref
errmsg
);
if
(
dic
.
Count
>
0
)
{
var
tb
=
dic
.
FirstOrDefault
();
/*
平台
站点
账单时间
月份
单号
费用字段说明
财务分类归集说明
数据中心费用类型
会计科目编码
项目编码
币种
原币金额
汇率
RMB金额
备注
*/
for
(
var
i
=
0
;
i
<
tb
.
Value
.
Rows
.
Count
;
i
++)
{
var
row
=
tb
.
Value
.
Rows
[
i
];
var
m
=
new
Models
.
DataWareHouse
.
order_fee_value_amazon
();
m
.
platform
=
row
[
"平台"
].
ToString
();
m
.
website
=
row
[
"站点"
].
ToString
();
return
Json
(
""
);
if
(
row
[
"账单时间"
]
!=
null
&&
row
[
"账单时间"
].
ToString
()!=
""
)
{
m
.
datatime
=
DateTime
.
Parse
(
row
[
"账单时间"
].
ToString
());
}
if
(
row
[
"月份"
]
==
null
||
row
[
"月份"
].
ToString
()
==
""
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行没有填写月份"
,
});
}
}
var
list
=
Dtb2Json
(
tb
.
Value
);
var
listOrders
=
new
List
<
Models
.
DataWareHouse
.
order_fee_value_amazon
>();
foreach
(
var
item
in
list
)
{
//保存数据
var
m
=
new
Models
.
DataWareHouse
.
order_fee_value_amazon
{
flowing_sales_id
=
0
,
amountname
=
""
,
};
listOrders
.
Add
(
m
);
}
var
result
=
""
;
// new Services.DataWareHouse.PlatformOrderServices().InsertOrderBilling(listOrders);
return
Json
(
new
{
success
=
string
.
IsNullOrEmpty
(
result
),
msg
=
result
});
}
return
Json
(
new
{
success
=
false
,
msg
=
"无法识别表格的数据,请确认字段是否有误或下载模板填写数据。"
,
});
}
}
#
endregion
#
endregion
...
...
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