|
|
@ -15,7 +15,6 @@ using SqlSugar; |
|
|
|
using Tiobon.Core.DataAccess; |
|
|
|
using Tiobon.Core.DataAccess; |
|
|
|
using System.Data; |
|
|
|
using System.Data; |
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
using Mysqlx.Crud; |
|
|
|
|
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
namespace Tiobon.Core.Services; |
|
|
@ -111,10 +110,11 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
entitys.ForEach(async x => |
|
|
|
entitys.ForEach(async x => |
|
|
|
{ |
|
|
|
{ |
|
|
|
x.ScoreMethodLabel = await GetParaLabel("ScoreMethod", x.ScoreMethod); |
|
|
|
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.CourseStatusLabel = await GetParaLabel("TrainingCourseStatus", x.CourseStatus); |
|
|
|
//x.StudyStatusLabel = await GetParaLabel("TrainingStudyStatus", x.StudyStatus); |
|
|
|
//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 == "1" ? "在职" : null; |
|
|
|
//x.InStatusLabel = x.InStatus == "2" ? "离职" : null; |
|
|
|
//x.InStatusLabel = x.InStatus == "2" ? "离职" : null; |
|
|
@ -425,7 +425,6 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (examRecordId == 0) examRecordId = id; |
|
|
|
if (examRecordId == 0) examRecordId = id; |
|
|
|
|
|
|
|
|
|
|
|
var records = await QueryFilterPage(body, $"Id='{examRecordId}' AND StaffId='{staffId}'"); |
|
|
|
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()) |
|
|
|
if (studyRecord.IsNull()) |
|
|
|
studyRecord = await Db.Queryable<Ghre_StudyRecord>().FirstAsync(x => x.Id == record.StudyRecordId); |
|
|
|
studyRecord = await Db.Queryable<Ghre_StudyRecord>().FirstAsync(x => x.Id == record.StudyRecordId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (studyRecord.StudyProgress.IsNull() || (!studyRecord.StudyProgress.IsNull() && studyRecord.StudyProgress < 100)) |
|
|
|
if (studyRecord.StudyProgress.IsNull() || (!studyRecord.StudyProgress.IsNull() && studyRecord.StudyProgress < 100)) |
|
|
|
return ServiceResult<QueryExam>.OprateFailed("学习尚未结束暂不可考试!"); |
|
|
|
return ServiceResult<QueryExam>.OprateFailed("学习尚未结束暂不可考试!"); |
|
|
|
|
|
|
|
|
|
|
@ -446,8 +444,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
exam = await Db.Queryable<Ghre_Exam>() |
|
|
|
exam = await Db.Queryable<Ghre_Exam>() |
|
|
|
.Where(x => x.Id == studyRecord.ExamId) |
|
|
|
.Where(x => x.Id == studyRecord.ExamId) |
|
|
|
.FirstAsync(x => x.Status == Consts.DIC_EXAM_STATUS.RELEASED); |
|
|
|
.FirstAsync(x => x.Status == Consts.DIC_EXAM_STATUS.RELEASED); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (exam.IsNull()) |
|
|
|
if (exam.IsNull()) |
|
|
|
return ServiceResult<QueryExam>.OprateFailed("该门课程尚未开启考试,请联系HR !"); |
|
|
|
return ServiceResult<QueryExam>.OprateFailed("该门课程尚未开启考试,请联系HR !"); |
|
|
|
|
|
|
|
|
|
|
|