diff --git a/src/main/java/ru/ulstu/admin/controller/AdminReportController.java b/src/main/java/ru/ulstu/admin/controller/AdminReportController.java new file mode 100644 index 0000000..1f15846 --- /dev/null +++ b/src/main/java/ru/ulstu/admin/controller/AdminReportController.java @@ -0,0 +1,46 @@ +package ru.ulstu.admin.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import ru.ulstu.admin.model.ReportForm; +import ru.ulstu.admin.service.AdminReportService; + +import java.util.List; + +@Controller +@RequestMapping("/admin") +public class AdminReportController { + + private final AdminReportService adminReportService; + + public AdminReportController(AdminReportService adminReportService) { + this.adminReportService = adminReportService; + } + + @GetMapping("/report/{aspirantId}") + public String getReportForm(@PathVariable(value = "aspirantId") Integer aspirantId, Model model) { + ReportForm reportForm = new ReportForm(); + reportForm.setAspirantId(aspirantId); // Устанавливаем ID аспиранта + model.addAttribute("report", reportForm); + return "admin/aspirantReport"; // Возвращает шаблон report.html + } + + @PostMapping("/saveReport") + public String saveReport(@ModelAttribute ReportForm reportForm, + @RequestParam("file") List files) { + // Сохраняем отчет + adminReportService.saveReport(reportForm); + + // Обработка загруженных файлов + if (!files.isEmpty()) { + for (MultipartFile file : files) { + System.out.println("Файл: " + file.getOriginalFilename()); + // Здесь можно добавить логику сохранения файла на сервере + } + } + + return "redirect:/admin/aspirants"; // Перенаправление на список аспирантов + } +} \ No newline at end of file diff --git a/src/main/java/ru/ulstu/admin/model/ReportForm.java b/src/main/java/ru/ulstu/admin/model/ReportForm.java new file mode 100644 index 0000000..344c779 --- /dev/null +++ b/src/main/java/ru/ulstu/admin/model/ReportForm.java @@ -0,0 +1,51 @@ +package ru.ulstu.admin.model; + +public class ReportForm { + private Integer id; // ID отчета + private Integer aspirantId; // ID аспиранта + private Integer courseWorkScore; // Баллы за курсовую работу + private Integer researchScore; // Баллы за научные исследования + private Integer publicationsScore; // Баллы за публикации + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + // Геттер и сеттер для aspirantId + public Integer getAspirantId() { + return aspirantId; + } + + public void setAspirantId(Integer aspirantId) { + this.aspirantId = aspirantId; + } + + // Геттеры и сеттеры для других полей (если их нет) + public Integer getCourseWorkScore() { + return courseWorkScore; + } + + public void setCourseWorkScore(Integer courseWorkScore) { + this.courseWorkScore = courseWorkScore; + } + + public Integer getResearchScore() { + return researchScore; + } + + public void setResearchScore(Integer researchScore) { + this.researchScore = researchScore; + } + + public Integer getPublicationsScore() { + return publicationsScore; + } + + public void setPublicationsScore(Integer publicationsScore) { + this.publicationsScore = publicationsScore; + } +} \ No newline at end of file diff --git a/src/main/java/ru/ulstu/admin/service/AdminReportService.java b/src/main/java/ru/ulstu/admin/service/AdminReportService.java new file mode 100644 index 0000000..6b0a278 --- /dev/null +++ b/src/main/java/ru/ulstu/admin/service/AdminReportService.java @@ -0,0 +1,17 @@ +package ru.ulstu.admin.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.admin.model.ReportForm; + +@Service +public class AdminReportService { + + // Здесь можно добавить дополнительную логику для работы с отчетами + public void saveReport(ReportForm reportForm) { + // Логика сохранения отчета + System.out.println("Аспирант ID: " + reportForm.getAspirantId()); + System.out.println("Курсовая работа: " + reportForm.getCourseWorkScore()); + System.out.println("Научные исследования: " + reportForm.getResearchScore()); + System.out.println("Публикации: " + reportForm.getPublicationsScore()); + } +} \ No newline at end of file diff --git a/src/main/resources/templates/admin/aspirantReport.html b/src/main/resources/templates/admin/aspirantReport.html new file mode 100644 index 0000000..b6c17c4 --- /dev/null +++ b/src/main/resources/templates/admin/aspirantReport.html @@ -0,0 +1,49 @@ + + +
+

Отчетность аспиранта

+ + +
+ + +
+ + +

+ Поле обязательно для заполнения +

+
+ +
+ + +

+ Поле обязательно для заполнения +

+
+ +
+ + +

+ Поле обязательно для заполнения +

+
+ +
+ + +
+ + + Отмена +
+
+ \ No newline at end of file diff --git a/src/main/resources/templates/admin/aspirantsList.html b/src/main/resources/templates/admin/aspirantsList.html index 2e0b3c1..a4ada2b 100644 --- a/src/main/resources/templates/admin/aspirantsList.html +++ b/src/main/resources/templates/admin/aspirantsList.html @@ -6,12 +6,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + +
ФамилияИмяОтчествоКурсТема диссертацииНаучный руководительДействия
+ + + Редактировать + +
- + \ No newline at end of file diff --git a/src/main/resources/templates/admin/managersList.html b/src/main/resources/templates/admin/managersList.html index 217f228..132f689 100644 --- a/src/main/resources/templates/admin/managersList.html +++ b/src/main/resources/templates/admin/managersList.html @@ -2,16 +2,42 @@
- + + - + + + + + + + + + + + + + + + + + + + + + + +
ФИОДолжностьСтепеньЗваниеНаучные интересыДействия
+
    +
  • +
+
+ + + Редактировать + +
- + \ No newline at end of file diff --git a/src/main/resources/templates/aspirant/adminBRS.html b/src/main/resources/templates/aspirant/adminBRS.html new file mode 100644 index 0000000..25a5e5b --- /dev/null +++ b/src/main/resources/templates/aspirant/adminBRS.html @@ -0,0 +1,33 @@ + + + + + + Правила расчета БРС + + + +
+

Правила расчета БРС

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/aspirant/adminReportConfirm.html b/src/main/resources/templates/aspirant/adminReportConfirm.html new file mode 100644 index 0000000..a221599 --- /dev/null +++ b/src/main/resources/templates/aspirant/adminReportConfirm.html @@ -0,0 +1,26 @@ + + + + + + Подтверждение отчета + + + +
+

Подтверждение отчета аспиранта

+
+
Отчет аспиранта: Иванов Иван Иванович +
+
+

Курсовая работа: 80 баллов

+

Научные исследования: 70 баллов

+

Публикации: 60 баллов

+ + +
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/aspirant/aspirantList.html b/src/main/resources/templates/aspirant/aspirantList.html new file mode 100644 index 0000000..7f61df8 --- /dev/null +++ b/src/main/resources/templates/aspirant/aspirantList.html @@ -0,0 +1,40 @@ + + + + + + Список аспирантов + + + +
+

Список аспирантов

+ + + + + + + + + + + + + + + + + + + + + + + + +
ФИОКурсФорма обученияОсноваТема диссертацииРуководительАктивное обучение
Иванов Иван Иванович1ОчнаяБюджетМетоды машинного обученияПетров Петр ПетровичДаНет
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/aspirant/aspirantReport.html b/src/main/resources/templates/aspirant/aspirantReport.html new file mode 100644 index 0000000..bfb00ca --- /dev/null +++ b/src/main/resources/templates/aspirant/aspirantReport.html @@ -0,0 +1,34 @@ + + + + + + Отчетность аспиранта + + + +
+

Отчетность аспиранта

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/aspirant/aspirantRukovod.html b/src/main/resources/templates/aspirant/aspirantRukovod.html new file mode 100644 index 0000000..a4e78bf --- /dev/null +++ b/src/main/resources/templates/aspirant/aspirantRukovod.html @@ -0,0 +1,25 @@ + + + + + + Список руководителей + + + +
+

Список руководителей

+
+
Петров Петр Петрович
+
+

Должность: Доцент

+

Степень: Кандидат технических наук

+

Звание: Доцент

+

Научные интересы:

+
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/aspirant/semesterStat.html b/src/main/resources/templates/aspirant/semesterStat.html new file mode 100644 index 0000000..0f584f0 --- /dev/null +++ b/src/main/resources/templates/aspirant/semesterStat.html @@ -0,0 +1,31 @@ + + + + + + Статистика по семестрам + + + +
+

Статистика по семестрам

+ + + + + + + + + + + + + + + +
СеместрАспирантОбщий балл
1Иванов Иван Иванович210
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index b95d4fd..ed43437 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -63,6 +63,10 @@ Список научных руководителей Список аспирантов Новости и заседания + Отчетность аспирантов + Правила БРС + Подтверждение БРС + Статистика по баллам