|
|
|
@ -1,5 +1,4 @@ |
|
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
|
|
|
|
|
@ -85,7 +84,24 @@ public class Ghre_OpenClassServices : BaseServices<Ghre_OpenClass, Ghre_OpenClas |
|
|
|
|
|
|
|
|
|
if (DT_TableDataT1.TeacherId != null) |
|
|
|
|
DT_TableDataT1.TeacherName = (await Db.Queryable<Ghre_Teacher>().FirstAsync(x => x.Id == DT_TableDataT1.TeacherId))?.TeacherName; |
|
|
|
|
|
|
|
|
|
if (DT_TableDataT1.PlanId != null) |
|
|
|
|
DT_TableDataT1.PlanName = await Db.Ado.GetStringAsync(@$"SELECT
|
|
|
|
|
CAST (A.Year AS VARCHAR) |
|
|
|
|
+ '-' |
|
|
|
|
+ B.ParaDetailName |
|
|
|
|
+ isnull ('-' + C.DeptName, '') |
|
|
|
|
+ isnull ('-' + D.ParaDetailName, '') |
|
|
|
|
+ isnull ('-' + E.CourseName, '') label |
|
|
|
|
FROM Ghre_Plan A |
|
|
|
|
LEFT JOIN Ghrs_ParaDetail B |
|
|
|
|
ON A.TrainCategory = B.ParaDetailNo |
|
|
|
|
AND B.ParaMasterNo = 'TrainingCategory' |
|
|
|
|
LEFT JOIN Ghro_Dept C ON A.DeptId = C.DeptID |
|
|
|
|
LEFT JOIN Ghrs_ParaDetail D |
|
|
|
|
ON A.InOrOut = D.ParaDetailNo |
|
|
|
|
AND D.ParaMasterNo = 'CourseInOrOut' |
|
|
|
|
LEFT JOIN Ghre_Course E ON A.CourseId = E.ID |
|
|
|
|
WHERE A.IsEnable = 1 and A.ID={DT_TableDataT1.PlanId}");
|
|
|
|
|
result.result.DT_TableDataT1[i] = DT_TableDataT1; |
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|