Commit d405723b authored by 黄奎's avatar 黄奎

获取考试发布详情

parent e9a51ddb
......@@ -14,5 +14,10 @@ namespace Edu.Model.ViewModel.Exam
/// 试卷发布编号
/// </summary>
public string QPublishIds { get; set; }
/// <summary>
/// 学员名称
/// </summary>
public string GuestName { get; set; }
}
}
\ No newline at end of file
......@@ -803,5 +803,27 @@ namespace Edu.Module.Exam
}
return flag;
}
/// <summary>
/// 根据编号获取考试发布详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public RB_Examination_Publish_ViewModel GetExaminationPublishModule(object Id)
{
var extModel = examination_PublishRepository.GetEntity<RB_Examination_Publish_ViewModel>(Id);
if (extModel == null)
{
extModel = new RB_Examination_Publish_ViewModel();
}
if (extModel != null&&extModel.Id>0)
{
extModel.StudentList = examination_StudentRepository.GetExaminationStudentListRepository(new RB_Examination_Student_ViewModel()
{
PublishId = extModel.Id
});
}
return extModel;
}
}
}
......@@ -24,8 +24,8 @@ namespace Edu.Repository.Exam
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Examination_Student AS A
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName
FROM RB_Examination_Student AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id
WHERE 1=1
");
if (query != null)
......@@ -51,8 +51,8 @@ WHERE 1=1
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Examination_Student AS A
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName
FROM RB_Examination_Student AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id
WHERE 1=1
");
if (query != null)
......
......@@ -418,6 +418,18 @@ namespace Edu.WebApi.Controllers.Exam
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 根据编号获取考试发布详情
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetExamPublish()
{
var Id = base.ParmJObj.GetInt("Id");
var model = paperModule.GetExaminationPublishModule(Id);
return ApiResult.Success(data: model);
}
/// <summary>
/// 获取发布考试分页列表
/// </summary>
......
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