Commit 5ceb5cab authored by Никита Ульяницкий's avatar Никита Ульяницкий :speech_balloon:
Browse files

Добавление связывания в вызов объемов

parent e33bdd41
Branches
Tags
1 merge request!3Выкатка на прод
Pipeline #653 passed with stage
in 4 minutes and 20 seconds
Showing with 7 additions and 0 deletions
......@@ -2,6 +2,7 @@ package com.documentation.volume.controller;
import com.documentation.volume.DTO.FileExcelDto;
import com.documentation.volume.DTO.volume.VolumeGeneralDTO;
import com.documentation.volume.service.DisciplineService;
import com.documentation.volume.service.VolumeGenerateService;
import com.documentation.volume.service.VolumeService;
import io.swagger.v3.oas.annotations.Operation;
......@@ -27,6 +28,8 @@ public class VolumeController {
private final VolumeGenerateService volumeGenerateService;
private final DisciplineService disciplineService;
@Operation(summary = "Получить список c часами по всем дисциплинам")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "список сформирован",
......@@ -36,6 +39,8 @@ public class VolumeController {
content = @Content) })
@GetMapping(value = "/volume/versions/{versionID}")
public ResponseEntity<List<VolumeGeneralDTO>> read(@PathVariable("versionID") Long id){
disciplineService.connectContingent(id);
final List<VolumeGeneralDTO> volumeListDto = volumeService.read(id);
return volumeListDto != null
......@@ -51,6 +56,8 @@ public class VolumeController {
content = @Content) })
@GetMapping(value = "/volume/toFile/")
public ResponseEntity<?> generate(@RequestParam("versionID") Long id) throws IOException {
disciplineService.connectContingent(id);
return volumeGenerateService.generate(id);
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment