Skip to content

Commit

Permalink
Inserimento più richieste cambio reperibilità non ancora confermate.
Browse files Browse the repository at this point in the history
  • Loading branch information
criluc committed Mar 1, 2024
1 parent 7f8a43b commit 9713791
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- Corretta lista persone in Straordinario mensili gruppo, filtrando le persone non più affiliate

- Corretta possibilità di inserire più richieste di cambio reperibilità non ancora confermate nello stesso mese

## [2.13.0] - 2024-02-13
### Added
Expand Down
7 changes: 6 additions & 1 deletion app/dao/CompetenceRequestDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,17 @@ public List<CompetenceRequest> existingCompetenceRequests(CompetenceRequest requ
final QCompetenceRequest competenceRequest = QCompetenceRequest.competenceRequest;
return getQueryFactory().selectFrom(competenceRequest)
.where(competenceRequest.person.eq(request.getPerson())
.and(
competenceRequest.beginDateToAsk.between(request.getBeginDateToAsk(), request.getEndDateToAsk())
.or(competenceRequest.endDateToAsk.between(request.getBeginDateToAsk(), request.getEndDateToAsk()))
.or(competenceRequest.beginDateToGive.between(request.getBeginDateToGive(), request.getEndDateToGive()))
.or(competenceRequest.endDateToGive.between(request.getBeginDateToGive(), request.getEndDateToGive()))
)
.and(competenceRequest.flowEnded.eq(false)))
.fetch();
}



/**
* Metodo che aggiorna le condizioni di ricerca per il responsabile del servizio.
*
Expand Down
2 changes: 2 additions & 0 deletions app/models/flows/CompetenceRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import javax.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import models.Person;
import models.base.MutableModel;
import models.enumerate.ShiftSlot;
Expand All @@ -46,6 +47,7 @@
* @author Dario Tagliaferri
*
*/
@ToString
@Getter
@Setter
@Entity
Expand Down

0 comments on commit 9713791

Please sign in to comment.