|
|
|
@ -1135,13 +1135,13 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
data.ForEach(x => |
|
|
|
|
{ |
|
|
|
|
if (x.DataSource.IsNull()) |
|
|
|
|
x.DataSource = DIC_EXAM_STAFF_SOURCE.MANUAL_REQUIRED; |
|
|
|
|
x.DataSource = DIC_EXAM_STAFF_SOURCE.MANUAL_REQUIRED; |
|
|
|
|
|
|
|
|
|
if (x.DataSource == DIC_EXAM_STAFF_SOURCE.MANUAL_REQUIRED) |
|
|
|
|
if (x.DataSource == DIC_EXAM_STAFF_SOURCE.MANUAL_REQUIRED) |
|
|
|
|
x.DataSourceLabel = "手动必修"; |
|
|
|
|
else if (x.DataSource == DIC_EXAM_STAFF_SOURCE.STUDY_RULE_REQUIRED) |
|
|
|
|
else if (x.DataSource == DIC_EXAM_STAFF_SOURCE.STUDY_RULE_REQUIRED) |
|
|
|
|
x.DataSourceLabel = "必修规则"; |
|
|
|
|
else if (x.DataSource == DIC_EXAM_STAFF_SOURCE.MANUAL_ELECTIVE) |
|
|
|
|
else if (x.DataSource == DIC_EXAM_STAFF_SOURCE.MANUAL_ELECTIVE) |
|
|
|
|
x.DataSourceLabel = "手动选修"; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -1460,7 +1460,9 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
var exist = await Db.Queryable<Ghre_StudyRecord>() |
|
|
|
|
.WhereIF(!entity.CourseId.IsNull(), x => x.CourseId == entity.CourseId) |
|
|
|
|
.WhereIF(!entity.CourseSceneId.IsNull(), x => x.CourseSceneId == entity.CourseSceneId) |
|
|
|
|
.Where(x => x.ExamId == id && x.StaffId == staff.StaffId).AnyAsync(); |
|
|
|
|
//.Where(x => (x.CourseBeginTime <= courseTime.Date && x.CourseEndTime >= courseTime.Date) || |
|
|
|
|
//(x.CourseBeginTime <= courseEndTime && x.CourseEndTime >= courseEndTime)) |
|
|
|
|
.Where(x => x.ExamId == id && x.StaffId == staff.StaffId && x.CourseType != "ExcelImport").AnyAsync(); |
|
|
|
|
|
|
|
|
|
if (!exist) |
|
|
|
|
inserts.Add(new Ghre_StudyRecord() |
|
|
|
|