20220802新增考试记录页 校正考题重复按钮,优化交卷功能

This commit is contained in:
2022-08-02 14:59:32 +08:00
parent 5767f8d259
commit 019e2fc83e
12 changed files with 174 additions and 81 deletions
@@ -374,6 +374,37 @@ namespace WebAPI.Controllers
return responeData;
}
#endregion
#endregion
/// <summary>
/// 重考
/// </summary>
/// <param name="testRecordId">试卷ID</param>
public Model.ResponeData getRetakeTestRecordByTestRecordId(string testRecordId)
{
var responeData = new Model.ResponeData();
try
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
string returnTestRecordId = string.Empty;
var getTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecordId);
if (getTestRecord != null)
{
////重新生成一条考试记录 以及考试试卷
returnTestRecordId = APITestRecordService.getResitTestRecord(getTestRecord);
responeData.data = new { returnTestRecordId };
}
}
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
}
}