考试获取题目添加 标识
This commit is contained in:
parent
30a99a8b45
commit
92d8fd452e
@ -259,6 +259,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
/// 考卷ID
|
/// 考卷ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid TEXT_ID { get; set; }
|
public Guid TEXT_ID { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 播放、查看 路径
|
||||||
|
/// 课件 考试按这个为 下一题 依据
|
||||||
|
/// </summary>
|
||||||
|
public List<string> listPath { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, Route("GetUserPapers")]
|
[HttpPost, Route("GetUserPapers")]
|
||||||
@ -267,10 +272,18 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
var papers = GetEntities<T_SE_TRAIN_RECORD_PAPER>(null, filter).ToList();
|
var papers = GetEntities<T_SE_TRAIN_RECORD_PAPER>(null, filter).ToList();
|
||||||
var config = GetEntity<T_SE_SECONFIG>(t => true);
|
var config = GetEntity<T_SE_SECONFIG>(t => true);
|
||||||
var ret = new JsonActionResult<TrainUserPaperModel>();
|
var ret = new JsonActionResult<TrainUserPaperModel>();
|
||||||
|
List<string> listPath = new List<string>();
|
||||||
|
if (papers != null && papers.Any() && !string.IsNullOrEmpty(filter.Keyword))
|
||||||
|
{
|
||||||
|
listPath = papers.Select(e => e.FILE_PATH).Distinct().ToList();
|
||||||
|
if (listPath != null && listPath.Any() && listPath.Count() > 1)
|
||||||
|
papers = papers.OrderBy(e => e.FILE_PATH).ToList();
|
||||||
|
}
|
||||||
ret.Data = new TrainUserPaperModel
|
ret.Data = new TrainUserPaperModel
|
||||||
{
|
{
|
||||||
Nav_Papers = papers,
|
Nav_Papers = papers,
|
||||||
Nav_Config = config
|
Nav_Config = config,
|
||||||
|
listPath = listPath
|
||||||
};
|
};
|
||||||
ret.IsSuccessful = true;
|
ret.IsSuccessful = true;
|
||||||
ret.TotalCount = 1;
|
ret.TotalCount = 1;
|
||||||
@ -421,7 +434,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
|
|
||||||
modelText.SCORE = RecordUser.SCORE;
|
modelText.SCORE = RecordUser.SCORE;
|
||||||
modelText.ISPASS = RecordUser.EXAMINATION_RESULTS == SEExaminationResultsEnum.合格 ? true : false;
|
modelText.ISPASS = RecordUser.EXAMINATION_RESULTS == SEExaminationResultsEnum.合格 ? true : false;
|
||||||
|
RecordUser.EXAMETIMES = modelText.TEXT_TIMES;
|
||||||
#region 如果不合格 重新生成试卷 考试
|
#region 如果不合格 重新生成试卷 考试
|
||||||
|
|
||||||
T_SE_TRAIN_RECORD_TEXT modelTextNew = null;
|
T_SE_TRAIN_RECORD_TEXT modelTextNew = null;
|
||||||
@ -438,7 +451,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
|
|
||||||
T_SE_TRAIN_RECORD record = null;
|
T_SE_TRAIN_RECORD record = null;
|
||||||
T_FM_NOTIFICATION_TASK sendNotices = null;
|
T_FM_NOTIFICATION_TASK sendNotices = null;
|
||||||
if (RecordUser.EXAMINATION_RESULTS == SEExaminationResultsEnum.合格)
|
if (RecordUser.EXAMINATION_RESULTS == SEExaminationResultsEnum.合格 || (entity.Nav_Config != null && modelText.TEXT_TIMES == entity.Nav_Config.COUNT_RETRY + 1))
|
||||||
{
|
{
|
||||||
var check = GetEntity<T_SE_TRAIN_RECORD_USER>(e => e.RECORD_ID == modelText.RECORD_ID && e.STATUS == SETrainRecordUserStatusEnum.参与 && e.OK == false && e.USER_ID != APT.Infrastructure.Api.AppContext.CurrentSession.UserID);
|
var check = GetEntity<T_SE_TRAIN_RECORD_USER>(e => e.RECORD_ID == modelText.RECORD_ID && e.STATUS == SETrainRecordUserStatusEnum.参与 && e.OK == false && e.USER_ID != APT.Infrastructure.Api.AppContext.CurrentSession.UserID);
|
||||||
if (check == null || check.ID == Guid.Empty)
|
if (check == null || check.ID == Guid.Empty)
|
||||||
@ -456,7 +469,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
{
|
{
|
||||||
sendNotices = NotificationTaskService.InsertUserNoticeTaskModel("培训记录完成待审阅-" + record.Nav_Notify.NAME, record.ID, record.ORG_ID, chargeUser.ID, chargeUser.NAME, DateTime.Now, DateTime.Now.AddDays(2), 1, "SE017_SHOWPRINT");
|
sendNotices = NotificationTaskService.InsertUserNoticeTaskModel("培训记录完成待审阅-" + record.Nav_Notify.NAME, record.ID, record.ORG_ID, chargeUser.ID, chargeUser.NAME, DateTime.Now, DateTime.Now.AddDays(2), 1, "SE017_SHOWPRINT");
|
||||||
}
|
}
|
||||||
record.Nav_Notify = null;
|
//record.Nav_Notify = null;//不能加加了会报错的样子
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user