From 45b3c5a0682036886df2e4ddb32094129af314da Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 14 Aug 2024 09:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BA=BA=E7=9A=84=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=BB=BC=E5=90=88=E5=AD=A6=E4=B9=A0=E3=80=81?= =?UTF-8?q?=E8=80=83=E8=AF=95=E3=80=81=E5=8F=8D=E9=A6=88=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/Extend/Ghre_StudyRecordESS.cs | 4 +++- .../Ghre/Ghre_StudyRecordServices.cs | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) 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);