|
|
|
@ -20,6 +20,7 @@ using NPOI.XSSF.UserModel; |
|
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
|
using System.Data; |
|
|
|
|
using Tiobon.Core.Model.ViewModels.Extend; |
|
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
|
|
|
|
|
@ -1109,7 +1110,7 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud |
|
|
|
|
AS TeacherEName, |
|
|
|
|
E.PhotoUrl |
|
|
|
|
TeacherPhotoUrl, |
|
|
|
|
CASE B.InOrOut |
|
|
|
|
CASE E.TeacherType |
|
|
|
|
WHEN 'In' |
|
|
|
|
THEN |
|
|
|
|
dbo.FO_DeptInfo (E.DeptID, |
|
|
|
@ -1135,13 +1136,13 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud |
|
|
|
|
A.CourseBeginTime, |
|
|
|
|
A.CourseEndTime, |
|
|
|
|
A.StandardDuration |
|
|
|
|
CourseStandardDuration, |
|
|
|
|
A.StudyDuration |
|
|
|
|
CourseStandardDuration1, |
|
|
|
|
A.StudyDuration StudyDuration1 |
|
|
|
|
FROM Ghre_StudyRecord A |
|
|
|
|
LEFT JOIN Ghre_Course B ON A.CourseId = B.Id |
|
|
|
|
LEFT JOIN Ghra_Staff c ON B.TeacherId = c.StaffID |
|
|
|
|
LEFT JOIN Ghre_Teacher E ON B.SchoolTeacherId = E.Id |
|
|
|
|
LEFT JOIN Ghre_School F ON B.SchoolId = F.Id |
|
|
|
|
LEFT JOIN Ghre_School F ON E.SchoolId = F.Id |
|
|
|
|
LEFT JOIN Ghre_CourseScene G ON A.CourseSceneId = G.Id |
|
|
|
|
WHERE A.Id = '{id}'";
|
|
|
|
|
course = await Db.Ado.SqlQuerySingleAsync<Ghre_StudyRecordCourse>(sql); |
|
|
|
@ -1265,9 +1266,28 @@ WHERE A.Id = '{id}'"; |
|
|
|
|
OR CourseSceneId = '{course.CourseSceneId}' AND IsEnable = 1)";
|
|
|
|
|
var mins = await Db.Ado.GetDecimalAsync(sql); |
|
|
|
|
|
|
|
|
|
course.CourseStandardDuration = mins; |
|
|
|
|
course.CourseStandardDuration1 = mins; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (course.StudyDuration1.IsNull()) |
|
|
|
|
course.StudyDuration = $"0 分 0 秒"; |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
var dt = DateTime.Now; |
|
|
|
|
var dt1 = dt.AddMinutes((double)course.StudyDuration1); |
|
|
|
|
var subTract = dt1.Subtract(dt); |
|
|
|
|
course.StudyDuration = $"{subTract.Minutes} 分 {subTract.Seconds} 秒"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (course.CourseStandardDuration1.IsNull()) |
|
|
|
|
course.CourseStandardDuration = $"0 分 0 秒"; |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
var dt = DateTime.Now; |
|
|
|
|
var dt1 = dt.AddMinutes((double)course.CourseStandardDuration1); |
|
|
|
|
var subTract = dt1.Subtract(dt); |
|
|
|
|
course.CourseStandardDuration = $"{subTract.Minutes} 分 {subTract.Seconds} 秒"; |
|
|
|
|
} |
|
|
|
|
if (course.StudyDuration.IsNull()) course.StudyDuration = 0; |
|
|
|
|
return ServiceResult<Ghre_StudyRecordCourse>.OprateSuccess("查询成功!", course); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|