Schedule taken places

This commit is contained in:
Filip Izydorczyk
2020-12-29 16:36:12 +01:00
parent eecb1a6d36
commit a0570a055f
4 changed files with 47 additions and 4 deletions

View File

@ -36,6 +36,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.ArrayList;
import java.util.HashMap;
import com.plannaplan.responses.mappers.AssignmentResponseMappers;
import com.plannaplan.responses.models.AssignmentResponse;
@ -127,7 +128,10 @@ public class CommisionController extends TokenBasedController {
if (com.isPresent()) {
List<Assignment> respone = this.assignmentService.getCommisionAssignments(com.get());
return new ResponseEntity<>(AssignmentResponseMappers.mapToResponse(respone), HttpStatus.OK);
final HashMap<Long, Integer> ammounts = this.groupServcicxe
.getTakenPlacesOfAssignments(respone);
return new ResponseEntity<>(AssignmentResponseMappers.mapToResponse(respone, ammounts),
HttpStatus.OK);
}
return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);