From 56dc75c3887089733236a5c16c70138ee9cd26ab Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Tue, 13 Sep 2022 17:04:40 +0200 Subject: [PATCH 1/9] Iniziata rifattorizzazione dei congedi parentali. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aggiunti i nuovi codici 25A e 25S (anche per secondo e terzo figlio) e modificati i vecchi 25 (anche per figli successivi) aggiungendo la "O" in fondo al codice. Inserita fine validità per tutti i codici 24 --- .../definitions/DefaultAbsenceType.java | 216 ++++++++++++++++-- .../definitions/DefaultComplation.java | 12 + .../absences/definitions/DefaultGroup.java | 23 ++ .../absences/definitions/DefaultTakable.java | 45 +++- 4 files changed, 265 insertions(+), 31 deletions(-) diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index ebaec0de9..220d6e171 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -670,20 +670,69 @@ null, new LocalDate(2020, 1, 1), true, true, true), false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_25O("25", "Astensione facoltativa post partum 30% primo figlio intera giornata", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, 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, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), + /*Da definire 25A e 25S*/ + A_25A("25A", "Da definire...", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, false, true, true), + A_25AM("25AM", "Da definire... in ore e minuti", 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_25AH7("25AH7", "Astensione facoltativa post partum 30% primo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_25S("25S", "Da definire...", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, false, true, true), + A_25SM("25SM", "Da definire... in ore e minuti", 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_25SH7("25SH7", "Astensione facoltativa post partum 30% primo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + /*Fine spazio 25A e 25S*/ + A_25OM("25M", "Astensione facoltativa post partum 30% primo figlio in ore e minuti", 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_25M("25M", "Astensione facoltativa post partum 30% primo figlio in ore e minuti", 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_25OH7("25H7", "Astensione facoltativa post partum 30% primo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_25H7("25H7", "Astensione facoltativa post partum 30% primo figlio completamento giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_25OU("25U", "Astensione facoltativa post partum 30% primo figlio intera giornata altro genitore", + true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, + 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, MealTicketBehaviour.notAllowMealTicket, 0, null, @@ -692,20 +741,20 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_24("24", "Astensione facoltativa post partum non retrib. primo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, - null, false, true, true), + new LocalDate(2022,8,12), 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, MealTicketBehaviour.notAllowMealTicket, 0, null, - Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, - false, true, true), + Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, + new LocalDate(2022,8,12), false, true, true), A_24H7("24H7", "Astensione facoltativa post partum non retrib. primo figlio completamento " + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - MealTicketBehaviour.notAllowMealTicket, 0, - JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), + null, new LocalDate(2022,8,12), 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, MealTicketBehaviour.notAllowMealTicket, - 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, null, Sets.newHashSet(), null, new LocalDate(2022,8,12), false, true, true), A_232("232", "Astensione facoltativa post partum 100% secondo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, @@ -725,19 +774,68 @@ null, new LocalDate(2020, 1, 1), true, true, true), true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), + A_252OM("252M", "Astensione facoltativa post partum 30% secondo figlio in ore e minuti", 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_252M("252M", "Astensione facoltativa post partum 30% secondo figlio in ore e minuti", 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_252("252", "Astensione facoltativa post partum 30% secondo figlio intera giornata", + + A_252O("252", "Astensione facoltativa post partum 30% secondo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), 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, + MealTicketBehaviour.notAllowMealTicket, 0, null, + Sets.newHashSet(), null, null, false, true, true), + + A_252A("252A", "Da definire...", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, false, true, true), + A_252AM("252AM", "Da definire... in ore e minuti", 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_252AH7("25H7", "Astensione facoltativa post partum 30% primo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_252S("252S", "Da definire...", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, false, true, true), + A_252SM("252SM", "Da definire... in ore e minuti", 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_252SH7("25H7", "Astensione facoltativa post partum 30% primo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + + A_252OH7("252H7", "Astensione facoltativa post partum 30% secondo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, 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, MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_252OU("252U", "Astensione facoltativa post partum 30% secondo figlio intera giornata " + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, + 0, null, 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, MealTicketBehaviour.notAllowMealTicket, @@ -746,21 +844,21 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_242("242", "Astensione facoltativa post partum non retrib. secondo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), - null, null, false, true, true), + null, new LocalDate(2022,8,12), 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, MealTicketBehaviour.notAllowMealTicket, 0, null, - Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, - false, true, true), + Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, + new LocalDate(2022,8,12), false, true, true), A_242H7("242H7", "Astensione facoltativa post partum non retrib. secondo figlio completamento " + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - MealTicketBehaviour.notAllowMealTicket, 0, - JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), + null, new LocalDate(2022,8,12), 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, MealTicketBehaviour.notAllowMealTicket, - 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, null, Sets.newHashSet(), null, new LocalDate(2022,8,12), false, true, true), A_233("233", "Astensione facoltativa post partum 100% terzo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, @@ -780,19 +878,67 @@ null, new LocalDate(2020, 1, 1), true, true, true), true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), + A_253O("253", "Astensione facoltativa post partum 30% terzo figlio intera giornata", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, 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, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), + + A_253A("253A", "Da definire...", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, false, true, true), + A_253AM("253AM", "Da definire... in ore e minuti", 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_253AH7("253AH7", "Astensione facoltativa post partum 30% terzo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_253S("253S", "Da definire...", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, false, true, true), + A_253SM("253SM", "Da definire... in ore e minuti", 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_253SH7("253SH7", "Astensione facoltativa post partum 30% terzo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_253OM("253M", "Astensione facoltativa post partum 30% terzo figlio in ore e minuti", 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_253M("253M", "Astensione facoltativa post partum 30% terzo figlio in ore e minuti", 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_253OH7("253H7", "Astensione facoltativa post partum 30% terzo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_253H7("253H7", "Astensione facoltativa post partum 30% terzo figlio completamento giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_253OU("253U", "Astensione facoltativa post partum 30% terzo figlio intera giornata " + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, + 0, null, 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, MealTicketBehaviour.notAllowMealTicket, @@ -801,21 +947,21 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_243("243", "Astensione facoltativa post partum non retrib. terzo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, - null, false, true, true), + new LocalDate(2022,8,12), 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, MealTicketBehaviour.notAllowMealTicket, 0, null, - Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, - false, true, true), + Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, + new LocalDate(2022,8,12), false, true, true), A_243H7("243H7", "Astensione facoltativa post partum non retrib. terzo figlio completamento " + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - MealTicketBehaviour.notAllowMealTicket, 0, - JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), + null, new LocalDate(2022,8,12), 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, MealTicketBehaviour.notAllowMealTicket, - 0, null, Sets.newHashSet(), null, null, false, true, true), + 0, null, Sets.newHashSet(), null, new LocalDate(2022,8,12), false, true, true), A_234("234", "Astensione facoltativa post partum 100% quarto figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, @@ -835,19 +981,39 @@ null, new LocalDate(2020, 1, 1), true, true, true), MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), + A_254O("254", "Astensione facoltativa post partum 30% quarto figlio intera giornata", false, + ImmutableSet.of(JustifiedTypeName.all_day), 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, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), + + A_254OM("254M", + "Astensione facoltativa post partum 30% quarto figlio in ore e minuti", 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_254M("254M", "Astensione facoltativa post partum 30% quarto figlio in ore e minuti", 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_254OH7("254H7", "Astensione facoltativa post partum 30% quarto figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_254H7("254H7", "Astensione facoltativa post partum 30% quarto figlio completamento giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_254OU("254U", "Astensione facoltativa post partum 30% quarto figlio intera giornata " + + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, + MealTicketBehaviour.notAllowMealTicket, + 0, null, 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, MealTicketBehaviour.notAllowMealTicket, @@ -856,21 +1022,21 @@ null, new LocalDate(2020, 1, 1), true, true, true), A_244("244", "Astensione facoltativa post partum non retrib. quarto figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, false, MealTicketBehaviour.notAllowMealTicket, 0, null, - Sets.newHashSet(), null, null, false, true, true), + Sets.newHashSet(), null, new LocalDate(2022,8,12), 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, MealTicketBehaviour.notAllowMealTicket, 0, null, - Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, null, - false, true, true), + Sets.newHashSet(new Behaviour(JustifiedBehaviourName.no_overtime)), null, + new LocalDate(2022,8,12), false, true, true), A_244H7("244H7", "Astensione facoltativa post partum non retrib. quarto figlio completamento " + "giornata", false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, - MealTicketBehaviour.notAllowMealTicket, 0, - JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), + null, new LocalDate(2022,8,12), 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, MealTicketBehaviour.notAllowMealTicket, 0, - null, Sets.newHashSet(), null, null, false, true, true), + null, Sets.newHashSet(), null, new LocalDate(2022,8,12), false, true, true), A_25P("25P", "Prolungamento astensione facoltativa post partum 30% intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, diff --git a/app/models/absences/definitions/DefaultComplation.java b/app/models/absences/definitions/DefaultComplation.java index 460577151..a6db00b74 100644 --- a/app/models/absences/definitions/DefaultComplation.java +++ b/app/models/absences/definitions/DefaultComplation.java @@ -173,6 +173,9 @@ public enum DefaultComplation { C_23(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_23M), ImmutableSet.of(DefaultAbsenceType.A_23H7)), + C_25O(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_25OM), + ImmutableSet.of(DefaultAbsenceType.A_25OH7)), C_25(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_25M), ImmutableSet.of(DefaultAbsenceType.A_25H7)), @@ -188,6 +191,9 @@ public enum DefaultComplation { C_232(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_232M), ImmutableSet.of(DefaultAbsenceType.A_232H7)), + C_252O(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_252OM), + ImmutableSet.of(DefaultAbsenceType.A_252OH7)), C_252(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_252M), ImmutableSet.of(DefaultAbsenceType.A_252H7)), @@ -198,6 +204,9 @@ public enum DefaultComplation { C_233(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_233M), ImmutableSet.of(DefaultAbsenceType.A_233H7)), + C_253O(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_253OM), + ImmutableSet.of(DefaultAbsenceType.A_253OH7)), C_253(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_253M), ImmutableSet.of(DefaultAbsenceType.A_253H7)), @@ -208,6 +217,9 @@ public enum DefaultComplation { C_234(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_234M), ImmutableSet.of(DefaultAbsenceType.A_234H7)), + C_254O(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_254OM), + ImmutableSet.of(DefaultAbsenceType.A_254OH7)), C_254(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_254M), ImmutableSet.of(DefaultAbsenceType.A_254H7)), diff --git a/app/models/absences/definitions/DefaultGroup.java b/app/models/absences/definitions/DefaultGroup.java index 0605df96d..bed844f1c 100644 --- a/app/models/absences/definitions/DefaultGroup.java +++ b/app/models/absences/definitions/DefaultGroup.java @@ -223,6 +223,11 @@ public enum DefaultGroup { DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_12, DefaultTakable.T_24, DefaultComplation.C_24, null, false, true), + + G_25O("25 - Astensione facoltativa post partum 30% primo figlio 0-6 anni 150 giorni", + "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child1_0_6, DefaultTakable.T_25O, DefaultComplation.C_25O, DefaultGroup.G_24, + false, true), G_25("25 - Astensione facoltativa post partum 30% primo figlio 0-6 anni 150 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_6, DefaultTakable.T_25, DefaultComplation.C_25, DefaultGroup.G_24, @@ -242,6 +247,12 @@ public enum DefaultGroup { PeriodType.always, DefaultTakable.T_COV00, DefaultComplation.C_COV00, null, false, true), + G_23O("23 - Astensione facoltativa post partum 100% primo figlio 0-12 anni 30 giorni", + "23/25/24 - Astensione facoltativa post partum primo figlio", + DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child1_0_12, DefaultTakable.T_23, DefaultComplation.C_23, + DefaultGroup.G_25, false, true), + G_23("23 - Astensione facoltativa post partum 100% primo figlio 0-12 anni 30 giorni", "23/25/24 - Astensione facoltativa post partum primo figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, @@ -253,6 +264,10 @@ public enum DefaultGroup { "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child2_0_12, DefaultTakable.T_242, DefaultComplation.C_242, null, false, true), + G_252O("252 - Astensione facoltativa post partum 30% secondo figlio 0-6 anni 150 giorni", "", + DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child2_0_6, DefaultTakable.T_252O, DefaultComplation.C_252O, DefaultGroup.G_242, + false, true), G_252("252 - Astensione facoltativa post partum 30% secondo figlio 0-6 anni 150 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child2_0_6, DefaultTakable.T_252, DefaultComplation.C_252, DefaultGroup.G_242, @@ -266,6 +281,10 @@ public enum DefaultGroup { G_243("243 - Astensione facoltativa post partum non retrib. terzo figlio 0-12 anni 600 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child3_0_12, DefaultTakable.T_243, DefaultComplation.C_243, null, false, true), + G_253O("253 - Astensione facoltativa post partum 30% terzo figlio 0-6 anni 150 giorni", + "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child3_0_6, DefaultTakable.T_253O, DefaultComplation.C_253O, DefaultGroup.G_243, + false, true), G_253("253 - Astensione facoltativa post partum 30% terzo figlio 0-6 anni 150 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child3_0_6, DefaultTakable.T_253, DefaultComplation.C_253, DefaultGroup.G_243, @@ -279,6 +298,10 @@ public enum DefaultGroup { G_244("244 - Astensione facoltativa post partum non retrib. quarto figlio 0-12 anni 600 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child4_0_12, DefaultTakable.T_244, DefaultComplation.C_244, null, false, true), + G_254O("254 - Astensione facoltativa post partum 30% quarto figlio 0-6 anni 150 giorni", + "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child4_0_6, DefaultTakable.T_254O, DefaultComplation.C_254O, DefaultGroup.G_244, + false, true), G_254("254 - Astensione facoltativa post partum 30% quarto figlio 0-6 anni 150 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child4_0_6, DefaultTakable.T_254, DefaultComplation.C_254, DefaultGroup.G_244, diff --git a/app/models/absences/definitions/DefaultTakable.java b/app/models/absences/definitions/DefaultTakable.java index a20d74294..60c772fb7 100644 --- a/app/models/absences/definitions/DefaultTakable.java +++ b/app/models/absences/definitions/DefaultTakable.java @@ -265,6 +265,15 @@ public enum DefaultTakable { DefaultAbsenceType.A_COV00M), ImmutableSet.of(DefaultAbsenceType.A_COV00, DefaultAbsenceType.A_COV00M), -1, null), + + T_25O(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_25O, + DefaultAbsenceType.A_25OM, + DefaultAbsenceType.A_25OU), + ImmutableSet.of(DefaultAbsenceType.A_25O, + DefaultAbsenceType.A_25OM, + DefaultAbsenceType.A_25OU), + 150, null), T_25(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_25, @@ -293,6 +302,14 @@ public enum DefaultTakable { DefaultAbsenceType.A_232U), 30, null), + T_252O(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_252O, + DefaultAbsenceType.A_252OM, + DefaultAbsenceType.A_252OU), + ImmutableSet.of(DefaultAbsenceType.A_252O, + DefaultAbsenceType.A_252OM, + DefaultAbsenceType.A_252OU), + 150, null), T_252(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_252, DefaultAbsenceType.A_252M, @@ -320,6 +337,14 @@ public enum DefaultTakable { DefaultAbsenceType.A_233U), 30, null), + T_253O(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_253O, + DefaultAbsenceType.A_253OM, + DefaultAbsenceType.A_253OU), + ImmutableSet.of(DefaultAbsenceType.A_253O, + DefaultAbsenceType.A_253OM, + DefaultAbsenceType.A_253OU), + 150, null), T_253(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_253, DefaultAbsenceType.A_253M, @@ -346,6 +371,14 @@ public enum DefaultTakable { DefaultAbsenceType.A_234M, DefaultAbsenceType.A_234U), 30, null), + T_254O(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_254O, + DefaultAbsenceType.A_254OM, + DefaultAbsenceType.A_254OU), + ImmutableSet.of(DefaultAbsenceType.A_254O, + DefaultAbsenceType.A_254OM, + DefaultAbsenceType.A_254OU), + 150, null), T_254(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_254, DefaultAbsenceType.A_254M, @@ -649,11 +682,11 @@ public enum DefaultTakable { T_RIDUCE_FERIE_CNR(AmountType.units, ImmutableSet.of( DefaultAbsenceType.A_24, DefaultAbsenceType.A_24H7, - DefaultAbsenceType.A_25, DefaultAbsenceType.A_25H7, + DefaultAbsenceType.A_25O, DefaultAbsenceType.A_25OH7, DefaultAbsenceType.A_242, DefaultAbsenceType.A_242H7, - DefaultAbsenceType.A_252, DefaultAbsenceType.A_252H7, + DefaultAbsenceType.A_252O, DefaultAbsenceType.A_252OH7, DefaultAbsenceType.A_243, DefaultAbsenceType.A_243H7, - DefaultAbsenceType.A_253, DefaultAbsenceType.A_253H7, + DefaultAbsenceType.A_253O, DefaultAbsenceType.A_253OH7, DefaultAbsenceType.A_54L230, DefaultAbsenceType.A_50, DefaultAbsenceType.A_54, DefaultAbsenceType.A_54D, DefaultAbsenceType.A_54E, DefaultAbsenceType.A_54F, @@ -670,11 +703,11 @@ public enum DefaultTakable { DefaultAbsenceType.A_C16, DefaultAbsenceType.A_35R), ImmutableSet.of( DefaultAbsenceType.A_24, DefaultAbsenceType.A_24H7, - DefaultAbsenceType.A_25, DefaultAbsenceType.A_25H7, + DefaultAbsenceType.A_25O, DefaultAbsenceType.A_25OH7, DefaultAbsenceType.A_242, DefaultAbsenceType.A_242H7, - DefaultAbsenceType.A_252, DefaultAbsenceType.A_252H7, + DefaultAbsenceType.A_252O, DefaultAbsenceType.A_252OH7, DefaultAbsenceType.A_243, DefaultAbsenceType.A_243H7, - DefaultAbsenceType.A_253, DefaultAbsenceType.A_253H7, + DefaultAbsenceType.A_253O, DefaultAbsenceType.A_253OH7, DefaultAbsenceType.A_54L230, DefaultAbsenceType.A_50, DefaultAbsenceType.A_54, DefaultAbsenceType.A_54D, DefaultAbsenceType.A_54E, DefaultAbsenceType.A_54F, From 412ab4a85c851fbfbf1f922a3f07ebf13a2bd211 Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Thu, 15 Sep 2022 17:52:51 +0200 Subject: [PATCH 2/9] Prosegue modifica dei codici di assenza. Aggiunta evoluzione che trasforma tutti i codici 25 in 25O (compresi ore e minuti e orari). Iniziato job per il ricambio dei codici 25O e successivi in 25 dal 13 agosto in poi. --- app/jobs/ParentalCodesFix.java | 74 +++++++++++++++++++ .../definitions/DefaultAbsenceType.java | 37 ++++++++++ .../definitions/DefaultComplation.java | 12 +++ .../absences/definitions/DefaultGroup.java | 52 ++++++++++--- .../absences/definitions/DefaultTakable.java | 67 +++++++++++++++++ db/evolutions/192.sql | 20 +++++ 6 files changed, 253 insertions(+), 9 deletions(-) create mode 100644 app/jobs/ParentalCodesFix.java create mode 100644 db/evolutions/192.sql diff --git a/app/jobs/ParentalCodesFix.java b/app/jobs/ParentalCodesFix.java new file mode 100644 index 000000000..17124f513 --- /dev/null +++ b/app/jobs/ParentalCodesFix.java @@ -0,0 +1,74 @@ +package jobs; + +import com.google.common.base.Optional; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import dao.absences.AbsenceComponentDao; +import java.util.List; +import java.util.stream.Collectors; +import javax.inject.Inject; +import lombok.extern.slf4j.Slf4j; +import models.Person; +import models.absences.Absence; +import org.joda.time.LocalDate; +import play.Play; +import play.jobs.Job; +import play.jobs.OnApplicationStart; + +@Slf4j +@OnApplicationStart +public class ParentalCodesFix extends Job { + + @Inject + static AbsenceComponentDao absenceComponentDao; + + @Override + public void doJob() { + + //in modo da inibire l'esecuzione dei job in base alla configurazione + if (!"true".equals(Play.configuration.getProperty(Bootstrap.JOBS_CONF))) { + log.info("{} interrotto. Disattivato dalla configurazione.", getClass().getName()); + return; + } + log.info("Start Job parental codes fix"); + List codes = ImmutableList.of("25O", "252O", "253O", "254O", "25MO", "252MO", "253MO", + "254MO", "25OH7", "252OH7", "253OH7", "254OH7"); + List allChildrenCodes = absenceComponentDao.absences(codes); + List childrenCodesFiltered = allChildrenCodes.stream() + .filter(ab -> !ab.personDay.date.isBefore(new LocalDate(2022, 8, 13))) + .collect(Collectors.toList()); + for (Absence abs : childrenCodesFiltered) { + switch (abs.absenceType.code) { + case "25O": + break; + case "252O": + break; + case "253O": + break; + case "254O": + break; + case "25MO": + break; + case "252MO": + break; + case "253MO": + break; + case "254MO": + break; + case "25OH7": + break; + case "252OH7": + break; + case "253OH7": + break; + case "254OH7": + break; + default: + break; + } + } + + log.debug("End Job parental codes fix"); + + } +} diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index 220d6e171..ff70f499d 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -1010,6 +1010,35 @@ null, new LocalDate(2022,8,12), false, true, true), MealTicketBehaviour.notAllowMealTicket, 0, JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + A_254A("254A", "Astensione facoltativa post partum 30% quarto figlio intera giornata", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, + 0, null, Sets.newHashSet(), null, null, false, true, true), + + A_254AM("254AM", + "Astensione facoltativa post partum 30% quarto figlio in ore e minuti", 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_254AH7("254AH7", "Astensione facoltativa post partum 30% quarto figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + + A_254S("254S", "Da definire...", false, + ImmutableSet.of(JustifiedTypeName.all_day), 0, true, + MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, + null, false, true, true), + A_254SM("254SM", "Da definire... in ore e minuti", 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_254SH7("254SH7", "Da definire 30% terzo figlio completamento giornata", + false, ImmutableSet.of(JustifiedTypeName.nothing), 0, false, + MealTicketBehaviour.notAllowMealTicket, 0, + JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), + A_254OU("254U", "Astensione facoltativa post partum 30% quarto figlio intera giornata " + "altro genitore", true, ImmutableSet.of(JustifiedTypeName.all_day_limit), 0, true, MealTicketBehaviour.notAllowMealTicket, @@ -1099,6 +1128,14 @@ null, new LocalDate(2019, 12, 31), false, true, true), A_21("21", "Congedo/permesso per maternità", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, null, false, true, true), + + A_21P("21P", "Da definire...", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, + true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), + + A_21P2("21P2", "Da definire...", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, + true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), + null, null, false, true, true), A_111("111", "Malattia", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, 0, diff --git a/app/models/absences/definitions/DefaultComplation.java b/app/models/absences/definitions/DefaultComplation.java index a6db00b74..52be58017 100644 --- a/app/models/absences/definitions/DefaultComplation.java +++ b/app/models/absences/definitions/DefaultComplation.java @@ -179,6 +179,9 @@ public enum DefaultComplation { C_25(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_25M), ImmutableSet.of(DefaultAbsenceType.A_25H7)), + C_25A(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_25AM), + ImmutableSet.of(DefaultAbsenceType.A_25AH7)), C_24(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_24M), ImmutableSet.of(DefaultAbsenceType.A_24H7)), @@ -197,6 +200,9 @@ public enum DefaultComplation { C_252(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_252M), ImmutableSet.of(DefaultAbsenceType.A_252H7)), + C_252A(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_252AM), + ImmutableSet.of(DefaultAbsenceType.A_252AH7)), C_242(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_242M), ImmutableSet.of(DefaultAbsenceType.A_242H7)), @@ -210,6 +216,9 @@ public enum DefaultComplation { C_253(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_253M), ImmutableSet.of(DefaultAbsenceType.A_253H7)), + C_253A(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_253AM), + ImmutableSet.of(DefaultAbsenceType.A_253AH7)), C_243(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_243M), ImmutableSet.of(DefaultAbsenceType.A_243H7)), @@ -223,6 +232,9 @@ public enum DefaultComplation { C_254(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_254M), ImmutableSet.of(DefaultAbsenceType.A_254H7)), + C_254A(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_254AM), + ImmutableSet.of(DefaultAbsenceType.A_254AH7)), C_244(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_244M), ImmutableSet.of(DefaultAbsenceType.A_244H7)); diff --git a/app/models/absences/definitions/DefaultGroup.java b/app/models/absences/definitions/DefaultGroup.java index bed844f1c..bf42dcb94 100644 --- a/app/models/absences/definitions/DefaultGroup.java +++ b/app/models/absences/definitions/DefaultGroup.java @@ -218,6 +218,22 @@ public enum DefaultGroup { MALATTIA_FIGLIO_4("124/134/144 - Malattia quarto figlio", "", DefaultCategoryType.MALATTIA_FIGLIO_4, 2, GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, DefaultTakable.T_MALATTIA_FIGLIO_4, null, null, false, false), + G_25A("25A - Astensione facoltativa post partum 30% primo figlio 0-12 anni 90 giorni", + "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child1_0_12, DefaultTakable.T_25A, DefaultComplation.C_25A, null, + false, true), + G_252A("252A - Astensione facoltativa post partum 30% secondo figlio 0-12 anni 90 giorni", "", + DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child2_0_12, DefaultTakable.T_252A, DefaultComplation.C_252A, null, + false, true), + G_253A("253A - Astensione facoltativa post partum 30% terzo figlio 0-12 anni 90 giorni", + "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child3_0_12, DefaultTakable.T_253A, DefaultComplation.C_253A, null, + false, true), + G_254A("254A - Astensione facoltativa post partum 30% quarto figlio 0-12 anni 90 giorni", + "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child4_0_12, DefaultTakable.T_254A, DefaultComplation.C_254A, null, + false, true), G_24("24 - Astensione facoltativa post partum non retrib. primo figlio 0-12 anni 600 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, @@ -228,9 +244,9 @@ public enum DefaultGroup { "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_6, DefaultTakable.T_25O, DefaultComplation.C_25O, DefaultGroup.G_24, false, true), - G_25("25 - Astensione facoltativa post partum 30% primo figlio 0-6 anni 150 giorni", + G_25("25 - Astensione facoltativa post partum 30% primo figlio 0-12 anni 150 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, - PeriodType.child1_0_6, DefaultTakable.T_25, DefaultComplation.C_25, DefaultGroup.G_24, + PeriodType.child1_0_12, DefaultTakable.T_25, DefaultComplation.C_25, DefaultGroup.G_25A, false, true), // G_COVID50("COVID50 - Congedo parentale straordinario al 50%.", // "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, @@ -251,7 +267,7 @@ public enum DefaultGroup { "23/25/24 - Astensione facoltativa post partum primo figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_12, DefaultTakable.T_23, DefaultComplation.C_23, - DefaultGroup.G_25, false, true), + DefaultGroup.G_25O, false, true), G_23("23 - Astensione facoltativa post partum 100% primo figlio 0-12 anni 30 giorni", "23/25/24 - Astensione facoltativa post partum primo figlio", @@ -268,10 +284,16 @@ public enum DefaultGroup { DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child2_0_6, DefaultTakable.T_252O, DefaultComplation.C_252O, DefaultGroup.G_242, false, true), - G_252("252 - Astensione facoltativa post partum 30% secondo figlio 0-6 anni 150 giorni", "", + G_252("252 - Astensione facoltativa post partum 30% secondo figlio 0-12 anni 150 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, - PeriodType.child2_0_6, DefaultTakable.T_252, DefaultComplation.C_252, DefaultGroup.G_242, + PeriodType.child2_0_12, DefaultTakable.T_252, DefaultComplation.C_252, DefaultGroup.G_252A, false, true), + + G_232O("232O - Astensione facoltativa post partum 100% secondo figlio 0-12 anni 30 giorni", + "232/252/242 - Astensione facoltativa post partum secondo figlio", + DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child2_0_12, DefaultTakable.T_232, DefaultComplation.C_232, + DefaultGroup.G_252O, false, true), G_232("232 - Astensione facoltativa post partum 100% secondo figlio 0-12 anni 30 giorni", "232/252/242 - Astensione facoltativa post partum secondo figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, @@ -285,10 +307,16 @@ public enum DefaultGroup { "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child3_0_6, DefaultTakable.T_253O, DefaultComplation.C_253O, DefaultGroup.G_243, false, true), - G_253("253 - Astensione facoltativa post partum 30% terzo figlio 0-6 anni 150 giorni", + G_253("253 - Astensione facoltativa post partum 30% terzo figlio 0-12 anni 150 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, - PeriodType.child3_0_6, DefaultTakable.T_253, DefaultComplation.C_253, DefaultGroup.G_243, + PeriodType.child3_0_12, DefaultTakable.T_253, DefaultComplation.C_253, DefaultGroup.G_253A, false, true), + G_233O("233 - Astensione facoltativa post partum 100% terzo figlio 0-12 anni 30 giorni", + "233/253/243 - Astensione facoltativa post partum terzo figlio", + DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + PeriodType.child3_0_12, DefaultTakable.T_233, DefaultComplation.C_233, + DefaultGroup.G_253O, false, true), + G_233("233 - Astensione facoltativa post partum 100% terzo figlio 0-12 anni 30 giorni", "233/253/243 - Astensione facoltativa post partum terzo figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, @@ -302,10 +330,16 @@ public enum DefaultGroup { "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child4_0_6, DefaultTakable.T_254O, DefaultComplation.C_254O, DefaultGroup.G_244, false, true), - G_254("254 - Astensione facoltativa post partum 30% quarto figlio 0-6 anni 150 giorni", + G_254("254 - Astensione facoltativa post partum 30% quarto figlio 0-12 anni 150 giorni", "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, - PeriodType.child4_0_6, DefaultTakable.T_254, DefaultComplation.C_254, DefaultGroup.G_244, + PeriodType.child4_0_12, DefaultTakable.T_254, DefaultComplation.C_254, DefaultGroup.G_254A, false, true), + + G_234O("234 - Astensione facoltativa post partum 100% quarto figlio 0-12 anni 30 giorni", + "234/254/244 - Astensione facoltativa post partum quarto figlio", + DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, + PeriodType.child4_0_12, DefaultTakable.T_234, DefaultComplation.C_234, + DefaultGroup.G_254O, false, true), G_234("234 - Astensione facoltativa post partum 100% quarto figlio 0-12 anni 30 giorni", "234/254/244 - Astensione facoltativa post partum quarto figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, diff --git a/app/models/absences/definitions/DefaultTakable.java b/app/models/absences/definitions/DefaultTakable.java index 60c772fb7..5719fc81a 100644 --- a/app/models/absences/definitions/DefaultTakable.java +++ b/app/models/absences/definitions/DefaultTakable.java @@ -84,6 +84,15 @@ public enum DefaultTakable { ImmutableSet.of(DefaultAbsenceType.A_20M), -1, null), + T_21P(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_21P), + ImmutableSet.of(DefaultAbsenceType.A_21P), + 10, null), + T_21P2(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_21P2), + ImmutableSet.of(DefaultAbsenceType.A_21P2), + 20, null), + T_26(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_26, DefaultAbsenceType.A_26BP), ImmutableSet.of(DefaultAbsenceType.A_26, DefaultAbsenceType.A_26BP), @@ -404,6 +413,62 @@ public enum DefaultTakable { DefaultAbsenceType.A_25PM), -1, null), //150 + + T_25A(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_25A, + DefaultAbsenceType.A_25AM), + ImmutableSet.of(DefaultAbsenceType.A_25A, + DefaultAbsenceType.A_25AM), + 90, null), + + T_25S(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_25S, + DefaultAbsenceType.A_25SM), + ImmutableSet.of(DefaultAbsenceType.A_25S, + DefaultAbsenceType.A_25SM), + 90, null), + T_252A(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_252A, + DefaultAbsenceType.A_25AM), + ImmutableSet.of(DefaultAbsenceType.A_252A, + DefaultAbsenceType.A_252AM), + 90, null), + + T_252S(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_252S, + DefaultAbsenceType.A_252SM), + ImmutableSet.of(DefaultAbsenceType.A_252S, + DefaultAbsenceType.A_252SM), + 90, null), + + T_253A(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_253A, + DefaultAbsenceType.A_253AM), + ImmutableSet.of(DefaultAbsenceType.A_253A, + DefaultAbsenceType.A_253AM), + 90, null), + + T_253S(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_253S, + DefaultAbsenceType.A_253SM), + ImmutableSet.of(DefaultAbsenceType.A_253S, + DefaultAbsenceType.A_253SM), + 90, null), + + T_254A(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_254A, + DefaultAbsenceType.A_254AM), + ImmutableSet.of(DefaultAbsenceType.A_254, + DefaultAbsenceType.A_254M), + 90, null), + + T_254S(AmountType.units, + ImmutableSet.of(DefaultAbsenceType.A_254S, + DefaultAbsenceType.A_254SM), + ImmutableSet.of(DefaultAbsenceType.A_254S, + DefaultAbsenceType.A_254SM), + 90, null), + T_MALATTIA(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_111, DefaultAbsenceType.A_111FR, @@ -687,6 +752,7 @@ public enum DefaultTakable { DefaultAbsenceType.A_252O, DefaultAbsenceType.A_252OH7, DefaultAbsenceType.A_243, DefaultAbsenceType.A_243H7, DefaultAbsenceType.A_253O, DefaultAbsenceType.A_253OH7, + DefaultAbsenceType.A_254O, DefaultAbsenceType.A_254OH7, DefaultAbsenceType.A_54L230, DefaultAbsenceType.A_50, DefaultAbsenceType.A_54, DefaultAbsenceType.A_54D, DefaultAbsenceType.A_54E, DefaultAbsenceType.A_54F, @@ -708,6 +774,7 @@ public enum DefaultTakable { DefaultAbsenceType.A_252O, DefaultAbsenceType.A_252OH7, DefaultAbsenceType.A_243, DefaultAbsenceType.A_243H7, DefaultAbsenceType.A_253O, DefaultAbsenceType.A_253OH7, + DefaultAbsenceType.A_254O, DefaultAbsenceType.A_254OH7, DefaultAbsenceType.A_54L230, DefaultAbsenceType.A_50, DefaultAbsenceType.A_54, DefaultAbsenceType.A_54D, DefaultAbsenceType.A_54E, DefaultAbsenceType.A_54F, diff --git a/db/evolutions/192.sql b/db/evolutions/192.sql new file mode 100644 index 000000000..ad4ce62a1 --- /dev/null +++ b/db/evolutions/192.sql @@ -0,0 +1,20 @@ +# ---!Ups + +UPDATE absence_types SET code = '25O' where code = '25'; +UPDATE absence_types SET code = '252O' where code = '252'; +UPDATE absence_types SET code = '253O' where code = '253'; +UPDATE absence_types SET code = '254O' where code = '254'; + +UPDATE absence_types SET code = '25MO' where code = '25M'; +UPDATE absence_types SET code = '252MO' where code = '252M'; +UPDATE absence_types SET code = '253MO' where code = '253M'; +UPDATE absence_types SET code = '254MO' where code = '254M'; + +UPDATE absence_types SET code = '25OH7' where code = '25H7'; +UPDATE absence_types SET code = '252OH7' where code = '252H7'; +UPDATE absence_types SET code = '253OH7' where code = '253H7'; +UPDATE absence_types SET code = '254OH7' where code = '254H7'; + +# ---!Downs + +-- non è necessaria una down \ No newline at end of file From 6a4ff1afcdafeb170123a644aa64f8885cb1ea88 Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Fri, 16 Sep 2022 14:17:19 +0200 Subject: [PATCH 3/9] Completata la procedura di fix dei codici di assenza. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I congedi parentali sono stati modificati correttamente. Mancano però ancora le descrizioni dei codici nuovi: 21P, 21P2, 25A, 25S ecc... --- app/jobs/AbsencesRedefinitionsJob.java | 2 +- app/jobs/ParentalCodesFix.java | 22 +++++++-- .../services/absences/AbsenceService.java | 12 +++-- .../absences/definitions/DefaultGroup.java | 48 +++++++++++-------- 4 files changed, 54 insertions(+), 30 deletions(-) diff --git a/app/jobs/AbsencesRedefinitionsJob.java b/app/jobs/AbsencesRedefinitionsJob.java index 0e3fba584..92a94b51f 100644 --- a/app/jobs/AbsencesRedefinitionsJob.java +++ b/app/jobs/AbsencesRedefinitionsJob.java @@ -33,7 +33,7 @@ * */ @Slf4j -@OnApplicationStart(async = true) +@OnApplicationStart public class AbsencesRedefinitionsJob extends Job { @Inject diff --git a/app/jobs/ParentalCodesFix.java b/app/jobs/ParentalCodesFix.java index 17124f513..f975c6ce8 100644 --- a/app/jobs/ParentalCodesFix.java +++ b/app/jobs/ParentalCodesFix.java @@ -16,7 +16,7 @@ import play.jobs.OnApplicationStart; @Slf4j -@OnApplicationStart +@OnApplicationStart(async = true) public class ParentalCodesFix extends Job { @Inject @@ -37,38 +37,52 @@ public void doJob() { List childrenCodesFiltered = allChildrenCodes.stream() .filter(ab -> !ab.personDay.date.isBefore(new LocalDate(2022, 8, 13))) .collect(Collectors.toList()); + log.debug("Ci sono {} assenze da modificare", childrenCodesFiltered.size() ); for (Absence abs : childrenCodesFiltered) { switch (abs.absenceType.code) { case "25O": + abs.absenceType = absenceComponentDao.absenceTypeByCode("25").get(); break; case "252O": + abs.absenceType = absenceComponentDao.absenceTypeByCode("252").get(); break; case "253O": + abs.absenceType = absenceComponentDao.absenceTypeByCode("253").get(); break; case "254O": + abs.absenceType = absenceComponentDao.absenceTypeByCode("254").get(); break; case "25MO": + abs.absenceType = absenceComponentDao.absenceTypeByCode("25M").get(); break; case "252MO": + abs.absenceType = absenceComponentDao.absenceTypeByCode("252M").get(); break; case "253MO": + abs.absenceType = absenceComponentDao.absenceTypeByCode("253M").get(); break; case "254MO": + abs.absenceType = absenceComponentDao.absenceTypeByCode("254M").get(); break; case "25OH7": + abs.absenceType = absenceComponentDao.absenceTypeByCode("25H7").get(); break; case "252OH7": + abs.absenceType = absenceComponentDao.absenceTypeByCode("252H7").get(); break; case "253OH7": + abs.absenceType = absenceComponentDao.absenceTypeByCode("253H7").get(); break; case "254OH7": - break; + abs.absenceType = absenceComponentDao.absenceTypeByCode("254H7").get(); + break; default: - break; + break; } + abs.save(); } - log.debug("End Job parental codes fix"); + log.info("End Job parental codes fix"); } } diff --git a/app/manager/services/absences/AbsenceService.java b/app/manager/services/absences/AbsenceService.java index e8e1f1635..85c64d094 100644 --- a/app/manager/services/absences/AbsenceService.java +++ b/app/manager/services/absences/AbsenceService.java @@ -702,17 +702,21 @@ public List groupsPermitted(Person person, boolean readOnly) { private List namesOfChildGroups() { List names = Lists.newArrayList(); names.add(DefaultGroup.G_23.name()); - names.add(DefaultGroup.G_24.name()); +// names.add(DefaultGroup.G_24.name()); names.add(DefaultGroup.G_25.name()); + names.add(DefaultGroup.G_25A.name()); names.add(DefaultGroup.G_232.name()); names.add(DefaultGroup.G_233.name()); - names.add(DefaultGroup.G_242.name()); - names.add(DefaultGroup.G_243.name()); - names.add(DefaultGroup.G_244.name()); +// names.add(DefaultGroup.G_242.name()); +// names.add(DefaultGroup.G_243.name()); +// names.add(DefaultGroup.G_244.name()); names.add(DefaultGroup.G_234.name()); names.add(DefaultGroup.G_252.name()); names.add(DefaultGroup.G_253.name()); names.add(DefaultGroup.G_254.name()); + names.add(DefaultGroup.G_252A.name()); + names.add(DefaultGroup.G_253A.name()); + names.add(DefaultGroup.G_254A.name()); names.add(DefaultGroup.MALATTIA_FIGLIO_1.name()); names.add(DefaultGroup.MALATTIA_FIGLIO_2.name()); names.add(DefaultGroup.MALATTIA_FIGLIO_3.name()); diff --git a/app/models/absences/definitions/DefaultGroup.java b/app/models/absences/definitions/DefaultGroup.java index bf42dcb94..5b9af0bce 100644 --- a/app/models/absences/definitions/DefaultGroup.java +++ b/app/models/absences/definitions/DefaultGroup.java @@ -236,12 +236,12 @@ public enum DefaultGroup { false, true), G_24("24 - Astensione facoltativa post partum non retrib. primo figlio 0-12 anni 600 giorni", "", - DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_12, DefaultTakable.T_24, DefaultComplation.C_24, null, false, true), G_25O("25 - Astensione facoltativa post partum 30% primo figlio 0-6 anni 150 giorni", - "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + "", DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_6, DefaultTakable.T_25O, DefaultComplation.C_25O, DefaultGroup.G_24, false, true), G_25("25 - Astensione facoltativa post partum 30% primo figlio 0-12 anni 150 giorni", @@ -265,23 +265,23 @@ public enum DefaultGroup { G_23O("23 - Astensione facoltativa post partum 100% primo figlio 0-12 anni 30 giorni", "23/25/24 - Astensione facoltativa post partum primo figlio", - DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_12, DefaultTakable.T_23, DefaultComplation.C_23, DefaultGroup.G_25O, false, true), G_23("23 - Astensione facoltativa post partum 100% primo figlio 0-12 anni 30 giorni", - "23/25/24 - Astensione facoltativa post partum primo figlio", + "23/25/25A - Astensione facoltativa post partum primo figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_12, DefaultTakable.T_23, DefaultComplation.C_23, DefaultGroup.G_25, false, true), G_242("242 - Astensione facoltativa post partum non retrib. " + "secondo figlio 0-12 anni 600 giorni", - "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + "", DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child2_0_12, DefaultTakable.T_242, DefaultComplation.C_242, null, false, true), G_252O("252 - Astensione facoltativa post partum 30% secondo figlio 0-6 anni 150 giorni", "", - DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child2_0_6, DefaultTakable.T_252O, DefaultComplation.C_252O, DefaultGroup.G_242, false, true), G_252("252 - Astensione facoltativa post partum 30% secondo figlio 0-12 anni 150 giorni", "", @@ -291,20 +291,20 @@ public enum DefaultGroup { G_232O("232O - Astensione facoltativa post partum 100% secondo figlio 0-12 anni 30 giorni", "232/252/242 - Astensione facoltativa post partum secondo figlio", - DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child2_0_12, DefaultTakable.T_232, DefaultComplation.C_232, DefaultGroup.G_252O, false, true), G_232("232 - Astensione facoltativa post partum 100% secondo figlio 0-12 anni 30 giorni", - "232/252/242 - Astensione facoltativa post partum secondo figlio", + "232/252/252A - Astensione facoltativa post partum secondo figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child2_0_12, DefaultTakable.T_232, DefaultComplation.C_232, DefaultGroup.G_252, false, true), G_243("243 - Astensione facoltativa post partum non retrib. terzo figlio 0-12 anni 600 giorni", - "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + "", DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child3_0_12, DefaultTakable.T_243, DefaultComplation.C_243, null, false, true), G_253O("253 - Astensione facoltativa post partum 30% terzo figlio 0-6 anni 150 giorni", - "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + "", DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child3_0_6, DefaultTakable.T_253O, DefaultComplation.C_253O, DefaultGroup.G_243, false, true), G_253("253 - Astensione facoltativa post partum 30% terzo figlio 0-12 anni 150 giorni", @@ -313,21 +313,21 @@ public enum DefaultGroup { false, true), G_233O("233 - Astensione facoltativa post partum 100% terzo figlio 0-12 anni 30 giorni", "233/253/243 - Astensione facoltativa post partum terzo figlio", - DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child3_0_12, DefaultTakable.T_233, DefaultComplation.C_233, DefaultGroup.G_253O, false, true), G_233("233 - Astensione facoltativa post partum 100% terzo figlio 0-12 anni 30 giorni", - "233/253/243 - Astensione facoltativa post partum terzo figlio", + "233/253/253A - Astensione facoltativa post partum terzo figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child3_0_12, DefaultTakable.T_233, DefaultComplation.C_233, DefaultGroup.G_253, false, true), G_244("244 - Astensione facoltativa post partum non retrib. quarto figlio 0-12 anni 600 giorni", - "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + "", DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child4_0_12, DefaultTakable.T_244, DefaultComplation.C_244, null, false, true), G_254O("254 - Astensione facoltativa post partum 30% quarto figlio 0-6 anni 150 giorni", - "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, + "", DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.child4_0_6, DefaultTakable.T_254O, DefaultComplation.C_254O, DefaultGroup.G_244, false, true), G_254("254 - Astensione facoltativa post partum 30% quarto figlio 0-12 anni 150 giorni", @@ -337,11 +337,11 @@ public enum DefaultGroup { G_234O("234 - Astensione facoltativa post partum 100% quarto figlio 0-12 anni 30 giorni", "234/254/244 - Astensione facoltativa post partum quarto figlio", - DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, + DefaultCategoryType.ALTRI_CODICI, 1, GroupAbsenceTypePattern.programmed, PeriodType.child4_0_12, DefaultTakable.T_234, DefaultComplation.C_234, DefaultGroup.G_254O, false, true), G_234("234 - Astensione facoltativa post partum 100% quarto figlio 0-12 anni 30 giorni", - "234/254/244 - Astensione facoltativa post partum quarto figlio", + "234/254/254A - Astensione facoltativa post partum quarto figlio", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, PeriodType.child4_0_12, DefaultTakable.T_234, DefaultComplation.C_234, DefaultGroup.G_254, false, true), @@ -569,21 +569,27 @@ public static List parentalLeaveAndChildIllnessCodes() { List g232 = getCodes(DefaultGroup.G_232); List g233 = getCodes(DefaultGroup.G_233); List g234 = getCodes(DefaultGroup.G_234); - List g24 = getCodes(DefaultGroup.G_24); - List g242 = getCodes(DefaultGroup.G_242); - List g243 = getCodes(DefaultGroup.G_243); - List g244 = getCodes(DefaultGroup.G_244); +// List g24 = getCodes(DefaultGroup.G_24); +// List g242 = getCodes(DefaultGroup.G_242); +// List g243 = getCodes(DefaultGroup.G_243); +// List g244 = getCodes(DefaultGroup.G_244); List g25 = getCodes(DefaultGroup.G_25); List g252 = getCodes(DefaultGroup.G_252); List g253 = getCodes(DefaultGroup.G_253); List g254 = getCodes(DefaultGroup.G_254); + List g25a = getCodes(DefaultGroup.G_25A); + List g252a = getCodes(DefaultGroup.G_252A); + List g253a = getCodes(DefaultGroup.G_253A); + List g254a = getCodes(DefaultGroup.G_254A); + List g25P = getCodes(DefaultGroup.G_25P); List gmal1 = getCodes(DefaultGroup.MALATTIA_FIGLIO_1); List gmal2 = getCodes(DefaultGroup.MALATTIA_FIGLIO_2); List gmal3 = getCodes(DefaultGroup.MALATTIA_FIGLIO_3); List gmal4 = getCodes(DefaultGroup.MALATTIA_FIGLIO_4); - return Stream.of(g23, g232, g233, g234, g24, g242, g243, g244, g25, g252, g253, g254, + return Stream.of(g23, g232, g233, g234, /*g24, g242, g243, g244,*/ g25, g252, g253, g254, + g25a, g252a, g253a, g254a, g25P, gmal1, gmal2, gmal3, gmal4).flatMap(x -> x.stream()).collect(Collectors.toList()); } From 7fc4f0e75791a8affe87cda7aa0cebb009a4bd79 Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Fri, 16 Sep 2022 15:23:27 +0200 Subject: [PATCH 4/9] Aggiunti i gruppi dei congedi per il padre. --- app/models/absences/definitions/DefaultComplation.java | 1 + app/models/absences/definitions/DefaultGroup.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/app/models/absences/definitions/DefaultComplation.java b/app/models/absences/definitions/DefaultComplation.java index 52be58017..98e32396c 100644 --- a/app/models/absences/definitions/DefaultComplation.java +++ b/app/models/absences/definitions/DefaultComplation.java @@ -123,6 +123,7 @@ public enum DefaultComplation { DefaultAbsenceType.A_20H6, DefaultAbsenceType.A_20H7)), + C_92E(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_92E), ImmutableSet.of(DefaultAbsenceType.A_92E)), diff --git a/app/models/absences/definitions/DefaultGroup.java b/app/models/absences/definitions/DefaultGroup.java index 5b9af0bce..94e3b34f0 100644 --- a/app/models/absences/definitions/DefaultGroup.java +++ b/app/models/absences/definitions/DefaultGroup.java @@ -370,6 +370,16 @@ public enum DefaultGroup { G_20("20 - Congedo/permesso DPR 1026 Art. 20", "", DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.programmed, PeriodType.year, DefaultTakable.T_20, DefaultComplation.C_20, null, false, false), + + G_21P("21P - Congedo parentale per il padre da definire....", + "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, + PeriodType.always, DefaultTakable.T_21P, null, null, + false, true), + + G_21P2("21P2 - Congedo parentale per il padre da definire....", + "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, + PeriodType.always, DefaultTakable.T_21P2, null, null, + false, true), G_ALTRI_CODICI("Altri Codici", "", DefaultCategoryType.ALTRI_CODICI, 0, GroupAbsenceTypePattern.simpleGrouping, PeriodType.always, DefaultTakable.T_ALTRI, null, null, From 8f832ddb8b6f0f36fda9ea945deaceaaeb7979d0 Mon Sep 17 00:00:00 2001 From: darietto1983 Date: Fri, 16 Sep 2022 15:52:02 +0200 Subject: [PATCH 5/9] Aggiunto inserimento delle righe nell'absence_types_history --- db/evolutions/192.sql | 112 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/db/evolutions/192.sql b/db/evolutions/192.sql index ad4ce62a1..c727c38e7 100644 --- a/db/evolutions/192.sql +++ b/db/evolutions/192.sql @@ -15,6 +15,118 @@ UPDATE absence_types SET code = '252OH7' where code = '252H7'; UPDATE absence_types SET code = '253OH7' where code = '253H7'; UPDATE absence_types SET code = '254OH7' where code = '254H7'; +INSERT INTO revinfo (revtstmp) VALUES (EXTRACT(EPOCH FROM NOW())::BIGINT*1000); + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '25'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '252'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '253'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '254'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '25M'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '252M'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '253M'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '254M'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '25H7'; + + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '252H7'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '253H7'; + +INSERT INTO absence_types_history ( + id, _revision, _revision_type, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour) + SELECT id, (SELECT MAX(rev) AS rev FROM revinfo), 1, certification_code, code, considered_week_end, description, internal_use, + justified_time_at_work, valid_from, valid_to, justified_time, replacing_time, replacing_type_id, + documentation, reperibility_compatible, is_real_absence, to_update, meal_ticket_behaviour + FROM absence_types WHERE code = '254H7'; + + # ---!Downs -- non è necessaria una down \ No newline at end of file From 9ae84e93fca6aa9597dfc88e77342c8c1290e7db Mon Sep 17 00:00:00 2001 From: dario Date: Wed, 21 Sep 2022 11:42:31 +0200 Subject: [PATCH 6/9] =?UTF-8?q?Rimossi=20i=20codici=20COV00=20e=20COV50=20?= =?UTF-8?q?che=20non=20sono=20pi=C3=B9=20usati?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/absences/AbsenceService.java | 2 +- .../definitions/DefaultAbsenceType.java | 58 +++++++++---------- .../definitions/DefaultComplation.java | 14 ++--- .../absences/definitions/DefaultGroup.java | 16 ++--- .../absences/definitions/DefaultTakable.java | 22 +++---- 5 files changed, 56 insertions(+), 56 deletions(-) diff --git a/app/manager/services/absences/AbsenceService.java b/app/manager/services/absences/AbsenceService.java index 85c64d094..2bdfde7eb 100644 --- a/app/manager/services/absences/AbsenceService.java +++ b/app/manager/services/absences/AbsenceService.java @@ -722,7 +722,7 @@ private List namesOfChildGroups() { names.add(DefaultGroup.MALATTIA_FIGLIO_3.name()); names.add(DefaultGroup.MALATTIA_FIGLIO_4.name()); names.add(DefaultGroup.G_25P.name()); - names.add(DefaultGroup.G_COV50.name()); +// names.add(DefaultGroup.G_COV50.name()); return names; } diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index 4593f73e4..c4e8a6c2c 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -641,35 +641,35 @@ null, new LocalDate(2020, 1, 1), true, true, 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, - 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, - 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, - 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, - 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, - 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, - MealTicketBehaviour.notAllowMealTicket, 0, - JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), +// A_COV50("COV50", "congedo parentale straordinario al 50%.", +// 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, +// 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, +// 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, +// 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, +// 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, +// MealTicketBehaviour.notAllowMealTicket, 0, +// JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), A_25O("25", "Astensione facoltativa post partum 30% primo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, diff --git a/app/models/absences/definitions/DefaultComplation.java b/app/models/absences/definitions/DefaultComplation.java index 98e32396c..0eef57bf5 100644 --- a/app/models/absences/definitions/DefaultComplation.java +++ b/app/models/absences/definitions/DefaultComplation.java @@ -163,13 +163,13 @@ public enum DefaultComplation { ImmutableSet.of(DefaultAbsenceType.A_43), ImmutableSet.of(DefaultAbsenceType.A_43)), - C_COV50(AmountType.units, - ImmutableSet.of(DefaultAbsenceType.A_COV50M), - ImmutableSet.of(DefaultAbsenceType.A_COV50H)), - - C_COV00(AmountType.units, - ImmutableSet.of(DefaultAbsenceType.A_COV00M), - ImmutableSet.of(DefaultAbsenceType.A_COV00H)), +// C_COV50(AmountType.units, +// ImmutableSet.of(DefaultAbsenceType.A_COV50M), +// ImmutableSet.of(DefaultAbsenceType.A_COV50H)), +// +// C_COV00(AmountType.units, +// ImmutableSet.of(DefaultAbsenceType.A_COV00M), +// ImmutableSet.of(DefaultAbsenceType.A_COV00H)), C_23(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_23M), diff --git a/app/models/absences/definitions/DefaultGroup.java b/app/models/absences/definitions/DefaultGroup.java index 94e3b34f0..bd4f30727 100644 --- a/app/models/absences/definitions/DefaultGroup.java +++ b/app/models/absences/definitions/DefaultGroup.java @@ -253,15 +253,15 @@ public enum DefaultGroup { // PeriodType.always, DefaultTakable.T_COVID50, null, null, // false, true), - G_COV50("COV50 - Congedo parentale straordinario al 50%.", - "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, - PeriodType.always, DefaultTakable.T_COV50, DefaultComplation.C_COV50, null, - false, true), +// G_COV50("COV50 - Congedo parentale straordinario al 50%.", +// "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, +// PeriodType.always, DefaultTakable.T_COV50, DefaultComplation.C_COV50, null, +// false, true), - G_COV00("COV00 - Congedo parentale straordinario al 0%.", - "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, - PeriodType.always, DefaultTakable.T_COV00, DefaultComplation.C_COV00, null, - false, true), +// G_COV00("COV00 - Congedo parentale straordinario al 0%.", +// "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, +// PeriodType.always, DefaultTakable.T_COV00, DefaultComplation.C_COV00, null, +// false, true), G_23O("23 - Astensione facoltativa post partum 100% primo figlio 0-12 anni 30 giorni", "23/25/24 - Astensione facoltativa post partum primo figlio", diff --git a/app/models/absences/definitions/DefaultTakable.java b/app/models/absences/definitions/DefaultTakable.java index 5719fc81a..aba56d4ed 100644 --- a/app/models/absences/definitions/DefaultTakable.java +++ b/app/models/absences/definitions/DefaultTakable.java @@ -263,17 +263,17 @@ public enum DefaultTakable { // ImmutableSet.of(DefaultAbsenceType.A_COVID50), // ImmutableSet.of(DefaultAbsenceType.A_COVID50), -1, null), - T_COV50(AmountType.units, - ImmutableSet.of(DefaultAbsenceType.A_COV50, - DefaultAbsenceType.A_COV50M), - ImmutableSet.of(DefaultAbsenceType.A_COV50, - DefaultAbsenceType.A_COV50M), -1, null), - - T_COV00(AmountType.units, - ImmutableSet.of(DefaultAbsenceType.A_COV00, - DefaultAbsenceType.A_COV00M), - ImmutableSet.of(DefaultAbsenceType.A_COV00, - DefaultAbsenceType.A_COV00M), -1, null), +// T_COV50(AmountType.units, +// ImmutableSet.of(DefaultAbsenceType.A_COV50, +// DefaultAbsenceType.A_COV50M), +// ImmutableSet.of(DefaultAbsenceType.A_COV50, +// DefaultAbsenceType.A_COV50M), -1, null), +// +// T_COV00(AmountType.units, +// ImmutableSet.of(DefaultAbsenceType.A_COV00, +// DefaultAbsenceType.A_COV00M), +// ImmutableSet.of(DefaultAbsenceType.A_COV00, +// DefaultAbsenceType.A_COV00M), -1, null), T_25O(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_25O, From bf47efebd5c2c96e615a0692b6c602edb2a7fa32 Mon Sep 17 00:00:00 2001 From: dario Date: Wed, 21 Sep 2022 16:48:21 +0200 Subject: [PATCH 7/9] Rimossa riga in fondo all'evoluzione 192 --- db/evolutions/192.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/db/evolutions/192.sql b/db/evolutions/192.sql index b64cb41b2..dea9421de 100644 --- a/db/evolutions/192.sql +++ b/db/evolutions/192.sql @@ -7,4 +7,3 @@ ALTER TABLE general_setting_history ADD COLUMN enable_absence_top_level_authoriz ALTER TABLE general_setting DROP COLUMN enable_absence_top_level_authorization; ALTER TABLE general_setting_history DROP enable_absence_top_level_authorization; - From 1856d87273805f59a61a0fa68a989b9a5081a6fb Mon Sep 17 00:00:00 2001 From: dario Date: Wed, 21 Sep 2022 16:52:29 +0200 Subject: [PATCH 8/9] Replace della evoluzione 192 con quella del branch master. --- db/evolutions/192.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/evolutions/192.sql b/db/evolutions/192.sql index dea9421de..c936e7ddb 100644 --- a/db/evolutions/192.sql +++ b/db/evolutions/192.sql @@ -6,4 +6,4 @@ ALTER TABLE general_setting_history ADD COLUMN enable_absence_top_level_authoriz # ---!Downs ALTER TABLE general_setting DROP COLUMN enable_absence_top_level_authorization; -ALTER TABLE general_setting_history DROP enable_absence_top_level_authorization; +ALTER TABLE general_setting_history DROP enable_absence_top_level_authorization; \ No newline at end of file From f5b7908f3db88969a4f76b401edff07d502428dc Mon Sep 17 00:00:00 2001 From: dario Date: Wed, 21 Sep 2022 17:03:37 +0200 Subject: [PATCH 9/9] Cambiata versione a 2.6.0rc2. Rimossi i pezzi di codice commentati nelle classi --- VERSION | 2 +- .../definitions/DefaultAbsenceType.java | 30 ------------------- .../absences/definitions/DefaultGroup.java | 14 --------- .../absences/definitions/DefaultTakable.java | 15 ---------- 4 files changed, 1 insertion(+), 60 deletions(-) diff --git a/VERSION b/VERSION index 18ad5bd85..c14b79ed0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6.0-rc1 \ No newline at end of file +2.6.0-rc2 \ No newline at end of file diff --git a/app/models/absences/definitions/DefaultAbsenceType.java b/app/models/absences/definitions/DefaultAbsenceType.java index c4e8a6c2c..859c6dc62 100644 --- a/app/models/absences/definitions/DefaultAbsenceType.java +++ b/app/models/absences/definitions/DefaultAbsenceType.java @@ -641,36 +641,6 @@ null, new LocalDate(2020, 1, 1), true, true, 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, -// 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, -// 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, -// 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, -// 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, -// 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, -// MealTicketBehaviour.notAllowMealTicket, 0, -// JustifiedTypeName.all_day, Sets.newHashSet(), null, null, false, true, true), - A_25O("25", "Astensione facoltativa post partum 30% primo figlio intera giornata", false, ImmutableSet.of(JustifiedTypeName.all_day), 0, true, MealTicketBehaviour.notAllowMealTicket, 0, null, Sets.newHashSet(), null, diff --git a/app/models/absences/definitions/DefaultGroup.java b/app/models/absences/definitions/DefaultGroup.java index bd4f30727..01945d663 100644 --- a/app/models/absences/definitions/DefaultGroup.java +++ b/app/models/absences/definitions/DefaultGroup.java @@ -248,20 +248,6 @@ public enum DefaultGroup { "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 0, GroupAbsenceTypePattern.programmed, PeriodType.child1_0_12, DefaultTakable.T_25, DefaultComplation.C_25, DefaultGroup.G_25A, false, true), - // G_COVID50("COVID50 - Congedo parentale straordinario al 50%.", - // "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, - // PeriodType.always, DefaultTakable.T_COVID50, null, null, - // false, true), - -// G_COV50("COV50 - Congedo parentale straordinario al 50%.", -// "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, -// PeriodType.always, DefaultTakable.T_COV50, DefaultComplation.C_COV50, null, -// false, true), - -// G_COV00("COV00 - Congedo parentale straordinario al 0%.", -// "", DefaultCategoryType.ASTENSIONE_POSTPARTUM, 1, GroupAbsenceTypePattern.programmed, -// PeriodType.always, DefaultTakable.T_COV00, DefaultComplation.C_COV00, null, -// false, true), G_23O("23 - Astensione facoltativa post partum 100% primo figlio 0-12 anni 30 giorni", "23/25/24 - Astensione facoltativa post partum primo figlio", diff --git a/app/models/absences/definitions/DefaultTakable.java b/app/models/absences/definitions/DefaultTakable.java index aba56d4ed..7b5324a23 100644 --- a/app/models/absences/definitions/DefaultTakable.java +++ b/app/models/absences/definitions/DefaultTakable.java @@ -259,21 +259,6 @@ public enum DefaultTakable { DefaultAbsenceType.A_23M, DefaultAbsenceType.A_23U), 30, null), - // T_COVID50(AmountType.units, - // ImmutableSet.of(DefaultAbsenceType.A_COVID50), - // ImmutableSet.of(DefaultAbsenceType.A_COVID50), -1, null), - -// T_COV50(AmountType.units, -// ImmutableSet.of(DefaultAbsenceType.A_COV50, -// DefaultAbsenceType.A_COV50M), -// ImmutableSet.of(DefaultAbsenceType.A_COV50, -// DefaultAbsenceType.A_COV50M), -1, null), -// -// T_COV00(AmountType.units, -// ImmutableSet.of(DefaultAbsenceType.A_COV00, -// DefaultAbsenceType.A_COV00M), -// ImmutableSet.of(DefaultAbsenceType.A_COV00, -// DefaultAbsenceType.A_COV00M), -1, null), T_25O(AmountType.units, ImmutableSet.of(DefaultAbsenceType.A_25O,