Commit 0017b5e7 authored by 黄奎's avatar 黄奎

Excel导入修改

parent 2846f5d4
...@@ -78,6 +78,17 @@ namespace Edu.WebApi.Controllers ...@@ -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>
/// 判断用户是否有功能权限 /// 判断用户是否有功能权限
/// </summary> /// </summary>
......
...@@ -41,6 +41,7 @@ namespace Edu.WebApi.Controllers.Upload ...@@ -41,6 +41,7 @@ namespace Edu.WebApi.Controllers.Upload
Int32.TryParse(json["Analysis"].ToString(), out int Analysis); Int32.TryParse(json["Analysis"].ToString(), out int Analysis);
Int32.TryParse(json["Excel"].ToString(), out int Excel); Int32.TryParse(json["Excel"].ToString(), out int Excel);
Int32.TryParse(json["CourseId"].ToString(), out int CourseId); Int32.TryParse(json["CourseId"].ToString(), out int CourseId);
Int32.TryParse(json["Uid"].ToString(), out int Uid);
string filename = files[0].FileName; string filename = files[0].FileName;
string fileExtention = System.IO.Path.GetExtension(files[0].FileName); string fileExtention = System.IO.Path.GetExtension(files[0].FileName);
...@@ -70,7 +71,7 @@ namespace Edu.WebApi.Controllers.Upload ...@@ -70,7 +71,7 @@ namespace Edu.WebApi.Controllers.Upload
//导入Excel文件 //导入Excel文件
if (Analysis == 1 && Excel == 1 && CourseId > 0) 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 }); return ApiResult.Success("", new { Name = filename, Path = path_server });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment