что-то непонятное я наделала с отчетом по контингенту. нужно пересмотреть смысОл этого всего

This commit is contained in:
2025-06-05 01:44:33 +04:00
parent d2f61d8cb5
commit 81b4238394
30 changed files with 472 additions and 46 deletions

View File

@@ -0,0 +1,32 @@
using DataModels.Orders;
namespace Controller.BusinessLogic
{
public class AcademicLeaveOrderLogic : AbstractLogic<NextCourseOrder>
{
public override NextCourseOrder add(NextCourseOrder entity)
{
throw new NotImplementedException();
}
public override NextCourseOrder get(int id)
{
throw new NotImplementedException();
}
public override List<NextCourseOrder> getAll()
{
throw new NotImplementedException();
}
public override NextCourseOrder remove(int id)
{
throw new NotImplementedException();
}
public override NextCourseOrder update(NextCourseOrder entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Orders;
namespace Controller.BusinessLogic
{
public class AddStudentOrderLogic : AbstractLogic<NextCourseOrder>
{
public override NextCourseOrder add(NextCourseOrder entity)
{
throw new NotImplementedException();
}
public override NextCourseOrder get(int id)
{
throw new NotImplementedException();
}
public override List<NextCourseOrder> getAll()
{
throw new NotImplementedException();
}
public override NextCourseOrder remove(int id)
{
throw new NotImplementedException();
}
public override NextCourseOrder update(NextCourseOrder entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Orders;
namespace Controller.BusinessLogic
{
public class ChangeSpecializationOrderLogic : AbstractLogic<ChangeSpecializationOrder>
{
public override ChangeSpecializationOrder add(ChangeSpecializationOrder entity)
{
throw new NotImplementedException();
}
public override ChangeSpecializationOrder get(int id)
{
throw new NotImplementedException();
}
public override List<ChangeSpecializationOrder> getAll()
{
throw new NotImplementedException();
}
public override ChangeSpecializationOrder remove(int id)
{
throw new NotImplementedException();
}
public override ChangeSpecializationOrder update(ChangeSpecializationOrder entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Models;
namespace Controller.BusinessLogic
{
public class ContingentReportLogic : AbstractLogic<ContingentReport<FacultLogic>>
{
public override ContingentReport<FacultLogic> add(ContingentReport<FacultLogic> entity)
{
throw new NotImplementedException();
}
public override ContingentReport<FacultLogic> get(int id)
{
throw new NotImplementedException();
}
public override List<ContingentReport<FacultLogic>> getAll()
{
throw new NotImplementedException();
}
public override ContingentReport<FacultLogic> remove(int id)
{
throw new NotImplementedException();
}
public override ContingentReport<FacultLogic> update(ContingentReport<FacultLogic> entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Models;
namespace Controller.BusinessLogic
{
public class DeanLogic : AbstractLogic<LearningPlan>
{
public override LearningPlan add(LearningPlan entity)
{
throw new NotImplementedException();
}
public override LearningPlan get(int id)
{
throw new NotImplementedException();
}
public override List<LearningPlan> getAll()
{
throw new NotImplementedException();
}
public override LearningPlan remove(int id)
{
throw new NotImplementedException();
}
public override LearningPlan update(LearningPlan entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Orders;
namespace Controller.BusinessLogic
{
public class ExpulsionOrderLogic : AbstractLogic<NextCourseOrder>
{
public override NextCourseOrder add(NextCourseOrder entity)
{
throw new NotImplementedException();
}
public override NextCourseOrder get(int id)
{
throw new NotImplementedException();
}
public override List<NextCourseOrder> getAll()
{
throw new NotImplementedException();
}
public override NextCourseOrder remove(int id)
{
throw new NotImplementedException();
}
public override NextCourseOrder update(NextCourseOrder entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Models;
namespace Controller.BusinessLogic
{
public class FacultLogic : AbstractLogic<LearningPlan>
{
public override LearningPlan add(LearningPlan entity)
{
throw new NotImplementedException();
}
public override LearningPlan get(int id)
{
throw new NotImplementedException();
}
public override List<LearningPlan> getAll()
{
throw new NotImplementedException();
}
public override LearningPlan remove(int id)
{
throw new NotImplementedException();
}
public override LearningPlan update(LearningPlan entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Models;
namespace Controller.BusinessLogic
{
public class GroupLogic : AbstractLogic<Group>
{
public override Group add(Group entity)
{
throw new NotImplementedException();
}
public override Group get(int id)
{
throw new NotImplementedException();
}
public override List<Group> getAll()
{
throw new NotImplementedException();
}
public override Group remove(int id)
{
throw new NotImplementedException();
}
public override Group update(Group entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Models;
namespace Controller.BusinessLogic
{
public class LearningPlanLogic : AbstractLogic<LearningPlan>
{
public override LearningPlan add(LearningPlan entity)
{
throw new NotImplementedException();
}
public override LearningPlan get(int id)
{
throw new NotImplementedException();
}
public override List<LearningPlan> getAll()
{
throw new NotImplementedException();
}
public override LearningPlan remove(int id)
{
throw new NotImplementedException();
}
public override LearningPlan update(LearningPlan entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Orders;
namespace Controller.BusinessLogic
{
public class NextCourseOrderLogic : AbstractLogic<NextCourseOrder>
{
public override NextCourseOrder add(NextCourseOrder entity)
{
throw new NotImplementedException();
}
public override NextCourseOrder get(int id)
{
throw new NotImplementedException();
}
public override List<NextCourseOrder> getAll()
{
throw new NotImplementedException();
}
public override NextCourseOrder remove(int id)
{
throw new NotImplementedException();
}
public override NextCourseOrder update(NextCourseOrder entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Models;
namespace Controller.BusinessLogic
{
public class SpecializationLogic : AbstractLogic<LearningPlan>
{
public override LearningPlan add(LearningPlan entity)
{
throw new NotImplementedException();
}
public override LearningPlan get(int id)
{
throw new NotImplementedException();
}
public override List<LearningPlan> getAll()
{
throw new NotImplementedException();
}
public override LearningPlan remove(int id)
{
throw new NotImplementedException();
}
public override LearningPlan update(LearningPlan entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Models;
namespace Controller.BusinessLogic
{
public class StudentLogic : AbstractLogic<Student>
{
public override Student add(Student entity)
{
throw new NotImplementedException();
}
public override Student get(int id)
{
throw new NotImplementedException();
}
public override List<Student> getAll()
{
throw new NotImplementedException();
}
public override Student remove(int id)
{
throw new NotImplementedException();
}
public override Student update(Student entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,32 @@
using DataModels.Models;
namespace Controller.BusinessLogic
{
public class UserLogic : AbstractLogic<LearningPlan>
{
public override LearningPlan add(LearningPlan entity)
{
throw new NotImplementedException();
}
public override LearningPlan get(int id)
{
throw new NotImplementedException();
}
public override List<LearningPlan> getAll()
{
throw new NotImplementedException();
}
public override LearningPlan remove(int id)
{
throw new NotImplementedException();
}
public override LearningPlan update(LearningPlan entity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,8 @@
namespace Controller.Contracts
{
public class SearchStudentModel
{
public int Id { get; set; }
public string? FIO { get; set; } = string.Empty;
}
}

View File

@@ -7,8 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Folder Include="BusinessLogic\" /> <ProjectReference Include="..\DataModels\DataModels.csproj" />
<Folder Include="Contracts\" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,4 +1,4 @@
namespace Controller namespace Controller.Repository
{ {
public interface IRepository<T> where T : class public interface IRepository<T> where T : class
{ {

View File

@@ -5,7 +5,7 @@ namespace DataModels.Models
{ {
public abstract class AbstractOrder : Model public abstract class AbstractOrder : Model
{ {
protected AbstractOrder(OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) protected AbstractOrder(OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
{ {
OrderType = orderType; OrderType = orderType;
Reason = reason; Reason = reason;
@@ -15,7 +15,7 @@ namespace DataModels.Models
Students = students; Students = students;
} }
protected AbstractOrder(int id, OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) protected AbstractOrder(int id, OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: this(orderType, reason, number, currentDean, date, students) : this(orderType, reason, number, currentDean, date, students)
{ {
Id = id; Id = id;
@@ -25,7 +25,7 @@ namespace DataModels.Models
public OrderType OrderType { get; set; } public OrderType OrderType { get; set; }
public Reason Reason { get; set; } public Reason Reason { get; set; }
public int Number { get; set; } public int Number { get; set; }
public Dean? CurrentDean { get; set; } public LearningPlan? CurrentDean { get; set; }
public DateTime Date { get; set; } = DateTime.Now; public DateTime Date { get; set; } = DateTime.Now;
public abstract string TemplatePath { get; } public abstract string TemplatePath { get; }

View File

@@ -2,20 +2,19 @@
namespace DataModels.Models namespace DataModels.Models
{ {
public class ContingentReport public class ContingentReport<T> where T : class
{ {
public List<Specialization>? Specializations { get; set; } public List<T?>? Contingent { get; set; }
public Dean? CurrentDean { get; set; } public LearningPlan? CurrentDean { get; set; }
public DateTime? Date { get; set; } = DateTime.Now; public DateTime? Date { get; set; } = DateTime.Now;
public string TemplatePath { get; } = string.Empty; public string TemplatePath { get; } = string.Empty;
private int GetStudentsCount(List<Specialization> specializations) private int GetStudentsCount()
{ {
return 1; return 1;
} }
public void FillTemplate(DocX doc) public void FillTemplate(DocX doc)
{ {
} }
public void CreateDocument(string path) public void CreateDocument(string path)
{ {

View File

@@ -1,8 +1,8 @@
namespace DataModels.Models namespace DataModels.Models
{ {
public class Dean : User public class LearningPlan : LearningPlan
{ {
public Dean(string fIO, string email, string password, int code2FA, DateTime date2FA) public LearningPlan(string fIO, string email, string password, int code2FA, DateTime date2FA)
: base(fIO, email, password, code2FA, date2FA) : base(fIO, email, password, code2FA, date2FA)
{ {
FIO = fIO; FIO = fIO;
@@ -11,7 +11,7 @@
Code2FA = code2FA; Code2FA = code2FA;
} }
public Dean(int id, string fio, string email, string password, int code2FA, DateTime date2FA) public LearningPlan(int id, string fio, string email, string password, int code2FA, DateTime date2FA)
: base(id, fio, email, password, code2FA, date2FA) : base(id, fio, email, password, code2FA, date2FA)
{ {
Id = id; Id = id;

View File

@@ -1,19 +1,19 @@
namespace DataModels.Models namespace DataModels.Models
{ {
public class Facult : Model public class LearningPlan : Model
{ {
public Facult(string name, Dean dean) public LearningPlan(string name, LearningPlan dean)
{ {
Name = name; Name = name;
Dean = dean; Dean = dean;
} }
public Facult(int id, string name, Dean dean) : this(name, dean) public LearningPlan(int id, string name, LearningPlan dean) : this(name, dean)
{ {
Id = id; Id = id;
} }
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
public Dean? Dean { get; set; } public LearningPlan? Dean { get; set; }
} }
} }

View File

@@ -2,20 +2,24 @@
{ {
public class Group : Model public class Group : Model
{ {
// здесь есть максимально допустимое количество студентов
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
public int Number { get; set; } public int Number { get; set; }
public int Course { get; set; } public int Course { get; set; }
public Specialization? Specialization { get; set; } public int MaxStudentCount { get; set; } = 30;
public LearningPlan? Specialization { get; set; }
public Group(string name, int num, int course, Specialization spec) public Group(string name, int num, int course, LearningPlan spec)
{ {
Name = name; Name = name;
Number = num; Number = num;
Course = course; Course = course;
Specialization = spec; Specialization = spec;
MaxStudentCount = 30;
} }
public Group(int id, string name, int num, int course, Specialization spec) : this(name, num, course, spec) public Group(int id, string name, int num, int course, LearningPlan spec)
: this(name, num, course, spec)
{ {
Id = id; Id = id;
} }

View File

@@ -2,6 +2,6 @@
{ {
public class LearningPlan public class LearningPlan
{ {
public Specialization Specialization { get; set; } public LearningPlan Specialization { get; set; }
} }
} }

View File

@@ -1,18 +1,18 @@
namespace DataModels.Models namespace DataModels.Models
{ {
public class Specialization : Model public class LearningPlan : Model
{ {
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
public string Code { get; set; } = string.Empty; public string Code { get; set; } = string.Empty;
public Facult? Facult { get; set; } public LearningPlan? Facult { get; set; }
public Specialization(Facult facult, string name, string code) public LearningPlan(LearningPlan facult, string name, string code)
{ {
Facult = facult; Facult = facult;
Name = name; Name = name;
Code = code; Code = code;
} }
public Specialization(Facult facult, string name, string code, int id) : this(facult, name, code ) public LearningPlan(LearningPlan facult, string name, string code, int id) : this(facult, name, code )
{ {
Id = id; Id = id;
} }

View File

@@ -1,9 +1,9 @@
 
namespace DataModels.Models namespace DataModels.Models
{ {
public class Student : User public class Student : LearningPlan
{ {
public Student(string fIO, string email, string password, int code2FA, DateTime date2FA, Specialization spec, Group group) public Student(string fIO, string email, string password, int code2FA, DateTime date2FA, LearningPlan spec, Group group)
: base(fIO, email, password, code2FA, date2FA) : base(fIO, email, password, code2FA, date2FA)
{ {
FIO = fIO; FIO = fIO;
@@ -21,7 +21,7 @@ namespace DataModels.Models
Id = id; Id = id;
} }
public Specialization? Specialization { get; set; } public LearningPlan? Specialization { get; set; }
public Group? Group { get; set; } public Group? Group { get; set; }
} }

View File

@@ -1,8 +1,8 @@
namespace DataModels.Models namespace DataModels.Models
{ {
public class User : Model public class LearningPlan : Model
{ {
public User(string fIO, string email, string password, int code2FA, DateTime date2FA) public LearningPlan(string fIO, string email, string password, int code2FA, DateTime date2FA)
{ {
FIO = fIO; FIO = fIO;
Email = email; Email = email;
@@ -11,7 +11,7 @@
Date2FA = date2FA; Date2FA = date2FA;
} }
public User(int id, string fio, string email, string password, int code2FA, DateTime date2FA) public LearningPlan(int id, string fio, string email, string password, int code2FA, DateTime date2FA)
: this(fio, email, password, code2FA, date2FA) : this(fio, email, password, code2FA, date2FA)
{ {
Id = id; Id = id;

View File

@@ -4,17 +4,17 @@ using Xceed.Words.NET;
namespace DataModels.Orders namespace DataModels.Orders
{ {
public class AcademicLeaveOrder : AbstractOrder public class NextCourseOrder : AbstractOrder
{ {
public DateTime? DateStart { get; set; } public DateTime? DateStart { get; set; }
public DateTime? DateEnd { get; set; } public DateTime? DateEnd { get; set; }
public AcademicLeaveOrder(OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public NextCourseOrder(OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(orderType, reason, number, currentDean, date, students) : base(orderType, reason, number, currentDean, date, students)
{ {
} }
public AcademicLeaveOrder(int id, OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public NextCourseOrder(int id, OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(id, orderType, reason, number, currentDean, date, students) : base(id, orderType, reason, number, currentDean, date, students)
{ {
Id = id; Id = id;

View File

@@ -4,14 +4,14 @@ using Xceed.Words.NET;
namespace DataModels.Orders namespace DataModels.Orders
{ {
public class AddStudentsOrder : AbstractOrder public class NextCourseOrder : AbstractOrder
{ {
public AddStudentsOrder(OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public NextCourseOrder(OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(orderType, reason, number, currentDean, date, students) : base(orderType, reason, number, currentDean, date, students)
{ {
} }
public AddStudentsOrder(int id, OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public NextCourseOrder(int id, OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(id, orderType, reason, number, currentDean, date, students) : base(id, orderType, reason, number, currentDean, date, students)
{ {
Id = id; Id = id;

View File

@@ -6,18 +6,18 @@ namespace DataModels.Orders
{ {
public class ChangeSpecializationOrder : AbstractOrder public class ChangeSpecializationOrder : AbstractOrder
{ {
public ChangeSpecializationOrder(OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public ChangeSpecializationOrder(OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(orderType, reason, number, currentDean, date, students) : base(orderType, reason, number, currentDean, date, students)
{ {
} }
public ChangeSpecializationOrder(int id, OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, public ChangeSpecializationOrder(int id, OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date,
List<Student> students) : base(id, orderType, reason, number, currentDean, date, students) List<Student> students) : base(id, orderType, reason, number, currentDean, date, students)
{ {
Id = id; Id = id;
} }
public Specialization? NewSpec { get; set; } public LearningPlan? NewSpec { get; set; }
public override string TemplatePath => throw new NotImplementedException(); public override string TemplatePath => throw new NotImplementedException();

View File

@@ -4,14 +4,14 @@ using Xceed.Words.NET;
namespace DataModels.Orders namespace DataModels.Orders
{ {
public class ExpulsionOrder : AbstractOrder public class NextCourseOrder : AbstractOrder
{ {
public ExpulsionOrder(OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public NextCourseOrder(OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(orderType, reason, number, currentDean, date, students) : base(orderType, reason, number, currentDean, date, students)
{ {
} }
public ExpulsionOrder(int id, OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public NextCourseOrder(int id, OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(id, orderType, reason, number, currentDean, date, students) : base(id, orderType, reason, number, currentDean, date, students)
{ {
Id = id; Id = id;

View File

@@ -6,12 +6,12 @@ namespace DataModels.Orders
{ {
public class NextCourseOrder : AbstractOrder public class NextCourseOrder : AbstractOrder
{ {
public NextCourseOrder(OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public NextCourseOrder(OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(orderType, reason, number, currentDean, date, students) : base(orderType, reason, number, currentDean, date, students)
{ {
} }
public NextCourseOrder(int id, OrderType orderType, Reason reason, int number, Dean? currentDean, DateTime date, List<Student> students) public NextCourseOrder(int id, OrderType orderType, Reason reason, int number, LearningPlan? currentDean, DateTime date, List<Student> students)
: base(id, orderType, reason, number, currentDean, date, students) : base(id, orderType, reason, number, currentDean, date, students)
{ {
Id = id; Id = id;