|
|
|
@ -51,12 +51,12 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud |
|
|
|
|
var sql = @$" SELECT *
|
|
|
|
|
FROM Ghre_StudyRecord_V A";
|
|
|
|
|
|
|
|
|
|
string conditions = " WHERE 1=1 "; |
|
|
|
|
string conditions = " WHERE BeginTime IS NOT NULL "; |
|
|
|
|
if (await Db.Queryable<Ghrs_Menu>().Where(x => x.DataPrivType == "Priv" && x.MenuNo == filter.menuName).AnyAsync()) |
|
|
|
|
{ |
|
|
|
|
var staffIds = await GetUserStaffPrivIds((int)App.User.ID); |
|
|
|
|
if (staffIds.Any()) |
|
|
|
|
conditions = $" WHERE StaffId IN ({string.Join(",", staffIds.Select(id => "'" + id + "'"))})"; |
|
|
|
|
conditions = $" WHERE BeginTime IS NOT NULL AND StaffId IN ({string.Join(",", staffIds.Select(id => "'" + id + "'"))})"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (IsEnable == true) |
|
|
|
@ -136,7 +136,7 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud |
|
|
|
|
var sql = @$" SELECT *
|
|
|
|
|
FROM Ghre_StudyRecord_V A";
|
|
|
|
|
|
|
|
|
|
string conditions = " WHERE 1=1 "; |
|
|
|
|
string conditions = $" WHERE BeginTime IS NOT NULL AND UserId= {App.User.ID} "; |
|
|
|
|
var IsEnable = true; |
|
|
|
|
string condition = string.Empty; |
|
|
|
|
if (IsEnable == true) |
|
|
|
@ -274,7 +274,8 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud |
|
|
|
|
|
|
|
|
|
var snap = await Db.Queryable<Ghre_CourseSnap>().FirstAsync(x => x.CourseId == entity.CourseId); |
|
|
|
|
entity.CourseSnapId = snap?.Id; |
|
|
|
|
entity.CourseType = "ManualInsert"; |
|
|
|
|
if (entity.CourseType.IsNullOrEmpty()) |
|
|
|
|
entity.CourseType = "ManualInsert"; |
|
|
|
|
var result = await base.Add(entity); |
|
|
|
|
|
|
|
|
|
var id = SnowFlakeSingle.Instance.NextId(); |
|
|
|
@ -700,9 +701,10 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud |
|
|
|
|
AdjustScore = AdjustScore ?? 0, |
|
|
|
|
IsPass = isPass == "是" ? true : false, |
|
|
|
|
ExamDate = dtExamDate, |
|
|
|
|
CourseBeginTime = dtCourseBeginTime, |
|
|
|
|
CourseEndTime = dtCourseEndTime, |
|
|
|
|
BeginTime = dtCourseBeginTime, |
|
|
|
|
EndTime = dtCourseEndTime, |
|
|
|
|
RemarkSz = remarkSz, |
|
|
|
|
CourseType = "ExcelImport" |
|
|
|
|
}; |
|
|
|
|
await Add(insert); |
|
|
|
|
} |
|
|
|
|