diff --git a/src/main/java/ru/ulstu/admin/controller/AdminReportController.java b/src/main/java/ru/ulstu/admin/controller/AdminReportController.java index 1f15846..3018ca4 100644 --- a/src/main/java/ru/ulstu/admin/controller/AdminReportController.java +++ b/src/main/java/ru/ulstu/admin/controller/AdminReportController.java @@ -2,7 +2,11 @@ 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.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import ru.ulstu.admin.model.ReportForm; import ru.ulstu.admin.service.AdminReportService; @@ -19,10 +23,12 @@ public class AdminReportController { this.adminReportService = adminReportService; } - @GetMapping("/report/{aspirantId}") - public String getReportForm(@PathVariable(value = "aspirantId") Integer aspirantId, Model model) { + @GetMapping("/report") + public String getReportForm(Model model) { ReportForm reportForm = new ReportForm(); - reportForm.setAspirantId(aspirantId); // Устанавливаем ID аспиранта + + //todo get current user aspirant id + //reportForm.setAspirantId(aspirantId); // Устанавливаем ID аспиранта model.addAttribute("report", reportForm); return "admin/aspirantReport"; // Возвращает шаблон report.html }