master
xiaochanghai 11 months ago
parent 9dab63582d
commit dba395c9dd
  1. 1
      Tiobon.Core.Model/View/Ghre/Ghre_ExamRecord.Dto.View.cs
  2. 1
      Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs
  3. 7
      Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs

@ -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;

@ -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;

@ -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,9 +110,10 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
entitys.ForEach(async x =>
{
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);
if (x.IsPass != null)
x.IsPassLabel = x.IsPass == true ? "合格" : "不合格";
//x.InStatusLabel = x.InStatus == "1" ? "在职" : null;
@ -425,7 +425,6 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
}
}
if (examRecordId == 0) examRecordId = id;
var records = await QueryFilterPage(body, $"Id='{examRecordId}' AND StaffId='{staffId}'");
@ -438,7 +437,6 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
if (studyRecord.IsNull())
studyRecord = await Db.Queryable<Ghre_StudyRecord>().FirstAsync(x => x.Id == record.StudyRecordId);
if (studyRecord.StudyProgress.IsNull() || (!studyRecord.StudyProgress.IsNull() && studyRecord.StudyProgress < 100))
return ServiceResult<QueryExam>.OprateFailed("学习尚未结束暂不可考试!");
@ -447,7 +445,6 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
.Where(x => x.Id == studyRecord.ExamId)
.FirstAsync(x => x.Status == Consts.DIC_EXAM_STATUS.RELEASED);
if (exam.IsNull())
return ServiceResult<QueryExam>.OprateFailed("该门课程尚未开启考试,请联系HR !");

Loading…
Cancel
Save