考试获取题目添加 标识

This commit is contained in:
wyw 2026-03-06 11:19:35 +08:00
parent 30a99a8b45
commit 92d8fd452e

View File

@ -259,6 +259,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE
/// 考卷ID
/// </summary>
public Guid TEXT_ID { get; set; }
/// <summary>
/// 播放、查看 路径
/// 课件 考试按这个为 下一题 依据
/// </summary>
public List<string> listPath { get; set; }
}
[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 config = GetEntity<T_SE_SECONFIG>(t => true);
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
{
Nav_Papers = papers,
Nav_Config = config
Nav_Config = config,
listPath = listPath
};
ret.IsSuccessful = true;
ret.TotalCount = 1;
@ -421,7 +434,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
modelText.SCORE = RecordUser.SCORE;
modelText.ISPASS = RecordUser.EXAMINATION_RESULTS == SEExaminationResultsEnum. ? true : false;
RecordUser.EXAMETIMES = modelText.TEXT_TIMES;
#region
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_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);
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");
}
record.Nav_Notify = null;
//record.Nav_Notify = null;//不能加加了会报错的样子
}
}