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
c03844dc
Commit
c03844dc
authored
Sep 08, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加导入汇率接口
parent
85cb0c22
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
ParsingErrorLogServices.cs
Bailun.DC.Services/DataWareHouse/ParsingErrorLogServices.cs
+2
-0
HomeController.cs
Bailun.DC.Web/Controllers/HomeController.cs
+44
-0
No files found.
Bailun.DC.Services/DataWareHouse/ParsingErrorLogServices.cs
View file @
c03844dc
...
@@ -65,6 +65,8 @@ namespace Bailun.DC.Services.DataWareHouse
...
@@ -65,6 +65,8 @@ namespace Bailun.DC.Services.DataWareHouse
public
string
UpdateStatus
(
int
id
,
int
status
,
string
note
)
public
string
UpdateStatus
(
int
id
,
int
status
,
string
note
)
{
{
return
""
;
return
""
;
}
}
...
...
Bailun.DC.Web/Controllers/HomeController.cs
View file @
c03844dc
...
@@ -590,5 +590,48 @@ namespace Bailun.DC.Web.Controllers
...
@@ -590,5 +590,48 @@ namespace Bailun.DC.Web.Controllers
return
Content
(
"OK"
);
return
Content
(
"OK"
);
}
}
public
JsonResult
UploadExchange
()
{
if
(
Request
.
Form
.
Files
.
Count
==
0
)
{
return
Json
(
new
{
success
=
false
,
msg
=
"请上传文件!"
});
}
//var user = HttpContextHelper.Current?.User;
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
list
=
new
List
<
Models
.
DataWareHouse
.
exchange_rate_finance
>();
var
tb
=
dic
.
FirstOrDefault
();
for
(
var
i
=
0
;
i
<
tb
.
Value
.
Rows
.
Count
;
i
++)
{
var
_row
=
tb
.
Value
.
Rows
[
i
];
var
_month
=
_row
[
"月份"
].
ToString
();
var
_currency
=
_row
[
"币种"
].
ToString
();
var
_exchangerate
=
decimal
.
Parse
(
_row
[
"汇率"
].
ToString
());
}
}
return
Json
(
new
{
success
=
true
,
msg
=
""
,
});
;
}
}
}
}
}
\ No newline at end of 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