From f769ca4c193a446f28165218f6f1d170a4a9270d Mon Sep 17 00:00:00 2001 From: Cristian Lucchesi Date: Fri, 15 Apr 2022 12:41:31 +0200 Subject: [PATCH 01/19] Controllo su API contracts/byPerson per previousContract non coerente. --- CHANGELOG.md | 5 +++++ VERSION | 2 +- app/cnr/sync/dto/v2/ContractShowDto.java | 8 +++++++- app/cnr/sync/dto/v2/ContractShowTerseDto.java | 8 +++++++- app/controllers/rest/v2/Contracts.java | 8 +++++++- app/helpers/JsonResponse.java | 5 +++++ 6 files changed, 32 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e87409a7d..d33897ecd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.5.1] - UNRELEASED +### Added + - Aggiunto controllo su API rest contracts/byPerson per fornire un messaggio di errore + quando si tenta di leggere un contratto con previousContract non coerente + ## [2.5.0] - 2022-04-14 ### Added - Aggiunta possiblità di trattare gli orari in telelavoro inseriti dai livelli I-III diff --git a/VERSION b/VERSION index fad066f80..c418c810b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.0 \ No newline at end of file +2.5.1-rc1 \ No newline at end of file diff --git a/app/cnr/sync/dto/v2/ContractShowDto.java b/app/cnr/sync/dto/v2/ContractShowDto.java index 743d23a95..7ef488333 100644 --- a/app/cnr/sync/dto/v2/ContractShowDto.java +++ b/app/cnr/sync/dto/v2/ContractShowDto.java @@ -50,10 +50,16 @@ public class ContractShowDto extends ContractShowTerseDto { * Nuova instanza di un ContractShowDto contenente i valori * dell'oggetto contract passato. */ - public static ContractShowDto build(Contract contract) { + public static ContractShowDto build(Contract contract) throws IllegalStateException { val contractDto = modelMapper.map(contract, ContractShowDto.class); contractDto.setPerson(PersonShowTerseDto.build(contract.person)); if (contract.getPreviousContract() != null) { + if (contract.getPreviousContract().id.equals(contract.id)) { + throw new IllegalStateException( + String.format( + "The previous contract is equal to the current contract (id=%s), please correct this error", + contract.id)); + } contractDto.setPreviousContract(ContractShowTerseDto.build(contract.getPreviousContract())); } contractDto.setWorkingTimeTypes( diff --git a/app/cnr/sync/dto/v2/ContractShowTerseDto.java b/app/cnr/sync/dto/v2/ContractShowTerseDto.java index e0fc1ec03..8e801ef35 100644 --- a/app/cnr/sync/dto/v2/ContractShowTerseDto.java +++ b/app/cnr/sync/dto/v2/ContractShowTerseDto.java @@ -56,10 +56,16 @@ public class ContractShowTerseDto { * Nuova instanza di un ContractShowTerseDto contenente i valori * dell'oggetto contract passato. */ - public static ContractShowTerseDto build(Contract contract) { + public static ContractShowTerseDto build(Contract contract) throws IllegalStateException { val contractDto = modelMapper.map(contract, ContractShowTerseDto.class); contractDto.setPerson(PersonShowTerseDto.build(contract.person)); if (contract.getPreviousContract() != null) { + if (contract.getPreviousContract().id.equals(contract.id)) { + throw new IllegalStateException( + String.format( + "The previous contract is equal to the current contract (id=%s), please correct this error", + contract.id)); + } contractDto.setPreviousContract(ContractShowTerseDto.build(contract.getPreviousContract())); } return contractDto; diff --git a/app/controllers/rest/v2/Contracts.java b/app/controllers/rest/v2/Contracts.java index 4d3727373..d1769974b 100644 --- a/app/controllers/rest/v2/Contracts.java +++ b/app/controllers/rest/v2/Contracts.java @@ -24,6 +24,7 @@ import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.google.common.base.Optional; +import com.google.common.collect.Lists; import com.google.gson.GsonBuilder; import common.security.SecurityRules; import controllers.Resecure; @@ -83,9 +84,14 @@ public static void byPerson(Long id, String email, String eppn, Long personPerse RestUtils.checkMethod(request, HttpMethod.GET); val person = Persons.getPersonFromRequest(id, email, eppn, personPerseoId, fiscalCode, number); rules.checkIfPermitted(person.office); - List contracts = + List contracts = Lists.newArrayList(); + try { + contracts = person.contracts.stream().map(c -> ContractShowTerseDto.build(c)) .collect(Collectors.toList()); + } catch (IllegalStateException e) { + JsonResponse.internalError(e.getMessage()); + } renderJSON(gsonBuilder.create().toJson(contracts)); } diff --git a/app/helpers/JsonResponse.java b/app/helpers/JsonResponse.java index 5110abb73..f2a02f7ad 100755 --- a/app/helpers/JsonResponse.java +++ b/app/helpers/JsonResponse.java @@ -78,5 +78,10 @@ public static void unauthorized(String message) { Http.Response.current().status = Http.StatusCode.UNAUTHORIZED; throw new RenderJson(String.format(WITH_MSG, Http.StatusCode.UNAUTHORIZED, message)); } + + public static void internalError(String message) { + Http.Response.current().status = Http.StatusCode.INTERNAL_ERROR; + throw new RenderJson(String.format(WITH_MSG, Http.StatusCode.INTERNAL_ERROR, message)); + } } From eb1c84de7f1538fa32034486cf5a6e9687bff1a6 Mon Sep 17 00:00:00 2001 From: Cristian Lucchesi Date: Fri, 15 Apr 2022 17:51:01 +0200 Subject: [PATCH 02/19] =?UTF-8?q?Migliorato=20errore=20per=20inserimento?= =?UTF-8?q?=20via=20REST=20di=20buoni=20gi=C3=A0=20esistenti.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ app/controllers/rest/v3/MealTickets.java | 31 +++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d33897ecd..892aa6377 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Aggiunto controllo su API rest contracts/byPerson per fornire un messaggio di errore quando si tenta di leggere un contratto con previousContract non coerente +### Changed + - Migliorato messaggio di errore in caso di inserimento via REST di buoni pasto già esistenti ## [2.5.0] - 2022-04-14 ### Added diff --git a/app/controllers/rest/v3/MealTickets.java b/app/controllers/rest/v3/MealTickets.java index 6629bc239..15a75d9d5 100644 --- a/app/controllers/rest/v3/MealTickets.java +++ b/app/controllers/rest/v3/MealTickets.java @@ -20,6 +20,7 @@ import cnr.sync.dto.v3.BlockMealTicketShowTerseDto; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; +import com.google.common.base.Joiner; import com.google.common.base.Optional; import com.google.common.collect.Lists; import com.google.common.collect.Sets; @@ -41,6 +42,7 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; +import java.util.stream.IntStream; import javax.inject.Inject; import lombok.val; import lombok.extern.slf4j.Slf4j; @@ -219,6 +221,13 @@ static void _create(BlockMealTicketCreateDto blockMealTicketCreateDto, JsonResponse.badRequest(validation.errorsMap().toString()); } + List matchingAlreadyExisting = matchingAlreadyExisting(blockMealTicketCreateDto, person); + + if (!matchingAlreadyExisting.isEmpty()) { + JsonResponse.badRequest("Meal ticket(s) already exists: ".concat( + Joiner.on(", ").join(matchingAlreadyExisting.stream().map(ml -> ml.code).collect(Collectors.toList())))); + } + val admin = extractAdmin(blockMealTicketCreateDto); if (blockMealTicketCreateDto.getFirst() > blockMealTicketCreateDto.getLast()) { @@ -268,6 +277,27 @@ static void _create(BlockMealTicketCreateDto blockMealTicketCreateDto, JsonResponse.ok(); } + /** + * @param blockMealTicketCreateDto i buoni pasto da verificare se già presenti + * @param person la persona di cui controllare i buoni pasto + * @return la lista dei Meal Ticket già presenti che corrispondono a quelli indicati nel blockMealTicketCreateDto + */ + @Util + static List matchingAlreadyExisting(BlockMealTicketCreateDto blockMealTicketCreateDto, Person person) { + val alreadyPresentMealTickets = + mealTicketDao.getMealTicketsMatchCodeBlock( + blockMealTicketCreateDto.getCodeBlock(), Optional.of(person.office)); + + List matchingAlreadyExisting = Lists.newArrayList(); + IntStream.range(blockMealTicketCreateDto.getFirst(), blockMealTicketCreateDto.getLast() + 1).forEachOrdered(n -> { + matchingAlreadyExisting.addAll(alreadyPresentMealTickets.stream() + .filter(ml -> ml.code.equals(String.format("%s%02d", blockMealTicketCreateDto.getCodeBlock(), n))) + .collect(Collectors.toList())); + }); + return matchingAlreadyExisting; + } + + /** * Decide quale utente impostare come chi ha consegnato il buono. * Se è passato il parametro adminId cerca l'utente con quel parametro, @@ -421,5 +451,4 @@ public static void returnBlock(Long contractId, String codeBlock, int first, int JsonResponse.ok(); } - } From 356055736db2109f52989ad5741fcab1086c9a8f Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Tue, 19 Apr 2022 09:22:58 +0200 Subject: [PATCH 03/19] Risolto errore nel calcolo dei giorni di lavoro agile mensili --- app/manager/services/absences/model/AbsencePeriod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/manager/services/absences/model/AbsencePeriod.java b/app/manager/services/absences/model/AbsencePeriod.java index 01f43edbf..270aca813 100644 --- a/app/manager/services/absences/model/AbsencePeriod.java +++ b/app/manager/services/absences/model/AbsencePeriod.java @@ -216,7 +216,7 @@ public int computePeriodTakableAmount(TakeCountBehaviour countBehaviour, LocalDa List workingDays = personDayManager.workingDaysInMonth(person, from, to); int count = (workingDays.size() * 100 / 2); if (count % 100 != 0) { - count = count - count%100; + return count - count%100; } return count -(1*100); } From 5bdf06e92481ae53758d86c42a5c3c7d944a43c9 Mon Sep 17 00:00:00 2001 From: Loredana Sideri Date: Tue, 19 Apr 2022 15:23:51 +0200 Subject: [PATCH 04/19] =?UTF-8?q?aggiunto=20merge=20prima=20della=20delete?= =?UTF-8?q?=20per=20fare=20il=20re-attached=20dell'entit=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/manager/PersonDayManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/manager/PersonDayManager.java b/app/manager/PersonDayManager.java index fce843df2..2173c3475 100755 --- a/app/manager/PersonDayManager.java +++ b/app/manager/PersonDayManager.java @@ -1813,7 +1813,8 @@ public void doJob() { } if (!shortPermission.isPresent() && previousShortPermission.isPresent()) { - previousShortPermission.get().delete(); + //Viene fatta prima la merge perché l'assenza è detached + previousShortPermission.get().merge()._delete(); log.info("Rimosso permesso breve di {} minuti nel giorno {} per {}", previousShortPermission.get().justifiedMinutes, personDay.date, personDay.person.getFullname()); From cf610fd5a8bb3c15a7e3d44f73f45942301329ac Mon Sep 17 00:00:00 2001 From: Loredana Sideri Date: Tue, 19 Apr 2022 15:37:58 +0200 Subject: [PATCH 05/19] aggiornato changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 892aa6377..86e768723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 quando si tenta di leggere un contratto con previousContract non coerente ### Changed - Migliorato messaggio di errore in caso di inserimento via REST di buoni pasto già esistenti + - Fix bug del permesso breve che non veniva eliminato quando si completava la giornata ## [2.5.0] - 2022-04-14 ### Added From 2a374373c603c5e44f59671a2282490cb280c1ae Mon Sep 17 00:00:00 2001 From: dario Date: Wed, 20 Apr 2022 17:28:52 +0200 Subject: [PATCH 06/19] =?UTF-8?q?Aggiunta=20evoluzione=20per=20rimuovere?= =?UTF-8?q?=20i=20record=20duplicati=20di=20parametri=20personali=20e=20ag?= =?UTF-8?q?giunta=20constraint=20di=20unicit=C3=A0=20sulla=20tabella=20per?= =?UTF-8?q?son=5Fconfigurations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/evolutions/188.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/evolutions/188.sql diff --git a/db/evolutions/188.sql b/db/evolutions/188.sql new file mode 100644 index 000000000..91435b6e0 --- /dev/null +++ b/db/evolutions/188.sql @@ -0,0 +1,11 @@ +# --- !Ups + +DELETE FROM person_configurations pc +using person_configurations pc2 +WHERE pc.id > pc2.id +AND pc.person_id = pc2.person_id AND pc.epas_param = pc2.epas_param; + +ALTER TABLE person_configurations +ADD CONSTRAINT unique_param UNIQUE (person_id, epas_param); + +# --- !Downs From 1ae590e01950d415e1d0f493582b3e4b0e688001 Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 21 Apr 2022 12:08:26 +0200 Subject: [PATCH 07/19] =?UTF-8?q?Modificato=20metodo=20per=20aggiornamento?= =?UTF-8?q?=20di=20parametri=20di=20configurazione=20del=20dipendente=20pe?= =?UTF-8?q?r=20renderlo=20pi=C3=B9=20rapido=20con=20transazioni=20separate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configurations/ConfigurationManager.java | 43 ++++++++++++++----- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/app/manager/configurations/ConfigurationManager.java b/app/manager/configurations/ConfigurationManager.java index 964e9105d..9741b31d6 100644 --- a/app/manager/configurations/ConfigurationManager.java +++ b/app/manager/configurations/ConfigurationManager.java @@ -25,6 +25,8 @@ import com.querydsl.jpa.JPQLQuery; import com.querydsl.jpa.JPQLQueryFactory; import com.querydsl.jpa.impl.JPAQueryFactory; +import dao.OfficeDao; +import dao.PersonDao; import it.cnr.iit.epas.DateInterval; import it.cnr.iit.epas.DateUtility; import java.util.Comparator; @@ -47,6 +49,7 @@ import models.enumerate.BlockType; import models.query.QConfiguration; import models.query.QPersonConfiguration; +import play.db.jpa.JPAPlugin; import org.joda.time.LocalDate; import org.joda.time.LocalTime; import org.joda.time.MonthDay; @@ -59,15 +62,19 @@ public class ConfigurationManager { protected final JPQLQueryFactory queryFactory; private final PeriodManager periodManager; + private final OfficeDao officeDao; + private final PersonDao personDao; /** * Default constructor per l'injection. */ @Inject ConfigurationManager(JPQLQueryFactory queryFactory, Provider emp, - PeriodManager periodManager) { + PeriodManager periodManager, OfficeDao officeDao, PersonDao personDao) { this.queryFactory = new JPAQueryFactory(emp); this.periodManager = periodManager; + this.officeDao = officeDao; + this.personDao = personDao; } /** @@ -94,13 +101,13 @@ public List configurationWithType(EpasParam epasParam) { public List configurationWithTypeAndValue( EpasParam epasParam, String value) { final QPersonConfiguration configuration = QPersonConfiguration.personConfiguration; - + final JPQLQuery query = queryFactory.selectFrom(configuration) .where(configuration.epasParam.eq(epasParam) .and(configuration.fieldValue.eq(value))); return query.fetch(); } - + /** * Aggiunge una nuova configurazione di tipo LocalTime. * @@ -264,7 +271,7 @@ public IPropertyInPeriod updateInteger(EpasParam epasParam, IPropertiesInPeriodO return build(epasParam, target, EpasParamValueType.formatValue(value), begin, end, false, persist); } - + /** * Aggiunge una nuova configurazione di tipo enumerato. * @@ -441,7 +448,7 @@ public LocalDate targetYearEnd(IPropertiesInPeriodOwner target, int year) { public List getOfficeConfigurationsByDate(Office office, LocalDate date) { return office.configurations.stream().filter(conf -> - DateUtility.isDateIntoInterval(date, conf.periodInterval())).distinct() + DateUtility.isDateIntoInterval(date, conf.periodInterval())).distinct() .sorted(Comparator.comparing(c -> c.epasParam)) .collect(Collectors.toList()); } @@ -699,16 +706,32 @@ public void updateAllOfficesConfigurations() { updateConfigurations(office); } } - + /** * Aggiorna la configurazione di tutte le persone. */ + @SuppressWarnings("deprecation") public void updatePeopleConfigurations() { - List people = Person.findAll(); - for (Person person : people) { - log.debug("Fix parametri di configurazione della persona {}", person.fullName()); - updateConfigurations(person); + List officeList = officeDao.allEnabledOffices(); + List people = Lists.newArrayList(); + for (Office office : officeList) { + log.info("Aggiorno i parametri per i dipendenti di {}", office.name); + people = personDao.byOffice(office); + for (Person person : people) { + JPAPlugin.closeTx(false); + JPAPlugin.startTx(false); + person = personDao.getPersonById(person.id); + log.debug("Fix parametri di configurazione della persona {}", person.fullName()); + updateConfigurations(person); + } + JPAPlugin.closeTx(false); + JPAPlugin.startTx(false); + office = officeDao.getOfficeById(office.id); + log.info("Fine aggiornamento parametri per {} dipendenti di {}", + office.persons.size(), office.name); } + + } /** From b3ae21af308af133e662fbceadf556605e3762d9 Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 21 Apr 2022 13:38:56 +0200 Subject: [PATCH 08/19] =?UTF-8?q?Modificata=20modalit=C3=A0=20di=20aggiorn?= =?UTF-8?q?amento=20parametri.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Utilizzato job al posto delle transazioni (deprecate). --- .../configurations/ConfigurationManager.java | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/app/manager/configurations/ConfigurationManager.java b/app/manager/configurations/ConfigurationManager.java index 9741b31d6..e285ede37 100644 --- a/app/manager/configurations/ConfigurationManager.java +++ b/app/manager/configurations/ConfigurationManager.java @@ -50,6 +50,7 @@ import models.query.QConfiguration; import models.query.QPersonConfiguration; import play.db.jpa.JPAPlugin; +import play.jobs.Job; import org.joda.time.LocalDate; import org.joda.time.LocalTime; import org.joda.time.MonthDay; @@ -710,30 +711,28 @@ public void updateAllOfficesConfigurations() { /** * Aggiorna la configurazione di tutte le persone. */ - @SuppressWarnings("deprecation") public void updatePeopleConfigurations() { List officeList = officeDao.allEnabledOffices(); - List people = Lists.newArrayList(); - for (Office office : officeList) { - log.info("Aggiorno i parametri per i dipendenti di {}", office.name); - people = personDao.byOffice(office); - for (Person person : people) { - JPAPlugin.closeTx(false); - JPAPlugin.startTx(false); - person = personDao.getPersonById(person.id); - log.debug("Fix parametri di configurazione della persona {}", person.fullName()); - updateConfigurations(person); - } - JPAPlugin.closeTx(false); - JPAPlugin.startTx(false); - office = officeDao.getOfficeById(office.id); + + for (Office office : officeList) { + new Job() { + @Override + public void doJob() { + log.info("Aggiorno i parametri per i dipendenti di {}", office.name); + List people = personDao.byOffice(office); + for (Person person : people) { + log.info("Fix parametri di configurazione della persona {}", person.fullName()); + updateConfigurations(person); + } + } + }.now(); log.info("Fine aggiornamento parametri per {} dipendenti di {}", office.persons.size(), office.name); } - - } + + /** * Converte il formato stringa in formato oggetto per l'epasParam. * From 0004cf26a27131b611ec86323258955aaaeb1a0b Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 21 Apr 2022 13:54:00 +0200 Subject: [PATCH 09/19] Cambiato livello di log. Cambiato il livello di log in fase di aggiornamento dei parametri di una persona. --- app/manager/configurations/ConfigurationManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/manager/configurations/ConfigurationManager.java b/app/manager/configurations/ConfigurationManager.java index e285ede37..208fb4595 100644 --- a/app/manager/configurations/ConfigurationManager.java +++ b/app/manager/configurations/ConfigurationManager.java @@ -721,7 +721,7 @@ public void doJob() { log.info("Aggiorno i parametri per i dipendenti di {}", office.name); List people = personDao.byOffice(office); for (Person person : people) { - log.info("Fix parametri di configurazione della persona {}", person.fullName()); + log.debug("Fix parametri di configurazione della persona {}", person.fullName()); updateConfigurations(person); } } From c1de54871276f8c2663aa84ac39b2b4f1f776859 Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 21 Apr 2022 17:30:56 +0200 Subject: [PATCH 10/19] Risolti errori di stile. --- app/cnr/sync/dto/CompetenceDto.java | 1 + app/cnr/sync/dto/PersonDto.java | 1 + app/cnr/sync/dto/SimplePersonDto.java | 1 + app/cnr/sync/dto/v2/ContractShowDto.java | 4 +- app/cnr/sync/dto/v2/ContractShowTerseDto.java | 4 +- .../sync/dto/v3/BadgeReaderShowTerseDto.java | 3 +- .../sync/dto/v3/BadgeSystemShowTerseDto.java | 3 +- .../sync/dto/v3/BlockMealTicketCreateDto.java | 1 + .../dto/v3/BlockMealTicketShowTerseDto.java | 1 + .../sync/dto/v3/CompetenceCodeShowDto.java | 2 +- .../sync/dto/v3/MealTicketShowTerseDto.java | 1 + .../v3/OfficeMonthValidationStatusDto.java | 2 + app/common/injection/InjectionPlugin.java | 6 + app/common/oauth2/AccessInfo.java | 6 + app/common/oauth2/Oauth2Authorization.java | 6 + app/common/oauth2/OpenIdClientsModule.java | 72 +- app/common/oauth2/OpenIdConnectClient.java | 73 +- app/common/oauth2/ProviderConfig.java | 6 + app/common/oauth2/RealmsAdminApiFallback.java | 6 + app/common/oauth2/UserManager.java | 21 +- app/common/oauth2/UsersApiFallback.java | 12 +- app/common/security/SecurityModule.java | 9 +- app/controllers/AbsenceRequests.java | 7 +- app/controllers/Administration.java | 7 +- app/controllers/CheckGreenPasses.java | 11 +- app/controllers/Competences.java | 2 +- app/controllers/Contracts.java | 6 +- app/controllers/Groups.java | 7 +- app/controllers/InformationRequests.java | 17 +- app/controllers/JsonExport.java | 5 +- app/controllers/MealTickets.java | 6 +- app/controllers/MonthRecaps.java | 2 +- app/controllers/PrintTags.java | 7 + app/controllers/ReperibilityCalendar.java | 7 +- app/controllers/RequestInit.java | 7 +- app/controllers/Resecure.java | 41 +- app/controllers/Security.java | 10 +- app/controllers/SecurityTokens.java | 31 +- app/controllers/SwitchTemplate.java | 6 + app/controllers/TeleworkStampings.java | 17 +- app/controllers/WorkingTimes.java | 2 + app/controllers/rest/v2/Certifications.java | 8 +- app/controllers/rest/v2/Contracts.java | 2 +- app/controllers/rest/v3/AbsenceTypes.java | 1 + app/controllers/rest/v3/Badges.java | 2 +- app/controllers/rest/v3/MealTickets.java | 672 +++++++++--------- app/controllers/rest/v3/PersonDays.java | 2 +- app/controllers/rest/v3/Stampings.java | 2 +- app/dao/AbsenceRequestDao.java | 3 +- app/dao/AbsenceTypeDao.java | 7 +- app/dao/BadgeDao.java | 12 + app/dao/CheckGreenPassDao.java | 9 +- app/dao/ContractMonthRecapDao.java | 1 + app/dao/InformationRequestDao.java | 16 +- app/dao/PersonDayDao.java | 2 +- app/dao/TeleworkValidationDao.java | 9 +- app/dao/UserDao.java | 1 + app/dao/history/ContractHistoryDao.java | 2 +- app/dao/wrapper/IWrapperPersonDay.java | 2 +- app/helpers/Paginator.java | 6 + app/helpers/PersonTags.java | 6 + app/helpers/TemplateUtility.java | 7 +- .../deserializers/InlineStreamHandler.java | 6 + .../deserializers/LocalDateDeserializer.java | 7 +- app/helpers/rest/RestUtils.java | 1 + app/helpers/validators/AffiliationCheck.java | 1 + app/helpers/validators/StringIsValid.java | 6 +- app/it/cnr/iit/epas/DateInterval.java | 2 +- app/it/cnr/iit/epas/DateUtility.java | 1 - app/it/cnr/iit/epas/JsonAbsenceBinder.java | 2 +- app/it/cnr/iit/epas/JsonMissionBinder.java | 8 +- .../cnr/iit/epas/JsonPersonEmailBinder.java | 1 + .../JsonRequestedFrequentAbsenceBinder.java | 6 + .../iit/epas/JsonRequestedPersonsBinder.java | 2 +- app/it/cnr/iit/epas/JsonStampingBinder.java | 2 +- app/it/cnr/iit/epas/TimeInterval.java | 2 +- app/jobs/BonusJob.java | 1 + app/jobs/Bootstrap.java | 6 + app/jobs/CheckGreenPassJob.java | 6 + app/jobs/CheckGreenPassJob2.java | 6 + app/jobs/CheckPersonCompetence.java | 6 + app/jobs/DarkNightJob.java | 6 + app/jobs/ExpandableJob.java | 6 + app/jobs/FixEmployeesPermission.java | 1 + app/jobs/FixReperibilityShiftDates.java | 6 + app/jobs/MealTicketBlockTypeJob.java | 6 + app/manager/CheckGreenPassManager.java | 10 +- app/manager/EmailManager.java | 6 +- app/manager/MissionManager.java | 5 +- app/manager/NotificationManager.java | 4 +- app/manager/PersonDayManager.java | 3 +- app/manager/StampingManager.java | 6 +- app/manager/TeleworkStampingManager.java | 7 +- .../dto/internal/TipoBlocchettoSede.java | 6 + .../service/CertificationService.java | 2 +- .../service/CertificationsComunication.java | 1 + app/manager/attestati/service/OauthToken.java | 2 +- .../service/PersonMonthlySituationData.java | 3 +- .../configurations/ConfigurationManager.java | 7 +- .../flows/CompetenceRequestManager.java | 6 +- .../flows/InformationRequestManager.java | 25 +- .../service/contracts/ContractService.java | 2 +- .../absences/model/AbsencePeriod.java | 4 +- .../services/absences/model/DayInPeriod.java | 6 + .../absences/model/ServiceFactories.java | 4 +- .../services/mealtickets/BlockMealTicket.java | 1 + .../mealtickets/IMealTicketsService.java | 2 +- app/manager/sync/SynchronizationManager.java | 2 +- .../service/TeleworkComunication.java | 6 +- app/models/CheckGreenPass.java | 6 + app/models/PersonReperibility.java | 26 +- app/models/PersonalWorkingTime.java | 6 + app/models/ShiftTypeMonth.java | 2 +- app/models/Stamping.java | 7 +- app/models/absences/GroupAbsenceType.java | 2 + app/models/absences/JustifiedType.java | 8 +- .../definitions/DefaultAbsenceType.java | 14 +- .../definitions/DefaultComplation.java | 2 +- .../absences/definitions/DefaultGroup.java | 14 +- .../absences/definitions/DefaultTakable.java | 2 +- app/models/base/InformationRequest.java | 6 + app/models/dto/MealTicketComposition.java | 6 + app/models/dto/NewTeleworkDto.java | 6 + app/models/enumerate/BlockType.java | 6 + app/models/enumerate/InformationType.java | 1 + .../informationrequests/IllnessRequest.java | 6 + .../InformationRequestEvent.java | 2 +- .../informationrequests/ServiceRequest.java | 6 + .../informationrequests/TeleworkRequest.java | 1 + 129 files changed, 1024 insertions(+), 533 deletions(-) diff --git a/app/cnr/sync/dto/CompetenceDto.java b/app/cnr/sync/dto/CompetenceDto.java index ebb8bf94f..a55d477bb 100755 --- a/app/cnr/sync/dto/CompetenceDto.java +++ b/app/cnr/sync/dto/CompetenceDto.java @@ -31,6 +31,7 @@ public class CompetenceDto { /** * Applica la conversione da dto a oggetto. + * * @author dario * */ diff --git a/app/cnr/sync/dto/PersonDto.java b/app/cnr/sync/dto/PersonDto.java index 5b89b0750..de0b9029b 100755 --- a/app/cnr/sync/dto/PersonDto.java +++ b/app/cnr/sync/dto/PersonDto.java @@ -41,6 +41,7 @@ public class PersonDto { /** * Sotto classe definizione dell'indirizzo. + * * @author dario * */ diff --git a/app/cnr/sync/dto/SimplePersonDto.java b/app/cnr/sync/dto/SimplePersonDto.java index f17675885..7be680249 100755 --- a/app/cnr/sync/dto/SimplePersonDto.java +++ b/app/cnr/sync/dto/SimplePersonDto.java @@ -34,6 +34,7 @@ public class SimplePersonDto { /** * Applica la conversione da dto a oggetto. + * * @author dario * */ diff --git a/app/cnr/sync/dto/v2/ContractShowDto.java b/app/cnr/sync/dto/v2/ContractShowDto.java index 7ef488333..f5f8bba28 100644 --- a/app/cnr/sync/dto/v2/ContractShowDto.java +++ b/app/cnr/sync/dto/v2/ContractShowDto.java @@ -57,8 +57,8 @@ public static ContractShowDto build(Contract contract) throws IllegalStateExcept if (contract.getPreviousContract().id.equals(contract.id)) { throw new IllegalStateException( String.format( - "The previous contract is equal to the current contract (id=%s), please correct this error", - contract.id)); + "The previous contract is equal to the current contract (id=%s), " + + "please correct this error", contract.id)); } contractDto.setPreviousContract(ContractShowTerseDto.build(contract.getPreviousContract())); } diff --git a/app/cnr/sync/dto/v2/ContractShowTerseDto.java b/app/cnr/sync/dto/v2/ContractShowTerseDto.java index 8e801ef35..e9302493d 100644 --- a/app/cnr/sync/dto/v2/ContractShowTerseDto.java +++ b/app/cnr/sync/dto/v2/ContractShowTerseDto.java @@ -63,8 +63,8 @@ public static ContractShowTerseDto build(Contract contract) throws IllegalStateE if (contract.getPreviousContract().id.equals(contract.id)) { throw new IllegalStateException( String.format( - "The previous contract is equal to the current contract (id=%s), please correct this error", - contract.id)); + "The previous contract is equal to the current contract (id=%s), " + + "please correct this error", contract.id)); } contractDto.setPreviousContract(ContractShowTerseDto.build(contract.getPreviousContract())); } diff --git a/app/cnr/sync/dto/v3/BadgeReaderShowTerseDto.java b/app/cnr/sync/dto/v3/BadgeReaderShowTerseDto.java index d40bef040..7b360a969 100644 --- a/app/cnr/sync/dto/v3/BadgeReaderShowTerseDto.java +++ b/app/cnr/sync/dto/v3/BadgeReaderShowTerseDto.java @@ -59,7 +59,8 @@ public class BadgeReaderShowTerseDto extends BadgeReaderShowMinimalDto { public static BadgeReaderShowTerseDto build(BadgeReader badgeReader) { val dto = modelMapper.map(badgeReader, BadgeReaderShowTerseDto.class); dto.setUsername(badgeReader.user.username); - dto.setBadgeSystems(badgeReader.badgeSystems.stream().map(bs -> BadgeSystemShowMinimalDto.build(bs)) + dto.setBadgeSystems(badgeReader.badgeSystems.stream() + .map(bs -> BadgeSystemShowMinimalDto.build(bs)) .collect(Collectors.toList())); return dto; } diff --git a/app/cnr/sync/dto/v3/BadgeSystemShowTerseDto.java b/app/cnr/sync/dto/v3/BadgeSystemShowTerseDto.java index 79315e40a..695da994e 100644 --- a/app/cnr/sync/dto/v3/BadgeSystemShowTerseDto.java +++ b/app/cnr/sync/dto/v3/BadgeSystemShowTerseDto.java @@ -56,7 +56,8 @@ public class BadgeSystemShowTerseDto extends BadgeSystemShowMinimalDto { public static BadgeSystemShowTerseDto build(BadgeSystem badgeSystem) { val dto = modelMapper.map(badgeSystem, BadgeSystemShowTerseDto.class); dto.setOffice(OfficeDto.build(badgeSystem.office)); - dto.setBadgeReaders(badgeSystem.badgeReaders.stream().map(br -> BadgeReaderShowMinimalDto.buildMinimal(br)) + dto.setBadgeReaders(badgeSystem.badgeReaders.stream() + .map(br -> BadgeReaderShowMinimalDto.buildMinimal(br)) .collect(Collectors.toSet())); return dto; } diff --git a/app/cnr/sync/dto/v3/BlockMealTicketCreateDto.java b/app/cnr/sync/dto/v3/BlockMealTicketCreateDto.java index dd7a39294..ae43b9caf 100644 --- a/app/cnr/sync/dto/v3/BlockMealTicketCreateDto.java +++ b/app/cnr/sync/dto/v3/BlockMealTicketCreateDto.java @@ -15,6 +15,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + package cnr.sync.dto.v3; import common.injection.StaticInject; diff --git a/app/cnr/sync/dto/v3/BlockMealTicketShowTerseDto.java b/app/cnr/sync/dto/v3/BlockMealTicketShowTerseDto.java index ae2201c50..4785a0076 100644 --- a/app/cnr/sync/dto/v3/BlockMealTicketShowTerseDto.java +++ b/app/cnr/sync/dto/v3/BlockMealTicketShowTerseDto.java @@ -14,6 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + package cnr.sync.dto.v3; import cnr.sync.dto.v2.PersonShowTerseDto; diff --git a/app/cnr/sync/dto/v3/CompetenceCodeShowDto.java b/app/cnr/sync/dto/v3/CompetenceCodeShowDto.java index fd536cab6..0284c088c 100644 --- a/app/cnr/sync/dto/v3/CompetenceCodeShowDto.java +++ b/app/cnr/sync/dto/v3/CompetenceCodeShowDto.java @@ -63,7 +63,7 @@ public static CompetenceCodeShowDto build(CompetenceCode competenceCode) { val dto = modelMapper.map(competenceCode, CompetenceCodeShowDto.class); if (competenceCode.competenceCodeGroup != null) { dto.setCompetenceCodeGroup( - CompetenceCodeGroupShowTerseDto.build(competenceCode.competenceCodeGroup)); + CompetenceCodeGroupShowTerseDto.build(competenceCode.competenceCodeGroup)); } return dto; } diff --git a/app/cnr/sync/dto/v3/MealTicketShowTerseDto.java b/app/cnr/sync/dto/v3/MealTicketShowTerseDto.java index 0fedb453b..c401d42d4 100644 --- a/app/cnr/sync/dto/v3/MealTicketShowTerseDto.java +++ b/app/cnr/sync/dto/v3/MealTicketShowTerseDto.java @@ -14,6 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + package cnr.sync.dto.v3; import cnr.sync.dto.v2.PersonShowTerseDto; diff --git a/app/cnr/sync/dto/v3/OfficeMonthValidationStatusDto.java b/app/cnr/sync/dto/v3/OfficeMonthValidationStatusDto.java index 8287b598c..27926a10b 100644 --- a/app/cnr/sync/dto/v3/OfficeMonthValidationStatusDto.java +++ b/app/cnr/sync/dto/v3/OfficeMonthValidationStatusDto.java @@ -35,6 +35,8 @@ public class OfficeMonthValidationStatusDto { private List notValidatedPersons = Lists.newArrayList(); /** + * Controlla se tutti gli attestati sono stati validati. + * * @return true se tutti gli attestati sono stati validati, false altrimenti. */ public boolean isAllCertificationsValidated() { diff --git a/app/common/injection/InjectionPlugin.java b/app/common/injection/InjectionPlugin.java index addbd81a6..f1e7bdd63 100755 --- a/app/common/injection/InjectionPlugin.java +++ b/app/common/injection/InjectionPlugin.java @@ -63,6 +63,12 @@ public void onApplicationStart() { play.inject.Injector.inject(this); } + /** + * Classe staticInject estende abstractModule. + * + * @author Marco + * + */ @AutoRegister public static class StaticInjectModule extends AbstractModule { diff --git a/app/common/oauth2/AccessInfo.java b/app/common/oauth2/AccessInfo.java index 74452ef53..9c3d654c1 100644 --- a/app/common/oauth2/AccessInfo.java +++ b/app/common/oauth2/AccessInfo.java @@ -3,6 +3,12 @@ import java.time.LocalDateTime; import lombok.Data; +/** + * classe di informazioni sull'accesso. + * + * @author Cristian + * + */ @Data public class AccessInfo { private final LocalDateTime when; diff --git a/app/common/oauth2/Oauth2Authorization.java b/app/common/oauth2/Oauth2Authorization.java index f9d90a105..bb77c3331 100644 --- a/app/common/oauth2/Oauth2Authorization.java +++ b/app/common/oauth2/Oauth2Authorization.java @@ -6,6 +6,12 @@ import lombok.extern.slf4j.Slf4j; import lombok.val; +/** + * classe di autorizzazione oauth2. + * + * @author cristian + * + */ @Slf4j @RequiredArgsConstructor public class Oauth2Authorization implements RequestInterceptor { diff --git a/app/common/oauth2/OpenIdClientsModule.java b/app/common/oauth2/OpenIdClientsModule.java index 69375aa43..b6a0a89d0 100644 --- a/app/common/oauth2/OpenIdClientsModule.java +++ b/app/common/oauth2/OpenIdClientsModule.java @@ -29,6 +29,12 @@ import play.Play; import play.mvc.Router; +/** + * Modulo OpenIdClient. + * + * @author Cristian + * + */ @Slf4j @AutoRegister public class OpenIdClientsModule extends AbstractModule { @@ -52,9 +58,9 @@ public class OpenIdClientsModule extends AbstractModule { */ @Provides public OpenIdConnectClient openIdConnectClient(@Named(KEYCLOAK_CLIENT_ID) String clientId, - @Named(KEYCLOAK_CLIENT_SECRET) String clientSecret, - @Named(KEYCLOAK_CLIENT_CONFIG_URI) String configUrl, - @Named(KEYCLOAK_JWT_FIELD) Optional jwtField) { + @Named(KEYCLOAK_CLIENT_SECRET) String clientSecret, + @Named(KEYCLOAK_CLIENT_CONFIG_URI) String configUrl, + @Named(KEYCLOAK_JWT_FIELD) Optional jwtField) { try { return new OpenIdConnectClient(configUrl, () -> Router.getFullUrl("Resecure.oauthCallback"), @@ -89,6 +95,11 @@ public String keycloakRealm() { return Play.configuration.getProperty(KEYCLOAK_REALM); } + /** + * Ritorna l'uri di configurazione del keycloack. + * + * @return l'uri di configurazione del keycloack + */ @Provides @Named(KEYCLOAK_CLIENT_CONFIG_URI) public String keycloakConfigUri() { @@ -103,6 +114,12 @@ public Optional keycloakJwtField() { return Optional.ofNullable(Play.configuration.getProperty(KEYCLOAK_JWT_FIELD)); } + /** + * Costruisce l'oggetto TokenData. + * + * @author Cristian + * + */ @Data public static class TokenData { @JsonProperty("access_token") @@ -123,6 +140,12 @@ public static class TokenData { private String tokenType; } + /** + * Api auth. + * + * @author Cristian + * + */ public interface AuthApi { @RequestLine("POST /protocol/openid-connect/token") @@ -133,12 +156,24 @@ TokenData generateToken(@Param("realm") String realm, @Param("client_secret") String clientSecret); } + /** + * Costruisce il configData. + * + * @author Cristian + * + */ @Data public static class ConfigData { private final OkHttpClient client; private final Slf4jLogger logger; } + /** + * ClientFactory. + * + * @author Cristian + * + */ @FunctionalInterface public interface ClientFactory { ApiClient builder(Function fallback); @@ -151,6 +186,15 @@ public ConfigData config() { new Slf4jLogger("keycloak")); } + /** + * Ritorna l'api di autenticazione. + * + * @param openIdConnectClient il client openidconnect + * @param config la configurazione + * @param encoder l'encoder + * @param decoder il decoder + * @return l'api auth. + */ @Singleton @Provides public AuthApi authApi(OpenIdConnectClient openIdConnectClient, @@ -162,6 +206,17 @@ public AuthApi authApi(OpenIdConnectClient openIdConnectClient, .target(AuthApi.class, openIdConnectClient.getConfig().getIssuer()); } + /** + * Il clientFactory. + * + * @param adminUri l'uri admin del keycloack + * @param realm il realm keycloack + * @param clientId l'id client del keycloack + * @param clientSecret il secret del keycloack + * @param config la configurazione + * @param authApi l'api di autenticazione + * @return il clientFactory. + */ @Singleton @Provides public ClientFactory clientFactory(@Named(KEYCLOAK_ADMIN_URI) String adminUri, @@ -171,7 +226,8 @@ public ClientFactory clientFactory(@Named(KEYCLOAK_ADMIN_URI) String adminUri, ConfigData config, AuthApi authApi) { - // Attenzione: occorre un feignbuilder separato per evitare interazioni con il request-interceptor + // Attenzione: occorre un feignbuilder separato per evitare interazioni con il + //request-interceptor return fallback -> { val api = new ApiClient().setBasePath(adminUri); val decorator = FeignDecorators.builder() @@ -198,8 +254,8 @@ public RealmsAdminApi keycloakAdminApi(ClientFactory factory) { return factory.builder(RealmsAdminApiFallback::new).buildClient(RealmsAdminApi.class); } -// @Override -// public void configure() { -// bind(UserManagerEvents.class).asEagerSingleton(); -// } + // @Override + // public void configure() { + // bind(UserManagerEvents.class).asEagerSingleton(); + // } } diff --git a/app/common/oauth2/OpenIdConnectClient.java b/app/common/oauth2/OpenIdConnectClient.java index 156090c90..bab0751b4 100644 --- a/app/common/oauth2/OpenIdConnectClient.java +++ b/app/common/oauth2/OpenIdConnectClient.java @@ -29,6 +29,12 @@ import play.libs.WS; import play.mvc.results.Redirect; +/** + * Classe openIdConnect. + * + * @author Cristian + * + */ @Slf4j @Getter public final class OpenIdConnectClient { @@ -54,9 +60,21 @@ public final class OpenIdConnectClient { // Il campo da considerare per il match dell'utente (default: email) private final String jwtField; - + /** + * Costruttore. + * + * @param configUrl url di configurazione + * @param callBackUrl url di callback + * @param clientId id del client + * @param secret il secret + * @param jwtField campo da analizzare + * @param jwksCacheSize dimensione della cache + * @param jwksCacheDuration durata della cache + * @throws IOException eccezione IO + */ public OpenIdConnectClient(String configUrl, Supplier callBackUrl, String clientId, - String secret, String jwtField, long jwksCacheSize, long jwksCacheDuration) throws IOException { + String secret, String jwtField, long jwksCacheSize, long jwksCacheDuration) + throws IOException { this.callBackUrl = callBackUrl; this.jwtField = Objects.requireNonNullElse(jwtField, DEFAULT_FIELD); @@ -69,8 +87,8 @@ public OpenIdConnectClient(String configUrl, Supplier callBackUrl, Strin .encodeToString((clientId + ":" + secret).getBytes(StandardCharsets.UTF_8)); instance = new OAuth2(config.getAuthorizationEndpoint(), config.getTokenEndpoint(), clientId, secret); - JwkProvider provider = new GuavaCachedJwkProvider(new UrlJwkProvider(new URL(config.getJwksUri())), - jwksCacheSize, jwksCacheDuration, TimeUnit.MINUTES); + JwkProvider provider = new GuavaCachedJwkProvider(new UrlJwkProvider( + new URL(config.getJwksUri())), jwksCacheSize, jwksCacheDuration, TimeUnit.MINUTES); jwksResolver = new JwksResolver(provider); log.info("Correctly configured new identity provider {}", config.getIssuer()); } @@ -92,6 +110,8 @@ public void retrieveVerificationCode(Consumer saveState) { } /** + * Ritorna la risposta OAuth2. + * * @param accessCode il codice prelevato dai parametri della richiesta * @param state lo stato prelevato dai parametri della richiesta * @param savedState lo stato prelevato dalla sessione @@ -123,6 +143,12 @@ public OAuth2.Response retrieveAccessToken(String accessCode, String state, Stri return null; } + /** + * Ritorna la risposta OAuth2 generata dal token. + * + * @param refreshToken il token aggiornato + * @return la risposta OAuth2 + */ public OAuth2.Response retrieveRefreshToken(String refreshToken) { Map params = new HashMap<>(); @@ -145,21 +171,36 @@ public OAuth2.Response retrieveRefreshToken(String refreshToken) { } } + /** + * Funzione di logout. + * + * @param idToken identificativo del token + * @param redirectUri uri di reindirizzamento + */ public void logout(String idToken, String redirectUri) { - // TODO: 06/05/20 c'è da ripulire la sessione, ma forse conviene farlo prima di chiamare questo metodo + // TODO: 06/05/20 c'è da ripulire la sessione, ma forse conviene farlo prima di chiamare + // questo metodo throw new Redirect(config.getEndSessionEndpoint(), Map.of(LOGOUT_IDTOKEN_PARAM, idToken, REDIRECT_URI, redirectUri)); } + /** + * Verifica la validità dell'accessToken. + * + * @param response l'oggetto json di risposta + * @return se è valido l'access token + */ public boolean validateAccessToken(JsonObject response) { -// https://openid.net/specs/openid-connect-core-1_0.html#ImplicitTokenValidation -// 3.2.2.9. Access Token Validation -// To validate an Access Token issued from the Authorization Endpoint with an ID Token, the Client SHOULD do the following: -// -// Hash the octets of the ASCII representation of the access_token with the hash algorithm specified in JWA [JWA] for the alg Header Parameter of the ID Token's JOSE Header. For instance, if the alg is RS256, the hash algorithm used is SHA-256. -// Take the left-most half of the hash and base64url encode it. -// The value of at_hash in the ID Token MUST match the value produced in the previous step. - // TODO: 27/04/20 prevedere altri tipi di codifica oltre lo SHA-256 + // https://openid.net/specs/openid-connect-core-1_0.html#ImplicitTokenValidation + // 3.2.2.9. Access Token Validation + // To validate an Access Token issued from the Authorization Endpoint with an ID Token, + // the Client SHOULD do the following: + // Hash the octets of the ASCII representation of the access_token with the hash algorithm + // specified in JWA [JWA] for the alg Header Parameter of the ID Token's JOSE Header. + // For instance, if the alg is RS256, the hash algorithm used is SHA-256. + // Take the left-most half of the hash and base64url encode it. + // The value of at_hash in the ID Token MUST match the value produced in the previous step. + //TODO: 27/04/20 prevedere altri tipi di codifica oltre lo SHA-256 String accessToken; try { accessToken = response.get("access_token").getAsString(); @@ -189,6 +230,12 @@ public boolean validateAccessToken(JsonObject response) { return true; } + /** + * Classe Resolver. + * + * @author Cristian + * + */ public static class JwksResolver implements SigningKeyResolver { private final JwkProvider keyStore; diff --git a/app/common/oauth2/ProviderConfig.java b/app/common/oauth2/ProviderConfig.java index 5f626c6a6..13b3dcd66 100644 --- a/app/common/oauth2/ProviderConfig.java +++ b/app/common/oauth2/ProviderConfig.java @@ -5,6 +5,12 @@ import lombok.Getter; import lombok.Setter; +/** + * Classe di configurazione del provider. + * + * @author Cristian + * + */ @JsonIgnoreProperties(ignoreUnknown = true) @Getter @Setter diff --git a/app/common/oauth2/RealmsAdminApiFallback.java b/app/common/oauth2/RealmsAdminApiFallback.java index 9d5762ca7..43a900181 100644 --- a/app/common/oauth2/RealmsAdminApiFallback.java +++ b/app/common/oauth2/RealmsAdminApiFallback.java @@ -7,6 +7,12 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +/** + * Costruttore che implementa RealmsAdminApi. + * + * @author Cristian + * + */ @RequiredArgsConstructor @Slf4j public class RealmsAdminApiFallback implements RealmsAdminApi { diff --git a/app/common/oauth2/UserManager.java b/app/common/oauth2/UserManager.java index acc9b2ccf..7f76d5494 100644 --- a/app/common/oauth2/UserManager.java +++ b/app/common/oauth2/UserManager.java @@ -12,10 +12,16 @@ import javax.inject.Named; import javax.inject.Singleton; import lombok.NonNull; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import models.User; +/** + * Classe UserManager. + * + * @author Cristian + * + */ @Singleton @Slf4j public class UserManager { @@ -31,8 +37,9 @@ public UserManager(@NonNull UsersApi usersApi, } /** + * Ritorna l'utente se esiste. * - * @param person l'utente da cercare (via keycloak id) + * @param user l'utente da cercare (via keycloak id) * @return l'id dello user se c'è */ public Optional find(User user) { @@ -44,6 +51,12 @@ Map byUsername(User user) { .stream().findFirst().orElseThrow(); } + /** + * Aggiorna la password dell'utente. + * + * @param user l'utente di cui aggiornare la password + * @param password la password da aggiornare + */ public void updatePassword(User user, String password) { log.info("update keycloak credentials with legacy password for {}", user); val data = new CredentialRepresentation(); @@ -59,7 +72,9 @@ public Integer usersCount() { } /** - * @param date + * Ritorna la localdatetime convertita. + * + * @param date l'instant da convertire * @return la localdatetime convertita */ public static LocalDateTime toLocalDateTime(Instant date) { diff --git a/app/common/oauth2/UsersApiFallback.java b/app/common/oauth2/UsersApiFallback.java index c32f07fbd..e21259912 100644 --- a/app/common/oauth2/UsersApiFallback.java +++ b/app/common/oauth2/UsersApiFallback.java @@ -10,6 +10,12 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +/** + * Classe fallback implementa usersApi. + * + * @author Cristian + * + */ @Slf4j @RequiredArgsConstructor public class UsersApiFallback implements UsersApi { @@ -79,7 +85,8 @@ public List> realmUsersIdConfiguredUserStorageCredentialType } @Override - public ApiResponse>> realmUsersIdConfiguredUserStorageCredentialTypesGetWithHttpInfo( + public ApiResponse>> + realmUsersIdConfiguredUserStorageCredentialTypesGetWithHttpInfo( String arg0, String arg1) { // TODO Auto-generated method stub return null; @@ -132,7 +139,8 @@ public void realmUsersIdCredentialsCredentialIdMoveAfterNewPreviousCredentialIdP } @Override - public ApiResponse realmUsersIdCredentialsCredentialIdMoveAfterNewPreviousCredentialIdPostWithHttpInfo( + public ApiResponse + realmUsersIdCredentialsCredentialIdMoveAfterNewPreviousCredentialIdPostWithHttpInfo( String arg0, String arg1, String arg2, String arg3) { // TODO Auto-generated method stub return null; diff --git a/app/common/security/SecurityModule.java b/app/common/security/SecurityModule.java index 6d38905bf..2366a8d8d 100755 --- a/app/common/security/SecurityModule.java +++ b/app/common/security/SecurityModule.java @@ -40,6 +40,12 @@ @AutoRegister public class SecurityModule implements Module { + /** + * Interfaccia di security login. + * + * @author Cristian + * + */ @FunctionalInterface public interface SecurityLogin { boolean isLegacy(); @@ -78,7 +84,8 @@ public String currentIpAddress() { : NO_REQUEST_ADDRESS; } - @Provides @Named(SECURITY_LEGACY) + @Provides + @Named(SECURITY_LEGACY) public Boolean isSecurityLegacy() { return LEGACY.equalsIgnoreCase(Play.configuration.getProperty(SECURITY_LOGIN, LEGACY)); } diff --git a/app/controllers/AbsenceRequests.java b/app/controllers/AbsenceRequests.java index a0a9f3b4c..4f9745229 100644 --- a/app/controllers/AbsenceRequests.java +++ b/app/controllers/AbsenceRequests.java @@ -407,12 +407,13 @@ public static void edit(final AbsenceRequest absenceRequest, boolean retroactive boolean insideContracts = !absenceRequest.person.getContracts().stream() .filter(c -> - c.getRange().contains(absenceRequest.startAtAsDate()) && - c.getRange().contains(absenceRequest.endToAsDate())) + c.getRange().contains(absenceRequest.startAtAsDate()) + && c.getRange().contains(absenceRequest.endToAsDate())) .collect(Collectors.toList()).isEmpty(); if (!insideContracts) { - val message = "Non è possibile fare una richiesta in una data non coperta da nessun contratto del dipendente"; + val message = "Non è possibile fare una richiesta in una data non " + + "coperta da nessun contratto del dipendente"; Validation.addError("absenceRequest.startAt", message); Validation.addError("absenceRequest.endTo", message); response.status = 400; diff --git a/app/controllers/Administration.java b/app/controllers/Administration.java index e94015ab5..752821079 100755 --- a/app/controllers/Administration.java +++ b/app/controllers/Administration.java @@ -168,9 +168,8 @@ public class Administration extends Controller { static OfficeDao officeDao; /** - * metodo che renderizza la pagina di utilities senza parametri passati + * metodo che renderizza la pagina di utilities senza parametri passati. */ - public static void utilities() { log.debug("Chiamata utilities senza parametri"); final List personList = personDao.list( @@ -234,8 +233,8 @@ public static void fixPersonSituation(Person person, Office office, if (Validation.hasErrors()) { flash.error("Correggere gli errori evidenziati"); - log.debug("Errori di validazione in fixPersonSituation, person={}, office={}, year={}, month={}", - person, office, year, month); + log.debug("Errori di validazione in fixPersonSituation, person={}, " + + "office={}, year={}, month={}", person, office, year, month); Validation.keep(); utilities(person, office, year, month); } diff --git a/app/controllers/CheckGreenPasses.java b/app/controllers/CheckGreenPasses.java index 1fbd0a0b8..6055580ae 100644 --- a/app/controllers/CheckGreenPasses.java +++ b/app/controllers/CheckGreenPasses.java @@ -33,6 +33,7 @@ /** * Controller green pass. + * * @author dario * */ @@ -51,7 +52,7 @@ public class CheckGreenPasses extends Controller { /** * Ritorna la lista dei sorteggiati per il check del green pass. - * + * * @param year l'anno di riferimento * @param month il mese di riferimento * @param day il giorno di riferimento @@ -75,7 +76,7 @@ public static void dailySituation(final Integer year, final Integer month, /** * Genera la form di inserimento di una nuova unità di personale da verificare. - * + * * @param officeId l'identificativo della sede * @param date la data */ @@ -93,7 +94,7 @@ public static void addPerson(Long officeId, LocalDate date) { /** * Salva la nuova persona di cui controllare il green pass. - * + * * @param person la persona da controllare */ public static void save(Person person) { @@ -112,7 +113,7 @@ public static void save(Person person) { /** * Elimina il check di green pass dell'identificativo passato. - * + * * @param checkGreenPassId l'identificativo di green pass da eliminare */ public static void deletePerson(long checkGreenPassId) { @@ -129,7 +130,7 @@ public static void deletePerson(long checkGreenPassId) { /** * Aggiorna lo stato del checkGreenPass. - * + * * @param checkGreenPassId l'identificativo del checkGreenPass da aggiornare */ public static void checkPerson(long checkGreenPassId) { diff --git a/app/controllers/Competences.java b/app/controllers/Competences.java index 597aee7bf..07ae806e7 100755 --- a/app/controllers/Competences.java +++ b/app/controllers/Competences.java @@ -701,7 +701,7 @@ public static void getCompetenceGroupInYearMonth(int year, int month, Long offic FileInputStream inputStream = competenceManager .getCompetenceGroupInYearMonth(year, month, personList, group); renderBinary(inputStream, "competenze_per_gruppo_" + group.getLabel() - + DateUtility.fromIntToStringMonth(month) + year + ".csv"); + + DateUtility.fromIntToStringMonth(month) + year + ".csv"); } /** diff --git a/app/controllers/Contracts.java b/app/controllers/Contracts.java index 9858b0ff2..3de91b1e6 100644 --- a/app/controllers/Contracts.java +++ b/app/controllers/Contracts.java @@ -41,8 +41,8 @@ import it.cnr.iit.epas.DateUtility; import java.util.List; import javax.inject.Inject; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import manager.ContractManager; import manager.PeriodManager; import manager.attestati.service.ICertificationService; @@ -631,7 +631,7 @@ public static void updatePersonalWorkingTime(Long id, PersonalWorkingTime pwt) { /** * Salva il nuovo periodo di orario di lavoro personalizzato. - * + * * @param pwt l'orario di lavoro personalizzato * @param confirmed conferma se true */ @@ -708,7 +708,7 @@ public static void savePersonalWorkingTime(PersonalWorkingTime pwt, boolean conf /** * Cancella un orario di lavoro personalizzato. - * + * * @param id identificativo dell'orario da cancellare * @param confirmed conferma se true */ diff --git a/app/controllers/Groups.java b/app/controllers/Groups.java index ff09f79be..7626fd51d 100644 --- a/app/controllers/Groups.java +++ b/app/controllers/Groups.java @@ -86,11 +86,12 @@ public static void createGroup( Set people) { boolean hasErrors = Validation.hasErrors(); - if (!Strings.isNullOrEmpty(group.externalId) && - groupDao.byOfficeAndExternalId(office, group.externalId).isPresent()) { + if (!Strings.isNullOrEmpty(group.externalId) + && groupDao.byOfficeAndExternalId(office, group.externalId).isPresent()) { hasErrors = true; Validation.addError("group.externalId", "deve essere univoco"); - }; + } + ; if (hasErrors) { response.status = 400; diff --git a/app/controllers/InformationRequests.java b/app/controllers/InformationRequests.java index 7c3fd4850..c7ca5c564 100644 --- a/app/controllers/InformationRequests.java +++ b/app/controllers/InformationRequests.java @@ -123,7 +123,7 @@ public static void serviceExitToApprove() { /** * Ritorna la lista delle richieste del tipo passato come parametro. - * + * * @param type il tipo di flusso informativo da richiedere */ public static void list(InformationType type) { @@ -177,7 +177,7 @@ public static void list(InformationType type) { /** * Genera la pagina con tutte le richieste di flusso informativo del tipo passato * come parametro. - * + * * @param type la tipologia di flusso informativo. */ public static void listToApprove(InformationType type) { @@ -231,7 +231,7 @@ public static void listToApprove(InformationType type) { /** * Crea la pagina di inserimento di una nuova richiesta di flusso informativo. - * + * * @param personId l'identificativo della persona * @param type la tipologia di flusso informativo da generare */ @@ -289,7 +289,7 @@ public static void editIllnessRequest(IllnessRequest illnessRequest, boolean ret /** * Persiste la richiesta di uscita di servizio e avvia il flusso approvativo. - * + * * @param serviceRequest la richiesta di uscita di servizio * @param begin l'orario di inizio * @param finish l'orario di fine @@ -355,7 +355,7 @@ public static void saveServiceRequest(ServiceRequest serviceRequest, /** * Persiste la richiesta e avvia il flusso informativo. - * + * * @param illnessRequest la richiesta informativa di malattia */ public static void saveIllnessRequest(IllnessRequest illnessRequest) { @@ -402,7 +402,7 @@ public static void saveIllnessRequest(IllnessRequest illnessRequest) { /** * Persiste la richiesta di telelavoro e avvia il flusso informativo. - * + * * @param personId l'identificativo della persona * @param year l'anno di riferimento * @param month il mese di riferimento @@ -606,6 +606,7 @@ public static void delete(long id) { /** * Ritorna il riepilogo del telelavoro dell'anno/mese della persona in oggetto. + * * @param personId l'identificativo della persona * @param year l'anno di riferimento * @param month il mese di riferimento @@ -639,7 +640,7 @@ public static void generateTeleworkReport(Long personId, int year, int month) /** * Ritorna la form di gestione approvazioni di telelavoro. - * + * * @param personId l'identificativo della persona di cui gestire le richieste/approvazioni * di telelavoro */ @@ -686,7 +687,7 @@ public static void handleTeleworkApproval(Long personId) { /** * Revoca la validazione ad un telelavoro. - * + * * @param validationId l'identificativo della validazione */ public static void revokeValidation(Long validationId) { diff --git a/app/controllers/JsonExport.java b/app/controllers/JsonExport.java index 970316c17..c7f05c5aa 100755 --- a/app/controllers/JsonExport.java +++ b/app/controllers/JsonExport.java @@ -33,7 +33,10 @@ import play.mvc.Controller; import play.mvc.With; - +/** + * Classe che permette l'esportazione di persone e sedi. + * + */ @Slf4j @With(Resecure.class) public class JsonExport extends Controller { diff --git a/app/controllers/MealTickets.java b/app/controllers/MealTickets.java index bfc50be20..fb8dacc91 100755 --- a/app/controllers/MealTickets.java +++ b/app/controllers/MealTickets.java @@ -522,7 +522,7 @@ public static void performDeletePersonCodeBlock(Long contractId, String codeBloc /** * Ritorna il blocchetto di cui aggiornare la tipologia di blocchetto. - * + * * @param contractId l'identificativo del contratto * @param codeBlock il codice del blocchetto * @param first il primo buono del blocchetto @@ -550,7 +550,7 @@ public static void convertPersonCodeBlock(Long contractId, String codeBlock, /** * Modifica la tipologia del blocchetto di buoni pasto da cartaceo a elettronico * o viceversa. - * + * * @param contractId l'identificativo del contratto * @param codeBlock il codice del blocchetto da modificare */ @@ -629,7 +629,7 @@ public static void returnedMealTickets(Long officeId, String code) { /** * Quale tipologia di blocchetto viene associata alla maturazione dei buoni pasto nel mese. - * + * * @param contractId l'identificativo del contratto * @param year l'anno di riferimento * @param month il mese di riferimento diff --git a/app/controllers/MonthRecaps.java b/app/controllers/MonthRecaps.java index 6f1c64e51..dec094cd8 100755 --- a/app/controllers/MonthRecaps.java +++ b/app/controllers/MonthRecaps.java @@ -237,7 +237,7 @@ public static void customRecap(final int year, final int month, Long officeId) { /** * Raccoglitore per il CustomRecap. - * + * * @author Alessandro Martelli */ @Data diff --git a/app/controllers/PrintTags.java b/app/controllers/PrintTags.java index dc9aa2f02..f26136ab2 100755 --- a/app/controllers/PrintTags.java +++ b/app/controllers/PrintTags.java @@ -47,6 +47,12 @@ import play.mvc.Controller; import play.mvc.With; +/** + * Controller per la gestione della stampa dei cartellini. + * + * @author dario + * + */ @Slf4j @With({Resecure.class}) public class PrintTags extends Controller { @@ -167,6 +173,7 @@ public static void listPersonForPrintTags(int year, int month, Long officeId) { /** * Genera la pagina di timbrature autocertificate per lavoro fuori sede * nell'anno/mese passati come parametro. + * * @param year l'anno di riferimento * @param month il mese di riferimento */ diff --git a/app/controllers/ReperibilityCalendar.java b/app/controllers/ReperibilityCalendar.java index 8a90f4787..2853cad99 100644 --- a/app/controllers/ReperibilityCalendar.java +++ b/app/controllers/ReperibilityCalendar.java @@ -66,7 +66,12 @@ import play.mvc.Router; import play.mvc.With; - +/** + * Controller per la generazione e gestione dei calendari di reperibilità. + * + * @author dario + * + */ @With(Resecure.class) @Slf4j public class ReperibilityCalendar extends Controller { diff --git a/app/controllers/RequestInit.java b/app/controllers/RequestInit.java index 422b342ed..4a222dc53 100644 --- a/app/controllers/RequestInit.java +++ b/app/controllers/RequestInit.java @@ -45,7 +45,12 @@ import play.mvc.With; - +/** + * Injector di dati nel menu e nei dropdown. + * + * @author dario + * + */ @With(TemplateDataInjector.class) public class RequestInit extends Controller { diff --git a/app/controllers/Resecure.java b/app/controllers/Resecure.java index 342b9a161..d8c1a72ff 100755 --- a/app/controllers/Resecure.java +++ b/app/controllers/Resecure.java @@ -29,8 +29,8 @@ import java.util.Map; import java.util.Optional; import javax.inject.Inject; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import models.User; import play.Play; import play.libs.OAuth2; @@ -74,7 +74,8 @@ public class Resecure extends Controller { @Inject static PersonDao personDao; - @Before(priority = 1, unless = {"login", "authenticate", "logout", "oauthLogin", "oauthLogout", "oauthCallback"}) + @Before(priority = 1, unless = {"login", "authenticate", "logout", "oauthLogin", + "oauthLogout", "oauthCallback"}) static void checkAccess() throws Throwable { //Se è annotato con NoCheck non si fanno controlli if (getActionAnnotation(NoCheck.class) != null @@ -141,16 +142,14 @@ public static boolean check(String action, Object instance) { //Empty } - /** - * This method returns the current connected username - * @return - */ + static String connected() { return session.get(USERNAME); } /** - * Indicate if a user is currently connected + * Indicate if a user is currently connected. + * * @return true if the user is connected */ static boolean isConnected() { @@ -161,13 +160,17 @@ static boolean isConnected() { @Util static void redirectToOriginalURL() { String url = flash.get(URL); - if(url == null) { + if (url == null) { url = Play.ctxPath + "/"; } redirect(url); } - //Utilizzata come callback dell'eventuale autenticazione OAuth + /** + * Utilizzata come callback dell'eventuale autenticazione OAuth. + * + * @throws Throwable eccezione. + */ public static void logout() throws Throwable { session.clear(); flash.success("secure.logout"); @@ -175,6 +178,12 @@ public static void logout() throws Throwable { } + + /** + * Logout oauth. + * + * @param data map with logout info + */ @Util public static void oauthLogout(Map data) { val idToken = data.get(ID_TOKEN); @@ -224,10 +233,18 @@ private static Optional setSessionUsernameIfAvailable() { } } + /** + * Callback function on oauth connection. + * + * @param code the code + * @param state the state + * @throws Throwable exception + */ @NoCheck public static void oauthCallback(String code, String state) throws Throwable { log.debug("Callback received code = {}, state = {}", code, state); - OAuth2.Response oauthResponse = openIdConnectClient.retrieveAccessToken(code, state, session.get(STATE)); + OAuth2.Response oauthResponse = openIdConnectClient + .retrieveAccessToken(code, state, session.get(STATE)); if (oauthResponse == null) { error("Could not retrieve jwt"); } else { @@ -250,8 +267,10 @@ public static Optional getCurrentUser() { } /** + * Verifica se l'autenticazione oauth è abilitata. + * * @return true se l'autenticazione oauth è abilitata in configurazione, - * false altrimenti. + * false altrimenti. */ public static boolean oauthLoginEnabled() { return "true".equalsIgnoreCase( diff --git a/app/controllers/Security.java b/app/controllers/Security.java index 4e9075223..f7af44856 100755 --- a/app/controllers/Security.java +++ b/app/controllers/Security.java @@ -27,14 +27,20 @@ import java.util.HashMap; import java.util.List; import javax.inject.Inject; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import manager.OfficeManager; import models.User; import play.mvc.Http; import play.mvc.Util; import play.utils.Java; +/** + * Classe di gestione della security. + * + * @author dario + * + */ @Slf4j public class Security extends Secure.Security { @@ -143,7 +149,7 @@ public static void logout() { flash.success("secure.logout"); Resecure.oauthLogout(sessionCopy); } else { - //Caso autenticazione locale o shibboleth + //Caso autenticazione locale o shibboleth try { invoke("onDisconnect"); session.clear(); diff --git a/app/controllers/SecurityTokens.java b/app/controllers/SecurityTokens.java index caa94adb2..e44e040c0 100644 --- a/app/controllers/SecurityTokens.java +++ b/app/controllers/SecurityTokens.java @@ -51,7 +51,8 @@ private static Key key() { return key; } else { val decodedKey = Base64.getDecoder().decode(encodedKey); - return new SecretKeySpec(decodedKey, 0, decodedKey.length, SignatureAlgorithm.HS512.getJcaName()); + return new SecretKeySpec(decodedKey, 0, decodedKey.length, + SignatureAlgorithm.HS512.getJcaName()); } } @@ -67,6 +68,11 @@ public static void token() { renderText(token); } + /** + * Check del token. + * + * @param token il token da verificare + */ @NoCheck public static void check(String token) { try { @@ -78,6 +84,12 @@ public static void check(String token) { } } + /** + * Classe di controllo della validità dell'username. + * + * @author dario + * + */ public static class InvalidUsername extends Exception { private static final long serialVersionUID = 681032973379857729L; @@ -86,6 +98,12 @@ public static class InvalidUsername extends Exception { } } + /** + * Ritorna e valida l'username. + * + * @return l'username se valido. + * @throws InvalidUsername eccezione di username non valido + */ @Util public static java.util.Optional retrieveAndValidateJwtUsername() throws InvalidUsername { Header authorization = Http.Request.current.get().headers.get(AUTHORIZATION); @@ -131,6 +149,11 @@ public static String cacheAccessTokenKey() { return Session.current().getId() + CACHE_ACCESS_TOKEN_POSTFIX; } + /** + * Setta la sessione jwt. + * + * @param oauthResponse la risposta oauth + */ @Util public static void setJwtSession(OAuth2.Response oauthResponse) { //XXX l'accesso token viene impostato in Cache e non in sessione perché la sessione @@ -143,7 +166,8 @@ public static void setJwtSession(OAuth2.Response oauthResponse) { String refreshToken = body.get(REFRESH_TOKEN).getAsString(); String idToken = body.get(ID_TOKEN).getAsString(); Session.current().put(Resecure.REFRESH_TOKEN, refreshToken); - log.trace("put REFRESH_TOKEN in sessione. Length = {}, value = {}", refreshToken.length(), refreshToken); + log.trace("put REFRESH_TOKEN in sessione. Length = {}, value = {}", + refreshToken.length(), refreshToken); Session.current().put(Resecure.ID_TOKEN, idToken); log.trace("put ID_TOKEN in sessione. Length = {}, value = {}", idToken.length(), idToken); } @@ -166,7 +190,8 @@ private static String extractSubjectFromJwt(String jwt) { if (issuer.equals(Router.getBaseUrl())) { jwtBody = Jwts.parserBuilder().setSigningKey(key()).build().parse(jwt).getBody(); } else { - jwtBody = Jwts.parserBuilder().setSigningKeyResolver(openIdConnectClient.getJwksResolver()).build() + jwtBody = Jwts.parserBuilder() + .setSigningKeyResolver(openIdConnectClient.getJwksResolver()).build() .parse(jwt).getBody(); } return ((Claims) jwtBody).get(openIdConnectClient.getJwtField(), String.class); diff --git a/app/controllers/SwitchTemplate.java b/app/controllers/SwitchTemplate.java index d2fe1c2fb..a4d20c1fd 100755 --- a/app/controllers/SwitchTemplate.java +++ b/app/controllers/SwitchTemplate.java @@ -25,6 +25,12 @@ import play.mvc.Router; import play.mvc.With; +/** + * Classe che permette lo switch dei vari menu (persone, sedi, giorni...) + * + * @author dario + * + */ @With(Resecure.class) public class SwitchTemplate extends Controller { diff --git a/app/controllers/TeleworkStampings.java b/app/controllers/TeleworkStampings.java index dc2b758bb..76ab870a3 100644 --- a/app/controllers/TeleworkStampings.java +++ b/app/controllers/TeleworkStampings.java @@ -37,8 +37,8 @@ import java.util.List; import java.util.concurrent.ExecutionException; import javax.inject.Inject; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import manager.ConsistencyManager; import manager.PersonDayManager; import manager.StampingManager; @@ -53,8 +53,8 @@ import models.PersonDay; import models.Stamping; import models.Stamping.WayType; -import models.absences.definitions.DefaultGroup; import models.TeleworkValidation; +import models.absences.definitions.DefaultGroup; import models.dto.NewTeleworkDto; import models.dto.TeleworkDto; import models.dto.TeleworkPersonDayDto; @@ -71,6 +71,7 @@ /** * Controller per la gestione delle timbrature in telelavoro. + * * @author dario * */ @@ -180,7 +181,7 @@ public static void personTeleworkStampings(Long personId, Integer year, Integer Person person = personDao.getPersonById(personId); PersonLite p = null; if (person.personConfigurations.stream().noneMatch(pc -> - pc.epasParam.equals(EpasParam.TELEWORK_STAMPINGS) && pc.fieldValue.equals("true"))) { + pc.epasParam.equals(EpasParam.TELEWORK_STAMPINGS) && pc.fieldValue.equals("true"))) { @SuppressWarnings("unchecked") List persons = (List) renderArgs.get("navPersons"); if (persons.isEmpty()) { @@ -349,8 +350,8 @@ public static void save(Long personId, @Required LocalDate date, stamping.setPersonDayId(pd.getId()); int result = manager.save(stamping); if (result == Http.StatusCode.CREATED) { - if (person.isTopQualification() && - person.checkConf(EpasParam.ENABLE_TELEWORK_STAMPINGS_FOR_WORKTIME, "true")) { + if (person.isTopQualification() + && person.checkConf(EpasParam.ENABLE_TELEWORK_STAMPINGS_FOR_WORKTIME, "true")) { log.info("Inserisco la stessa timbratura anche nel cartellino di {}", person.fullName()); Stamping ordinaryStamping = stampingManager .generateStampingFromTelework(stamping, pd, time); @@ -360,8 +361,8 @@ public static void save(Long personId, @Required LocalDate date, //è abilitato all'inserimento di questo codice e se non già presente if (absenceService.groupsPermitted(person, false) .contains(absenceComponentDao - .groupAbsenceTypeByName(DefaultGroup.TELELAVORO_RICERCATORI_TECNOLOGI.name()).get()) && - absenceDao.absenceInPeriod(person, date, date, "103RT").isEmpty()) { + .groupAbsenceTypeByName(DefaultGroup.TELELAVORO_RICERCATORI_TECNOLOGI.name()).get()) + && absenceDao.absenceInPeriod(person, date, date, "103RT").isEmpty()) { manager.insertTeleworkAbsenceCode(person, date); } if (!Strings.isNullOrEmpty(ordinaryStampingResult)) { @@ -401,7 +402,7 @@ public static void editTeleworkStamping(long teleworkStampingId) { /** * Genera il report mensile di telelavoro. - * + * * @param year l'anno di riferimento * @param month il mese di riferimento * @throws NoSuchFieldException eccezione di mancanza di parametro diff --git a/app/controllers/WorkingTimes.java b/app/controllers/WorkingTimes.java index 6a87b88fc..747e166e8 100755 --- a/app/controllers/WorkingTimes.java +++ b/app/controllers/WorkingTimes.java @@ -636,6 +636,7 @@ public static void executeChangeWorkingTimeTypeToAll( /** * Genera la form per il cambio della capacità di riproporzionare la quantità * dei codici di assenza. + * * @param wttId identificativo dell'orario di lavoro * @param officeId identificativo della sede di lavoro */ @@ -652,6 +653,7 @@ public static void changeEnableAdjustment(Long wttId, Long officeId) { /** * Salva le modifiche effettuate sull'orario di lavoro. + * * @param wtt l'orario di lavoro * @param officeId l'identificativo della sede */ diff --git a/app/controllers/rest/v2/Certifications.java b/app/controllers/rest/v2/Certifications.java index bd8566eed..7975a3370 100644 --- a/app/controllers/rest/v2/Certifications.java +++ b/app/controllers/rest/v2/Certifications.java @@ -178,7 +178,7 @@ public static void getMonthSituationByOffice(String sedeId, int year, int month) Optional office = officeDao.byCodeId(sedeId); if (!office.isPresent()) { JsonResponse.notFound( - String.format("Ufficio con sedeId = %s non trovato", sedeId)); + String.format("Ufficio con sedeId = %s non trovato", sedeId)); } rules.checkIfPermitted(office.get()); Set offices = Sets.newHashSet(); @@ -329,11 +329,11 @@ private static List searchAbsences(Person person, int y timeToJustify = workingTimeTypeDay.get().workingTime; } if (abs.getJustifiedType().name.equals(JustifiedTypeName.complete_day_and_add_overtime)) { - timeToJustify = workingTimeTypeDay.get().workingTime - abs.personDay.getStampingsTime(); + timeToJustify = workingTimeTypeDay.get().workingTime - abs.personDay.getStampingsTime(); } } else { - log.warn("Il workingTimeTypeDay per il giorno {} non è presente ma è presente l'assenza {}", - abs.personDay.date, abs, person.getFullname()); + log.warn("Il workingTimeTypeDay per il giorno {} non è presente ma è " + + "presente l'assenza {}", abs.personDay.date, abs, person.getFullname()); } if (abs.getJustifiedType().name.equals(JustifiedTypeName.absence_type_minutes)) { diff --git a/app/controllers/rest/v2/Contracts.java b/app/controllers/rest/v2/Contracts.java index d1769974b..4af8329db 100644 --- a/app/controllers/rest/v2/Contracts.java +++ b/app/controllers/rest/v2/Contracts.java @@ -86,7 +86,7 @@ public static void byPerson(Long id, String email, String eppn, Long personPerse rules.checkIfPermitted(person.office); List contracts = Lists.newArrayList(); try { - contracts = + contracts = person.contracts.stream().map(c -> ContractShowTerseDto.build(c)) .collect(Collectors.toList()); } catch (IllegalStateException e) { diff --git a/app/controllers/rest/v3/AbsenceTypes.java b/app/controllers/rest/v3/AbsenceTypes.java index 0ad995a7d..e73b60aad 100644 --- a/app/controllers/rest/v3/AbsenceTypes.java +++ b/app/controllers/rest/v3/AbsenceTypes.java @@ -14,6 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + package controllers.rest.v3; import cnr.sync.dto.v3.AbsenceTypeShowDto; diff --git a/app/controllers/rest/v3/Badges.java b/app/controllers/rest/v3/Badges.java index bce5883e4..8973813ff 100644 --- a/app/controllers/rest/v3/Badges.java +++ b/app/controllers/rest/v3/Badges.java @@ -37,8 +37,8 @@ import java.util.List; import java.util.stream.Collectors; import javax.inject.Inject; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import models.Badge; import play.mvc.Controller; import play.mvc.Util; diff --git a/app/controllers/rest/v3/MealTickets.java b/app/controllers/rest/v3/MealTickets.java index 15a75d9d5..1462964b6 100644 --- a/app/controllers/rest/v3/MealTickets.java +++ b/app/controllers/rest/v3/MealTickets.java @@ -14,6 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + package controllers.rest.v3; import cnr.sync.dto.v3.BlockMealTicketCreateDto; @@ -44,8 +45,8 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; import javax.inject.Inject; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import manager.ConsistencyManager; import manager.services.mealtickets.BlockMealTicket; import manager.services.mealtickets.IMealTicketsService; @@ -71,384 +72,397 @@ @Slf4j public class MealTickets extends Controller { - @Inject - private static IWrapperFactory wrapperFactory; - @Inject - private static ContractDao contractDao; - @Inject - private static SecurityRules rules; - @Inject - private static IMealTicketsService mealTicketService; - @Inject - private static MealTicketDao mealTicketDao; - @Inject - private static PersonDao personDao; - @Inject - static ConsistencyManager consistencyManager; - @Inject - static GsonBuilder gsonBuilder; - - /** - * Metodo Rest che ritorna il Json con la lista blocchetti - * di buoni pasto consegnati ad un persona per un contratto - * specifico. - */ - public static void list(Long contractId) { - RestUtils.checkMethod(request, HttpMethod.GET); - val contract = contractDao.getContractById(contractId); - RestUtils.checkIfPresent(contract); - rules.checkIfPermitted(contract.person.office); - - // riepilogo contratto corrente - Optional currentRecap = mealTicketService.create(contract); - Preconditions.checkState(currentRecap.isPresent()); - MealTicketRecap recap = currentRecap.get(); - val blockMealTickets = recap.getBlockMealTicketReceivedDeliveryDesc(); - - renderJSON(gsonBuilder.create().toJson(blockMealTickets.stream().map( - bmt -> BlockMealTicketShowTerseDto.build(bmt)).collect(Collectors.toList()))); + @Inject + private static IWrapperFactory wrapperFactory; + @Inject + private static ContractDao contractDao; + @Inject + private static SecurityRules rules; + @Inject + private static IMealTicketsService mealTicketService; + @Inject + private static MealTicketDao mealTicketDao; + @Inject + private static PersonDao personDao; + @Inject + static ConsistencyManager consistencyManager; + @Inject + static GsonBuilder gsonBuilder; + + /** + * Metodo Rest che ritorna il Json con la lista blocchetti + * di buoni pasto consegnati ad un persona per un contratto + * specifico. + */ + public static void list(Long contractId) { + RestUtils.checkMethod(request, HttpMethod.GET); + val contract = contractDao.getContractById(contractId); + RestUtils.checkIfPresent(contract); + rules.checkIfPermitted(contract.person.office); + + // riepilogo contratto corrente + Optional currentRecap = mealTicketService.create(contract); + Preconditions.checkState(currentRecap.isPresent()); + MealTicketRecap recap = currentRecap.get(); + val blockMealTickets = recap.getBlockMealTicketReceivedDeliveryDesc(); + + renderJSON(gsonBuilder.create().toJson(blockMealTickets.stream().map( + bmt -> BlockMealTicketShowTerseDto.build(bmt)).collect(Collectors.toList()))); + } + + /** + * Restituisce il JSON con il blocchetto di buoni pasto + * dato un codice blocco consegnato ad una persona + * per un contratto specifico. + */ + public static void show(Long contractId, String codeBlock) { + RestUtils.checkMethod(request, HttpMethod.GET); + RestUtils.checkIfPresent(contractId); + RestUtils.checkIfPresent(codeBlock); + + val contract = contractDao.getContractById(contractId); + RestUtils.checkIfPresent(contract); + rules.checkIfPermitted(contract.person.office); + + if (codeBlock == null || codeBlock.isEmpty()) { + JsonResponse.notFound(); } - /** - * Restituisce il JSON con il blocchetto di buoni pasto - * dato un codice blocco consegnato ad una persona - * per un contratto specifico. - */ - public static void show(Long contractId, String codeBlock) { - RestUtils.checkMethod(request, HttpMethod.GET); - RestUtils.checkIfPresent(contractId); - RestUtils.checkIfPresent(codeBlock); + List mealTicketList = mealTicketDao + .getMealTicketsMatchCodeBlock(codeBlock, Optional.of(contract.person.office)); - val contract = contractDao.getContractById(contractId); - RestUtils.checkIfPresent(contract); - rules.checkIfPermitted(contract.person.office); + if (mealTicketList.size() <= 0) { + JsonResponse.notFound(); + } - if (codeBlock == null || codeBlock.isEmpty()) { - JsonResponse.notFound(); - } + List blocks = MealTicketStaticUtility + .getBlockMealTicketFromOrderedList(mealTicketList, Optional.absent()); - List mealTicketList = mealTicketDao.getMealTicketsMatchCodeBlock(codeBlock, Optional.of(contract.person.office)); + renderJSON(gsonBuilder.create().toJson(blocks.stream().map( + bmt -> BlockMealTicketShowTerseDto.build(bmt)).collect(Collectors.toList()))); + } - if (mealTicketList.size() <= 0) { - JsonResponse.notFound(); - } + /** + * Metodo Rest per permettere l'inserimento di un blocchetto di buoni pasto per una persona e + * per un contratto specifico. + */ + public static void create(String body) + throws JsonParseException, JsonMappingException, IOException { - List blocks = MealTicketStaticUtility - .getBlockMealTicketFromOrderedList(mealTicketList, Optional.absent()); + RestUtils.checkMethod(request, HttpMethod.POST); + log.debug("Create blockMealTickets -> request.body = {}", body); - renderJSON(gsonBuilder.create().toJson(blocks.stream().map( - bmt -> BlockMealTicketShowTerseDto.build(bmt)).collect(Collectors.toList()))); + // Malformed Json (400) + if (body == null) { + JsonResponse.badRequest(); } - /** - * Metodo Rest per permettere l'inserimento di un blocchetto di buoni pasto per una persona e - * per un contratto specifico. - */ - public static void create(String body) - throws JsonParseException, JsonMappingException, IOException { + val gson = gsonBuilder.create(); + val blockMealTicketCreateDto = gson.fromJson(body, BlockMealTicketCreateDto.class); - RestUtils.checkMethod(request, HttpMethod.POST); - log.debug("Create blockMealTickets -> request.body = {}", body); + val contractId = blockMealTicketCreateDto.getContractId(); + if (contractId == null) { + JsonResponse.badRequest("Il contractId è obbligatorio per " + + "l'inserimento del blocchetto dei buoni pasto "); + } - // Malformed Json (400) - if (body == null) { - JsonResponse.badRequest(); - } + val contract = contractDao.getContractById(contractId); + RestUtils.checkIfPresent(contract); - val gson = gsonBuilder.create(); - val blockMealTicketCreateDto = gson.fromJson(body, BlockMealTicketCreateDto.class); + _create(blockMealTicketCreateDto, contract); + } - val contractId = blockMealTicketCreateDto.getContractId(); - if (contractId == null) { - JsonResponse.badRequest("Il contractId è obbligatorio per l'inserimento del blocchetto dei buoni pasto "); - } - val contract = contractDao.getContractById(contractId); - RestUtils.checkIfPresent(contract); + /** + * Metodo Rest per permettere l'inserimento di un blocchetto di buoni pasto per una persona. + * La persona è individuate tramite una delle chiavi della persona passate nel payload + * + */ + public static void createByPerson(String body) + throws JsonParseException, JsonMappingException, IOException { - _create(blockMealTicketCreateDto, contract); + RestUtils.checkMethod(request, HttpMethod.POST); + log.debug("Create blockMealTickets byPerson -> request.body = {}", body); + + // Malformed Json (400) + if (body == null) { + JsonResponse.badRequest(); + } + + val gson = gsonBuilder.create(); + val blockMealTicketCreateDto = gson.fromJson(body, BlockMealTicketCreateDto.class); + + val person = Persons.getPersonFromRequest( + blockMealTicketCreateDto.getPersonId(), + blockMealTicketCreateDto.getEmail(), + blockMealTicketCreateDto.getEppn(), + blockMealTicketCreateDto.getPersonPerseoId(), + blockMealTicketCreateDto.getFiscalCode(), + blockMealTicketCreateDto.getNumber()); + + Optional contract = wrapperFactory.create(person).getCurrentContract(); + RestUtils.checkIfPresent(contract.orNull()); + + _create(blockMealTicketCreateDto, contract.get()); + } + + /** + * Creazione dei meal ticket associati alle informazioni passate. + * + * @param blockMealTicketCreateDto il dto contenente il blocchetto da creare + * @param contract i meal ticket vengono associati a questo contratto + */ + static void _create(BlockMealTicketCreateDto blockMealTicketCreateDto, + Contract contract) { + + RestUtils.checkIfPresent(contract); + val person = contract.person; + rules.checkIfPermitted(person.office); + + val validationResult = validation.valid(blockMealTicketCreateDto); + if (!validationResult.ok) { + JsonResponse.badRequest(validation.errorsMap().toString()); } + List matchingAlreadyExisting = + matchingAlreadyExisting(blockMealTicketCreateDto, person); + + if (!matchingAlreadyExisting.isEmpty()) { + JsonResponse.badRequest("Meal ticket(s) already exists: ".concat(Joiner.on(", ") + .join(matchingAlreadyExisting.stream() + .map(ml -> ml.code).collect(Collectors.toList())))); + } - /** - * Metodo Rest per permettere l'inserimento di un blocchetto di buoni pasto per una persona. - * La persona è individuate tramite una delle chiavi della persona passate nel payload - * - */ - public static void createByPerson(String body) - throws JsonParseException, JsonMappingException, IOException { - - RestUtils.checkMethod(request, HttpMethod.POST); - log.debug("Create blockMealTickets byPerson -> request.body = {}", body); - - // Malformed Json (400) - if (body == null) { - JsonResponse.badRequest(); - } - - val gson = gsonBuilder.create(); - val blockMealTicketCreateDto = gson.fromJson(body, BlockMealTicketCreateDto.class); - - val person = Persons.getPersonFromRequest( - blockMealTicketCreateDto.getPersonId(), - blockMealTicketCreateDto.getEmail(), - blockMealTicketCreateDto.getEppn(), - blockMealTicketCreateDto.getPersonPerseoId(), - blockMealTicketCreateDto.getFiscalCode(), - blockMealTicketCreateDto.getNumber()); - - Optional contract = wrapperFactory.create(person).getCurrentContract(); - RestUtils.checkIfPresent(contract.orNull()); - - _create(blockMealTicketCreateDto, contract.get()); + if (blockMealTicketCreateDto.getFirst() > blockMealTicketCreateDto.getLast()) { + JsonResponse.badRequest("Numeri di blocchetto non validi, first > last"); } - /** - * Creazione dei meal ticket associati alle informazioni passate. - * - * @param blockMealTicketCreateDto - * @param contract i meal ticket vengono associati a questo contratto - */ - static void _create(BlockMealTicketCreateDto blockMealTicketCreateDto, - Contract contract) { - - RestUtils.checkIfPresent(contract); - val person = contract.person; - rules.checkIfPermitted(person.office); - - val validationResult = validation.valid(blockMealTicketCreateDto); - if (!validationResult.ok) { - JsonResponse.badRequest(validation.errorsMap().toString()); - } + // riepilogo contratto corrente + Optional currentRecap = mealTicketService.create(contract); + if (!currentRecap.isPresent()) { + JsonResponse.notFound(); + } + val admin = extractAdmin(blockMealTicketCreateDto); + + val codeBlock = blockMealTicketCreateDto.getCodeBlock(); + val blockType = blockMealTicketCreateDto.getBlockType(); + val first = blockMealTicketCreateDto.getFirst(); + val last = blockMealTicketCreateDto.getLast(); + val expireDate = blockMealTicketCreateDto.getExpiredDate(); + val deliveryDate = blockMealTicketCreateDto.getDeliveryDate(); + + List ticketToAddOrdered = Lists.newArrayList(); + ticketToAddOrdered.addAll(mealTicketService.buildBlockMealTicket(codeBlock, blockType, + first, last, expireDate, person.office)); + + ticketToAddOrdered.forEach(ticket -> { + ticket.contract = contract; + ticket.date = deliveryDate; + ticket.admin = admin; + validation.valid(ticket); + }); + + if (Validation.hasErrors()) { + JsonResponse.badRequest(validation.errorsMap().toString()); + } - List matchingAlreadyExisting = matchingAlreadyExisting(blockMealTicketCreateDto, person); + Set contractUpdated = Sets.newHashSet(); - if (!matchingAlreadyExisting.isEmpty()) { - JsonResponse.badRequest("Meal ticket(s) already exists: ".concat( - Joiner.on(", ").join(matchingAlreadyExisting.stream().map(ml -> ml.code).collect(Collectors.toList())))); + //Persistenza + for (MealTicket mealTicket : ticketToAddOrdered) { + mealTicket.date = deliveryDate; + mealTicket.contract = contract; + mealTicket.admin = admin; + mealTicket.save(); + } + consistencyManager.updatePersonRecaps(person.id, deliveryDate); + log.info("Added new mealTickets {} via REST", contractUpdated.size()); + + JsonResponse.ok(); + } + + /** + * La lista dei buoni pasto che matchano buoni già esistenti. + * + * @param blockMealTicketCreateDto i buoni pasto da verificare se già presenti + * @param person la persona di cui controllare i buoni pasto + * + * @return la lista dei Meal Ticket già presenti che corrispondono a quelli + * indicati nel blockMealTicketCreateDto + */ + @Util + static List matchingAlreadyExisting( + BlockMealTicketCreateDto blockMealTicketCreateDto, Person person) { + val alreadyPresentMealTickets = + mealTicketDao.getMealTicketsMatchCodeBlock( + blockMealTicketCreateDto.getCodeBlock(), Optional.of(person.office)); + + List matchingAlreadyExisting = Lists.newArrayList(); + IntStream.range(blockMealTicketCreateDto.getFirst(), blockMealTicketCreateDto.getLast() + 1) + .forEachOrdered(n -> { + matchingAlreadyExisting.addAll(alreadyPresentMealTickets.stream() + .filter(ml -> ml.code.equals(String.format("%s%02d", + blockMealTicketCreateDto.getCodeBlock(), n))) + .collect(Collectors.toList())); + }); + return matchingAlreadyExisting; + } + + + /** + * Decide quale utente impostare come chi ha consegnato il buono. + * Se è passato il parametro adminId cerca l'utente con quel parametro, + * altrimenti cerca se l'utente in sessione ha una persona associata, allora utilizza + * quello, infine se non può determinare l'utente restituisce un 404. + * + * @param blockMealTicketCreateDto il dto per creare il blocchetto + * @return la Person che consegna il buono + */ + @Util + static Person extractAdmin(BlockMealTicketCreateDto blockMealTicketCreateDto) { + Long adminId = null; + if (blockMealTicketCreateDto.getAdminId() != null) { + val person = personDao.byId(blockMealTicketCreateDto.getAdminId()); + if (!person.isPresent()) { + JsonResponse.notFound(String.format("Admin con id %s non trovato", + blockMealTicketCreateDto.getAdminId())); + } else { + adminId = person.get().id; } + } + if (adminId != null && Security.getUser().get().person != null) { + adminId = Security.getUser().get().person.id; + } + if (adminId == null) { + JsonResponse.notFound("Admin non trovato per effettuare l'inserimento"); + } - val admin = extractAdmin(blockMealTicketCreateDto); + return personDao.byId(adminId).get(); + } - if (blockMealTicketCreateDto.getFirst() > blockMealTicketCreateDto.getLast()) { - JsonResponse.badRequest("Numeri di blocchetto non validi, first > last"); - } + /** + * Metodo Rest per effettuare l'eliminazione di un blocchetto di buoni pasto + * consegnati ad un persona per un contratto specifico. + * Questo metodo può essere chiamato solo via HTTP DELETE. + */ + public static void delete(Long contractId, String codeBlock, int first, int last) { + RestUtils.checkMethod(request, HttpMethod.DELETE); + val contract = contractDao.getContractById(contractId); + RestUtils.checkIfPresent(contract); + rules.checkIfPermitted(contract.person.office); - // riepilogo contratto corrente - Optional currentRecap = mealTicketService.create(contract); - if (!currentRecap.isPresent()) { - JsonResponse.notFound(); - } + List mealTicketList = mealTicketDao + .getMealTicketsInCodeBlock(codeBlock, Optional.fromNullable(contract)); - val codeBlock = blockMealTicketCreateDto.getCodeBlock(); - val blockType = blockMealTicketCreateDto.getBlockType(); - val first = blockMealTicketCreateDto.getFirst(); - val last = blockMealTicketCreateDto.getLast(); - val expireDate = blockMealTicketCreateDto.getExpiredDate(); - val deliveryDate = blockMealTicketCreateDto.getDeliveryDate(); - - List ticketToAddOrdered = Lists.newArrayList(); - ticketToAddOrdered.addAll(mealTicketService.buildBlockMealTicket(codeBlock, blockType, - first, last, expireDate, person.office)); - - ticketToAddOrdered.forEach(ticket -> { - ticket.contract = contract; - ticket.date = deliveryDate; - ticket.admin = admin; - validation.valid(ticket); - }); - - if (Validation.hasErrors()) { - JsonResponse.badRequest(validation.errorsMap().toString()); - } + Preconditions.checkState(mealTicketList.size() > 0); - Set contractUpdated = Sets.newHashSet(); + List mealTicketToRemove = MealTicketStaticUtility + .blockPortion(mealTicketList, contract, first, last); - //Persistenza - for (MealTicket mealTicket : ticketToAddOrdered) { - mealTicket.date = deliveryDate; - mealTicket.contract = contract; - mealTicket.admin = admin; - mealTicket.save(); + int deleted = 0; + LocalDate pastDate = LocalDate.now(); + + for (MealTicket mealTicket : mealTicketToRemove) { + if (mealTicket.date.isBefore(pastDate)) { + pastDate = mealTicket.date; } - consistencyManager.updatePersonRecaps(person.id, deliveryDate); - log.info("Added new mealTickets {} via REST", contractUpdated.size()); - JsonResponse.ok(); + mealTicket.delete(); + log.info("Deleted mealTicket {} via REST", mealTicket); + deleted++; } - /** - * @param blockMealTicketCreateDto i buoni pasto da verificare se già presenti - * @param person la persona di cui controllare i buoni pasto - * @return la lista dei Meal Ticket già presenti che corrispondono a quelli indicati nel blockMealTicketCreateDto - */ - @Util - static List matchingAlreadyExisting(BlockMealTicketCreateDto blockMealTicketCreateDto, Person person) { - val alreadyPresentMealTickets = - mealTicketDao.getMealTicketsMatchCodeBlock( - blockMealTicketCreateDto.getCodeBlock(), Optional.of(person.office)); - - List matchingAlreadyExisting = Lists.newArrayList(); - IntStream.range(blockMealTicketCreateDto.getFirst(), blockMealTicketCreateDto.getLast() + 1).forEachOrdered(n -> { - matchingAlreadyExisting.addAll(alreadyPresentMealTickets.stream() - .filter(ml -> ml.code.equals(String.format("%s%02d", blockMealTicketCreateDto.getCodeBlock(), n))) - .collect(Collectors.toList())); - }); - return matchingAlreadyExisting; + consistencyManager.updatePersonSituation(contract.person.id, pastDate); + log.info("Deleted {} mealTickets via REST", deleted); + + JsonResponse.ok(); + } + + /** + * Metodo Rest per effettuare la conversione della tipologia di blocchetto di buoni + * pasto da cartaceo a elettronico o viceversa. + * Questo metodo può essere chiamato solo via HTTP PUT. + */ + public static void convert(Long contractId, String codeBlock) { + RestUtils.checkMethod(request, HttpMethod.PUT); + val contract = contractDao.getContractById(contractId); + RestUtils.checkIfPresent(contract); + rules.checkIfPermitted(contract.person.office); + + if (codeBlock == null || codeBlock.isEmpty()) { + JsonResponse.notFound(); } - - /** - * Decide quale utente impostare come chi ha consegnato il buono. - * Se è passato il parametro adminId cerca l'utente con quel parametro, - * altrimenti cerca se l'utente in sessione ha una persona associata, allora utilizza - * quello, infine se non può determinare l'utente restituisce un 404. - * - * @param blockMealTicketCreateDto - * @return la Person che consegna il buono - */ - @Util - static Person extractAdmin(BlockMealTicketCreateDto blockMealTicketCreateDto) { - Long adminId = null; - if (blockMealTicketCreateDto.getAdminId() != null) { - val person = personDao.byId(blockMealTicketCreateDto.getAdminId()); - if (!person.isPresent()) { - JsonResponse.notFound(String.format("Admin con id %s non trovato", - blockMealTicketCreateDto.getAdminId())); - } else { - adminId = person.get().id; - } - } - if (adminId != null && Security.getUser().get().person != null) { - adminId = Security.getUser().get().person.id; - } - if (adminId == null) { - JsonResponse.notFound("Admin non trovato per effettuare l'inserimento"); - } - - return personDao.byId(adminId).get(); + List mealTicketList = mealTicketDao + .getMealTicketsMatchCodeBlock(codeBlock, Optional.of(contract.person.office)); + if (mealTicketList.size() <= 0) { + JsonResponse.notFound(); } - /** - * Metodo Rest per effettuare l'eliminazione di un blocchetto di buoni pasto - * consegnati ad un persona per un contratto specifico. - * Questo metodo può essere chiamato solo via HTTP DELETE. - */ - public static void delete(Long contractId, String codeBlock, int first, int last) { - RestUtils.checkMethod(request, HttpMethod.DELETE); - val contract = contractDao.getContractById(contractId); - RestUtils.checkIfPresent(contract); - rules.checkIfPermitted(contract.person.office); + int converted = 0; + for (MealTicket mealTicket : mealTicketList) { + if (mealTicket.blockType.equals(BlockType.papery)) { + mealTicket.blockType = BlockType.electronic; + } else { + mealTicket.blockType = BlockType.papery; + } + mealTicket.save(); + converted++; + } - List mealTicketList = mealTicketDao.getMealTicketsInCodeBlock(codeBlock, Optional.fromNullable(contract)); + log.info("Converted {} mealTickets via REST", converted); - Preconditions.checkState(mealTicketList.size() > 0); + JsonResponse.ok(); + } - List mealTicketToRemove = MealTicketStaticUtility - .blockPortion(mealTicketList, contract, first, last); - int deleted = 0; - LocalDate pastDate = LocalDate.now(); + /** + * Metodo Rest per effettuare la riconsegna del blocchetto di buoni pasto alla sede centrale. + * Questo metodo può essere chiamato solo via HTTP PUT. + */ + public static void returnBlock(Long contractId, String codeBlock, int first, int last) { + RestUtils.checkMethod(request, HttpMethod.PUT); + val contract = contractDao.getContractById(contractId); + RestUtils.checkIfPresent(contract); + rules.checkIfPermitted(contract.person.office); - for (MealTicket mealTicket : mealTicketToRemove) { - if (mealTicket.date.isBefore(pastDate)) { - pastDate = mealTicket.date; - } + if (codeBlock == null || codeBlock.isEmpty()) { + JsonResponse.notFound(); + } - mealTicket.delete(); - log.info("Deleted mealTicket {} via REST", mealTicket); - deleted++; - } + List mealTicketList = mealTicketDao + .getMealTicketsMatchCodeBlock(codeBlock, Optional.of(contract.person.office)); + if (mealTicketList.size() <= 0) { + JsonResponse.notFound(); + } - consistencyManager.updatePersonSituation(contract.person.id, pastDate); - log.info("Deleted {} mealTickets via REST", deleted); + int returned = 0; + List blockPortionToReturn = MealTicketStaticUtility + .blockPortion(mealTicketList, contract, first, last); - JsonResponse.ok(); + for (MealTicket mealTicket : blockPortionToReturn) { + mealTicket.returned = true; + returned++; } - /** - * Metodo Rest per effettuare la conversione della tipologia di blocchetto di buoni pasto da cartaceo a elettronico - * o viceversa. - * Questo metodo può essere chiamato solo via HTTP PUT. - */ - public static void convert(Long contractId, String codeBlock) { - RestUtils.checkMethod(request, HttpMethod.PUT); - val contract = contractDao.getContractById(contractId); - RestUtils.checkIfPresent(contract); - rules.checkIfPermitted(contract.person.office); - - if (codeBlock == null || codeBlock.isEmpty()) { - JsonResponse.notFound(); - } - - List mealTicketList = mealTicketDao.getMealTicketsMatchCodeBlock(codeBlock, Optional.of(contract.person.office)); - if (mealTicketList.size() <= 0) { - JsonResponse.notFound(); - } - - int converted = 0; - for (MealTicket mealTicket : mealTicketList) { - if (mealTicket.blockType.equals(BlockType.papery)) { - mealTicket.blockType = BlockType.electronic; - } else { - mealTicket.blockType = BlockType.papery; - } - mealTicket.save(); - converted++; - } - - log.info("Converted {} mealTickets via REST", converted); - - JsonResponse.ok(); + // Perform + LocalDate pastDate = LocalDate.now(); + for (MealTicket mealTicket : mealTicketList) { + if (mealTicket.date.isBefore(pastDate)) { + pastDate = mealTicket.date; + } + } + for (MealTicket mealTicket : blockPortionToReturn) { + if (mealTicket.date.isBefore(pastDate)) { + pastDate = mealTicket.date; + } + mealTicket.save(); } + consistencyManager.updatePersonSituation(contract.person.id, pastDate); + log.info("Returned {} mealTickets via REST", returned); - /** - * Metodo Rest per effettuare la riconsegna del blocchetto di buoni pasto alla sede centrale. - * Questo metodo può essere chiamato solo via HTTP PUT. - */ - public static void returnBlock(Long contractId, String codeBlock, int first, int last) { - RestUtils.checkMethod(request, HttpMethod.PUT); - val contract = contractDao.getContractById(contractId); - RestUtils.checkIfPresent(contract); - rules.checkIfPermitted(contract.person.office); - - if (codeBlock == null || codeBlock.isEmpty()) { - JsonResponse.notFound(); - } - - List mealTicketList = mealTicketDao.getMealTicketsMatchCodeBlock(codeBlock, Optional.of(contract.person.office)); - if (mealTicketList.size() <= 0) { - JsonResponse.notFound(); - } - - int returned = 0; - List blockPortionToReturn = MealTicketStaticUtility - .blockPortion(mealTicketList, contract, first, last); - - for (MealTicket mealTicket : blockPortionToReturn) { - mealTicket.returned = true; - returned++; - } - - // Perform - LocalDate pastDate = LocalDate.now(); - for (MealTicket mealTicket : mealTicketList) { - if (mealTicket.date.isBefore(pastDate)) { - pastDate = mealTicket.date; - } - } - for (MealTicket mealTicket : blockPortionToReturn) { - if (mealTicket.date.isBefore(pastDate)) { - pastDate = mealTicket.date; - } - mealTicket.save(); - } - consistencyManager.updatePersonSituation(contract.person.id, pastDate); - - log.info("Returned {} mealTickets via REST", returned); - - JsonResponse.ok(); - } + JsonResponse.ok(); + } } diff --git a/app/controllers/rest/v3/PersonDays.java b/app/controllers/rest/v3/PersonDays.java index 9524b7d6b..ba8850885 100755 --- a/app/controllers/rest/v3/PersonDays.java +++ b/app/controllers/rest/v3/PersonDays.java @@ -43,8 +43,8 @@ import java.util.stream.Collectors; import javax.inject.Inject; import lombok.extern.slf4j.Slf4j; -import manager.PersonManager; import lombok.val; +import manager.PersonManager; import models.Office; import models.Person; import models.PersonDay; diff --git a/app/controllers/rest/v3/Stampings.java b/app/controllers/rest/v3/Stampings.java index 6eebd74d6..2a004bd42 100644 --- a/app/controllers/rest/v3/Stampings.java +++ b/app/controllers/rest/v3/Stampings.java @@ -33,8 +33,8 @@ import java.io.IOException; import java.time.LocalDateTime; import javax.inject.Inject; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import manager.ConsistencyManager; import manager.StampingManager; import models.exports.StampingFromClient; diff --git a/app/dao/AbsenceRequestDao.java b/app/dao/AbsenceRequestDao.java index 47186ec98..377f49f69 100644 --- a/app/dao/AbsenceRequestDao.java +++ b/app/dao/AbsenceRequestDao.java @@ -372,7 +372,8 @@ private List totallyApprovedAsSuperVisor(List final QAbsenceRequest absenceRequest = QAbsenceRequest.absenceRequest; final QPerson person = QPerson.person; final QOffice office = QOffice.office; - List officeList = uros.stream().filter(uro -> uro.role.name.equals(Role.SEAT_SUPERVISOR)) + List officeList = uros.stream() + .filter(uro -> uro.role.name.equals(Role.SEAT_SUPERVISOR)) .map(u -> u.office).distinct() .collect(Collectors.toList()); BooleanBuilder conditions = new BooleanBuilder(); diff --git a/app/dao/AbsenceTypeDao.java b/app/dao/AbsenceTypeDao.java index f989cbc4d..2120bf0cb 100755 --- a/app/dao/AbsenceTypeDao.java +++ b/app/dao/AbsenceTypeDao.java @@ -17,12 +17,12 @@ package dao; -import static com.querydsl.core.group.GroupBy.groupBy; import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.inject.Inject; import com.google.inject.Provider; import com.querydsl.core.BooleanBuilder; +import static com.querydsl.core.group.GroupBy.groupBy; import com.querydsl.core.types.Projections; import com.querydsl.jpa.JPQLQuery; import com.querydsl.jpa.JPQLQueryFactory; @@ -36,6 +36,8 @@ import models.absences.query.QAbsenceType; import org.joda.time.LocalDate; + + /** * Dao per l'accesso alle informazioni degli AbsenceType. * @@ -59,7 +61,8 @@ public List list( BooleanBuilder condition = new BooleanBuilder(); JPQLQuery query = getQueryFactory().selectFrom(absenceType); if (validFrom.isPresent()) { - condition.and(absenceType.validFrom.before(validFrom.get()).or(absenceType.validFrom.isNull())); + condition.and(absenceType.validFrom.before(validFrom.get()) + .or(absenceType.validFrom.isNull())); } if (validTo.isPresent()) { condition.and(absenceType.validTo.after(validTo.get()).or(absenceType.validTo.isNull())); diff --git a/app/dao/BadgeDao.java b/app/dao/BadgeDao.java index 6baeb6f7f..8d810fd8f 100644 --- a/app/dao/BadgeDao.java +++ b/app/dao/BadgeDao.java @@ -84,6 +84,12 @@ public List byCodeAndPerson(String code, Person person) { .fetch(); } + /** + * La lista dei badge per ufficio. + * + * @param office la sede per cui ricercare i badge + * @return la lista dei badge appartenenti alla sede. + */ public List byOffice(Office office) { final QBadge badge = QBadge.badge; @@ -92,6 +98,12 @@ public List byOffice(Office office) { .fetch(); } + /** + * La lista dei badge per gruppo badge. + * + * @param badgeSystem il gruppo badge di cui ritornare i badge associati + * @return la lista di badge associata al gruppo badge. + */ public List byBadgeSystem(BadgeSystem badgeSystem) { final QBadge badge = QBadge.badge; diff --git a/app/dao/CheckGreenPassDao.java b/app/dao/CheckGreenPassDao.java index d75013bca..1c229e566 100644 --- a/app/dao/CheckGreenPassDao.java +++ b/app/dao/CheckGreenPassDao.java @@ -34,6 +34,7 @@ /** * Dao per le query sul green pass. + * * @author dario * */ @@ -47,7 +48,7 @@ public class CheckGreenPassDao extends DaoBase { /** * Ritorna la lista dei sorteggiati per la data passata come parametro. - * + * * @param date la data per cui cercare i check ai green pass * @return la lista dei sorteggiati per la data in oggetto. */ @@ -65,7 +66,7 @@ public List listByDate(LocalDate date, Office office) { /** * Ritorna, se esiste, il checkGreenPass identificato dall'id passato come parametro. - * + * * @param checkGreenPassId l'identificativo del checkGreenPass * @return l'optional contenenente o meno l'oggetto identificato dall'id passato come parametro. */ @@ -78,7 +79,7 @@ public CheckGreenPass getById(long checkGreenPassId) { /** * Verifica se esiste già una entry in tabella per la persona e la data passati. - * + * * @param person la persona da controllare * @param date la data in cui controllare * @return se esiste il check green pass per i parametri passati. @@ -93,7 +94,7 @@ public Optional byPersonAndDate(Person person, LocalDate date) { /** * Conta le volte in cui una persona è stata controllata. - * + * * @param person la persona di cui controllare il numero di volte in cui è stata * controllata * @return quante volte la persona passata come parametro è stata controllata. diff --git a/app/dao/ContractMonthRecapDao.java b/app/dao/ContractMonthRecapDao.java index 20dd9682f..955bdf2b9 100755 --- a/app/dao/ContractMonthRecapDao.java +++ b/app/dao/ContractMonthRecapDao.java @@ -81,6 +81,7 @@ public List getPersonMealticket( /** * Ritorna il riepilogo del contratto contract nell'anno/mese yearMonth. + * * @param contract il contratto da riepilogare * @param yearMonth l'anno mese di riferimento * @return Il riepilogo del contratto nell'anno mese diff --git a/app/dao/InformationRequestDao.java b/app/dao/InformationRequestDao.java index aa92813ba..da01ecec2 100644 --- a/app/dao/InformationRequestDao.java +++ b/app/dao/InformationRequestDao.java @@ -48,6 +48,7 @@ /** * Dao per i flussi informativi. + * * @author dario * */ @@ -61,6 +62,7 @@ public class InformationRequestDao extends DaoBase { /** * Metodo che ritorna la lista delle richieste di flusso corrispondenti ai * parametri passati. + * * @param uroList la lista dei ruoli sulle sedi * @param fromDate da quale data cercare le richieste (opzionale) * @param toDate a quale data cercare le richieste (opzionale) @@ -104,6 +106,7 @@ public List toApproveResults(List uroList /** * Lista delle richiesta di assenza per persona e data. + * * @param person La persona della quale recuperare le richieste di assenza * @param fromDate La data iniziale dell'intervallo temporale da considerare * @param toDate La data finale dell'intervallo temporale da considerare (opzionale) @@ -136,6 +139,7 @@ public List teleworksByPersonAndDate(Person person, /** * Lista delle richiesta di assenza per persona e data. + * * @param person La persona della quale recuperare le richieste di assenza * @param fromDate La data iniziale dell'intervallo temporale da considerare * @param toDate La data finale dell'intervallo temporale da considerare (opzionale) @@ -168,6 +172,7 @@ public List illnessByPersonAndDate(Person person, /** * Lista delle richiesta di assenza per persona e data. + * * @param person La persona della quale recuperare le richieste di assenza * @param fromDate La data iniziale dell'intervallo temporale da considerare * @param toDate La data finale dell'intervallo temporale da considerare (opzionale) @@ -200,7 +205,7 @@ public List servicesByPersonAndDate(Person person, /** * Ritorna la richiesta informativa con id passato come parametro. - * + * * @param id l'identificativo della richiesta * @return La richiesta con l'id passato come parametro. */ @@ -213,7 +218,7 @@ public InformationRequest getById(Long id) { /** * Ritorna la richiesta di uscita di servizio con l'id passato come parametro. - * + * * @param id l'idendificativo della richiesta di uscita di servizio * @return l'uscita di servizio, se esiste, corrispondente all'id passato. */ @@ -228,7 +233,7 @@ public Optional getServiceById(Long id) { /** * Ritorna la richiesta di info per malattia con id passato come parametro. - * + * * @param id l'identificativo della richiesta di informazione di malattia * @return la richiesta di info per malattia con id passato come parametro. */ @@ -243,7 +248,7 @@ public Optional getIllnessById(Long id) { /** * Cerca e ritorna la richiesta di telelavoro (se esiste) con id uguale a quello passato. - * + * * @param id l'identificativo della richiesta di telelavoro da cercare * @return la richiesta di telelavoro (se esiste) con id uguale a quello passato. */ @@ -300,7 +305,7 @@ public List teleworksByIds(List ids) { /** * La lista di tutte le richieste di telelavoro effettuate dalla persona passata come parametro. - * + * * @param person la persona di cui ricercare le richieste di telelavoro * @return la lista di tutte le richieste di telelavoro effettuate dalla persona passata * come parametro. @@ -314,6 +319,7 @@ public List personTeleworkList(Person person) { /** * Ritorna la lista delle informationRequest da approvare come responsabile di sede. + * * @param uros la lista degli userRoleOffice * @param informationType il tipo di richiesta * @param signer il firmatario della richiesta diff --git a/app/dao/PersonDayDao.java b/app/dao/PersonDayDao.java index a2f532069..813c61999 100755 --- a/app/dao/PersonDayDao.java +++ b/app/dao/PersonDayDao.java @@ -285,7 +285,7 @@ public PersonDay getOldestPersonDay() { /** * Ritorna il personday più futuro della persona. - * + * * @param person la persona di cui si ricerca l'ultimo personday * @return l'ultimo personday della persona sul db. */ diff --git a/app/dao/TeleworkValidationDao.java b/app/dao/TeleworkValidationDao.java index 00a3e9940..f0bab1a7c 100644 --- a/app/dao/TeleworkValidationDao.java +++ b/app/dao/TeleworkValidationDao.java @@ -14,6 +14,7 @@ /** * Dao per i controlli sul telelavoro. + * * @author dario * */ @@ -27,7 +28,7 @@ public class TeleworkValidationDao extends DaoBase { /** * Ritorna la lista delle richieste di telelavoro approvate. - * + * * @param person la persona di cui cercare le richieste * @param year l'anno di riferimento * @param month il mese di riferimento @@ -46,7 +47,7 @@ public Optional byPersonYearAndMonth(Person person, int year /** * Ritorna le validazioni precedenti all'anno/mese passato come parametro. - * + * * @param person la persona di cui si cercano le validazioni * @param year l'anno di riferimento * @param month il mese di riferimento @@ -65,7 +66,7 @@ public List previousValidations(Person person, int year, int /** * Ritorna la lista di tutte le validazioni di telelavoro relative alla persona passata. - * + * * @param person la persona di cui si richiedono le validazioni passate * @return la lista di tutte le validazioni di telelavoro relative alla persona passata. */ @@ -80,7 +81,7 @@ public List allPersonValidations(Person person) { /** * Ritorna la validazione, se esiste, con id passato come parametro. - * + * * @param id l'identificativo della validazione da ricercare * @return la validazione, se esiste, con id passato come parametro. */ diff --git a/app/dao/UserDao.java b/app/dao/UserDao.java index 30f397a40..8872ae038 100755 --- a/app/dao/UserDao.java +++ b/app/dao/UserDao.java @@ -47,6 +47,7 @@ /** * DAO per gli User. + * * @author Cristian Lucchesi */ public class UserDao extends DaoBase { diff --git a/app/dao/history/ContractHistoryDao.java b/app/dao/history/ContractHistoryDao.java index 3441ad190..64e0943d3 100644 --- a/app/dao/history/ContractHistoryDao.java +++ b/app/dao/history/ContractHistoryDao.java @@ -79,7 +79,7 @@ public List> contracts(long contractId) { /** * Metodo di storico sull'ultima modifica al contratto. - * + * * @param contractId l'id del contratto di cui recuperare lo storico * @return la lista contenente un solo elemento relativo alle modifiche al contratto * in oggetto. diff --git a/app/dao/wrapper/IWrapperPersonDay.java b/app/dao/wrapper/IWrapperPersonDay.java index 6089788bd..a2a83777d 100755 --- a/app/dao/wrapper/IWrapperPersonDay.java +++ b/app/dao/wrapper/IWrapperPersonDay.java @@ -50,7 +50,7 @@ public interface IWrapperPersonDay extends IWrapperModel { /** * L'orario giornaliero personalizzato se esiste. - * + * * @return Optional.absent() in caso di mancanza di contratto o di tipo orario personale. */ Optional getPersonalWorkingTime(); diff --git a/app/helpers/Paginator.java b/app/helpers/Paginator.java index 6c395df53..2284d37b0 100755 --- a/app/helpers/Paginator.java +++ b/app/helpers/Paginator.java @@ -115,6 +115,12 @@ public String getSimpleUrl() { return Router.reverse(action).url; } + /** + * Aggiorna i params col numero di pagina attuale. + * + * @param page il numero di pagina + * @return l'oggetto params aggiunto delle info sul numero di pagina. + */ public Object dataFor(int page) { Preconditions.checkArgument(page >= 0); params.put("page", Integer.toString(page)); diff --git a/app/helpers/PersonTags.java b/app/helpers/PersonTags.java index 1db9b4173..535dfef9c 100755 --- a/app/helpers/PersonTags.java +++ b/app/helpers/PersonTags.java @@ -22,6 +22,12 @@ import org.joda.time.LocalDateTime; import play.templates.JavaExtensions; +/** + * Classe di utilità per la gestione di date e orari. + * + * @author dario + * + */ public class PersonTags extends JavaExtensions { diff --git a/app/helpers/TemplateUtility.java b/app/helpers/TemplateUtility.java index 4ac08b05e..da4e709b7 100644 --- a/app/helpers/TemplateUtility.java +++ b/app/helpers/TemplateUtility.java @@ -197,7 +197,7 @@ public ModelQuery.SimpleResults get() { /** * Verifica se nella configurazione posso abilitare l'auto inserimento covid19. - * + * * @return se nella configurazione generale ho abilitato il covid19 come parametro per * auto inserimento. */ @@ -207,7 +207,7 @@ public boolean enableCovid() { /** * Verifica se nella configurazione posso abilitare l'auto inserimento smartworking. - * + * * @return se nella configurazione generale ho abilitato lo smartworking come parametro per * auto inserimento. */ @@ -328,6 +328,7 @@ public final int changeReperibilityRequests() { /** * Metodo di utilità per conteggiare le richieste pendenti di approvazione telelavoro. + * * @return la quantità di richieste di telelavoro pendenti. */ public final int teleworkRequests() { @@ -345,6 +346,7 @@ public final int teleworkRequests() { /** * Metodo di utilità per conteggiare le richieste pendenti di approvazione di uscite di servizio. + * * @return la quantità di richieste di uscite di servizio pendenti. */ public final int serviceRequests() { @@ -362,6 +364,7 @@ public final int serviceRequests() { /** * Metodo di utilità per conteggiare le richieste pendenti di informazione malattia. + * * @return la quantità di richieste di informazione di malattia pendenti. */ public final int illnessRequests() { diff --git a/app/helpers/deserializers/InlineStreamHandler.java b/app/helpers/deserializers/InlineStreamHandler.java index 831562b2a..a00c19750 100644 --- a/app/helpers/deserializers/InlineStreamHandler.java +++ b/app/helpers/deserializers/InlineStreamHandler.java @@ -33,6 +33,12 @@ */ public class InlineStreamHandler extends URLStreamHandler { + /** + * classe per le connesioni. + * + * @author dario + * + */ public static class InlineUrlConnection extends URLConnection { private final byte[] data; diff --git a/app/helpers/deserializers/LocalDateDeserializer.java b/app/helpers/deserializers/LocalDateDeserializer.java index 7012813ff..59f4c9ae7 100755 --- a/app/helpers/deserializers/LocalDateDeserializer.java +++ b/app/helpers/deserializers/LocalDateDeserializer.java @@ -26,7 +26,12 @@ import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; - +/** + * deserializzatore del localdate. + * + * @author dario + * + */ public class LocalDateDeserializer implements JsonDeserializer { static final DateTimeFormatter dtf = DateTimeFormat.forPattern("YYYY-MM-dd"); diff --git a/app/helpers/rest/RestUtils.java b/app/helpers/rest/RestUtils.java index d884948f0..36313d12b 100644 --- a/app/helpers/rest/RestUtils.java +++ b/app/helpers/rest/RestUtils.java @@ -52,6 +52,7 @@ public static void checkMethod(Request request, HttpMethod httpMethod) { String.format("This method supports only the %s method", httpMethod)); } } + /** * Verifica che l'oggetto passato sia presente (non Null) ed restituisce * un not found (404) se non presente. diff --git a/app/helpers/validators/AffiliationCheck.java b/app/helpers/validators/AffiliationCheck.java index 7a103bc4f..f2ac095f5 100644 --- a/app/helpers/validators/AffiliationCheck.java +++ b/app/helpers/validators/AffiliationCheck.java @@ -24,6 +24,7 @@ * Controlla che l'affiliazione di una persona sia corretta, * cioè non si sovrapponga con una già presente per lo stesso * gruppo. + * * @author Cristian Lucchesi */ public class AffiliationCheck extends Check { diff --git a/app/helpers/validators/StringIsValid.java b/app/helpers/validators/StringIsValid.java index c531cea2a..e345a0606 100644 --- a/app/helpers/validators/StringIsValid.java +++ b/app/helpers/validators/StringIsValid.java @@ -28,7 +28,7 @@ */ public class StringIsValid extends Check { - private final static int MIN_STRING_LENGTH = 3; + private final int minStringLength = 3; @Override public boolean isSatisfied(Object validatedObject, Object value) { @@ -41,8 +41,8 @@ public boolean isSatisfied(Object validatedObject, Object value) { } final String string = (String) value; - if (string.length() < MIN_STRING_LENGTH) { - setMessage(String.format("Il testo deve essere di almeno %d caratteri", MIN_STRING_LENGTH)); + if (string.length() < minStringLength) { + setMessage(String.format("Il testo deve essere di almeno %d caratteri", minStringLength)); return false; } if (string.matches("^[0-9 ]+$")) { diff --git a/app/it/cnr/iit/epas/DateInterval.java b/app/it/cnr/iit/epas/DateInterval.java index 87f2829f4..239399a5c 100755 --- a/app/it/cnr/iit/epas/DateInterval.java +++ b/app/it/cnr/iit/epas/DateInterval.java @@ -19,8 +19,8 @@ import com.google.common.base.Optional; import com.google.common.base.Preconditions; -import org.joda.time.LocalDate; import lombok.NoArgsConstructor; +import org.joda.time.LocalDate; /** * Rappresenta un intervallo di date. diff --git a/app/it/cnr/iit/epas/DateUtility.java b/app/it/cnr/iit/epas/DateUtility.java index a500f8ab2..33c2c7a8b 100755 --- a/app/it/cnr/iit/epas/DateUtility.java +++ b/app/it/cnr/iit/epas/DateUtility.java @@ -33,7 +33,6 @@ import org.joda.time.format.DateTimeFormatter; /** - * * Classe di utilità per la gestione delle date. * */ diff --git a/app/it/cnr/iit/epas/JsonAbsenceBinder.java b/app/it/cnr/iit/epas/JsonAbsenceBinder.java index fc23e6e77..83b8e0dd9 100755 --- a/app/it/cnr/iit/epas/JsonAbsenceBinder.java +++ b/app/it/cnr/iit/epas/JsonAbsenceBinder.java @@ -19,9 +19,9 @@ import com.google.gson.GsonBuilder; import common.injection.StaticInject; +import helpers.deserializers.AbsenceFromClientDeserializer; import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import helpers.deserializers.AbsenceFromClientDeserializer; import models.exports.AbsenceFromClient; import play.data.binding.Global; import play.data.binding.TypeBinder; diff --git a/app/it/cnr/iit/epas/JsonMissionBinder.java b/app/it/cnr/iit/epas/JsonMissionBinder.java index cc4de8aab..fb2e9ed4f 100644 --- a/app/it/cnr/iit/epas/JsonMissionBinder.java +++ b/app/it/cnr/iit/epas/JsonMissionBinder.java @@ -22,12 +22,18 @@ import common.injection.StaticInject; import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import org.joda.time.LocalDateTime; import lombok.extern.slf4j.Slf4j; import models.exports.MissionFromClient; +import org.joda.time.LocalDateTime; import play.data.binding.Global; import play.data.binding.TypeBinder; +/** + * Binder per l'oggetto json proveniente da Missioni. + * + * @author dario + * + */ @Slf4j @Global @StaticInject diff --git a/app/it/cnr/iit/epas/JsonPersonEmailBinder.java b/app/it/cnr/iit/epas/JsonPersonEmailBinder.java index 89b3083b2..e7d91ccb6 100755 --- a/app/it/cnr/iit/epas/JsonPersonEmailBinder.java +++ b/app/it/cnr/iit/epas/JsonPersonEmailBinder.java @@ -37,6 +37,7 @@ /** * binder per il recupero della person a partire dalla email. + * * @author dario * */ diff --git a/app/it/cnr/iit/epas/JsonRequestedFrequentAbsenceBinder.java b/app/it/cnr/iit/epas/JsonRequestedFrequentAbsenceBinder.java index 5b69a94b2..a2bd3853e 100755 --- a/app/it/cnr/iit/epas/JsonRequestedFrequentAbsenceBinder.java +++ b/app/it/cnr/iit/epas/JsonRequestedFrequentAbsenceBinder.java @@ -26,6 +26,12 @@ import models.exports.PeriodAbsenceCode; import play.data.binding.TypeBinder; +/** + * Binder per oggetti json sulle assenze frequenti. + * + * @author dario + * + */ @Slf4j public class JsonRequestedFrequentAbsenceBinder implements TypeBinder { diff --git a/app/it/cnr/iit/epas/JsonRequestedPersonsBinder.java b/app/it/cnr/iit/epas/JsonRequestedPersonsBinder.java index c57829b07..cc69b1d3f 100755 --- a/app/it/cnr/iit/epas/JsonRequestedPersonsBinder.java +++ b/app/it/cnr/iit/epas/JsonRequestedPersonsBinder.java @@ -22,12 +22,12 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; import common.injection.StaticInject; +import dao.PersonDao; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import javax.inject.Inject; -import dao.PersonDao; import lombok.extern.slf4j.Slf4j; import models.Person; import models.exports.PersonsList; diff --git a/app/it/cnr/iit/epas/JsonStampingBinder.java b/app/it/cnr/iit/epas/JsonStampingBinder.java index dad0148d2..c58d5f14d 100755 --- a/app/it/cnr/iit/epas/JsonStampingBinder.java +++ b/app/it/cnr/iit/epas/JsonStampingBinder.java @@ -23,10 +23,10 @@ import common.injection.StaticInject; import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import org.joda.time.LocalDateTime; import lombok.extern.slf4j.Slf4j; import models.enumerate.StampTypes; import models.exports.StampingFromClient; +import org.joda.time.LocalDateTime; import play.data.binding.Global; import play.data.binding.TypeBinder; diff --git a/app/it/cnr/iit/epas/TimeInterval.java b/app/it/cnr/iit/epas/TimeInterval.java index f58548148..6c5e4d96a 100644 --- a/app/it/cnr/iit/epas/TimeInterval.java +++ b/app/it/cnr/iit/epas/TimeInterval.java @@ -19,10 +19,10 @@ import com.google.common.base.Optional; import com.google.common.base.Preconditions; +import lombok.NoArgsConstructor; import org.joda.time.Hours; import org.joda.time.LocalTime; import org.joda.time.Minutes; -import lombok.NoArgsConstructor; /** * Classe di utilità per la gestione dei tempi e orari. diff --git a/app/jobs/BonusJob.java b/app/jobs/BonusJob.java index 3fe0aa8f1..b9fc97140 100644 --- a/app/jobs/BonusJob.java +++ b/app/jobs/BonusJob.java @@ -33,6 +33,7 @@ /** * Job che assegna le quantità per le competenze a presenza mensile. + * * @author dario * */ diff --git a/app/jobs/Bootstrap.java b/app/jobs/Bootstrap.java index 40cfc802e..b7b15add6 100755 --- a/app/jobs/Bootstrap.java +++ b/app/jobs/Bootstrap.java @@ -101,6 +101,12 @@ public void doJob() throws IOException { } + /** + * Classe di utilità. + * + * @author dario + * + */ public static class DatasetImport implements Work { private final URL url; diff --git a/app/jobs/CheckGreenPassJob.java b/app/jobs/CheckGreenPassJob.java index 291e41346..589d17bd4 100644 --- a/app/jobs/CheckGreenPassJob.java +++ b/app/jobs/CheckGreenPassJob.java @@ -10,6 +10,12 @@ import play.jobs.Job; import play.jobs.On; +/** + * Job per il controllo del green pass. + * + * @author dario + * + */ @Slf4j @On("0 15 10 ? * MON-FRI") //tutti i giorni dal lunedi al venerdi di ogni mese alle 10.15 public class CheckGreenPassJob extends Job { diff --git a/app/jobs/CheckGreenPassJob2.java b/app/jobs/CheckGreenPassJob2.java index e1555ccd5..45001691d 100644 --- a/app/jobs/CheckGreenPassJob2.java +++ b/app/jobs/CheckGreenPassJob2.java @@ -10,6 +10,12 @@ import play.jobs.Job; import play.jobs.On; +/** + * Job per il controllo del green pass. + * + * @author dario + * + */ @Slf4j @On("0 0 14 ? * MON-FRI") //tutti i giorni dal lunedi al venerdi di ogni mese alle 10.15 public class CheckGreenPassJob2 extends Job { diff --git a/app/jobs/CheckPersonCompetence.java b/app/jobs/CheckPersonCompetence.java index b383064ab..e2402352b 100644 --- a/app/jobs/CheckPersonCompetence.java +++ b/app/jobs/CheckPersonCompetence.java @@ -34,6 +34,12 @@ import play.jobs.Job; import play.jobs.OnApplicationStart; +/** + * Job per le associazioni tra persone e competenze. + * + * @author dario + * + */ @Slf4j @OnApplicationStart(async = true) public class CheckPersonCompetence extends Job { diff --git a/app/jobs/DarkNightJob.java b/app/jobs/DarkNightJob.java index 61f20a44d..ae924ca09 100755 --- a/app/jobs/DarkNightJob.java +++ b/app/jobs/DarkNightJob.java @@ -32,6 +32,12 @@ import play.jobs.Job; import play.jobs.On; +/** + * Job notturno per l'allineamento delle situazioni dei dipendenti. + * + * @author dario + * + */ @SuppressWarnings("rawtypes") @Slf4j @On("0 1 5 * * ?") // Ore 5:01 diff --git a/app/jobs/ExpandableJob.java b/app/jobs/ExpandableJob.java index 51386c3f5..1412f21b5 100755 --- a/app/jobs/ExpandableJob.java +++ b/app/jobs/ExpandableJob.java @@ -29,6 +29,12 @@ import play.jobs.On; //@On("0 34 15 ? * *") +/** + * Job per la verifica dei trouble sui giorni dei dipendenti. + * + * @author dario + * + */ @SuppressWarnings("rawtypes") @Slf4j @On("0 0 15 ? * MON,WED,FRI") diff --git a/app/jobs/FixEmployeesPermission.java b/app/jobs/FixEmployeesPermission.java index 1fcab2706..d4f221e19 100755 --- a/app/jobs/FixEmployeesPermission.java +++ b/app/jobs/FixEmployeesPermission.java @@ -27,6 +27,7 @@ /** * Classe che fixa eventuali problemi sui permessi degli impiegati. + * * @author dario * */ diff --git a/app/jobs/FixReperibilityShiftDates.java b/app/jobs/FixReperibilityShiftDates.java index 4ec539b36..96cf4528d 100644 --- a/app/jobs/FixReperibilityShiftDates.java +++ b/app/jobs/FixReperibilityShiftDates.java @@ -32,6 +32,12 @@ import play.jobs.Job; import play.jobs.OnApplicationStart; +/** + * Job per il fix delle date di reperibilità. + * + * @author dario + * + */ @Slf4j @OnApplicationStart(async = true) public class FixReperibilityShiftDates extends Job { diff --git a/app/jobs/MealTicketBlockTypeJob.java b/app/jobs/MealTicketBlockTypeJob.java index 5f8a5946c..570e9b879 100644 --- a/app/jobs/MealTicketBlockTypeJob.java +++ b/app/jobs/MealTicketBlockTypeJob.java @@ -21,6 +21,12 @@ import play.Play; import play.jobs.Job; +/** + * Job per la gestione dei blocchetti e dei buoni pasto. + * + * @author dario + * + */ @Slf4j //@On("0 0 6 * * ?") //tutte le mattine alle 6.00 //@OnApplicationStart diff --git a/app/manager/CheckGreenPassManager.java b/app/manager/CheckGreenPassManager.java index 19ea3618a..3702662f8 100644 --- a/app/manager/CheckGreenPassManager.java +++ b/app/manager/CheckGreenPassManager.java @@ -43,6 +43,7 @@ /** * Manager per il check giornaliero del green pass. + * * @author cristian * */ @@ -55,10 +56,11 @@ public class CheckGreenPassManager { private final OfficeDao officeDao; private final EmailManager emailManager; - private final double PEOPLE_TO_DRAW_EACH_ATTEMPT = 0.15; + private final double peopleToDrawEachAttempt = 0.15; /** * Costruttore manager. + * * @param personDao il dao sulle persone * @param stampingManager il manager per le timbrature * @param passDao il dao per il check green pass @@ -76,13 +78,13 @@ public CheckGreenPassManager(PersonDao personDao, StampingManager stampingManage /** * Il numero delle persone da conteggiare è una percentuale del numero di persone * presenti in sede. - * + * * @param numberOfActivePeople numero di persone attive in sede * @return il numero di persone da conteggiare. */ private Integer peopleToDrawn(Integer numberOfActivePeople) { - BigDecimal percentageToDrawn = BigDecimal.valueOf(PEOPLE_TO_DRAW_EACH_ATTEMPT); + BigDecimal percentageToDrawn = BigDecimal.valueOf(peopleToDrawEachAttempt); // conteggio quante persone sorteggiare BigDecimal numberOfPeopletoDraw = @@ -126,7 +128,7 @@ public void checkGreenPassProcedure(LocalDate date) { /** * Ritorna la lista delle persone attive sulla sede office in data date. - * + * * @param date la data in cui cercare le persone * @param office la sede su cui cercare le persone * @return la lista di persone attive nella sede office in data date. diff --git a/app/manager/EmailManager.java b/app/manager/EmailManager.java index 7dc499ccc..e811448da 100755 --- a/app/manager/EmailManager.java +++ b/app/manager/EmailManager.java @@ -149,7 +149,7 @@ public void newUserMail(Person person) { /** * Metodo che informa via mail la persona del controllo del green pass. - * + * * @param person la persona a cui inviare la mail informativa */ public void infoDrawnPersonForCheckingGreenPass(Person person) { @@ -187,7 +187,7 @@ public void infoDrawnPersonForCheckingGreenPass(Person person) { /** * Informa via mail l'amministrazione e l'ufficio tecnico di chi devono contattare * per il check del green pass. - * + * * @param peopleSelected la lista di persone selezionate * @param date la data in cui sono selezionate */ @@ -218,7 +218,7 @@ public int compare(CheckGreenPass cgp1, CheckGreenPass cgp2) { } }); - for (CheckGreenPass gp: peopleSelected) { + for (CheckGreenPass gp : peopleSelected) { sb.append(gp.person.getFullname() + "\r\n"); } } diff --git a/app/manager/MissionManager.java b/app/manager/MissionManager.java index 5c11a941e..ffc4d0efa 100644 --- a/app/manager/MissionManager.java +++ b/app/manager/MissionManager.java @@ -138,7 +138,7 @@ public Optional linkToPerson(MissionFromClient mission) { * @param recompute se deve essere avviato il ricalcolo * @return true se riesce a inserire la missione con i parametri esplicitati nel body, * false altrimenti. - * @throws InterruptedException + * @throws InterruptedException eccezione */ public boolean createMissionFromClient(MissionFromClient body, boolean recompute) { @@ -148,7 +148,8 @@ public boolean createMissionFromClient(MissionFromClient body, boolean recompute log.debug(LOG_PREFIX + "Imposto la cache {} con valore true", missionCacheKey); Cache.set(missionCacheKey, true, "1mn"); } else { - log.warn(LOG_PREFIX + "Creazione missione annullata, è già in corso un inserimento per la missione {}", body); + log.warn(LOG_PREFIX + "Creazione missione annullata, " + + "è già in corso un inserimento per la missione {}", body); return false; } diff --git a/app/manager/NotificationManager.java b/app/manager/NotificationManager.java index 5404fdfd7..140e43dfd 100644 --- a/app/manager/NotificationManager.java +++ b/app/manager/NotificationManager.java @@ -545,7 +545,7 @@ public void notifyAbsenceOnAbsenceRequestCompleted(List absences, Perso * * @param currentUser l'utente che fa la richiesta * @param absenceRequest la richiesta di assenza via flusso - * @param insert se si tratta di inserimento (per ora unico caso contemplato) + * @param operation se si tratta di inserimento (per ora unico caso contemplato) */ public void notificationAbsenceRequestPolicy(User currentUser, AbsenceRequest absenceRequest, Crud operation) { @@ -1350,7 +1350,7 @@ private void notifyInformationRequest(InformationRequest informationRequest, Cru /** * Notifica che una richiesta informativa è stata respinta da uno degli approvatori del flusso. - * + * * @param serviceRequest l'opzionale richiesta di uscita di servizio * @param illnessRequest l'opzionale richiesta di malattia * @param teleworkRequest l'opzionale richiesta di telelavoro diff --git a/app/manager/PersonDayManager.java b/app/manager/PersonDayManager.java index fce843df2..b8e3d34a9 100755 --- a/app/manager/PersonDayManager.java +++ b/app/manager/PersonDayManager.java @@ -1784,7 +1784,8 @@ public void doJob() { //Viene fatta prima la merge perché l'assenza è detached previousShortPermission.get().merge()._delete(); log.info("Rimosso permesso breve di {} minuti nel giorno {} per {} poiché sono presenti" - + " assenze giornaliere oppure il dipendente è in turno, oppure è un giorno festivo.", + + " assenze giornaliere oppure il dipendente è in turno, " + + "oppure è un giorno festivo.", previousShortPermission.get().justifiedMinutes, personDay.date, personDay.person.getFullname()); return; diff --git a/app/manager/StampingManager.java b/app/manager/StampingManager.java index bbe428a81..7c72ba3a5 100755 --- a/app/manager/StampingManager.java +++ b/app/manager/StampingManager.java @@ -248,7 +248,7 @@ public String persistStamping(Stamping stamping, /** * Crea l'oggetto stamping da persistere sul db di ePAS. - * + * * @param stamping il dto da cui creare la timbratura * @param pd il personday cui associare la timbratura * @param time l'orario della timbratura @@ -287,7 +287,7 @@ public Stamping generateStampingFromTelework(TeleworkDto stamping, PersonDay pd, /** * Ritorna il verso della timbratura corrispondente a quella del dto. - * + * * @param dto il dto contenente le informazioni della timbratura in telelavoro * @return il verso della timbratura corrispondente. */ @@ -295,7 +295,7 @@ public WayType retrieveWayFromTeleworkStamping(TeleworkDto dto) { if (dto.getStampType().equals(TeleworkStampTypes.INIZIO_TELELAVORO) || dto.getStampType().equals(TeleworkStampTypes.FINE_PRANZO_TELELAVORO) || dto.getStampType().equals(TeleworkStampTypes.FINE_INTERRUZIONE)) { - return WayType.in; + return WayType.in; } else { return WayType.out; } diff --git a/app/manager/TeleworkStampingManager.java b/app/manager/TeleworkStampingManager.java index d8b1feb1a..3ab74399d 100644 --- a/app/manager/TeleworkStampingManager.java +++ b/app/manager/TeleworkStampingManager.java @@ -28,8 +28,8 @@ import java.util.concurrent.ExecutionException; import java.util.stream.Collectors; import javax.inject.Inject; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import manager.recaps.personstamping.PersonStampingDayRecap; import manager.recaps.personstamping.PersonStampingRecap; import manager.services.absences.AbsenceForm; @@ -69,6 +69,7 @@ public class TeleworkStampingManager { /** * Injector. + * * @param comunication il service per la comunicazione con la piattaforma telework-stampings * @param absenceDao il dao delle assenze * @param absenceManager il manager delle assenze @@ -258,6 +259,7 @@ public List getMonthlyStampings(PersonStampingRecap psDto) /** * Ritorna la lista degli oggetti contenenti le info sulle giornate di telelavoro. + * * @param psDto il recap delle timbrature * @return la lista di oggetti NewTeleworkDto contenenti le info per il telelavoro. * @throws NoSuchFieldException eccezione di oggetto non trovato @@ -373,7 +375,7 @@ private Range getStampingRange(List list, LocalDate /** * Metodo che consente l'inserimento del codice 103RT per i ricercatori e tecnologi che * inseriscono timbrature in telelavoro che concorrono alla formazione di residuo sul cartellino. - * + * * @param person la persona per cui inserire l'assenza * @param date la data in cui inserire l'assenza */ @@ -406,6 +408,7 @@ public void insertTeleworkAbsenceCode(Person person, LocalDate date) { /** * Cancella l'assenza 103RT dal cartellino del dipendente. + * * @param pd il personDay relativo al giorno in cui rimuovere l'assenza */ public void deleteTeleworkAbsenceCode(PersonDay pd) { diff --git a/app/manager/attestati/dto/internal/TipoBlocchettoSede.java b/app/manager/attestati/dto/internal/TipoBlocchettoSede.java index d814a2f86..9701f83bb 100644 --- a/app/manager/attestati/dto/internal/TipoBlocchettoSede.java +++ b/app/manager/attestati/dto/internal/TipoBlocchettoSede.java @@ -1,5 +1,11 @@ package manager.attestati.dto.internal; +/** + * Blocchetto buono pasto. + * + * @author Alessandro + * + */ public class TipoBlocchettoSede { public int anno; diff --git a/app/manager/attestati/service/CertificationService.java b/app/manager/attestati/service/CertificationService.java index 2fa7fa898..b57f9859e 100644 --- a/app/manager/attestati/service/CertificationService.java +++ b/app/manager/attestati/service/CertificationService.java @@ -79,7 +79,7 @@ public CertificationService(CertificationsComunication certificationsComunicatio /** * Verifica se il token è abilitato alla sede. - * + * * @see manager.attestati.service.ICertificationService#authentication(models.Office, boolean) */ @Override diff --git a/app/manager/attestati/service/CertificationsComunication.java b/app/manager/attestati/service/CertificationsComunication.java index f99ddb03c..5eaa57a5c 100644 --- a/app/manager/attestati/service/CertificationsComunication.java +++ b/app/manager/attestati/service/CertificationsComunication.java @@ -586,6 +586,7 @@ public CruscottoDipendente getCruscotto(int dipendenteId, int year) /** * Metodo rest per chiedere il tipo di blocchetti di buono pasto usati nella sede. + * * @param year l'anno di riferimento * @param month il mese di riferimento * @param office la sede di riferimento diff --git a/app/manager/attestati/service/OauthToken.java b/app/manager/attestati/service/OauthToken.java index 9f777b1c6..50e2c676e 100644 --- a/app/manager/attestati/service/OauthToken.java +++ b/app/manager/attestati/service/OauthToken.java @@ -22,7 +22,7 @@ /** * DTO con le informazioni di token OAuth. - * + * * @author Dario Tagliaferri */ public class OauthToken implements Serializable { diff --git a/app/manager/attestati/service/PersonMonthlySituationData.java b/app/manager/attestati/service/PersonMonthlySituationData.java index c951e83cf..8e6f93c3b 100644 --- a/app/manager/attestati/service/PersonMonthlySituationData.java +++ b/app/manager/attestati/service/PersonMonthlySituationData.java @@ -274,7 +274,8 @@ private Map mealTicket(Person person, int year, int month month, year, person.getFullname(), person.id); } else { MealTicketRecap recap = mealTicketService.create(contract).orNull(); - MealTicketComposition composition = mealTicketService.whichBlock(recap, monthRecap, contract); + MealTicketComposition composition = mealTicketService + .whichBlock(recap, monthRecap, contract); buoniCartacei = buoniCartacei + composition.paperyMealTicket; buoniElettronici = buoniElettronici + composition.electronicMealTicket; } diff --git a/app/manager/configurations/ConfigurationManager.java b/app/manager/configurations/ConfigurationManager.java index 208fb4595..7c749d94c 100644 --- a/app/manager/configurations/ConfigurationManager.java +++ b/app/manager/configurations/ConfigurationManager.java @@ -49,11 +49,12 @@ import models.enumerate.BlockType; import models.query.QConfiguration; import models.query.QPersonConfiguration; -import play.db.jpa.JPAPlugin; -import play.jobs.Job; import org.joda.time.LocalDate; import org.joda.time.LocalTime; import org.joda.time.MonthDay; +import play.db.jpa.JPAPlugin; +import play.jobs.Job; + /** * Manager della configurazione. @@ -275,7 +276,7 @@ public IPropertyInPeriod updateInteger(EpasParam epasParam, IPropertiesInPeriodO /** * Aggiunge una nuova configurazione di tipo enumerato. - * + * * @param epasParam parametro * @param target il target * @param value valore diff --git a/app/manager/flows/CompetenceRequestManager.java b/app/manager/flows/CompetenceRequestManager.java index 9b5be9ae3..960fa9761 100644 --- a/app/manager/flows/CompetenceRequestManager.java +++ b/app/manager/flows/CompetenceRequestManager.java @@ -294,7 +294,8 @@ public Optional executeEvent( competenceRequest.flowStarted = true; //invio la notifica al primo che deve validare la mia richiesta notificationManager - .notificationCompetenceRequestPolicy(competenceRequest.person.user, competenceRequest, true); + .notificationCompetenceRequestPolicy(competenceRequest.person.user, + competenceRequest, true); // invio anche la mail notificationManager .sendEmailCompetenceRequestPolicy(competenceRequest.person.user, competenceRequest, true); @@ -520,7 +521,8 @@ public boolean approval(CompetenceRequest competenceRequest, User user) { reperibilityManagerApproval(competenceRequest.id, user); approved = true; } - if (competenceRequest.reperibilityManagerApprovalRequired && !competenceRequest.isManagerApproved()) { + if (competenceRequest.reperibilityManagerApprovalRequired + && !competenceRequest.isManagerApproved()) { log.debug("Necessaria l'approvazione da parte del manager della reperibilità per {}", competenceRequest); notificationManager.sendEmailCompetenceRequestPolicy(user, competenceRequest, true); diff --git a/app/manager/flows/InformationRequestManager.java b/app/manager/flows/InformationRequestManager.java index 8d8cca450..026280600 100644 --- a/app/manager/flows/InformationRequestManager.java +++ b/app/manager/flows/InformationRequestManager.java @@ -50,6 +50,7 @@ /** * Classe di costruzione information request. + * * @author dario * */ @@ -77,6 +78,7 @@ public class InformationRequestConfiguration { /** * Costruttore injector. + * * @param configurationManager il configuration manager * @param uroDao il dao per gli usersRolesOffices * @param roleDao il dao per i ruoli @@ -144,7 +146,8 @@ public InformationRequestConfiguration getConfiguration(InformationType requestT /** * Imposta nella richiesta di assenza i tipi di approvazione necessari in funzione del tipo di - * assenza e della configurazione specifica della sede del dipendente. * + * assenza e della configurazione specifica della sede del dipendente. + * * @param illnessRequest l'opzionale richiesta di malattia * @param serviceRequest l'opzionale richiesta di uscita di servizio * @param teleworkRequest l'opzionale richiesta di telelavoro @@ -167,6 +170,7 @@ public void configure(Optional illnessRequest, /** * Verifica che gruppi ed eventuali responsabile di sede siano presenti per poter richiedere il * tipo di assenza. + * * @param requestType il tipo di assenza da controllare * @param person la persona per cui controllare il tipo di assenza * @return la lista degli eventuali problemi riscontrati. @@ -200,7 +204,8 @@ public List checkconfiguration(InformationType requestType, Person perso } /** - * Metodo di utilità per parsare una stringa e renderla un LocalTime. * + * Metodo di utilità per parsare una stringa e renderla un LocalTime. + * * @param time la stringa contenente l'ora * @return il LocalTime corrispondente alla stringa passata come parametro. */ @@ -216,13 +221,14 @@ public LocalTime deparseTime(String time) { /** * Metodo che esegue gli eventi del flusso. + * * @param serviceRequest la richiesta di uscita di servizio (opzionale) * @param illnessRequest la richiesta di informazione di malattia (opzionale) * @param teleworkRequest la richiesta di telelavoro (opzionale) * @param person la persona che esegue la richiesta * @param eventType il tipo di evento da eseguire * @param reason la motivazione - * @return + * @return il risultato dell'evento da eseguire nel flusso. */ public Optional executeEvent(Optional serviceRequest, Optional illnessRequest, Optional teleworkRequest, @@ -312,6 +318,7 @@ public Optional executeEvent(Optional serviceRequest, /** * Verifica se il tipo di evento è eseguibile dall'utente indicato. + * * @param serviceRequest l'eventuale richiesta di uscita di servizio * @param illnessRequest l'eventuale richiesta di malattia * @param teleworkRequest l'eventuale richiesta di telelavoro @@ -371,7 +378,8 @@ public Optional checkInformationRequestEvent(Optional se } /** - * Rimuove tutte le eventuali approvazioni ed impostata il flusso come da avviare. + * Rimuove tutte le eventuali approvazioni ed impostata il flusso come da avviare. + * * @param serviceRequest l'eventuale richiesta di uscita di servizio * @param illnessRequest l'eventuale richiesta di malattia * @param teleworkRequest l'eventuale richiesta di telelavoro @@ -395,6 +403,7 @@ public void resetFlow(Optional serviceRequest, /** * Controlla se una richiesta informativa può essere terminata con successo. + * * @param serviceRequest l'eventuale richiesta di uscita di servizio * @param illnessRequest l'eventuale richiesta di malattia * @param teleworkRequest l'eventuale richiesta di telelavoro @@ -420,6 +429,7 @@ public void checkAndCompleteFlow(Optional serviceRequest, /** * Certifica il completamento del flusso. + * * @param serviceRequest l'eventuale richiesta di uscita di servizio * @param illnessRequest l'eventuale richiesta di informazione malattia * @param teleworkRequest l'eventuale richiesta di approvazione telelavoro @@ -442,6 +452,7 @@ private void completeFlow(Optional serviceRequest, /** * Segue l'approvazione del flusso controllando i vari casi possibili. + * * @param serviceRequest l'eventuale richiesta di uscita di servizio * @param illnessRequest l'eventuale richiesta di informazione malattia * @param teleworkRequest l'eventuale richiesta di approvazione telelavoro @@ -489,6 +500,7 @@ public boolean approval(Optional serviceRequest, /** * Approvazione richiesta informativa da parte del responsabile di sede. + * * @param id id della richiesta di assenza. * @param user l'utente che deve approvare */ @@ -522,7 +534,8 @@ public void officeHeadApproval(long id, User user) { /** - * Disapprovazione richiesta di flusso informativo da parte del responsabile di sede. + * Disapprovazione richiesta di flusso informativo da parte del responsabile di sede. + * * @param id id della richiesta di assenza. * @param reason la motivazione del rifiuto */ @@ -554,6 +567,7 @@ public void officeHeadDisapproval(long id, String reason) { /** * Approvazione della richiesta di flusso informativo da parte dell'amministratore del personale. + * * @param id l'id della richiesta di assenza. * @param user l'utente che approva. */ @@ -587,6 +601,7 @@ public void personnelAdministratorApproval(long id, User user) { /** * Approvazione della richiesta di flusso informativo da parte dell'amministratore del personale. + * * @param id l'id della richiesta di flusso informativo. * @param reason la motivazione della respinta. */ diff --git a/app/manager/service/contracts/ContractService.java b/app/manager/service/contracts/ContractService.java index ee235e883..b536b87b3 100644 --- a/app/manager/service/contracts/ContractService.java +++ b/app/manager/service/contracts/ContractService.java @@ -23,10 +23,10 @@ import dao.wrapper.IWrapperPerson; import it.cnr.iit.epas.DateInterval; import it.cnr.iit.epas.DateUtility; -import lombok.extern.slf4j.Slf4j; import java.util.Comparator; import java.util.List; import javax.inject.Inject; +import lombok.extern.slf4j.Slf4j; import manager.AbsenceManager; import manager.ConsistencyManager; import manager.PersonDayManager; diff --git a/app/manager/services/absences/model/AbsencePeriod.java b/app/manager/services/absences/model/AbsencePeriod.java index 270aca813..d36e83b70 100644 --- a/app/manager/services/absences/model/AbsencePeriod.java +++ b/app/manager/services/absences/model/AbsencePeriod.java @@ -216,9 +216,9 @@ public int computePeriodTakableAmount(TakeCountBehaviour countBehaviour, LocalDa List workingDays = personDayManager.workingDaysInMonth(person, from, to); int count = (workingDays.size() * 100 / 2); if (count % 100 != 0) { - return count - count%100; + return count - count % 100; } - return count -(1*100); + return count - (1 * 100); } return this.fixedPeriodTakableAmount; } diff --git a/app/manager/services/absences/model/DayInPeriod.java b/app/manager/services/absences/model/DayInPeriod.java index e3a5c45ec..8caa340f0 100644 --- a/app/manager/services/absences/model/DayInPeriod.java +++ b/app/manager/services/absences/model/DayInPeriod.java @@ -143,6 +143,12 @@ public TakenAbsence takenComplation() { } + /** + * Classe per la riga da ritornare in fase di inserimento assenza nell'interfaccia. + * + * @author Alessandro + * + */ public static class TemplateRow { public LocalDate date; diff --git a/app/manager/services/absences/model/ServiceFactories.java b/app/manager/services/absences/model/ServiceFactories.java index b6699e779..600e0b644 100644 --- a/app/manager/services/absences/model/ServiceFactories.java +++ b/app/manager/services/absences/model/ServiceFactories.java @@ -640,8 +640,8 @@ public ErrorsBox genericConstraints(ErrorsBox genericErrors, log.debug("Controllo la reperibilità per {} nel giorno {}", person, absence.getAbsenceDate()); //check sulla reperibilità - if (!absence.absenceType.reperibilityCompatible && - personReperibilityDayDao.getPersonReperibilityDay( + if (!absence.absenceType.reperibilityCompatible + && personReperibilityDayDao.getPersonReperibilityDay( person, absence.getAbsenceDate()).isPresent()) { genericErrors.addAbsenceWarning(absence, AbsenceProblem.InReperibility); log.info("Aggiunto warning di reperibilità per {} in data {}", person, diff --git a/app/manager/services/mealtickets/BlockMealTicket.java b/app/manager/services/mealtickets/BlockMealTicket.java index 658469ca0..c0766be9a 100755 --- a/app/manager/services/mealtickets/BlockMealTicket.java +++ b/app/manager/services/mealtickets/BlockMealTicket.java @@ -14,6 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + package manager.services.mealtickets; import com.google.common.base.Verify; diff --git a/app/manager/services/mealtickets/IMealTicketsService.java b/app/manager/services/mealtickets/IMealTicketsService.java index dadbca3ea..30e4a2344 100644 --- a/app/manager/services/mealtickets/IMealTicketsService.java +++ b/app/manager/services/mealtickets/IMealTicketsService.java @@ -73,7 +73,7 @@ List buildBlockMealTicket(String codeBlock, BlockType blockType, Int /** * Genera una composizione che determina con che tipo di buoni pasto si copre la maturazione * mensile dei buoni in base ai giorni di presenza. - * + * * @param recap il recap della situazione dei buoni pasto * @param monthRecap il recap sul contratto mensile * @param contract il contratto su cui verificare la situazione dei buoni pasto diff --git a/app/manager/sync/SynchronizationManager.java b/app/manager/sync/SynchronizationManager.java index c59be43f8..fa5c96c9d 100644 --- a/app/manager/sync/SynchronizationManager.java +++ b/app/manager/sync/SynchronizationManager.java @@ -28,8 +28,8 @@ import java.util.stream.Collectors; import javax.inject.Inject; import lombok.Data; -import lombok.val; import lombok.extern.slf4j.Slf4j; +import lombok.val; import manager.ContractManager; import manager.OfficeManager; import manager.RegistryNotificationManager; diff --git a/app/manager/telework/service/TeleworkComunication.java b/app/manager/telework/service/TeleworkComunication.java index 0642d778e..a41ae0326 100644 --- a/app/manager/telework/service/TeleworkComunication.java +++ b/app/manager/telework/service/TeleworkComunication.java @@ -17,8 +17,8 @@ package manager.telework.service; -import com.beust.jcommander.internal.Lists; import com.google.common.base.Strings; +import com.google.common.collect.Lists; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import java.util.List; @@ -147,8 +147,8 @@ public List getList(long personDayId) log.error("Utente non autorizzato: {}", wsRequest.username); } - if (httpResponse.getJson().isJsonArray() && - httpResponse.getJson().getAsJsonArray().size() == 0) { + if (httpResponse.getJson().isJsonArray() + && httpResponse.getJson().getAsJsonArray().size() == 0) { log.trace("httpResponse.json = {}", httpResponse.getJson()); } else { log.debug("httpResponse.json = {}", httpResponse.getJson()); diff --git a/app/models/CheckGreenPass.java b/app/models/CheckGreenPass.java index b48e6cd0a..51ab171d9 100644 --- a/app/models/CheckGreenPass.java +++ b/app/models/CheckGreenPass.java @@ -26,6 +26,12 @@ import org.joda.time.LocalDate; import play.data.validation.Required; +/** + * Entità di check green pass. + * + * @author dario + * + */ @Entity @Audited public class CheckGreenPass extends BaseModel { diff --git a/app/models/PersonReperibility.java b/app/models/PersonReperibility.java index 8472301fd..377fc342d 100755 --- a/app/models/PersonReperibility.java +++ b/app/models/PersonReperibility.java @@ -95,33 +95,37 @@ public Range dateRange() { public static Comparator PersonReperibilityComparator = new Comparator() { - public int compare(PersonReperibility pr1, PersonReperibility pr2) { - String prName1 = pr1.personReperibilityType.description.toUpperCase(); - String prName2 = pr2.personReperibilityType.description.toUpperCase(); - return prName1.compareTo(prName2); - } - }; + public int compare(PersonReperibility pr1, PersonReperibility pr2) { + String prName1 = pr1.personReperibilityType.description.toUpperCase(); + String prName2 = pr2.personReperibilityType.description.toUpperCase(); + return prName1.compareTo(prName2); + } + }; /** + * Verifica se il dipendente è attivo in reperibilità in una certa data. + * * @param date la data in cui verificare se la reperibilità era attiva * per questa persona. * @return true se la reperibilità era attiva nella data passata, false altrimenti. */ @Transient public boolean isActive(LocalDate date) { - return (startDate == null || !startDate.isAfter(date)) && - endDate == null || !endDate.isBefore(date); + return (startDate == null || !startDate.isAfter(date)) + && endDate == null || !endDate.isBefore(date); } /** + * Verifica se il dipendente è attivo in reperibilità nell'anno/mese. + * * @param yearMonth l'anno/mese in cui verificare se la reperibilità era attiva * per questa persona almeno un giorno. * @return true se la reperibilità era attiva nella data passata, false altrimenti. */ @Transient public boolean isActive(YearMonth yearMonth) { - return (startDate == null || - !startDate.isAfter(yearMonth.toLocalDate(1).dayOfMonth().withMaximumValue())) && - endDate == null || !endDate.isBefore(yearMonth.toLocalDate(1)); + return (startDate == null + || !startDate.isAfter(yearMonth.toLocalDate(1).dayOfMonth().withMaximumValue())) + && endDate == null || !endDate.isBefore(yearMonth.toLocalDate(1)); } } diff --git a/app/models/PersonalWorkingTime.java b/app/models/PersonalWorkingTime.java index 562c82b13..67b0d989a 100644 --- a/app/models/PersonalWorkingTime.java +++ b/app/models/PersonalWorkingTime.java @@ -35,6 +35,12 @@ import org.testng.util.Strings; import play.data.validation.Required; +/** + * Entità di associazione tra persona e orario di lavoro particolare. + * + * @author dario + * + */ @ToString @Entity @Table(name = "personal_working_times") diff --git a/app/models/ShiftTypeMonth.java b/app/models/ShiftTypeMonth.java index b234ebbe6..bd7ef2a73 100644 --- a/app/models/ShiftTypeMonth.java +++ b/app/models/ShiftTypeMonth.java @@ -30,7 +30,7 @@ /** * Oggetto che contiene l'approvazione delle ore di turno. - * + * * @author Daniele Murgia * * @since 09/06/17 diff --git a/app/models/Stamping.java b/app/models/Stamping.java index 8d64faa4e..b8380b085 100755 --- a/app/models/Stamping.java +++ b/app/models/Stamping.java @@ -101,9 +101,10 @@ public class Stamping extends BaseModel implements Comparable { public boolean markedByEmployee; /** - * con la nuova interpretazione del telelavoro per i livelli I-III, quando un dipendente si inserisce - * una timbratura in telelavoro, questa deve essere inserita anche sul suo cartellino, diventando - * a tutti gli effetti una timbratura che concorre alla generazione del residuo giornaliero. + * con la nuova interpretazione del telelavoro per i livelli I-III, quando un dipendente si + * inserisce una timbratura in telelavoro, questa deve essere inserita anche sul suo cartellino, + * diventando a tutti gli effetti una timbratura che concorre alla generazione del residuo + * giornaliero. */ @Column(name = "marked_by_telework") public boolean markedByTelework; diff --git a/app/models/absences/GroupAbsenceType.java b/app/models/absences/GroupAbsenceType.java index 4467b3821..0b9b07a9b 100644 --- a/app/models/absences/GroupAbsenceType.java +++ b/app/models/absences/GroupAbsenceType.java @@ -146,6 +146,7 @@ public GroupAbsenceType firstOfChain() { /** * Enumerato che gestisce il tipo di periodo temporale. + * * @author dario * */ @@ -202,6 +203,7 @@ public DateInterval getChildInterval(LocalDate birthDate) { /** * Enumerato che determina la tipologia di gruppo (se gestito da un pattern). + * * @author dario * */ diff --git a/app/models/absences/JustifiedType.java b/app/models/absences/JustifiedType.java index 5a55983ca..7a31dffa7 100644 --- a/app/models/absences/JustifiedType.java +++ b/app/models/absences/JustifiedType.java @@ -31,6 +31,12 @@ import models.base.BaseModel; import org.hibernate.envers.Audited; +/** + * Classe dei tipi di giustificazione delle assenze. + * + * @author dario + * + */ @Audited @Entity @Table(name = "justified_types") @@ -40,8 +46,8 @@ public class JustifiedType extends BaseModel { /** * Enumerato che gestisce i nomi dei tipi di giustificazione dell'assenza. - * @author dario * + * @author dario */ public enum JustifiedTypeName { diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index d9b1fc816..a0834db45 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -473,12 +473,14 @@ public enum DefaultAbsenceType { false, true, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), -// A_31_2019("31", "Ferie anno 2019 prorogate", false, ImmutableSet.of(JustifiedTypeName.all_day), -// 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 1, 1), -// new LocalDate(2021, 2, 15), false, true, true), -// A_31_2020("31", "Ferie anno 2020 prorogate", false, ImmutableSet.of(JustifiedTypeName.all_day), -// 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 11, 1), -// new LocalDate(2022, 2, 20), false, true, true), + // A_31_2019("31", "Ferie anno 2019 prorogate", false, + // ImmutableSet.of(JustifiedTypeName.all_day), + // 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 1, 1), + // new LocalDate(2021, 2, 15), false, true, true), + // A_31_2020("31", "Ferie anno 2020 prorogate", false, + // ImmutableSet.of(JustifiedTypeName.all_day), + // 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 11, 1), + // new LocalDate(2022, 2, 20), false, true, true), A_31("31", "Ferie anno precedente", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), diff --git a/app/models/absences/definitions/DefaultComplation.java b/app/models/absences/definitions/DefaultComplation.java index 2ae5a04e0..460577151 100644 --- a/app/models/absences/definitions/DefaultComplation.java +++ b/app/models/absences/definitions/DefaultComplation.java @@ -228,7 +228,7 @@ private DefaultComplation(AmountType amountType, /** * Ricerca i completamenti modellati e non presenti fra quelle passate in arg (db). - * + * * @return list */ public static List missing(List allComplations) { diff --git a/app/models/absences/definitions/DefaultGroup.java b/app/models/absences/definitions/DefaultGroup.java index c28d28710..7efbcd8b8 100644 --- a/app/models/absences/definitions/DefaultGroup.java +++ b/app/models/absences/definitions/DefaultGroup.java @@ -77,8 +77,8 @@ public enum DefaultGroup { PeriodType.always, DefaultTakable.T_26, null, null, false, false), G_C161718("C16/C17/C18 - Altri congedi L. 104/92", "", DefaultCategoryType.ALTRI_104, 0, - GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, DefaultTakable.T_C161718, null, null, - false, false), + GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, + DefaultTakable.T_C161718, null, null, false, false), G_661("661 - Permesso orario per motivi personali 18 ore anno", "", DefaultCategoryType.PERMESSI_PERSONALI, 0, GroupAbsenceTypePattern.programmed, @@ -325,8 +325,8 @@ public enum DefaultGroup { TELELAVORO_RICERCATORI_TECNOLOGI("Telelavoro Ricercatori Tecnologi", "", DefaultCategoryType.TELELAVORO_RICERCATORI_TECNOLOGI, 0, - GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, DefaultTakable.T_TELELAVORO_RT, null, - null, false, false), + GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, + DefaultTakable.T_TELELAVORO_RT, null, null, false, false), G_PUBBLICA_FUNZIONE("Codici Pubblica Funzione", "", DefaultCategoryType.PUBBLICA_FUNZIOINE, 2, GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, DefaultTakable.T_PUBBLICA_FUNZIONE, @@ -466,9 +466,9 @@ public static List employeeTeleworkCodes() { return getCodes(DefaultGroup.TELELAVORO); } -// public static List employeeTeleworkWithResidualCodes() { -// return getCodes(DefaultGroup.TELELAVORO_RICERCATORI_TECNOLOGI); -// } + // public static List employeeTeleworkWithResidualCodes() { + // return getCodes(DefaultGroup.TELELAVORO_RICERCATORI_TECNOLOGI); + // } public static List employeeDisabledRelativeCodes() { return getCodes(DefaultGroup.G_18_PARENTI_DIPENDENTI); diff --git a/app/models/absences/definitions/DefaultTakable.java b/app/models/absences/definitions/DefaultTakable.java index f4bb34fe1..4af3f50c8 100644 --- a/app/models/absences/definitions/DefaultTakable.java +++ b/app/models/absences/definitions/DefaultTakable.java @@ -533,7 +533,7 @@ public enum DefaultTakable { DefaultAbsenceType.A_96, DefaultAbsenceType.A_96A, DefaultAbsenceType.A_96B, DefaultAbsenceType.A_98, DefaultAbsenceType.A_52, DefaultAbsenceType.A_100, DefaultAbsenceType.A_401, DefaultAbsenceType.A_412, - DefaultAbsenceType.A_402,DefaultAbsenceType.A_62, + DefaultAbsenceType.A_402, DefaultAbsenceType.A_62, DefaultAbsenceType.A_62A, DefaultAbsenceType.A_62D, DefaultAbsenceType.A_98CV, DefaultAbsenceType.A_39LA, DefaultAbsenceType.A_40LA, DefaultAbsenceType.A_46, DefaultAbsenceType.A_46RA, DefaultAbsenceType.A_VAC19), diff --git a/app/models/base/InformationRequest.java b/app/models/base/InformationRequest.java index 7b99a085e..b6ce3e752 100644 --- a/app/models/base/InformationRequest.java +++ b/app/models/base/InformationRequest.java @@ -40,6 +40,12 @@ import org.hibernate.envers.NotAudited; import play.data.validation.Required; +/** + * Classe di base delle richieste di informazione. + * + * @author dario + * + */ @ToString(of = {"informationType", "person", "startAt", "endTo", "officeHeadApproved", "officeHeadApprovalRequired"}) @Audited diff --git a/app/models/dto/MealTicketComposition.java b/app/models/dto/MealTicketComposition.java index 2cf4a1a06..46e5b6e74 100644 --- a/app/models/dto/MealTicketComposition.java +++ b/app/models/dto/MealTicketComposition.java @@ -20,6 +20,12 @@ import models.enumerate.BlockType; +/** + * Dto per ritornare la conformazione di blocchetti di buoni pasto per attestati. + * + * @author dario + * + */ public class MealTicketComposition { public Integer paperyMealTicket; diff --git a/app/models/dto/NewTeleworkDto.java b/app/models/dto/NewTeleworkDto.java index 753ed8a55..09c78faf0 100644 --- a/app/models/dto/NewTeleworkDto.java +++ b/app/models/dto/NewTeleworkDto.java @@ -5,6 +5,12 @@ import java.util.Locale; import javax.persistence.Transient; +/** + * Dto per l'oggetto telework da mandare al teleworkstampings. + * + * @author dario + * + */ public class NewTeleworkDto { public LocalDate date; diff --git a/app/models/enumerate/BlockType.java b/app/models/enumerate/BlockType.java index a1b041e22..8f6c4c07f 100644 --- a/app/models/enumerate/BlockType.java +++ b/app/models/enumerate/BlockType.java @@ -18,6 +18,12 @@ package models.enumerate; +/** + * enumerato contenente le tipologie di blocchetto di buoni pasto per attestati. + * + * @author dario + * + */ public enum BlockType { electronic("Elettronico"), diff --git a/app/models/enumerate/InformationType.java b/app/models/enumerate/InformationType.java index 8f8c10cef..2a117e100 100644 --- a/app/models/enumerate/InformationType.java +++ b/app/models/enumerate/InformationType.java @@ -24,6 +24,7 @@ /** * Enumerato che gestisce la tipologia di richiesta informativa. + * * @author dario * */ diff --git a/app/models/informationrequests/IllnessRequest.java b/app/models/informationrequests/IllnessRequest.java index c8e1dc798..eb4d741bf 100644 --- a/app/models/informationrequests/IllnessRequest.java +++ b/app/models/informationrequests/IllnessRequest.java @@ -26,6 +26,12 @@ import org.hibernate.envers.Audited; import play.data.validation.Required; +/** + * Classe di richieste informative per malattia. + * + * @author dario + * + */ @Audited @Entity @Table(name = "illness_requests") diff --git a/app/models/informationrequests/InformationRequestEvent.java b/app/models/informationrequests/InformationRequestEvent.java index 1dfd6633b..1a663502b 100644 --- a/app/models/informationrequests/InformationRequestEvent.java +++ b/app/models/informationrequests/InformationRequestEvent.java @@ -37,7 +37,7 @@ /** * Evento del flusso di approvazione di una richiesta informativa. - * + * * @author dario * */ diff --git a/app/models/informationrequests/ServiceRequest.java b/app/models/informationrequests/ServiceRequest.java index a3724a5ba..5ae2fd89c 100644 --- a/app/models/informationrequests/ServiceRequest.java +++ b/app/models/informationrequests/ServiceRequest.java @@ -29,6 +29,12 @@ import org.hibernate.envers.Audited; import play.data.validation.Required; +/** + * Classe di richiesta di uscite di servizio. + * + * @author dario + * + */ @Audited @Entity @Table(name = "service_requests") diff --git a/app/models/informationrequests/TeleworkRequest.java b/app/models/informationrequests/TeleworkRequest.java index 35646cbc2..0396a83e6 100644 --- a/app/models/informationrequests/TeleworkRequest.java +++ b/app/models/informationrequests/TeleworkRequest.java @@ -27,6 +27,7 @@ /** * classe relativa alla richiesta di telelavoro. + * * @author dario * */ From 2323ad807d952b86c2f4daaf8b7853da161c975a Mon Sep 17 00:00:00 2001 From: Loredana Sideri Date: Tue, 26 Apr 2022 09:35:23 +0200 Subject: [PATCH 11/19] la missione oraria permette la decurtazione della pausa pranzo --- app/manager/PersonDayManager.java | 34 +++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/app/manager/PersonDayManager.java b/app/manager/PersonDayManager.java index fce843df2..c6540f2b4 100755 --- a/app/manager/PersonDayManager.java +++ b/app/manager/PersonDayManager.java @@ -402,10 +402,10 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, // Gli invarianti del calcolo. // - // 1) Tempo timbrature -> Tempo fra coppie ritenute valide. + // 1) Tempo timbrature -> Tempo fra coppie ritenute valide. // 2) Tempo dentro la fascia -> N.B nei giorni di festa è zero - // 3) Tempo fuori fascia -> Tempo timbrature - Tempo dentro fascia - // 4) Tempo di festa -> Tempo timbrature giorno di festa + // 3) Tempo fuori fascia -> Tempo timbrature - Tempo dentro fascia + // 4) Tempo di festa -> Tempo timbrature giorno di festa List validPairs = getValidPairStampings(personDay.stampings, exitingNow); @@ -461,7 +461,6 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, } personDay.setJustifiedTimeNoMeal(personDay.getJustifiedTimeNoMeal() + justifiedMinutes); - } /*Qui inizia il pezzo aggiunto che controlla la provenienza delle timbrature*/ @@ -472,7 +471,6 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, if (!link.isEmpty() && validPairs.size() > 1) { justifiedTimeBetweenZones = justifiedTimeBetweenZones(validPairs, startWork, endWork); - } personDay.setJustifiedTimeBetweenZones(justifiedTimeBetweenZones); @@ -484,8 +482,6 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, + personDay.getApprovedOutOpening() + personDay.getJustifiedTimeBetweenZones(); - - //TODO: il tempo ricavato deve essere persistito sul personDay su un nuovo campo // così posso sfruttare quel campo nel tabellone timbrature @@ -494,12 +490,15 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, mealTicketHandlerAndDecurtedMeal(personDay, wttd, stampingTimeInOpening, startLunch, endLunch, exitingNow); - //Gestione decurtazione. Si applica solo se non ci sono assenze orarie che maturano il buono. - if (personDay.getJustifiedTimeMeal() > 0) { - personDay.setDecurtedMeal(0); - } else { + //Gestione decurtazione. + // Si applica solo se non ci sono assenze orarie che maturano il buono + // o se il dipendente e' in missione oraria nella giornata da valutare + if (isOnHourlyMission(personDay) || personDay.getJustifiedTimeMeal() <= 0) { personDay.setTimeAtWork(personDay.getTimeAtWork() - personDay.getDecurtedMeal()); } + else { + personDay.setDecurtedMeal(0); + } // Il caso di assenze a giustificazione "quello che manca" if (getCompleteDayAndAddOvertime(personDay).isPresent()) { @@ -1304,6 +1303,19 @@ public boolean isOnMission(PersonDay personDay) { .findAny().isPresent(); } + /** + * Se la persona è in missione oraria nel giorno. + * + * @param personDay giorno + * @return esito + */ + public boolean isOnHourlyMission(PersonDay personDay) { + return personDay.absences.stream() + .filter(absence -> absence.absenceType.code.equals("92M")) + .findAny().isPresent(); + } + + /** * Il numero di coppie ingresso/uscita da stampare per il personday. */ From 6b8e629a79a0a1f4ee942dfcde2aceaa63465ecc Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Tue, 26 Apr 2022 15:08:13 +0200 Subject: [PATCH 12/19] Reinserito codice 31_2020. Risolto problema nella procedura di allineamento enumerati-codici di assenza. --- .../services/absences/EnumAllineator.java | 2 +- .../definitions/DefaultAbsenceType.java | 54 +++++++++---------- .../definitions/DefaultCategoryType.java | 2 +- .../absences/definitions/DefaultGroup.java | 3 ++ .../absences/definitions/DefaultTakable.java | 6 ++- 5 files changed, 37 insertions(+), 30 deletions(-) diff --git a/app/manager/services/absences/EnumAllineator.java b/app/manager/services/absences/EnumAllineator.java index 34865e086..740c104d8 100644 --- a/app/manager/services/absences/EnumAllineator.java +++ b/app/manager/services/absences/EnumAllineator.java @@ -80,7 +80,7 @@ public void handleAbsenceTypes(boolean initialization) { for (AbsenceType absenceType : allAbsenceType) { Optional defaultAbsenceType = DefaultAbsenceType.byCode(absenceType); if (defaultAbsenceType.isPresent()) { - if (defaultAbsenceType.get().toUpdate) { + if (absenceType.toUpdate) { //gli absenceType che esistono le allineo all'enum absenceType.code = defaultAbsenceType.get().getCode(); absenceType.certificateCode = defaultAbsenceType.get().certificationCode; diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index a0834db45..c0323d6a4 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -36,7 +36,7 @@ * */ public enum DefaultAbsenceType { - + A_VAC19("VAC-19", "Assenza per la somministrazione del vaccino contro il COVID-19", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, @@ -61,12 +61,12 @@ public enum DefaultAbsenceType { "Emergenza coronavirus, attività lavorativa presso il domicilio dei dipendenti", false, ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, false, 0, null, Sets.newHashSet(), null, new LocalDate(2022, 4, 15), true, false, true), - + A_COVID19BP("COVID19", "Emergenza coronavirus, attività lavorativa presso il domicilio dei dipendenti " - + "con maturazione buono pasto", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, true, 0, null, - Sets.newHashSet(), null, new LocalDate(2022, 4, 15), true, false, true), + + "con maturazione buono pasto", false, + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, true, 0, null, + Sets.newHashSet(), null, new LocalDate(2022, 4, 15), true, false, true), A_98CV("98CV", "Assente ingiustificato no greenpass", false, @@ -80,9 +80,9 @@ public enum DefaultAbsenceType { A_39LANOBP("39LA", "Lavoro agile per dipendenti fragili o per assistenza a disabile/immunodepresso " - + "senza buono pasto", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, false, 0, null, - Sets.newHashSet(), null, null, true, false, true), + + "senza buono pasto", false, + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, false, 0, null, + Sets.newHashSet(), null, null, true, false, true), A_40LA("40LA", "Lavoro agile per quarantena/isolamento fiduciario", false, @@ -253,7 +253,7 @@ public enum DefaultAbsenceType { A_C16("C16", "Cong. gravi motivi familiari NR", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), - + A_C17("C17", "Congedo assistenza figlio disabile L. 104/92", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), @@ -472,15 +472,15 @@ public enum DefaultAbsenceType { false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, true, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), - + // A_31_2019("31", "Ferie anno 2019 prorogate", false, // ImmutableSet.of(JustifiedTypeName.all_day), // 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 1, 1), // new LocalDate(2021, 2, 15), false, true, true), - // A_31_2020("31", "Ferie anno 2020 prorogate", false, - // ImmutableSet.of(JustifiedTypeName.all_day), - // 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 11, 1), - // new LocalDate(2022, 2, 20), false, true, true), + A_31_2020("31", "Ferie anno 2020 prorogate", false, + ImmutableSet.of(JustifiedTypeName.all_day), + 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 11, 1), + null, false, true, true), A_31("31", "Ferie anno precedente", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), @@ -534,11 +534,11 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_COVID50("COVID50", "Congedo parentale straordinario al 50%.", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, new LocalDate(2021, 9, 30), false, true, true), - + A_COV50("COV50", "congedo parentale straordinario al 50%.", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 10, 1), null, false, true, true), - + A_COV50M("COV50M", "Congedo parentale straordinario al 50% in ore e minuti.", true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, @@ -546,11 +546,11 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_COV50H("COV50H", "Congedo parentale straordinario al 50% completamento giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), - + A_COV00("COV00", "congedo parentale straordinario al 0%.", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 10, 1), null, false, true, true), - + A_COV00M("COV00M", "Congedo parentale straordinario al 0% in ore e minuti.", true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, @@ -558,7 +558,7 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_COV00H("COV00H", "Congedo parentale straordinario al 0% completamento giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), - + A_25("25", "Astensione facoltativa post partum 30% primo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), @@ -861,7 +861,7 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_143("143", "malattia terzo figlio non retribuita", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), new LocalDate(1990, 1, 1), new LocalDate(2008, 12, 31), false, true, true), - + A_124("124", "malattia quarto figlio/a <= 3 anni retribuita 100%", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), @@ -879,12 +879,12 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_45("45", "Congedo straordinario permesso per matrimonio", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), - + A_46("46", "cong.str./permesso richiamo armi", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), - + A_46RA("46RA", "cong.str/permesso richiamo armi 1gg", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, @@ -911,7 +911,7 @@ null, new LocalDate(2020, 1, 1), true, true, true), ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, true, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), - + A_71("71", "permesso sindacale 1 ora", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), @@ -1223,7 +1223,7 @@ null, new LocalDate(2020, 1, 1), true, true, true), false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, false, 0, null, Sets.newHashSet(), null, null, false, true, true), - + A_55("55", "aspett. per funzioni pubbliche", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, @@ -1756,7 +1756,7 @@ null, new LocalDate(2021, 12, 31), false, true, true), A_412("412", "Riposo compensativo missione Antartide", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2022, 1, 1), new LocalDate(2022, 12, 31), false, true, true), - + A_NC("NC", "Giorno non conteggiato ai fini del tempo a lavoro", true, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, @@ -1793,7 +1793,7 @@ null, new LocalDate(2021, 12, 31), false, true, true), A_96B("96B", "sospensione dal servizio", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true); - + public String certificationCode; public String description; @@ -1816,7 +1816,7 @@ null, new LocalDate(2021, 12, 31), false, true, true), public Boolean reperibilityCompatible; public Boolean isRealAbsenceType; - + public boolean toUpdate; /** diff --git a/app/models/absences/definitions/DefaultCategoryType.java b/app/models/absences/definitions/DefaultCategoryType.java index 08f379759..ad87baf79 100644 --- a/app/models/absences/definitions/DefaultCategoryType.java +++ b/app/models/absences/definitions/DefaultCategoryType.java @@ -36,7 +36,7 @@ public enum DefaultCategoryType { FERIE_CNR("Ferie e permessi legge", 2, DefaultTab.FERIE_PERMESSI_RIPOSI), //ESENZIONE_COVID19("Esenzione da lavoro causa COVID19", 3, DefaultTab.FERIE_PERMESSI_RIPOSI), RIPOSI_COMPENSATIVI_CNR("Riposi compensativi", 3, DefaultTab.FERIE_PERMESSI_RIPOSI), - + PROROGA_FERIE_2020("Proroga ferie 2020", 4, DefaultTab.FERIE_PERMESSI_RIPOSI), ASTENSIONE_POSTPARTUM("Astensione post partum", 5, DefaultTab.CONGEDI_PARENTALI), CONGEDI_PRENATALI("Congedi prenatali", 7, DefaultTab.CONGEDI_PARENTALI), diff --git a/app/models/absences/definitions/DefaultGroup.java b/app/models/absences/definitions/DefaultGroup.java index 7efbcd8b8..9d4c08350 100644 --- a/app/models/absences/definitions/DefaultGroup.java +++ b/app/models/absences/definitions/DefaultGroup.java @@ -167,6 +167,9 @@ public enum DefaultGroup { // GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, DefaultTakable.T_ESENZ_19, // null, null, false, false), + PROROGA_FERIE_2020("31_2020 - Proroga ferie 2020", "", DefaultCategoryType.PROROGA_FERIE_2020, 2, // must be greater than FERIE_CNR + GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, + DefaultTakable.T_FERIE_CNR_PROROGA_2020, null, null, false, false), FERIE_CNR_DIPENDENTI("Ferie e permessi legge", "", DefaultCategoryType.FERIE_DIPENDENTI, 2, // must be greater than FERIE_CNR GroupAbsenceTypePattern.vacationsCnr, PeriodType.always, DefaultTakable.T_FERIE_CNR, null, diff --git a/app/models/absences/definitions/DefaultTakable.java b/app/models/absences/definitions/DefaultTakable.java index 4af3f50c8..e8429da9a 100644 --- a/app/models/absences/definitions/DefaultTakable.java +++ b/app/models/absences/definitions/DefaultTakable.java @@ -193,7 +193,11 @@ public enum DefaultTakable { DefaultAbsenceType.A_32, DefaultAbsenceType.A_94), -1, null), - + + T_FERIE_CNR_PROROGA_2020(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_31_2020), + ImmutableSet.of(DefaultAbsenceType.A_31_2020), + -1, null), T_FERIE_CNR_PROROGA(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_31, From 1cc5c60823512bfcd471597ee3a0d8b89342af57 Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Tue, 26 Apr 2022 15:30:36 +0200 Subject: [PATCH 13/19] Aggiunta data di terminazione del codice 31_2020. Inserita per risolvere il problema di gestione codici inaf/cnr. --- CHANGELOG.md | 8 +++++++- app/models/absences/definitions/DefaultAbsenceType.java | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e768723..fbebb2cc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.5.1] - UNRELEASED +## [2.5.2] - UNRELEASED +### Changed + - Modificata procedura di allineamento dei codici di assenza con gli enumerati per risolvere + il problema CNR/INAF su alcuni codici. + - Reinserito il codice 31_2020 per le esigenze INAF + +## [2.5.1] - 2022-04-26 ### Added - Aggiunto controllo su API rest contracts/byPerson per fornire un messaggio di errore quando si tenta di leggere un contratto con previousContract non coerente diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index c0323d6a4..47bd393ef 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -480,7 +480,7 @@ public enum DefaultAbsenceType { A_31_2020("31", "Ferie anno 2020 prorogate", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 11, 1), - null, false, true, true), + new LocalDate(2022, 2, 28), false, true, true), A_31("31", "Ferie anno precedente", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), From ff5c3a6ce965f4f27db58c0c69c7b2c2725ee483 Mon Sep 17 00:00:00 2001 From: Cristian Lucchesi Date: Tue, 26 Apr 2022 15:33:39 +0200 Subject: [PATCH 14/19] Corretto changelog e version. --- CHANGELOG.md | 11 ++++------- VERSION | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbebb2cc7..41be224e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,19 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.5.2] - UNRELEASED -### Changed - - Modificata procedura di allineamento dei codici di assenza con gli enumerati per risolvere - il problema CNR/INAF su alcuni codici. - - Reinserito il codice 31_2020 per le esigenze INAF - -## [2.5.1] - 2022-04-26 +## [2.5.1] - UNRELEASED ### Added - Aggiunto controllo su API rest contracts/byPerson per fornire un messaggio di errore quando si tenta di leggere un contratto con previousContract non coerente ### Changed - Migliorato messaggio di errore in caso di inserimento via REST di buoni pasto già esistenti - Fix bug del permesso breve che non veniva eliminato quando si completava la giornata + - Modificata procedura di allineamento dei codici di assenza con gli enumerati per risolvere + il problema CNR/INAF su alcuni codici. + - Reinserito il codice 31_2020 per le esigenze INAF ## [2.5.0] - 2022-04-14 ### Added diff --git a/VERSION b/VERSION index c418c810b..a37a52cf5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.1-rc1 \ No newline at end of file +2.5.1-rc2 \ No newline at end of file From f1a20fc9546b9eccae7403fd68206aeda8dc84b4 Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Wed, 27 Apr 2022 18:02:17 +0200 Subject: [PATCH 15/19] Aggiunto l'enumerato MealTicketBehaviour. Serve per cambiare il comportamento del DefaultAbsenceType inserendo un comportamento meglio codificato per il caso del codice 103RT. --- .../services/absences/AbsenceService.java | 7 +++ .../definitions/DefaultAbsenceType.java | 54 +++++++++++-------- app/models/enumerate/MealTicketBehaviour.java | 43 +++++++++++++++ 3 files changed, 82 insertions(+), 22 deletions(-) create mode 100644 app/models/enumerate/MealTicketBehaviour.java diff --git a/app/manager/services/absences/AbsenceService.java b/app/manager/services/absences/AbsenceService.java index 9d0fde08a..0c1b78bc3 100644 --- a/app/manager/services/absences/AbsenceService.java +++ b/app/manager/services/absences/AbsenceService.java @@ -536,6 +536,8 @@ public List groupsPermitted(Person person, boolean readOnly) { // Fetch special groups final GroupAbsenceType employeeVacation = absenceComponentDao.groupAbsenceTypeByName(DefaultGroup.FERIE_CNR_DIPENDENTI.name()).get(); + final GroupAbsenceType employeeVacationExtension = + absenceComponentDao.groupAbsenceTypeByName(DefaultGroup.PROROGA_FERIE_2020.name()).get(); final GroupAbsenceType employeeCompensatory = absenceComponentDao.groupAbsenceTypeByName(DefaultGroup.RIPOSI_CNR_DIPENDENTI.name()).get(); final GroupAbsenceType employeeOffseat = @@ -589,6 +591,11 @@ public List groupsPermitted(Person person, boolean readOnly) { groupsPermitted.remove(covid19); } } + for (AbsenceType abt : employeeVacationExtension.category.getAbsenceTypes()) { + if (abt.isExpired()) { + groupsPermitted.remove(employeeVacationExtension); + } + } //groupsPermitted.remove(covid19); groupsPermitted.remove(medicalExams); groupsPermitted.remove(disabledRelativeAbsence); diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index 47bd393ef..8799ef21b 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -26,6 +26,7 @@ import models.absences.AbsenceType; import models.absences.JustifiedBehaviour.JustifiedBehaviourName; import models.absences.JustifiedType.JustifiedTypeName; +import models.enumerate.MealTicketBehaviour; import org.joda.time.LocalDate; @@ -39,55 +40,64 @@ public enum DefaultAbsenceType { A_VAC19("VAC-19", "Assenza per la somministrazione del vaccino contro il COVID-19", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, - Sets.newHashSet(), new LocalDate(2022, 1, 1), null, true, false, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), new LocalDate(2022, 1, 1), null, true, false, true), A_SMART("SMART", "Smartworking a completamento", false, - ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, false, false, 0, null, - Sets.newHashSet(), null, new LocalDate(2021, 11, 1), true, false, false), + ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + new LocalDate(2021, 11, 1), true, false, false), A_LAGILE("L-AGILE", "Lavoro agile", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, false, 0, null, - Sets.newHashSet(), new LocalDate(2022, 3, 29), null, true, false, true), + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + new LocalDate(2022, 3, 29), null, true, false, true), A_LAGILEBP("L-AGILE", "Lavoro agile con maturazione buono pasto", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, true, 0, null, - Sets.newHashSet(), new LocalDate(2022, 3, 29), null, true, false, true), + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + new LocalDate(2022, 3, 29), null, true, false, true), A_COVID19("COVID19", "Emergenza coronavirus, attività lavorativa presso il domicilio dei dipendenti", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, false, 0, null, - Sets.newHashSet(), null, new LocalDate(2022, 4, 15), true, false, true), + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + new LocalDate(2022, 4, 15), true, false, true), A_COVID19BP("COVID19", "Emergenza coronavirus, attività lavorativa presso il domicilio dei dipendenti " + "con maturazione buono pasto", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, true, 0, null, - Sets.newHashSet(), null, new LocalDate(2022, 4, 15), true, false, true), + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, + new LocalDate(2022, 4, 15), true, false, true), A_98CV("98CV", "Assente ingiustificato no greenpass", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, - Sets.newHashSet(), null, null, true, false, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, true, false, true), A_39LA("39LA", "Lavoro agile per dipendenti fragili o per assistenza a disabile/immunodepresso", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, true, 0, null, - Sets.newHashSet(), null, null, true, false, true), + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + null, null, true, false, true), A_39LANOBP("39LA", "Lavoro agile per dipendenti fragili o per assistenza a disabile/immunodepresso " + "senza buono pasto", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, false, 0, null, - Sets.newHashSet(), null, null, true, false, true), + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, true, false, true), A_40LA("40LA", "Lavoro agile per quarantena/isolamento fiduciario", false, - ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, true, 0, null, - Sets.newHashSet(), null, null, true, false, true), + ImmutableSet.of(JustifiedTypeName.assign_all_day), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, + null, true, false, true), A_18M("18M", "Permesso assistenza parenti/affini disabili L. 104/92 in ore e minuti", true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, @@ -1804,7 +1814,7 @@ null, new LocalDate(2021, 12, 31), false, true, true), public boolean consideredWeekEnd; - public boolean timeForMealTicket; + public MealTicketBehaviour timeForMealTicket; public Integer replacingTime; public JustifiedTypeName replacingType; // nullable @@ -1824,7 +1834,7 @@ null, new LocalDate(2021, 12, 31), false, true, true), */ private DefaultAbsenceType(String certificationCode, String description, boolean internalUse, Set justifiedTypeNamesPermitted, Integer justifiedTime, - boolean consideredWeekEnd, boolean timeForMealTicket, Integer replacingTime, + boolean consideredWeekEnd, MealTicketBehaviour timeForMealTicket, Integer replacingTime, JustifiedTypeName replacingType, Set behaviour, LocalDate validFrom, LocalDate validTo, Boolean reperibilityCompatible, Boolean isRealAbsenceType, boolean toUpdate) { diff --git a/app/models/enumerate/MealTicketBehaviour.java b/app/models/enumerate/MealTicketBehaviour.java new file mode 100644 index 000000000..fd820284a --- /dev/null +++ b/app/models/enumerate/MealTicketBehaviour.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2021 Consiglio Nazionale delle Ricerche + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package models.enumerate; + +/** + * enumerato contenente le tipologie di comportamento dei codici d'assenza + * per la maturazione del buono pasto. + * + * @author dario + * + */ +public enum MealTicketBehaviour { + + preventMealTicket("Impedisce buono pasto"), + allowMealTicket("Consente maturazione"), + notAllowMealTicket("Non consente maturazione"); + + public String description; + + MealTicketBehaviour(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } + +} From 32b4fcd6afd811ab722968a496bd2df84856daad Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 28 Apr 2022 14:57:06 +0200 Subject: [PATCH 16/19] Rimosso campo booleano e aggiunto campo stringa/enumerato. Iniziata la modifica su tutto il codice usando l'enumerato MealTicketBehaviour al posto del booleano nell'AbsenceType --- app/dao/absences/AbsenceComponentDao.java | 5 +- app/manager/PersonDayManager.java | 7 +- app/models/absences/AbsenceType.java | 14 +- .../definitions/DefaultAbsenceType.java | 1527 +++++++++++------ db/evolutions/189.sql | 9 + 5 files changed, 1014 insertions(+), 548 deletions(-) create mode 100644 db/evolutions/189.sql diff --git a/app/dao/absences/AbsenceComponentDao.java b/app/dao/absences/AbsenceComponentDao.java index 6a7cb225d..18412eec0 100755 --- a/app/dao/absences/AbsenceComponentDao.java +++ b/app/dao/absences/AbsenceComponentDao.java @@ -61,6 +61,7 @@ import models.absences.query.QJustifiedBehaviour; import models.absences.query.QJustifiedType; import models.absences.query.QTakableAbsenceBehaviour; +import models.enumerate.MealTicketBehaviour; import models.query.QContract; import models.query.QPerson; import models.query.QPersonDay; @@ -411,7 +412,7 @@ public List groupAbsenceTypeOfPattern(GroupAbsenceTypePattern public AbsenceType buildOrEditAbsenceType(String code, String description, int minutes, Set justifiedTypePermitted, JustifiedType complationType, int complationTime, boolean internalUse, boolean consideredWeekEnd, - boolean timeForMealticket, String certificateCode, LocalDate expire) { + MealTicketBehaviour mealTicketBehaviour, String certificateCode, LocalDate expire) { QAbsenceType absenceType = QAbsenceType.absenceType; AbsenceType obj = (AbsenceType) getQueryFactory() @@ -433,7 +434,7 @@ public AbsenceType buildOrEditAbsenceType(String code, String description, int m obj.replacingType = complationType; obj.replacingTime = complationTime; obj.internalUse = internalUse; - obj.timeForMealTicket = timeForMealticket; + obj.mealTicketBehaviour = mealTicketBehaviour; obj.consideredWeekEnd = consideredWeekEnd; obj.certificateCode = code; if (expire != null) { diff --git a/app/manager/PersonDayManager.java b/app/manager/PersonDayManager.java index 9102043f3..d3e5e2810 100755 --- a/app/manager/PersonDayManager.java +++ b/app/manager/PersonDayManager.java @@ -58,6 +58,7 @@ import models.absences.JustifiedBehaviour.JustifiedBehaviourName; import models.absences.JustifiedType.JustifiedTypeName; import models.enumerate.AbsenceTypeMapping; +import models.enumerate.MealTicketBehaviour; import models.enumerate.StampTypes; import models.enumerate.Troubles; import org.assertj.core.util.Strings; @@ -423,7 +424,7 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, Optional assignAllDay = getAssignAllDay(personDay); if (assignAllDay.isPresent()) { personDay.setTimeAtWork(wttd.workingTime); - setTicketStatusIfNotForced(personDay, assignAllDay.get().absenceType.timeForMealTicket); + setTicketStatusIfNotForced(personDay, assignAllDay.get().absenceType.mealTicketBehaviour); return personDay; } @@ -844,9 +845,9 @@ public void updateProgressive(PersonDay personDay, Optional previousF * Setta il valore della variabile isTicketAvailable solo se isTicketForcedByAdmin è false. * * @param pd personDay - * @param isTicketAvailable value. + * @param mealTicketBehaviour value. */ - public void setTicketStatusIfNotForced(PersonDay pd, boolean isTicketAvailable) { + public void setTicketStatusIfNotForced(PersonDay pd, MealTicketBehaviour mealTicketBehaviour) { if (!pd.isTicketForcedByAdmin()) { pd.setTicketAvailable(isTicketAvailable); diff --git a/app/models/absences/AbsenceType.java b/app/models/absences/AbsenceType.java index a5ef64dd0..9528ca784 100755 --- a/app/models/absences/AbsenceType.java +++ b/app/models/absences/AbsenceType.java @@ -29,6 +29,8 @@ import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; @@ -44,6 +46,7 @@ import models.absences.definitions.DefaultAbsenceType.Behaviour; import models.absences.definitions.DefaultGroup; import models.base.BaseModel; +import models.enumerate.MealTicketBehaviour; import models.enumerate.QualificationMapping; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; @@ -86,9 +89,14 @@ public class AbsenceType extends BaseModel { @Column(name = "considered_week_end") public boolean consideredWeekEnd = false; +// @Getter +// @Column(name = "time_for_mealticket") +// public boolean timeForMealTicket = false; + @Getter - @Column(name = "time_for_mealticket") - public boolean timeForMealTicket = false; + @Enumerated(EnumType.STRING) + @Column(name = "meal_ticket_behaviour") + public MealTicketBehaviour mealTicketBehaviour; @Getter @Column(name = "justified_time") @@ -411,7 +419,7 @@ public Optional matchEnum() { && defaultType.internalUse == this.internalUse && defaultType.justifiedTime.equals(this.justifiedTime) && defaultType.consideredWeekEnd == this.consideredWeekEnd - && defaultType.timeForMealTicket == this.timeForMealTicket + && defaultType.mealTicketBehaviour == this.mealTicketBehaviour && defaultType.replacingTime.equals(this.replacingTime) ) { //Tipi permessi diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index 8799ef21b..41e7b31d5 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -100,388 +100,467 @@ public enum DefaultAbsenceType { null, true, false, true), A_18M("18M", "Permesso assistenza parenti/affini disabili L. 104/92 in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_18("18", "Permesso assistenza parenti/affini disabili L. 104/92 intera giornata", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_18H1("18H1", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 1 ora", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_18H2("18H2", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 2 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 120, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_18H3("18H3", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 3 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 180, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_18H4("18H4", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 4 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 240, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_18H5("18H5", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 5 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_18H6("18H6", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 6 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - false, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), - null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 360, JustifiedTypeName.absence_type_minutes, + Sets.newHashSet(), null, null, false, true, true), A_18H7("18H7", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 7 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - false, 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), - null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 420, JustifiedTypeName.absence_type_minutes, + Sets.newHashSet(), null, null, false, true, true), A_18H8("18H8", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 8 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - false, 480, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), - null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 480, JustifiedTypeName.absence_type_minutes, + Sets.newHashSet(), null, null, false, true, true), A_18H9("18H9", "Permesso assistenza parenti/affini disabili L. 104/92 completamento 9 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - false, 540, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), - null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 540, JustifiedTypeName.absence_type_minutes, + Sets.newHashSet(), null, null, false, true, true), A_18P("18P", "Permesso provvisorio assistenza parenti/affini disabili L. 104/92 intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_18PM("18PM", "Permesso provvisorio assistenza parenti/affini disabili L. 104/92 in ore e minuti", - true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_18PH7("18P", "Permesso provvisorio assistenza parenti/affini disabili L. 104/92 " + "completamento giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), - 0, false, false, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, - false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, + Sets.newHashSet(), null, null, false, true, true), A_182M("182M", "Permesso assistenza secondo parenti/affini disabili L. 104/92 in ore e minuti", - true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_182("182", "Permesso assistenza secondo parenti/affini disabili L. 104/92 intera giornata", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_182H1("182H1", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 1 ora", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_182H2("182H2", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 2 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 120, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_182H3("182H3", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 3 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 180, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_182H4("182H4", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 4 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 240, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_182H5("182H5", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 5 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_182H6("182H6", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 6 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - false, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), - null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 360, JustifiedTypeName.absence_type_minutes, + Sets.newHashSet(), null, null, false, true, true), A_182H7("182H7", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 7 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - false, 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), - null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 420, JustifiedTypeName.absence_type_minutes, + Sets.newHashSet(), null, null, false, true, true), A_182H8("182H8", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 8 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 480, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_182H9("182H9", "Permesso assistenza secondo parenti/affini disabili L.104/92 compl. 9 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 540, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 540, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_182P("182P", "Permesso provvisorio assistenza secondo parenti/affini disabili L. 104/92 " + "intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_182PM("182PM", "Permesso provvisorio assistenza secondo parenti/affini disabili L. 104/92 " + "in ore e minuti", true, ImmutableSet.of(JustifiedTypeName.specified_minutes), - 0, false, false, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_182PH7("182P", "Permesso provvisorio assistenza secondo parenti/affini disabili L. 104/92 " + "completamento giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), - 0, false, false, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, - false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, + Sets.newHashSet(), null, null, false, true, true), A_19M("19M", "Permesso per dipendente disabile L. 104/92 in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_19("19", "Permesso per dipendente disabile L. 104/92 intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_19H1("19H1", "Permesso per dipendente disabile L. 104/92 completamento 1 ora", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19H2("19H2", "Permesso per dipendente disabile L. 104/92 completamento 2 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 120, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19H3("19H3", "Permesso per dipendente disabile L. 104/92 completamento 3 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 180, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19H4("19H4", "Permesso per dipendente disabile L. 104/92 completamento 4 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 240, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19H5("19H5", "Permesso per dipendente disabile L. 104/92 completamento 5 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, - 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, - false, true, true), + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 300, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19H6("19H6", "Permesso per dipendente disabile L. 104/92 completamento 6 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, - 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, - false, true, true), + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 360, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19H7("19H7", "Permesso per dipendente disabile L. 104/92 completamento 7 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, - 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, - false, true, true), + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 420, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19H8("19H8", "Permesso per dipendente disabile L. 104/92 completamento 8 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, - 480, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, - false, true, true), + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 480, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19H9("19H9", "Permesso per dipendente disabile L. 104/92 completamento 9 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, - 540, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, - false, true, true), + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 540, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_19P("19P", "Permesso provvisorio per dipendente disabile L. 104/92 intera giornata", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_19PM("19PM", "Permesso provvisorio per dipendente disabile L. 104/92 in ore e minuti", true, ImmutableSet.of(JustifiedTypeName.specified_minutes), - 0, false, false, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_19PH7("19P", "Permesso provvisorio per dipendente disabile L. 104/92 completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), // Il tempo per buono pasto in questo momento è disabilitato. Capire. A_26("26", "Permesso per dipendente disabile L. 104/92 due ore giornaliere", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_26BP("26", "Permesso per dipendente disabile L. 104/92 due ore giornaliere con buono pasto", - false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, true, 0, null, + false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_C16("C16", "Cong. gravi motivi familiari NR", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, - null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_C17("C17", "Congedo assistenza figlio disabile L. 104/92", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, - null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_C18("C18", "Congedo straordinario per assistenza L. 104/92", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), - null, null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_661MO("661MO", "Permesso orario per motivi personali in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, new LocalDate(2018, 6, 30), false, true, true), A_661M("661M", "Permesso orario per motivi personali in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime), new Behaviour(JustifiedBehaviourName.minimumTime, 60), new Behaviour(JustifiedBehaviourName.maximumTime, 300)), new LocalDate(2018, 7, 1), null, true, true, true), A_661G("661G", "Permesso orario per motivi personali intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.takenPercentageTime, 834)), null, null, false, true, true), A_661H1("661H1", "Permesso orario per motivi personali completamento 1 ora", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_661H2("661H2", "Permesso orario per motivi personali completamento 2 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 120, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_661H3("661H3", "Permesso orario per motivi personali completamento 3 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 180, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_661H4("661H4", "Permesso orario per motivi personali completamento 4 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 240, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_661H5("661H5", "Permesso orario per motivi personali completamento 5 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 300, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_661H6("661H6", "Permesso orario per motivi personali completamento 6 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 360, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, new LocalDate(2018, 12, 31), false, true, true), A_661H7("661H7", "Permesso orario per motivi personali completamento 7 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, - 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 420, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, new LocalDate(2018, 12, 31), false, true, true), A_661H8("661H8", "Permesso orario per motivi personali completamento 8 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - false, 480, JustifiedTypeName.absence_type_minutes, + MealTicketBehaviour.notAllowMealTicket, 480, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, new LocalDate(2018, 12, 31), false, true, true), A_661H9("661H9", "Permesso orario per motivi personali completamento 9 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, - false, false, 540, JustifiedTypeName.absence_type_minutes, + false, MealTicketBehaviour.notAllowMealTicket, 540, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, new LocalDate(2018, 12, 31), false, true, true), A_631M("631M", "Permesso orario visita medica in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime), new Behaviour(JustifiedBehaviourName.minimumTime, 60), new Behaviour(JustifiedBehaviourName.maximumTime, 360)), new LocalDate(2018, 7, 1), null, false, true, true), A_631H1("631H1", "Permesso orario visita medica completamento 1 ora", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2018, 7, 1), null, false, true, true), A_631H2("631H2", "Permesso orario visita medica completamento 2 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 120, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2018, 7, 1), null, false, true, true), A_631H3("631H3", "Permesso orario visita medica completamento 3 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 180, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2018, 7, 1), null, false, true, true), A_631H4("631H4", "Permesso orario visita medica completamento 4 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 240, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2018, 7, 1), null, false, true, true), A_631H5("631H5", "Permesso orario visita medica completamento 5 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 300, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2018, 7, 1), null, false, true, true), A_631H6("631H6", "Permesso orario visita medica completamento 6 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 360, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2018, 7, 1), null, false, true, true), A_631G("631G", "Permesso visita medica intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2018, 7, 1), null, false, true, true), // il vecchio codice, capire se andrà contato nel gruppo A_631("631", "Permesso visita medica", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - false, false, 0, null, Sets.newHashSet(), null, new LocalDate(2018, 6, 30), - false, true, true), + false, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, new LocalDate(2018, 6, 30), false, true, true), A_89("89", "Permesso diritto allo studio completamento giornata", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, JustifiedTypeName.all_day, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_89M("89M", "Permesso diritto allo studio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_98("98", "Assenza Ingiustificata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_99("99", "permesso per diritto allo studio", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_0M("0M", "Permesso assemblea in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_01("01", "Assemblea completamento 1 ora", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, true, 60, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.allowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_02("02", "Assemblea completamento 2 ore", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, - false, true, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, + false, MealTicketBehaviour.allowMealTicket, 120, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_03("03", "Assemblea completamento 3 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, true, 180, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.allowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_04("04", "Assemblea completamento 4 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, true, 240, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.allowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_05("05", "Assemblea completamento 5 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, true, 300, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.allowMealTicket, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_06("06", "Assemblea completamento 6 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, true, 360, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.allowMealTicket, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_07("07", "Assemblea completamento 7 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, true, 420, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.allowMealTicket, 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_08("08", "Assemblea completamento 8 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, true, - 480, JustifiedTypeName.absence_type_minutes, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.allowMealTicket,480, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_09BI("09B", "Permesso visita medica completamento giornata da importazione", true, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_92("92", "Missione", false, ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, - true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_92E("92E", "Missione all'estero", false, - ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_92M("92M", "Missione in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2019, 2, 1), null, false, true, true), A_92NG("92", "Missione che non giustifica niente ai fini del tempo a lavoro", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_92RE("92RE", "Missione comune residenza BP", false, - ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, false, true, 0, + ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2019, 4, 1), null, false, true, true), A_92H1("92H1", "Missione 1 ora", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - false, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), - new LocalDate(2019, 2, 15), null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, + Sets.newHashSet(), new LocalDate(2019, 2, 15), null, false, true, true), A_92H2("92H2", "Missione 2 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 120, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2019, 2, 15), null, false, true, true), A_92H3("92H3", "Missione 3 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 180, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2019, 2, 15), null, false, true, true), A_92H4("92H4", "Missione 4 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 240, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2019, 2, 15), null, false, true, true), A_92H5("92H5", "Missione 5 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 300, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2019, 2, 15), null, false, true, true), A_92H6("92H6", "Missione 6 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 360, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2019, 2, 15), null, false, true, true), A_92H7("92H7", "Missione 7 ore", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, - 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 420, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2019, 2, 15), null, false, true, true), A_92HO1("92H1", "Missione 1 ora", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, true, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), - new LocalDate(2019, 2, 14), false, true, true), + 60, false, MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), A_92HO2("92H2", "Missione 2 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), A_92HO3("92H3", "Missione 3 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), A_92HO4("92H4", "Missione 4 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), A_92HO5("92H5", "Missione 5 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), A_92HO6("92H6", "Missione 6 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, true, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), A_92HO7("92H7", "Missione 7 ore", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, - false, true, 0, null, Sets.newHashSet(), new LocalDate(2011, 1, 1), - new LocalDate(2019, 2, 14), false, true, true), + false, MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + new LocalDate(2011, 1, 1), new LocalDate(2019, 2, 14), false, true, true), // A_31_2019("31", "Ferie anno 2019 prorogate", false, // ImmutableSet.of(JustifiedTypeName.all_day), @@ -489,1319 +568,1687 @@ public enum DefaultAbsenceType { // new LocalDate(2021, 2, 15), false, true, true), A_31_2020("31", "Ferie anno 2020 prorogate", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), new LocalDate(2021, 11, 1), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), new LocalDate(2021, 11, 1), new LocalDate(2022, 2, 28), false, true, true), A_31("31", "Ferie anno precedente", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_94("94", "festività soppresse (ex legge 937/77)", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_32("32", "Ferie anno corrente", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_ESENZ19("ESENZ19", "esenzione dal servizo per Covid-19", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, new LocalDate(2020, 11, 1), true, true, true), A_37("37", "ferie anno precedente (dopo il 31/8)", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_91("91", "Riposo compensativo", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, - false, 0, null, Sets.newHashSet(), null, null, true, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, true, true, true), A_91F("91F", "Riposo compensativo recupero giornata lavorativa festiva", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, true, true, true), A_91CE("91", "Riposo compensativo per chiusura ente", false, - ImmutableSet.of(JustifiedTypeName.recover_time), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.recover_time), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, new LocalDate(2020, 1, 1), true, true, true), A_PB("PB", "Permesso breve 36 ore anno", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes_limit), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes_limit), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_105BP("105BP", "Convenzione CNR - Università", false, - ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, false, true), A_23("23", "Astensione facoltativa post partum 100% primo figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_23M("23M", "Astensione facoltativa post partum 100% primo figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_23H7("23H7", "Astensione facoltativa post partum 100% primo figlio completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_23U("23U", "Astensione facoltativa post partum 100% primo figlio intera giornata " + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), - 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_COVID50("COVID50", "Congedo parentale straordinario al 50%.", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, new LocalDate(2021, 9, 30), false, true, true), A_COV50("COV50", "congedo parentale straordinario al 50%.", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2021, 10, 1), null, false, true, true), A_COV50M("COV50M", "Congedo parentale straordinario al 50% in ore e minuti.", - true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_COV50H("COV50H", "Congedo parentale straordinario al 50% completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_COV00("COV00", "congedo parentale straordinario al 0%.", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2021, 10, 1), null, false, true, true), A_COV00M("COV00M", "Congedo parentale straordinario al 0% in ore e minuti.", - true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_COV00H("COV00H", "Congedo parentale straordinario al 0% completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_25("25", "Astensione facoltativa post partum 30% primo figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_25M("25M", "Astensione facoltativa post partum 30% primo figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_25H7("25H7", "Astensione facoltativa post partum 30% primo figlio completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_25U("25U", "Astensione facoltativa post partum 30% primo figlio intera giornata altro genitore", - true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, false, 0, null, + true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_24("24", "Astensione facoltativa post partum non retrib. primo figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_24M("24M", "Astensione facoltativa post partum non retrib. primo figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_24H7("24H7", "Astensione facoltativa post partum non retrib. primo figlio completamento " - + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_24U("24U", "Astensione facoltativa post partum non retrib. primo figlio intera giornata altro " - + "genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, false, false, + + "genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_232("232", "Astensione facoltativa post partum 100% secondo figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_232M("232M", "Astensione facoltativa post partum 100% secondo figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_232H7("232H7", "Astensione facoltativa post partum 100% secondo figlio completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_232U("232U", "Astensione facoltativa post partum 100% secondo figlio intera giornata " + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, - true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_252M("252M", "Astensione facoltativa post partum 30% secondo figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_252("252", "Astensione facoltativa post partum 30% secondo figlio intera giornata", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_252H7("252H7", "Astensione facoltativa post partum 30% secondo figlio completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_252U("252U", "Astensione facoltativa post partum 30% secondo figlio intera giornata " - + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, false, + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_242("242", "Astensione facoltativa post partum non retrib. secondo figlio intera giornata", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_242M("242M", "Astensione facoltativa post partum non retrib. secondo figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_242H7("242H7", "Astensione facoltativa post partum non retrib. secondo figlio completamento " - + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_242U("242U", "Astensione facoltativa post partum non retrib. secondo figlio intera giornata " - + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, false, false, + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_233("233", "Astensione facoltativa post partum 100% terzo figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_233M("233M", "Astensione facoltativa post partum 100% terzo figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_233H7("233H7", "Astensione facoltativa post partum 100% terzo figlio completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_233U("233U", "Astensione facoltativa post partum 100% terzo figlio intera giornata " + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, - true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_253("253", "Astensione facoltativa post partum 30% terzo figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_253M("253M", "Astensione facoltativa post partum 30% terzo figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_253H7("253H7", "Astensione facoltativa post partum 30% terzo figlio completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_253U("253U", "Astensione facoltativa post partum 30% terzo figlio intera giornata " - + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, false, + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_243("243", "Astensione facoltativa post partum non retrib. terzo figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_243M("243M", "Astensione facoltativa post partum non retrib. terzo figlio in ore e minuti", - true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_243H7("243H7", "Astensione facoltativa post partum non retrib. terzo figlio completamento " - + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_243U("243U", "Astensione facoltativa post partum non retrib. terzo figlio intera giornata " - + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, false, false, + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_234("234", "Astensione facoltativa post partum 100% quarto figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_234M("234M", "Astensione facoltativa post partum 100% quarto figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_234H7("234H7", "Astensione facoltativa post partum 100% quarto figlio completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_234U("234U", "Astensione facoltativa post partum 100% quarto figlio intera giornata " - + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, false, - 0, null, Sets.newHashSet(), null, null, false, true, true), + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_254("254", "Astensione facoltativa post partum 30% quarto figlio intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, - null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_254M("254M", "Astensione facoltativa post partum 30% quarto figlio in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_254H7("254H7", "Astensione facoltativa post partum 30% quarto figlio completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_254U("254U", "Astensione facoltativa post partum 30% quarto figlio intera giornata " - + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, false, + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_244("244", "Astensione facoltativa post partum non retrib. quarto figlio intera giornata", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_244M("244M", "Astensione facoltativa post partum non retrib. quarto figlio in ore e minuti", - true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + true, ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_244H7("244H7", "Astensione facoltativa post partum non retrib. quarto figlio completamento " - + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_244U("244U", "Astensione facoltativa post partum non retrib. quarto figlio intera giornata " + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, + null, Sets.newHashSet(), null, null, false, true, true), A_25P("25P", "Prolungamento astensione facoltativa post partum 30% intera giornata", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, - null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_25PM("25M", "Prolungamento astensione facoltativa post partum 30% in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_25PH7("25H7", "Prolungamento astensione facoltativa post partum 30% completamento giornata", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_20("20", "Congedo/permesso DPR 1026 Art. 20", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, true, false, 0, null, Sets.newHashSet(), null, new LocalDate(2019, 12, 31), - false, true, true), + 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, new LocalDate(2019, 12, 31), false, true, true), A_20M("20M", "Congedo/permesso DPR 1026 Art. 20 in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2020, 1, 1), null, false, true, true), A_20H1("20H1", "Congedo/permesso DPR 1026 Art. 20 1 ora", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2020, 1, 1), null, false, true, true), A_20H2("20H2", "Congedo/permesso DPR 1026 Art. 20 2 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 120, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2020, 1, 1), null, false, true, true), A_20H3("20H3", "Congedo/permesso DPR 1026 Art. 20 3 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 180, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2020, 1, 1), null, false, true, true), A_20H4("20H4", "Congedo/permesso DPR 1026 Art. 20 4 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 240, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2020, 1, 1), null, false, true, true), A_20H5("20H5", "Congedo/permesso DPR 1026 Art. 20 5 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 300, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2020, 1, 1), null, false, true, true), A_20H6("20H6", "Congedo/permesso DPR 1026 Art. 20 6 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 360, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2020, 1, 1), null, false, true, true), A_20H7("20H7", "Congedo/permesso DPR 1026 Art. 20 7 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 420, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), new LocalDate(2020, 1, 1), null, false, true, true), A_21("21", "Congedo/permesso per maternità", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), - A_111("111", "Malattia", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, + A_111("111", "Malattia", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_111FR("111FR", "Dipendenti con fragilità non SW", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_111VM("111VM", "gg visite/terapie/prest. spec. <= 9MM malat", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_111SCM("111SCM", "sosp.cautelare malattia <= 9mesi", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_119VM("119VM", "gg visite/terapie/prest. spec. > 9MM malat", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_115VM("115VM", "gg visite/terapie/prest. spec. > 12MM malat", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_11S("11S", "Malattia superiore a 15 gg lav.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_115("115", "Malattia superiore a 12 mesi", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_116("116", "Malattia superiore a 18 mesi", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_117("117", "Terapia invalidante grave patologia", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_118("118", "Malattia con responsabilita' di terzi", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), A_119("119", "Malattia superiore a nove mesi", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + true, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), A_11R("11R", "Malattia con ricovero", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + true, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), A_11R5("11R5", "Ricovero dopo malattia superiore a 12 mesi", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + true, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), A_11R9("11R9", "Ricovero dopo malattia superiore a 9 mesi", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), A_11C("11C", "Malattia post-ricovero", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_11C5("11C5", "Convalescenza dopo malattia superiore a 12 mesi", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_11C9("11C9", "Convalescenza dopo malattia superiore a 9 mesi", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), A_12("12", "malattia primo figlio/a <= 3 anni retribuita 100%", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_12U("12U", "malattia primo figlio/a <= 3 anni retribuita 100% altro genitore", true, - ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_13("13", "malattia primo figlio/a > 3 anni senza retr.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_14("14", "malattia primo figlio non retribuita", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_122("122", "malattia secondo figlio/a <= 3 anni retribuita 100%", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_132("132", "malattia secondo figlio/a > 3 anni senza retr.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_142("142", "malattia secondo figlio non retribuita", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(1990, 1, 1), new LocalDate(2008, 12, 31), false, true, true), A_123("123", "malattia terzo figlio/a <= 3 anni retribuita 100%", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_133("133", "malattia terzo figlio/a > 3 anni senza retr.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_143("143", "malattia terzo figlio non retribuita", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(1990, 1, 1), new LocalDate(2008, 12, 31), false, true, true), A_124("124", "malattia quarto figlio/a <= 3 anni retribuita 100%", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_134("134", "malattia quarto figlio/a > 3 anni senza retr.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_144("144", "malattia quarto figlio non retribuita", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(1990, 1, 1), new LocalDate(2008, 12, 31), false, true, true), // Altri codici A_45("45", "Congedo straordinario permesso per matrimonio", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_46("46", "cong.str./permesso richiamo armi", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_46RA("46RA", "cong.str/permesso richiamo armi 1gg", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_100("100", "Festività locali", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_102("102", "Collocamento fuori ruolo all'estero", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_103("103", "Telelavoro", false, - ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, false, true), A_103RT("103", "Telelavoro ricercatori/tecnologi no giust. orario", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 0, null, - Sets.newHashSet(), null, null, false, false, true), + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, MealTicketBehaviour.preventMealTicket, + 0, null, Sets.newHashSet(), null, null, false, false, true), A_103BP("103BP", "Telelavoro buono pasto", false, - ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, true, true, 0, null, + ImmutableSet.of(JustifiedTypeName.complete_day_and_add_overtime), 0, true, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, false, true), A_7M("7M", "Permesso sindacale in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_71("71", "permesso sindacale 1 ora", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_72("72", "permesso sindacale 2 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 120, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_73("73", "permesso sindacale 3 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 180, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_74("74", "permesso sindacale 4 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 240, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_75("75", "permesso sindacale 5 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 300, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_76("76", "permesso sindacale 6 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 360, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_77("77", "permesso sindacale 7 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 420, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_78("78", "permesso sindacale 8 ore", false, - ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 480, + ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 480, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_71A("71A", "permesso sindacale 1 ora non retribuita", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_72A("72A", "permesso sindacale 2 ore non retribuita", - false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, true, 0, null, + false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_73A("73A", "permesso sindacale 3 ore non retribuita", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_74A("74A", "permesso sindacale 4 ore non retribuita", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_75A("75A", "permesso sindacale 5 ore non retribuita", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_76A("76A", "permesso sindacale 6 ore non retribuita", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, true, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_77A("77A", "permesso sindacale 7 ore non retribuito", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, - true, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_78A("78A", "permesso sindacale 8 ore non retribuita", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 480, - false, true, 0, null, Sets.newHashSet(), null, null, false, true, true), + false, MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_71S("71S", "perm.1 ora rapp.lavoratori", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_72S("72S", "perm.2 ore rapp.lavoratori", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_73S("73S", "perm.3 ore rapp.lavoratori", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_74S("74S", "perm.4 ore rapp.lavoratori", - false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, true, + false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_75S("75S", "perm.5 ore rapp.lavoratori", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_76S("76S", "perm.6 ore rapp.lavoratori", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, true, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_77S("77S", "perm.7 ore rapp.lavoratori", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, - true, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_71R("71R", "perm. sind. 1 ora R.S.U.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_72R("72R", "perm. sind. 2 ore R.S.U.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_73R("73R", "perm. sind. 3 ore R.S.U", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_74R("74R", "perm. sind. 4 ore R.S.U.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_75R("75R", "perm. sind. 5 ore R.S.U.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_76R("76R", "perm. sind. 6 ore R.S.U.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, true, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_77R("77R", "perm. sind. 7 ore R.S.U.", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, - true, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_71D("71D", "perm. sind. 1 ora dirigenti sidac.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_72D("72D", "perm. sind. 2 ore dirigenti sindac.", - false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, true, 0, null, + false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_73D("73D", "perm. sind. 3 ore dirigenti sindac.", - false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, true, 0, + false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_74D("74D", "perm. sind. 4 ore dirigenti sindac.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_75D("75D", "perm. sind. 5 ore dirigenti sindac.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_76D("76D", "perm. sind. 6 ore dirigenti sindac.", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, true, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_77D("77D", "perm. sind. 7 ore dirigenti sindac.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_78D("78D", "perm. sind. 8 ore dirigenti sindac.", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 480, - false, true, 0, null, Sets.newHashSet(), null, null, false, true, true), + false, MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_FA1("FA1", "formazione e aggiornamento 1 ora", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_FA2("FA2", "formazione e aggiornamento 2 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_FA3("FA3", "formazione e aggiornamento 3 ore", - false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_FA4("FA4", "formazione e aggiornamento 4 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_FA5("FA5", "formazione e aggiornamento 5 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_FA6("FA6", "formazione e aggiornamento 6 ore", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, + null, Sets.newHashSet(), null, null, false, true, true), A_FA7("FA7", "formazione e aggiornamento 7 ore", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_OAM("OAM", "Ore aggiuntive in ore e minuti", true, - ImmutableSet.of(JustifiedTypeName.specified_minutes_limit), 0, false, true, 0, null, + ImmutableSet.of(JustifiedTypeName.specified_minutes_limit), 0, false, + MealTicketBehaviour.allowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2019, 2, 1), null, false, true, true), A_OA1("OA1", "ore aggiuntive 1", - false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, false, 60, + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 60, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_OA2("OA2", "ore aggiuntive 2", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, - false, false, 120, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, + false, MealTicketBehaviour.notAllowMealTicket, 120, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_OA3("OA3", "ore aggiuntive 3", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, - false, false, 180, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), + false, MealTicketBehaviour.notAllowMealTicket, 180, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_OA4("OA4", "ore aggiuntive 4", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, - false, false, 240, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), + false, MealTicketBehaviour.notAllowMealTicket, 240, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_OA5("OA5", "ore aggiuntive 5", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, - false, false, 300, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), + false, MealTicketBehaviour.notAllowMealTicket, 300, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_OA6("OA6", "ore aggiuntive 6", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, - false, false, 360, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), + false, MealTicketBehaviour.notAllowMealTicket, 360, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_OA7("OA7", "ore aggiuntive 7", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, - false, false, 420, JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), + false, MealTicketBehaviour.notAllowMealTicket, 420, + JustifiedTypeName.absence_type_minutes, Sets.newHashSet(), null, null, false, true, true), A_16("16", "congedo straordinario per volontariato", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_33("33", "congedo per motivi di studio retribuito", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_33B("33B", "congedo per motivi di studio retribuito / borsa CNR", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_33C("33C", "congedo per motivi di studio retribuito / cooperaz.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_34("34", "congedo per motivi di studio non retribuito", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_38("38", "infortunio in itinere o causa servizio da riconoscere", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_39("39", "aspettativa infortunio in itinere riconosciuto", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_681("681", "permesso lutto di famiglia", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_682("682", "permesso secondo lutto di famiglia", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_683("683", "permesso terzo lutto di famiglia", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), - A_441("441", "permesso esami", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, + A_441("441", "permesso esami", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_442("442", "permesso congr.conv.seminari ecc.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), - null, null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_6N("6N", "permesso motivi privati non retribuito", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), - null, null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_6NTD("6NTD", "permesso motivi privati non retribuito tempo determinato", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, - Sets.newHashSet(), null, null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_67("67", "permesso donazione sangue", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, - Sets.newHashSet(), null, null, false, true, true), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_80("80", "sciopero intera giornata", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_81("81", "sciopero 1 ora", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, - false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_82("82", "sciopero 2 ore", - false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_83("83", "sciopero 3 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_84("84", "sciopero 4 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_85("85", "sciopero 5 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, true, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_86("86", "sciopero 6 ore", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_87("87", "sciopero 7 ore", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_662("662", "permesso grave inferm. coniuge o parente", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_62S50V("62S50V", "dist. sind.a temp. det. p. t. 50% vert.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_ES_L133("ES-L133", "esonero servizio art.72 L.133/08", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_65("65", "causa forza maggiore da recuperare", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_61("61", "causa forza maggiore recuperato", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_42("42", "permesso cure invalidita' per servizio", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_43("43", "ferie radiazioni ionizzanti", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_93("93", "incarico di insegnamento", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_54("54", "aspett. per mot. di famigl.o studio", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_54C("54C", "aspett. per cooperaz. Paesi in sviluppo", - false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, false, 0, + false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_54D("54D", "aspett.per nomina a Dirett.Ammin.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, false, 0, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_54DD("54DD", "aspett.funz.dirigenzia.no anz.serv.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, false, 0, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_54E("54E", "congedo eventi cause particolari", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_54F("54F", "aspett. motivi fam. progetto recupero", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_54P("54P", "aspett. per periodo di prova", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true /* festivo capire */, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_54A17("54A17", "aspett. art17 CL0609 max 12 mesi", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true /* festivo capire */, false, 0, null, Sets.newHashSet(), null, - null, false, true, true), + true /* festivo capire */, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_54CNR("54CNR", "aspett. per incarico CNR (Direzione)", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true /* festivo capire */, false, 0, null, Sets.newHashSet(), - null, null, false, true, true), + true /* festivo capire */, MealTicketBehaviour.notAllowMealTicket, 0, + null, Sets.newHashSet(), null, null, false, true, true), A_54ORGPP("54ORGPP", "asp.s/ass. ex art. 23bis DLgs165/2001", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true /* festivo capire */, false, 0, null, Sets.newHashSet(), - null, null, false, true, true), + true /* festivo capire */, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_54L230("54L230", "asp.s/ass. contrat.priv. L.230/2005", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true /* festivo capire */, false, 0, null, - Sets.newHashSet(), null, null, false, true, true), + true /* festivo capire */, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), A_54R("54R", "aspett. motivi fam. progetto recupero", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true /* festivo capire */, false, 0, null, + true /* festivo capire */, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_54VV("54VV", "congedo per donne vittime di violenza", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true /* festivo capire */, false, 0, null, + true /* festivo capire */, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_54VVH7("54VVH7", "comp. congedo donne vittime di violenza", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, - true /* festivo capire */, false, 0, null, + true /* festivo capire */, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_55("55", "aspett. per funzioni pubbliche", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, true, false, 0, + 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_58("58", "aspett. per funz. pubb. non retr.", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, true /* festivo capire */, false, 0, + 0, true /* festivo capire */, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_58U("58U", "aspett. non retr. funz. supp. uff. O.D.P.", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, true, false, 0, + 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95046("95046", "perm. funz. pubb. giunte provin. 6 h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95053("95053", "perm. funz. pubb. comun. Giunt. Comm. 3 h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95053E("95053E", "perm. funz. pubb. O. E. com. e Un. com. 3 h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95053P("95053P", "perm. funz. pubb. Pres. Cons. comun. 3 h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95053S("95053S", "permesso sindaco 3 h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 180, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95054("95054", "perm. funz. pubb. comun. Giunt. Comm. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95054E("95054E", "perm. funz. pubb. O. E. com. e Un. com. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95054P("95054P", "perm. funz. pubb. Pres. Cons. comun. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95054S("95054S", "permesso sindaco 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 240, - false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95055("95055", "perm. funz. pubb. comun. Giunt. Comm. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95055E("95055E", "perm. funz. pubb. O. E. com. e Un. com. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), A_95055P("95055P", "perm. funz. pubb. Pres. Cons. comun. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), A_95055S("95055S", "permesso sindaco 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95056("95056", "perm. funz. pubb. comun. Giunt. Comm. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95052P("95052P", "perm. funz. pubb. Pres. Cons. comun. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95052S("95052S", "permesso sindaco 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95052E("95052E", "perm. funz. pubb. O. E. com. e Un. com. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95052("95052", "perm. funz. pubb. comun. Giunt. Comm. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95046E("95046E", "perm. funz. pubb. O. E. provinciali 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet( + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet( new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_95046P("95046P", "perm. funz. pubb. Pres. Cons. provin. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95046S("95046S", "perm. funz. pubb. Sindaci di prov. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95047("95047", "perm. funz. pubb. giunte provinc. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95047E("95047E", "perm. funz. pubb. O. E. provinciali 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet( + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet( new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_95047P("95047P", "perm. funz. pubb. Pres. Cons. provin. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95047S("95047S", "perm. funz. pubb. Sindaci di prov. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95051("95051", "perm. funz. pubb. comun.Giunt. Comm. 1h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95051E("95051E", "perm. funz. pubb. O. E. com. e Un. com. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95051P("95051P", "perm. funz. pubb. Pres. Cons. comun. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95051S("95051S", "permesso sindaco 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95056E("95056E", "perm. funz. pubb. O. E. com. e Un. com. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95056P("95056P", "perm. funz. pubb. Pres. Cons. comun. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95056S("95056S", "permesso sindaco 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95057("95057", "perm. funz. pubb. comun. Giunt. Comm. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95064P("95064P", "perm. funz. pubb. Pres. comun. monta. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95065("95065", "perm. funz. pubb. Giunte comun. mon. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95065E("95065E", "perm. funz. pubb. O. E.c omunit mon. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95065P("95065P", "perm. funz. pubb. Pres. comun. monta. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95066("95066", "perm. funz. pubb. Giunte comun. mon. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95066E("95066E", "perm. funz. pubb. O. E. comunit mon. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95066P("95066P", "perm. funz. pubb. Pres. comun. monta. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95067("95067", "perm. funz. pubb.Giunte comun. mon. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95067E("95067E", "perm. funz. pubb. O. E. comunit mon. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95067P("95067P", "perm. funz. pubb. Pres. comun. monta. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95064E("95064E", "perm. funz. pubb. O. E. comunit mon .4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95064("95064", "perm. funz. pubb. Giunte comun. mon. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95063P("95063P", "perm. funz. pubb. Pres. comun. monta. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95057E("95057E", "perm. funz. pubb. O. E. com. e Un.com. 7 h", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95057P("95057P", "perm.f unz. pubb. Pres. Cons. comun. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95057S("95057S", "permesso sindaco 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95061("95061", "perm. funz. pubb. Giunte comun. mon. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95061E("95061E", "perm. funz. pubb. O. E. comunita mon. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95061P("95061P", "perm. funz. pubb. Pres. comun. monta. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95062("95062", "perm. funz. pubb.Giunte comun mon. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95062E("95062E", "perm. funz. pubb. O. E. comunit mon. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95062P("95062P", "perm. funz. pubb. Pres. comun. monta. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95063("95063", "perm. funz. pubb. Giunte comun. mon. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95063E("95063E", "perm. funz. pubb. O. E. comunit mon. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95101("95101", "perm. funz .pubb. O. E. municipali 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95045S("95045S", "perm. funz. pubb. Sindaci di prov. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95012E("95012E", "perm. funz. pubb. O. E. citta metrop. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95017("95017", "perm. funz. pubb.Giunt. citta metr. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95017E("95017E", "perm. funz. pubb. O. E. citta metrop. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95017S("95017S", "perm. funz. pubb. Sindaci metropol. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9502("9502", "perm. funz. pubb. Cons. circoscrizion.", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95021("95021", "perm. funz. pubb. O. E. Cons. Comm. cir. 1h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95021P("95021P", "perm. funz. pubb. Presidenti circo. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95022("95022", "perm. funz. pubb. O. E. Cons. Comm. cir. 2h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95022P("95022P", "perm. funz. pubb. Presidenti circo. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95023("95023", "perm. funz. pubb. O. E. Cons. Comm. cir. 3h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95023P("95023P", "perm. funz. pubb. Presidenti circo. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95016S("95016S", "perm. funz. pubb. Sindaci metropol. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95016E("95016E", "perm. funz. pubb. O. E. citta metrop. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95016("95016", "perm. funz. pubb.Giunt. citta metr. 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95012S("95012S", "perm. funz. pubb.Sindaci metropol. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95013("95013", "perm. funz. pubb. Giunt.citta metr. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95013E("95013E", "perm. funz. pubb. O. E. citta metrop. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95013S("95013S", "perm. funz. pubb.Sindaci metropol. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95014("95014", "perm. funz. pubb.Giunt.citta metr. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95014E("95014E", "perm. funz. pubb. O. E. citta metrop. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95014S("95014S", "perm. funz. pubb. Sindaci metropol. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95015("95015", "perm. funz. pubb. Giunt. citta metr. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95015E("95015E", "perm. funz. pubb. O. E. citta metrop. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95015S("95015S", "perm. funz. pubb. Sindaci metropol. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95024("95024", "perm. funz. pubb. O. E. Cons. Comm. cir. 4h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95024P("95024P", "perm. funz. pubb.Presidenti circo. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95025("95025", "perm. funz. pubb. O. E. Cons. Comm. cir. 5h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95043("95043", "perm. funz. pubb. giunte provinc. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95001("95001", "perm. funz. pubb. non retribuito 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95043E("95043E", "perm. funz. pubb. O. E. provinciali 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet( + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet( new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_95002("95002", "perm. funz. pubb. non retribuito 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95043P("95043P", "perm. funz. pubb. Pres. Cons. provin. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95003("95003", "perm. funz. pubb. non retribuito 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95043S("95043S", "perm. funz. pubb. Sindaci di prov. 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95004("95004", "perm. funz. pubb. non retribuito 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95044("95044", "perm. funz. pubb. giunte provinc. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95005("95005", "perm. funz. pubb. non retribuito 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95044E("95044E", "perm.f unz. pubb. O. E. provinciali 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet( + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet( new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_95006("95006", "perm. funz. pubb. non retribuito 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95044P("95044P", "perm. funz. pubb. Pres. Cons. provin. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95007("95007", "perm. funz. pubb. non retribuito 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95044S("95044S", "perm. funz. pubb. Sindaci di prov. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9501("9501", "perm. funz. pubb. Consig. cittametrop.", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95045("95045", "perm. funz. pubb. giunte provinc. 4 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95011("95011", "perm. funz. pubb. Giunt. citta metr. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95045E("95045E", "perm. funz. pubb. O. E. provinciali 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet( + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet( new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_95011E("95011E", "perm. funz. pubb. O. E. citta metrop. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95042S("95042S", "perm. funz. pubb. Sindaci di prov. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95042P("95042P", "perm. funz. pubb. Pres. Cons. provin. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95042E("95042E", "perm. funz. pubb. O. E. provinciali 2 h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 120, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_95025P("95025P", "perm. funz. pubb. Presidenti circo. 5 h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 300, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95026("95026", "perm. funz. pubb. O. E. Cons. Comm. cir. 6h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95026P("95026P", "perm. funz. pubb. Presidenti circo. 6 h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 360, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95027("95027", "perm. funz. pubb. O. E. Cons. Comm. cir. 7h", false, - ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, false, 0, + ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95027P("95027P", "perm. funz. pubb. Presidenti circo. 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 420, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, + null, Sets.newHashSet(), null, null, false, true, true), A_95041("95041", "perm. funz. pubb. giunte provinc. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, false, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, + null, Sets.newHashSet(), null, null, false, true, true), A_95041E("95041E", "perm. funz. pubb. O. E. provinciali 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet( + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet( new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, false, true, true), A_95041P("95041P", "perm. funz. pubb. Pres.Cons. provin. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), 60, - false, false, 0, null, Sets.newHashSet(), null, null, + false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_95041S("95041S", "perm. funz. pubb. Sindaci di prov. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, + null, Sets.newHashSet(), null, null, false, true, true), A_95042("95042", "perm. funz. pubb. giunte provinc. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, + null, Sets.newHashSet(), null, null, false, true, true), A_95045P("95045P", "perm. funz. pubb. Pres. Cons. provin. 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, + null, Sets.newHashSet(), null, null, false, true, true), A_95011S("95011S", "perm. funz. pubb.Sindaci metropol. 1 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9599("9599", "permesso funzione pubbliche varie", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9509("9509", "permesso funzione pubblica ASL", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9508("9508", "permesso funzione pubblica enti regionali", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9503("9503", "permesso funzione pubblica cons. e giunte reg.", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9504("9504", "permesso funzione pubblica cons. e giunte prov.", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9505("9505", "permesso funzione pubblica cons. e giunte comunali", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9506("9506", "permesso funzione pubblica comunità montane", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9507("9507", "permesso funzione pubblica consorzi comunali", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9591("9591", "riposo compens. funz. pubblica", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_9599B("9599B", "Permesso per citazione a testimoniare o espl. funzioni giudice popolare", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95102("95102", "perm. funz. pubb. O. E. municipali 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95115("95115", "perm. funz. pubb. O. E. Co. Un. Com.En. L 5h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95115E("95115E", "perm. funz. pubb. O. E. Cons. enti loc. 5h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95116("95116", "perm. funz. pubb. O. E. Co. Un. Com. En. L 6h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95116E("95116E", "perm. funz. pubb. O. E. Cons. enti loc. 6h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95117("95117", "perm. funz. pubb. O. E. Co. Un. Com. En. L 7h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95117E("95117E", "perm. funz. pubb. O. E. Cons. enti loc. 7h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95E("95E", "perm. funz. pubb. Parlamento Europeo", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95N("95N", "perm. funz. pubb. Parlamento Nazionale", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95114E("95114E", "perm. funz. pubb. O. E.Cons. enti loc. 4h", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95114("95114", "perm. funz. pubb. O. E. Co. Un. Com En. L 4h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95113E("95113E", "perm. funz. pubb. O. E. Cons. enti loc. 2h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95103("95103", "perm. funz. pubb. O. E. municipali 3 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95104("95104", "perm. funz. pubb. O. E. municipali 4", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 240, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 240, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95105("95105", "perm. funz. pubb. O. E. municipali 5 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 300, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 300, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95106("95106", "perm. funz. pubb. O. E. municipali 6 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 360, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 360, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95107("95107", "perm. funz. pubb. O. E. municipali 7 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 420, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 420, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95111("95111", "perm. funz. pubb. O. E. Co. Un. Com. En. L 1h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95111E("95111E", "perm. funz. pubb. O. E. Cons. enti loc. 1h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 60, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 60, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95112("95112", "perm. funz. pubb. O. E. Co. Un. Com. En. L 2h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95112E("95112E", "perm. funz. pubb. O. E. Cons. enti loc. 2h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95113("95113", "perm. funz. pubb. O. E. Co .Un. Com. En. L 3h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 180, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 180, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_95012("95012", "perm. funz. pubb.Giunt. citta metr. 2 h", false, ImmutableSet.of(JustifiedTypeName.absence_type_minutes), - 120, false, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 120, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_407("407", "Ferie missione Antartide anno precedente", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2018, 1, 1), new LocalDate(2018, 12, 31), false, true, true), A_418("418", "Riposo compensativo missione Antartide", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2018, 1, 1), new LocalDate(2018, 12, 31), false, true, true), A_408("408", "Ferie missione Antartide anno precedente", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_409("409", "Ferie missione Antartide anno precedente", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_419("419", "Riposo compensativo missione Antartide", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, new LocalDate(2019, 12, 31), false, true, true), A_400("400", "Ferie missione Antartide anno corrente", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, new LocalDate(2021, 12, 31), false, true, true), A_410("410", "Riposo compensativo missione Antartide", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, new LocalDate(2021, 12, 31), false, true, true), A_401("401", "Ferie missione Antartide anno precedente", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, new LocalDate(2022, 12, 31), false, true, true), A_402("402", "Ferie missione Antartide anno corrente", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2022, 1, 1), new LocalDate(2023, 12, 31), false, true, true), A_412("412", "Riposo compensativo missione Antartide", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), new LocalDate(2022, 1, 1), new LocalDate(2022, 12, 31), false, true, true), A_NC("NC", "Giorno non conteggiato ai fini del tempo a lavoro", true, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_35R("35R", "dottorato di ricerca retribuito", false, ImmutableSet.of(JustifiedTypeName.all_day), - 0, true, false, 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), - A_62("62", "distacco sindacale", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, - false, 0, null, Sets.newHashSet(), null, null, false, true, true), + A_62("62", "distacco sindacale", false, ImmutableSet.of(JustifiedTypeName.all_day), + 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_62A("62A", "aspettativa sindacale non retribuita", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_62D("62D", "perm. sind. cumul. sotto forma distac.", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_50("50", "aspettativa per ricongiungimento familiare all'estero", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_52("52", "aspettativa per infermita' causa servizio", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, false, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_96("96", "sosp.ne cautelare e/o dal servizio", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_96A("96A", "sospensione dal lavoro", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, Sets.newHashSet(), + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), A_96B("96B", "sospensione dal servizio", false, - ImmutableSet.of(JustifiedTypeName.all_day), 0, true, false, 0, null, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true); @@ -1814,7 +2261,7 @@ null, new LocalDate(2021, 12, 31), false, true, true), public boolean consideredWeekEnd; - public MealTicketBehaviour timeForMealTicket; + public MealTicketBehaviour mealTicketBehaviour; public Integer replacingTime; public JustifiedTypeName replacingType; // nullable @@ -1834,7 +2281,7 @@ null, new LocalDate(2021, 12, 31), false, true, true), */ private DefaultAbsenceType(String certificationCode, String description, boolean internalUse, Set justifiedTypeNamesPermitted, Integer justifiedTime, - boolean consideredWeekEnd, MealTicketBehaviour timeForMealTicket, Integer replacingTime, + boolean consideredWeekEnd, MealTicketBehaviour mealTicketBehaviour, Integer replacingTime, JustifiedTypeName replacingType, Set behaviour, LocalDate validFrom, LocalDate validTo, Boolean reperibilityCompatible, Boolean isRealAbsenceType, boolean toUpdate) { @@ -1844,7 +2291,7 @@ private DefaultAbsenceType(String certificationCode, String description, boolean this.justifiedTypeNamesPermitted = justifiedTypeNamesPermitted; this.justifiedTime = justifiedTime; this.consideredWeekEnd = consideredWeekEnd; - this.timeForMealTicket = timeForMealTicket; + this.mealTicketBehaviour = mealTicketBehaviour; this.replacingTime = replacingTime; this.replacingType = replacingType; this.behaviour = behaviour; diff --git a/db/evolutions/189.sql b/db/evolutions/189.sql new file mode 100644 index 000000000..df4d6482c --- /dev/null +++ b/db/evolutions/189.sql @@ -0,0 +1,9 @@ +# --- !Ups + +ALTER TABLE absence_types ADD COLUMN meal_ticket_behaviour TEXT; +UPDATE absence_types SET meal_ticket_behaviour = 'notAllowMealTicket' WHERE time_for_mealticket = false; +UPDATE absence_types SET meal_ticket_behaviour = 'allowMealTicket' WHERE time_for_mealticket = true; +UPDATE absence_types SET meal_ticket_behaviour = 'preventMealTicket' WHERE code = '103RT'; +ALTER TABLE absence_types DROP COLUMN time_for_mealticket; + +# --- !Downs \ No newline at end of file From e3c7efb26ac6b3e1dfe6f240b5f2c2eaf4b806e8 Mon Sep 17 00:00:00 2001 From: Cristian Lucchesi Date: Thu, 28 Apr 2022 15:03:57 +0200 Subject: [PATCH 17/19] Generati i nuovi qmodel. --- app/models/absences/query/QAbsenceType.java | 4 ++-- app/models/query/QMealTicket.java | 2 -- app/models/query/QUser.java | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/absences/query/QAbsenceType.java b/app/models/absences/query/QAbsenceType.java index 2e242c722..76d7d9c55 100644 --- a/app/models/absences/query/QAbsenceType.java +++ b/app/models/absences/query/QAbsenceType.java @@ -56,6 +56,8 @@ public class QAbsenceType extends EntityPathBase { public final SetPath justifiedTypesPermitted = this.createSet("justifiedTypesPermitted", models.absences.JustifiedType.class, QJustifiedType.class, PathInits.DIRECT2); + public final EnumPath mealTicketBehaviour = createEnum("mealTicketBehaviour", models.enumerate.MealTicketBehaviour.class); + //inherited public final BooleanPath persistent = _super.persistent; @@ -73,8 +75,6 @@ public class QAbsenceType extends EntityPathBase { public final SetPath takenGroup = this.createSet("takenGroup", models.absences.TakableAbsenceBehaviour.class, QTakableAbsenceBehaviour.class, PathInits.DIRECT2); - public final BooleanPath timeForMealTicket = createBoolean("timeForMealTicket"); - public final BooleanPath toUpdate = createBoolean("toUpdate"); public final DatePath validFrom = createDate("validFrom", org.joda.time.LocalDate.class); diff --git a/app/models/query/QMealTicket.java b/app/models/query/QMealTicket.java index 3fec3b3ac..eb3472bb8 100644 --- a/app/models/query/QMealTicket.java +++ b/app/models/query/QMealTicket.java @@ -53,8 +53,6 @@ public class QMealTicket extends EntityPathBase { //inherited public final BooleanPath persistent = _super.persistent; - public final NumberPath quarter = createNumber("quarter", Integer.class); - public final BooleanPath returned = createBoolean("returned"); //inherited diff --git a/app/models/query/QUser.java b/app/models/query/QUser.java index 4b2c31992..40576e4fb 100644 --- a/app/models/query/QUser.java +++ b/app/models/query/QUser.java @@ -40,6 +40,8 @@ public class QUser extends EntityPathBase { //inherited public final NumberPath id = _super.id; + public final StringPath keycloakId = createString("keycloakId"); + public final StringPath label = createString("label"); public final QOffice owner; From d42592362d56e44ee218ee1ec9cf81c87cd43b8d Mon Sep 17 00:00:00 2001 From: dario Date: Thu, 28 Apr 2022 17:26:46 +0200 Subject: [PATCH 18/19] Completata procedura di aggiornamento campo absenceType. L'aggiornamento permette di poter definire un metodo che controlli se esiste un'assenza con comportamento per maturazione buono pasto che lo impedisce (caso 103RT) e applicarlo nel metodo UpdateTimeAtWork lanciato dal consistencyManager in fase di inserimento delle timbrature per telelavoro --- app/controllers/TeleworkStampings.java | 1 + app/manager/ConsistencyManager.java | 7 ++- app/manager/PersonDayManager.java | 62 ++++++++++++------- app/manager/TeleworkStampingManager.java | 1 + .../services/absences/EnumAllineator.java | 4 +- app/models/PersonDay.java | 22 +++++++ .../AbsenceGroups/consistencyGroups.html | 4 +- db/evolutions/189.sql | 6 ++ 8 files changed, 80 insertions(+), 27 deletions(-) diff --git a/app/controllers/TeleworkStampings.java b/app/controllers/TeleworkStampings.java index 76ab870a3..457ed4574 100644 --- a/app/controllers/TeleworkStampings.java +++ b/app/controllers/TeleworkStampings.java @@ -369,6 +369,7 @@ public static void save(Long personId, @Required LocalDate date, flash.error(ordinaryStampingResult); } else { flash.success(Web.msgSaved(Stampings.class)); + consistencyManager.updatePersonSituation(person.id, date); } } diff --git a/app/manager/ConsistencyManager.java b/app/manager/ConsistencyManager.java index 40c31acab..9b415d4c5 100755 --- a/app/manager/ConsistencyManager.java +++ b/app/manager/ConsistencyManager.java @@ -64,6 +64,7 @@ import models.absences.GroupAbsenceType; import models.absences.definitions.DefaultGroup; import models.base.IPropertiesInPeriodOwner; +import models.enumerate.MealTicketBehaviour; import org.joda.time.LocalDate; import org.joda.time.LocalDateTime; import org.joda.time.LocalTime; @@ -451,7 +452,8 @@ private void populatePersonDay(IWrapperPersonDay pd) { pd.getValue().timeAtWork = 0; pd.getValue().progressive = 0; pd.getValue().difference = 0; - personDayManager.setTicketStatusIfNotForced(pd.getValue(), false); + personDayManager.setTicketStatusIfNotForced(pd.getValue(), + MealTicketBehaviour.notAllowMealTicket); pd.getValue().stampModificationType = null; pd.getValue().save(); return; @@ -466,7 +468,8 @@ private void populatePersonDay(IWrapperPersonDay pd) { pd.getValue().timeAtWork = 0; pd.getValue().progressive = 0; pd.getValue().difference = 0; - personDayManager.setTicketStatusIfNotForced(pd.getValue(), false); + personDayManager.setTicketStatusIfNotForced(pd.getValue(), + MealTicketBehaviour.notAllowMealTicket); pd.getValue().stampModificationType = null; pd.getValue().save(); return; diff --git a/app/manager/PersonDayManager.java b/app/manager/PersonDayManager.java index d3e5e2810..be0b56adf 100755 --- a/app/manager/PersonDayManager.java +++ b/app/manager/PersonDayManager.java @@ -107,6 +107,18 @@ public PersonDayManager(ConfigurationManager configurationManager, this.absenceComponentDao = absenceComponentDao; this.contractDao = contractDao; } + + /** + * Assenza che impedisce la maturazione del buono pasto. + */ + public Optional getPreventMealTicket(PersonDay personDay) { + for (Absence absence : personDay.absences) { + if (absence.absenceType.mealTicketBehaviour.equals(MealTicketBehaviour.preventMealTicket)) { + return Optional.of(absence); + } + } + return Optional.absent(); + } /** * Assenza che assegna l'intera giornata. @@ -387,7 +399,7 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, } // Pulizia stato personDay. - setTicketStatusIfNotForced(personDay, false); + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.notAllowMealTicket); personDay.setStampModificationType(null); //Target personDay: p(-30), e(<30), f(now), d(fix) personDay.setOnHoliday(0); personDay.setOutOpening(0); @@ -432,9 +444,15 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, if (getAllDay(personDay).isPresent()) { personDay.setTimeAtWork(0); setTicketStatusIfNotForced(personDay, getAllDay(personDay).get() - .absenceType.timeForMealTicket); + .absenceType.mealTicketBehaviour); + return personDay; + } + + if (getPreventMealTicket(personDay).isPresent()) { + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.preventMealTicket); return personDay; } + //Giustificativi a grana minuti nel giorno for (Absence abs : personDay.getAbsences()) { @@ -456,7 +474,7 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, } //Assegnamento se contribuisce al buono pasto - if (abs.absenceType.timeForMealTicket) { + if (abs.absenceType.mealTicketBehaviour.equals(MealTicketBehaviour.allowMealTicket)) { personDay.setJustifiedTimeMeal(personDay.getJustifiedTimeMeal() + justifiedMinutes); continue; } @@ -496,8 +514,7 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, // o se il dipendente e' in missione oraria nella giornata da valutare if (isOnHourlyMission(personDay) || personDay.getJustifiedTimeMeal() <= 0) { personDay.setTimeAtWork(personDay.getTimeAtWork() - personDay.getDecurtedMeal()); - } - else { + } else { personDay.setDecurtedMeal(0); } @@ -520,9 +537,9 @@ public PersonDay updateTimeAtWork(PersonDay personDay, WorkingTimeTypeDay wttd, personDay.setTimeAtWork(personDay.getTimeAtWork() + missingTime); } if (!personDay.isTicketAvailable && getCompleteDayAndAddOvertime(personDay) - .get().getAbsenceType().timeForMealTicket) { - personDay.isTicketAvailable = getCompleteDayAndAddOvertime(personDay) - .get().getAbsenceType().timeForMealTicket; + .get().getAbsenceType().mealTicketBehaviour + .equals(MealTicketBehaviour.allowMealTicket)) { + personDay.isTicketAvailable = true; } } @@ -555,13 +572,13 @@ private PersonDay mealTicketHandlerAndDecurtedMeal(PersonDay personDay, WorkingT // Giorno festivo: default false if (personDay.isHoliday()) { - setTicketStatusIfNotForced(personDay, false); + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.notAllowMealTicket); return personDay; } // Il tipo orario non prevede il buono: default false if (!wttd.mealTicketEnabled()) { - setTicketStatusIfNotForced(personDay, false); + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.notAllowMealTicket); return personDay; } @@ -605,19 +622,19 @@ private PersonDay mealTicketHandlerAndDecurtedMeal(PersonDay personDay, WorkingT // Non ho eseguito il tempo minimo per buono pasto. if (mealTicketsMinutes - toCut < mealTicketTime) { - setTicketStatusIfNotForced(personDay, false); + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.notAllowMealTicket); return personDay; } // Controllo pausa pomeridiana (solo se la soglia è definita) if (!isAfternoonThresholdConditionSatisfied( computeValidPairStampings(personDay.stampings), wttd)) { - setTicketStatusIfNotForced(personDay, false); + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.notAllowMealTicket); return personDay; } // Il buono pasto è stato maturato - setTicketStatusIfNotForced(personDay, true); + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.allowMealTicket); // Assegnamento tempo decurtato per pausa troppo breve. if (toCut > 0) { @@ -636,19 +653,22 @@ private PersonDay updateTimeAtWorkFixed(PersonDay personDay, WorkingTimeTypeDay //In caso di giorno festivo niente tempo a lavoro ne festivo. if (personDay.isHoliday()) { personDay.setTimeAtWork(0); - setTicketStatusIfNotForced(personDay, false); + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.notAllowMealTicket); return personDay; } if (getAllDay(personDay).isPresent() - && !getAllDay(personDay).get().absenceType.timeForMealTicket + && getAllDay(personDay).get().absenceType.mealTicketBehaviour + .equals(MealTicketBehaviour.notAllowMealTicket) || (getAssignAllDay(personDay).isPresent() - && !getAssignAllDay(personDay).get().absenceType.timeForMealTicket) + && getAssignAllDay(personDay).get().absenceType.mealTicketBehaviour + .equals(MealTicketBehaviour.notAllowMealTicket)) || (getCompleteDayAndAddOvertime(personDay).isPresent() - && !getCompleteDayAndAddOvertime(personDay).get().absenceType.timeForMealTicket)) { - setTicketStatusIfNotForced(personDay, false); + && getCompleteDayAndAddOvertime(personDay).get().absenceType.mealTicketBehaviour + .equals(MealTicketBehaviour.notAllowMealTicket))) { + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.notAllowMealTicket); } else { - setTicketStatusIfNotForced(personDay, true); + setTicketStatusIfNotForced(personDay, MealTicketBehaviour.allowMealTicket); } if (getAllDay(personDay).isPresent() @@ -850,7 +870,7 @@ public void updateProgressive(PersonDay personDay, Optional previousF public void setTicketStatusIfNotForced(PersonDay pd, MealTicketBehaviour mealTicketBehaviour) { if (!pd.isTicketForcedByAdmin()) { - pd.setTicketAvailable(isTicketAvailable); + pd.setTicketAvailable(mealTicketBehaviour); } } @@ -1253,7 +1273,7 @@ public List getTotalPersonDayInMonth(List personDays, } return totalDays; } - + /** * Metodo che controlla i giorni lavorabili in un mese per la persona passata come parametro. diff --git a/app/manager/TeleworkStampingManager.java b/app/manager/TeleworkStampingManager.java index 3ab74399d..a739fa651 100644 --- a/app/manager/TeleworkStampingManager.java +++ b/app/manager/TeleworkStampingManager.java @@ -404,6 +404,7 @@ public void insertTeleworkAbsenceCode(Person person, LocalDate date) { personDay.save(); } } + } /** diff --git a/app/manager/services/absences/EnumAllineator.java b/app/manager/services/absences/EnumAllineator.java index 740c104d8..23394882b 100644 --- a/app/manager/services/absences/EnumAllineator.java +++ b/app/manager/services/absences/EnumAllineator.java @@ -90,7 +90,7 @@ public void handleAbsenceTypes(boolean initialization) { defaultAbsenceType.get().justifiedTypeNamesPermitted); absenceType.justifiedTime = defaultAbsenceType.get().justifiedTime; absenceType.consideredWeekEnd = defaultAbsenceType.get().consideredWeekEnd; - absenceType.timeForMealTicket = defaultAbsenceType.get().timeForMealTicket; + absenceType.mealTicketBehaviour = defaultAbsenceType.get().mealTicketBehaviour; absenceType.reperibilityCompatible = defaultAbsenceType.get().reperibilityCompatible; absenceType.replacingTime = defaultAbsenceType.get().replacingTime; if (defaultAbsenceType.get().replacingType != null) { @@ -538,7 +538,7 @@ public AbsenceType buildAbsenceType(DefaultAbsenceType defaultAbsenceType) { } absenceType.justifiedTime = defaultAbsenceType.justifiedTime; absenceType.consideredWeekEnd = defaultAbsenceType.consideredWeekEnd; - absenceType.timeForMealTicket = defaultAbsenceType.timeForMealTicket; + absenceType.mealTicketBehaviour = defaultAbsenceType.mealTicketBehaviour; absenceType.reperibilityCompatible = defaultAbsenceType.reperibilityCompatible; absenceType.replacingTime = defaultAbsenceType.replacingTime; if (defaultAbsenceType.replacingType != null) { diff --git a/app/models/PersonDay.java b/app/models/PersonDay.java index 05c96d0cb..6c2bc0cf3 100755 --- a/app/models/PersonDay.java +++ b/app/models/PersonDay.java @@ -35,6 +35,7 @@ import lombok.extern.slf4j.Slf4j; import models.absences.Absence; import models.base.BaseModel; +import models.enumerate.MealTicketBehaviour; import models.enumerate.Troubles; import org.apache.commons.beanutils.BeanUtils; import org.hibernate.envers.Audited; @@ -249,6 +250,27 @@ public int getDecurtedWorkOnHoliday() { public int getAssignableTime() { return this.timeAtWork - this.justifiedTimeMeal - this.justifiedTimeNoMeal; } + + /** + * + * @param mealTicketBehaviour + */ + @Transient + public void setTicketAvailable(MealTicketBehaviour mealTicketBehaviour) { + switch (mealTicketBehaviour) { + case allowMealTicket: + this.isTicketAvailable = true; + break; + case notAllowMealTicket: + this.isTicketAvailable = false; + break; + case preventMealTicket: + this.isTicketAvailable = false; + break; + default: + break; + } + } /** diff --git a/app/views/AbsenceGroups/consistencyGroups.html b/app/views/AbsenceGroups/consistencyGroups.html index 07d352fc1..dfd3745af 100755 --- a/app/views/AbsenceGroups/consistencyGroups.html +++ b/app/views/AbsenceGroups/consistencyGroups.html @@ -272,7 +272,7 @@ ${absenceType.justifiedTime} ${absenceType.consideredWeekEnd} - ${absenceType.timeForMealTicket} + ${absenceType.mealTicketBehaviour.description} ${absenceType.replacingType?.name} ${absenceType.replacingTime} ${absenceType.validFrom?.format()} @@ -319,7 +319,7 @@ ${absenceType.justifiedTime} ${absenceType.consideredWeekEnd} - ${absenceType.timeForMealTicket} + ${absenceType.mealTicketBehaviour.description} ${absenceType.replacingType?.name} ${absenceType.replacingTime} ${absenceType.validFrom?.format()} diff --git a/db/evolutions/189.sql b/db/evolutions/189.sql index df4d6482c..2d6060632 100644 --- a/db/evolutions/189.sql +++ b/db/evolutions/189.sql @@ -1,9 +1,15 @@ # --- !Ups ALTER TABLE absence_types ADD COLUMN meal_ticket_behaviour TEXT; +ALTER TABLE absence_types_history ADD COLUMN meal_ticket_behaviour TEXT; UPDATE absence_types SET meal_ticket_behaviour = 'notAllowMealTicket' WHERE time_for_mealticket = false; UPDATE absence_types SET meal_ticket_behaviour = 'allowMealTicket' WHERE time_for_mealticket = true; UPDATE absence_types SET meal_ticket_behaviour = 'preventMealTicket' WHERE code = '103RT'; ALTER TABLE absence_types DROP COLUMN time_for_mealticket; +UPDATE absence_types_history SET meal_ticket_behaviour = 'notAllowMealTicket' WHERE time_for_mealticket = false; +UPDATE absence_types_history SET meal_ticket_behaviour = 'allowMealTicket' WHERE time_for_mealticket = true; +UPDATE absence_types_history SET meal_ticket_behaviour = 'preventMealTicket' WHERE code = '103RT'; +ALTER TABLE absence_types_history DROP COLUMN time_for_mealticket; + # --- !Downs \ No newline at end of file From f4bb5d93eb98d7f486b30c0f78a8c4d8da92df08 Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Fri, 29 Apr 2022 11:47:05 +0200 Subject: [PATCH 19/19] Aggiornati version e changelog. --- CHANGELOG.md | 5 ++++- VERSION | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41be224e0..6c2906d7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.5.1] - UNRELEASED +## [2.5.1] - 2022-04-29 ### Added - Aggiunto controllo su API rest contracts/byPerson per fornire un messaggio di errore quando si tenta di leggere un contratto con previousContract non coerente + - Aggiunto campo enumerato per la gestione del buono pasto sul modello di absenceType + Risolve anche la problematica del 103RT che non deve permettere l'attribuzione del buono + pasto per coloro i quali fanno telelavoro che finisce sul cartellino come orario di lavoro. ### Changed - Migliorato messaggio di errore in caso di inserimento via REST di buoni pasto già esistenti - Fix bug del permesso breve che non veniva eliminato quando si completava la giornata diff --git a/VERSION b/VERSION index a37a52cf5..4fd0fe3cd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.1-rc2 \ No newline at end of file +2.5.1 \ No newline at end of file