diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_ExamRecord.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_ExamRecord.Dto.View.cs index 23048a7a..daf1d742 100644 --- a/Tiobon.Core.Model/View/Ghre/Ghre_ExamRecord.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghre/Ghre_ExamRecord.Dto.View.cs @@ -35,11 +35,11 @@ public class Ghre_ExamRecordDto : Ghre_ExamRecord public string StaffNo { get; set; } public string StaffName { get; set; } - + public string DeptNo { get; set; } public string DepteName { get; set; } public string DeptFullPateName { get; set; } - + public string TitleName { get; set; } public DateTime? Indate { get; set; } public string InStatus { get; set; } @@ -51,6 +51,7 @@ public class Ghre_ExamRecordDto : Ghre_ExamRecord public string ScoreMethod { get; set; } public string ScoreMethodLabel { get; set; } + public string ScoreStatusLabel { get; set; } public decimal? TotalScore { get; set; } = 0; diff --git a/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs b/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs index ec53e74b..5bb49026 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs @@ -15,7 +15,6 @@ using Tiobon.Core.Common.UserManager; using Tiobon.Core.Common.Helper; using AgileObjects.AgileMapper; using static Tiobon.Core.Model.Consts; -using MySqlX.XDevAPI.Common; namespace Tiobon.Core.Services; diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs index 0fa4cb35..229a0c79 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs @@ -15,7 +15,6 @@ using SqlSugar; using Tiobon.Core.DataAccess; using System.Data; using static Tiobon.Core.Model.Consts; -using Mysqlx.Crud; using MongoDB.Driver.Linq; namespace Tiobon.Core.Services; @@ -111,10 +110,11 @@ public class Ghre_ExamRecordServices : BaseServices { x.ScoreMethodLabel = await GetParaLabel("ScoreMethod", x.ScoreMethod); - x.ScoreStatus = await GetParaLabel("TrainingExamScoreStatus", x.ScoreStatus); + x.ScoreStatusLabel = await GetParaLabel("TrainingExamScoreStatus", x.ScoreStatus); //x.CourseStatusLabel = await GetParaLabel("TrainingCourseStatus", x.CourseStatus); //x.StudyStatusLabel = await GetParaLabel("TrainingStudyStatus", x.StudyStatus); - x.IsPassLabel = x.IsPass == true ? "合格" : "不合格"; + if (x.IsPass != null) + x.IsPassLabel = x.IsPass == true ? "合格" : "不合格"; //x.InStatusLabel = x.InStatus == "1" ? "在职" : null; //x.InStatusLabel = x.InStatus == "2" ? "离职" : null; @@ -425,7 +425,6 @@ public class Ghre_ExamRecordServices : BaseServices().FirstAsync(x => x.Id == record.StudyRecordId); - if (studyRecord.StudyProgress.IsNull() || (!studyRecord.StudyProgress.IsNull() && studyRecord.StudyProgress < 100)) return ServiceResult.OprateFailed("学习尚未结束暂不可考试!"); @@ -446,8 +444,7 @@ public class Ghre_ExamRecordServices : BaseServices() .Where(x => x.Id == studyRecord.ExamId) .FirstAsync(x => x.Status == Consts.DIC_EXAM_STATUS.RELEASED); - - + if (exam.IsNull()) return ServiceResult.OprateFailed("该门课程尚未开启考试,请联系HR !");