diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/6SETrainRecordController.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/6SETrainRecordController.cs index e87676d..b4c103c 100644 --- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/6SETrainRecordController.cs +++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/6SETrainRecordController.cs @@ -259,6 +259,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE /// 考卷ID /// public Guid TEXT_ID { get; set; } + /// + /// 播放、查看 路径 + /// 课件 考试按这个为 下一题 依据 + /// + public List listPath { get; set; } } [HttpPost, Route("GetUserPapers")] @@ -267,10 +272,18 @@ namespace APT.SC.WebApi.Controllers.Api.SE var papers = GetEntities(null, filter).ToList(); var config = GetEntity(t => true); var ret = new JsonActionResult(); + List listPath = new List(); + 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(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;//不能加加了会报错的样子 } }