开班评估

master
xiaochanghai 1 month ago
parent fa564b777f
commit 288908e306
  1. 22
      Model/Tiobon.Web.pdm
  2. 5
      Tiobon.Core.Model/View/Ghre/Ghre_OpenClassSchedule.Dto.View.cs
  3. 8
      Tiobon.Core.Services/Ghre/Ghre_OpenClassScheduleServices.cs

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{C294868A-C3F3-41AD-98CC-78B6D4E0CC40}" Label="" LastModificationDate="1747216162" Name="Tiobon" Objects="4280" Symbols="149" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{C294868A-C3F3-41AD-98CC-78B6D4E0CC40}" Label="" LastModificationDate="1747273487" Name="Tiobon" Objects="4266" Symbols="149" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -10121,7 +10121,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o101">
<a:CreationDate>1741251133</a:CreationDate>
<a:ModificationDate>1741253579</a:ModificationDate>
<a:Rect>((39946,-9675), (46170,-900))</a:Rect>
<a:Rect>((40058,-9675), (46058,-900))</a:Rect>
<a:ListOfPoints>((43058,-9675),(43058,-900))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10166,7 +10166,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o108">
<a:CreationDate>1741253476</a:CreationDate>
<a:ModificationDate>1741253575</a:ModificationDate>
<a:Rect>((39901,-2100), (46125,5325))</a:Rect>
<a:Rect>((40013,-2100), (46013,5325))</a:Rect>
<a:ListOfPoints>((43013,5325),(43013,-2100))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10188,7 +10188,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o111">
<a:CreationDate>1741253560</a:CreationDate>
<a:ModificationDate>1741253591</a:ModificationDate>
<a:Rect>((39197,5850), (46921,13800))</a:Rect>
<a:Rect>((39309,5850), (46809,13800))</a:Rect>
<a:ListOfPoints>((43059,13800),(43059,5850))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10210,7 +10210,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o114">
<a:CreationDate>1741255050</a:CreationDate>
<a:ModificationDate>1741255050</a:ModificationDate>
<a:Rect>((38289,14400), (47513,22350))</a:Rect>
<a:Rect>((38401,14400), (47401,22350))</a:Rect>
<a:ListOfPoints>((42901,22350),(42901,14400))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10232,7 +10232,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o117">
<a:CreationDate>1741255952</a:CreationDate>
<a:ModificationDate>1741255952</a:ModificationDate>
<a:Rect>((49898,-1950), (56122,5325))</a:Rect>
<a:Rect>((50010,-1950), (56010,5325))</a:Rect>
<a:ListOfPoints>((53010,-1950),(53010,5325))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -50277,7 +50277,7 @@ Ghra_staff_InsureBase
<a:Code>Ghre_OpenClassSchedule</a:Code>
<a:CreationDate>1738913568</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1744681019</a:ModificationDate>
<a:ModificationDate>1747273483</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier>
<a:Comment>开班课表</a:Comment>
<a:TotalSavingCurrency/>
@ -50450,12 +50450,12 @@ Ghra_staff_InsureBase
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o3136">
<a:ObjectID>3D4F79AD-A206-4BBF-94C8-F33E8B7955E0</a:ObjectID>
<a:ObjectID>3012A035-5681-4EAD-A72D-C54EC003EE2C</a:ObjectID>
<a:Name>讲师上级ID</a:Name>
<a:Code>TeacherSuperiorId</a:Code>
<a:CreationDate>1744679973</a:CreationDate>
<a:Code>ParentTeacherId</a:Code>
<a:CreationDate>1746500189</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1744684073</a:ModificationDate>
<a:ModificationDate>1747273487</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier>
<a:Comment>讲师上级ID</a:Comment>
<a:DataType>bigint</a:DataType>

@ -38,4 +38,9 @@ public class Ghre_OpenClassScheduleDto : Ghre_OpenClassSchedule
public string CourseName { get; set; }
public List<DateTime?> StartEndTime { get; set; } = new List<DateTime?>();
/// <summary>
/// 讲师上级ID
/// </summary>
public string ParentTeacherName { get; set; }
}

@ -1,4 +1,6 @@
namespace Tiobon.Core.Services;
using Tiobon.Core.Model;
namespace Tiobon.Core.Services;
/// <summary>
/// 开班课表 (服务)
@ -20,8 +22,10 @@ public class Ghre_OpenClassScheduleServices : BaseServices<Ghre_OpenClassSchedul
var data = await base.QueryDto(whereExpression);
var courseIds = data.Select(x => x.CourseId).Distinct().ToList();
var courses = await Db.Queryable<Ghre_Course>().Where(x => courseIds.Contains(x.Id)).ToListAsync();
data.ForEach(x =>
data.ForEach( async x =>
{
if (x.TeacherSuperiorId != null)
x.ParentTeacherName = (await Db.Queryable<Ghra_Staff>().FirstAsync(x => x.StaffID == x.TeacherSuperiorId))?.TeacherName;
x.CourseName = courses.Where(o => x.CourseId == o.Id).FirstOrDefault()?.CourseName;
x.StartEndTime.Add(x.StartTime);
x.StartEndTime.Add(x.EndTime);

Loading…
Cancel
Save