diff --git a/Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs b/Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs index e85545e1..0f670db5 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs @@ -44,8 +44,10 @@ public class Ghre_StudyRecordESS public string CourseDateString { get; set; } public string ExamDateString { get; set; } - + public string ExamStatus { get; set; } + public long? ExamId { get; set; } + public long? FeedbackOrderId { get; set; } } diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index fe99006f..c244464d 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -328,6 +328,28 @@ namespace Tiobon.Core.Services x.DisableExamBtn = true; if (x.FeedbackOrderId.IsNull()) x.ShowFeedbackBtn = false; + + #region 处理学习进度 + if (!x.ExamId.IsNull() && x.FeedbackOrderId.IsNull()) + { + if (x.ExamStatus == DIC_EXAM_RECORD_STATUS.WAIT) + x.StudyProgress = x.StudyProgress / 2; + else if (x.ExamStatus == DIC_EXAM_RECORD_STATUS.EXAMING) + x.StudyProgress = 75; + else if (x.ExamStatus == DIC_EXAM_RECORD_STATUS.EXAM_END) + x.StudyProgress = 100; + } + + if (!x.ExamId.IsNull() && !x.FeedbackOrderId.IsNull()) + { + if (x.ExamStatus == DIC_EXAM_RECORD_STATUS.WAIT) + x.StudyProgress = x.StudyProgress / 3; + else if (x.ExamStatus == DIC_EXAM_RECORD_STATUS.EXAMING) + x.StudyProgress = 45; + else if (x.ExamStatus == DIC_EXAM_RECORD_STATUS.EXAM_END) + x.StudyProgress = 60; + } + #endregion }); return new ServicePageResult(filter.pageNum, total, filter.pageSize, entitys);