Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
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
黄奎
Education
Commits
0017b5e7
Commit
0017b5e7
authored
Jan 11, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Excel导入修改
parent
2846f5d4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
239 additions
and
20 deletions
+239
-20
BaseController.cs
Edu.WebApi/Controllers/BaseController.cs
+11
-0
QuestionController.cs
Edu.WebApi/Controllers/Course/QuestionController.cs
+226
-19
UploadController.cs
Edu.WebApi/Controllers/Upload/UploadController.cs
+2
-1
No files found.
Edu.WebApi/Controllers/BaseController.cs
View file @
0017b5e7
...
...
@@ -78,6 +78,17 @@ namespace Edu.WebApi.Controllers
}
}
/// <summary>
/// 根据Id获取用户信息
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
UserInfo
GetUserInfo
(
object
Id
)
{
UserInfo
userInfo
=
UserReidsCache
.
GetUserLoginInfo
(
Id
);
return
userInfo
;
}
/// <summary>
/// 判断用户是否有功能权限
/// </summary>
...
...
Edu.WebApi/Controllers/Course/QuestionController.cs
View file @
0017b5e7
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Upload/UploadController.cs
View file @
0017b5e7
...
...
@@ -41,6 +41,7 @@ namespace Edu.WebApi.Controllers.Upload
Int32
.
TryParse
(
json
[
"Analysis"
].
ToString
(),
out
int
Analysis
);
Int32
.
TryParse
(
json
[
"Excel"
].
ToString
(),
out
int
Excel
);
Int32
.
TryParse
(
json
[
"CourseId"
].
ToString
(),
out
int
CourseId
);
Int32
.
TryParse
(
json
[
"Uid"
].
ToString
(),
out
int
Uid
);
string
filename
=
files
[
0
].
FileName
;
string
fileExtention
=
System
.
IO
.
Path
.
GetExtension
(
files
[
0
].
FileName
);
...
...
@@ -70,7 +71,7 @@ namespace Edu.WebApi.Controllers.Upload
//导入Excel文件
if
(
Analysis
==
1
&&
Excel
==
1
&&
CourseId
>
0
)
{
return
new
QuestionController
().
ImportExcelQuestion
(
path_server
,
CourseId
);
return
new
QuestionController
().
ImportExcelQuestion
(
path_server
,
CourseId
,
Uid
);
}
return
ApiResult
.
Success
(
""
,
new
{
Name
=
filename
,
Path
=
path_server
});
}
...
...
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