开班转入开课,自动产生考试数据,新增同步集团数据归属

master
xiaochanghai 3 weeks ago
parent 5c1b6fd1dc
commit 2aa2423c3b
  1. 17
      Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs
  2. 4
      Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs

@ -458,7 +458,8 @@ public class Ghre_OpenClassServices : BaseServices<Ghre_OpenClass, Ghre_OpenClas
ScoreRule = entity.ScoreRule,
StudyFinishedRule = entity.StudyFinishedRule,
IsViewResult = entity.IsViewResult,
IsAfterViewResultRetake = entity.IsAfterViewResultRetake
IsAfterViewResultRetake = entity.IsAfterViewResultRetake,
DataBelongID = entity.DataBelongID,
};
var examId = await Db.Insertable(exam).ExecuteReturnSnowflakeIdAsync();
@ -474,12 +475,24 @@ public class Ghre_OpenClassServices : BaseServices<Ghre_OpenClass, Ghre_OpenClas
{
ExamNo = entity.OpenClassNo,
ExamName = entity.OpenClassName,
UseDefaultCoverImage = true,
BeginTime = entity.ExamStartTime,
EndTime = entity.ExamEndTime,
Status = "Released",
LinkType = entity.LinkType == "Course" ? "CourseId" : "CourseSceneId",
CourseId = entity.LinkType == "Course" ? entity.LinkId : null,
CourseSceneId = entity.LinkType == "CourseScene" ? entity.LinkId : null,
ExamPaperId = entity.ExamPaperId
ExamPaperId = entity.ExamPaperId,
OpenClassId = entity.Id,
IsRequireStudy = entity.IsRequireStudy,
PlanId = entity.PlanId,
OnlineScorePercentage = entity.OnlineScorePercentage,
OfflineScorePercentage = entity.OfflineScorePercentage,
ScoreRule = entity.ScoreRule,
StudyFinishedRule = entity.StudyFinishedRule,
IsViewResult = entity.IsViewResult,
IsAfterViewResultRetake = entity.IsAfterViewResultRetake,
DataBelongID = entity.DataBelongID,
})
.Where(it => it.Id == entity.ExamId)
.ExecuteCommandAsync();

@ -308,7 +308,7 @@ FROM Ghre_Request A
LEFT JOIN Ghro_Dept B ON A.DeptId = B.DeptID
LEFT JOIN Ghra_Staff C ON A.ApplicantId = C.StaffID
LEFT JOIN Ghro_Dept D ON C.DeptID = D.DeptID
WHERE A.IsEnable = 1) A {conditions}
WHERE A.IsEnable = 1 AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1) A {conditions}
GROUP BY CourseName,
YearMonth1,
DeptName,
@ -350,7 +350,7 @@ FROM Ghre_Request A
LEFT JOIN Ghro_Dept B ON A.DeptId = B.DeptID
LEFT JOIN Ghra_Staff C ON A.ApplicantId = C.StaffID
LEFT JOIN Ghro_Dept D ON C.DeptID = D.DeptID
WHERE A.IsEnable = 1) A {conditions}
WHERE A.IsEnable = 1 AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1) A {conditions}
GROUP BY CourseName,
YearMonth1,
DeptName,

Loading…
Cancel
Save