我的学习开班列表 新增反馈单学习进度判断

master
xiaochanghai 1 month ago
parent 0e881bd5bb
commit 55e525c4ac
  1. 2
      Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs
  2. 20
      Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
  3. 2
      Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs

@ -119,5 +119,5 @@ public class Ghre_StudyRecordESS
public bool? IsRequireStudy { get; set; } = true;
public string StudyFinishedRule { get; set; }
public string OpenClassFeedbackStatus { get; set; }
}

@ -1076,6 +1076,11 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud
if (x.FeedbackOrderId.IsNull())
x.ShowFeedbackBtn = false;
if (x.ShowFeedbackBtn == true && x.StudyProgress < 100)
{
x.DisableFeedbackBtn = true;
}
#region 处理学习进度
if (x.ExamId.IsNull())
@ -1158,13 +1163,14 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud
A.Status OpenClassStatus,
A.CreateTime PublishTime, ISNULL (F.StudyProgress, 0) StudyProgress,
A.IsRequireStudy,
A.FeedbackId FeedbackOrderId,ISNULL( F.CompleteStatus , 'NoFinish') CompleteStatus
A.FeedbackId FeedbackOrderId,ISNULL( F.CompleteStatus , 'NoFinish') CompleteStatus, G.Status OpenClassFeedbackStatus
FROM Ghre_OpenClass A
LEFT JOIN Ghre_StaffGroup B ON A.StaffGroupId = B.Id
LEFT JOIN Ghre_Course C ON A.LinkId = C.Id
LEFT JOIN Ghre_CourseScene D ON A.LinkId = D.Id
LEFT JOIN Ghre_ExamRecord E ON A.Id = E.OpenClassId AND E.StaffId = '{staffId}'
LEFT JOIN Ghre_StudyRecord F ON A.Id = F.OpenClassId And F.IsEnable=1
LEFT JOIN Ghre_OpenClassFeedback G ON A.Id = G.OpenClassId AND G.Source = 'Trainee' AND G.StaffId = '9'
WHERE A.Status !='Temporary' AND A.IsEnable=1 AND ( EXISTS
(SELECT 1
FROM Ghre_OpenClassStaff C
@ -1315,8 +1321,6 @@ WHERE A.Status !='Temporary' AND A.IsEnable=1 AND ( EXISTS
if (x.IsRequireStudy == false)
x.ShowStudyBtn = false;
if (dt >= x.CourseBeginDate && dt <= x.CourseEndDate)
x.DisableStudyBtn = false;
else
@ -1341,6 +1345,11 @@ WHERE A.Status !='Temporary' AND A.IsEnable=1 AND ( EXISTS
if (x.FeedbackOrderId.IsNotEmptyOrNull())
x.DisableFeedbackBtn = false;
if (x.ShowFeedbackBtn == true && x.StudyProgress < 100)
{
x.DisableFeedbackBtn = true;
}
#region 处理学习进度
if (x.ExamId.IsNull())
@ -1365,6 +1374,11 @@ WHERE A.Status !='Temporary' AND A.IsEnable=1 AND ( EXISTS
else if (x.ExamStatus == DIC_EXAM_RECORD_STATUS.EXAM_END)
x.StudyProgress = 60;
}
if (x.OpenClassFeedbackStatus.IsNotEmptyOrNull())
if (x.OpenClassFeedbackStatus == "N")
x.StudyProgress = 83;
else x.StudyProgress = 100;
#endregion
});

@ -501,7 +501,7 @@ public class Ghre_SurveyServices : BaseServices<Ghre_Survey, Ghre_SurveyDto, Ins
#region 修正反馈单
if (feedbackId != null)
await Db.Updateable<Ghre_OpenClassFeedback>()
.SetColumns(it => new Ghre_OpenClassFeedback() { Score = totalScore, UpdateTime = DateTime.Now })
.SetColumns(it => new Ghre_OpenClassFeedback() { Score = totalScore, Status = "Y", UpdateTime = DateTime.Now })
.Where(it => it.Id == feedbackId)
.ExecuteCommandAsync();
#endregion

Loading…
Cancel
Save