From 42fcf3a1ef9535c026997899efb30e18aa2c190d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GRENOT?= Date: Mon, 4 Sep 2023 16:20:09 +0200 Subject: [PATCH 1/3] =?UTF-8?q?SDIS=2053=20:=20R=C3=A9pare=20la=20num?= =?UTF-8?q?=C3=A9rotation=20des=20PEI=20public=20Chang=C3=A9=20S1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: #187645 Change-Id: If51fca86e39982572b6685efb2d813c40eae5708 (cherry picked from commit a408319009ae97728735084ceb8254a30482c69b) --- .../fr/sdis83/remocra/repository/NumeroUtilRepository.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/remocra/src/main/java/fr/sdis83/remocra/repository/NumeroUtilRepository.java b/remocra/src/main/java/fr/sdis83/remocra/repository/NumeroUtilRepository.java index 44c08fb71..2904b2946 100755 --- a/remocra/src/main/java/fr/sdis83/remocra/repository/NumeroUtilRepository.java +++ b/remocra/src/main/java/fr/sdis83/remocra/repository/NumeroUtilRepository.java @@ -315,7 +315,9 @@ protected static String computeNumero53(Hydrant hydrant) { suffixe = "D"; break; case "SECTEUR CHANGE 1": - suffixe = "S1"; + if ("PRIVE".equalsIgnoreCase(natureDeci)) { + suffixe = "S1"; + } break; case "SECTEUR CHANGE 2": if ("PRIVE".equalsIgnoreCase(natureDeci)) { @@ -731,7 +733,7 @@ public static Integer computeNumeroInterne53(Hydrant hydrant) { if (codeZoneSpeciale != null) { switch (codeZoneSpeciale) { case "SECTEUR CHANGE 1": - numInterne = computeNumeroInterne53Public(hydrant, 101, 199); + numInterne = computeNumeroInterne53ZoneSpeciale(hydrant, 101, 199); return numInterne; case "SECTEUR CHANGE 2": numInterne = computeNumeroInterne53ZoneSpeciale(hydrant, 201, 299); From 3a0180e51a8624857dda81cbf71a24e13c11792c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GRENOT?= Date: Tue, 12 Sep 2023 08:56:35 +0200 Subject: [PATCH 2/3] Passe en version 2.2.5.5 Change-Id: Idbdfe7758deaef31dbd39f16e79cf0f31dac79ff --- client-ng/pom.xml | 2 +- dist/pom.xml | 2 +- pom.xml | 2 +- remocra/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client-ng/pom.xml b/client-ng/pom.xml index da9537f00..bea56e047 100644 --- a/client-ng/pom.xml +++ b/client-ng/pom.xml @@ -5,7 +5,7 @@ fr.sdis83.remocra parent - 2.2.5.4 + 2.2.5.5 fr.sdis83.remocra diff --git a/dist/pom.xml b/dist/pom.xml index dbbfa011f..fcd31faee 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -7,7 +7,7 @@ fr.sdis83.remocra parent - 2.2.5.4 + 2.2.5.5 fr.sdis83.remocra diff --git a/pom.xml b/pom.xml index 89ca174ed..d1238a259 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ fr.sdis83.remocra parent pom - 2.2.5.4 + 2.2.5.5 parent diff --git a/remocra/pom.xml b/remocra/pom.xml index ac34bf493..c069b996c 100644 --- a/remocra/pom.xml +++ b/remocra/pom.xml @@ -5,7 +5,7 @@ fr.sdis83.remocra parent - 2.2.5.4 + 2.2.5.5 fr.sdis83.remocra From 79d2bffc12e17c4db7b94bfbb8ab0bc83103c11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20GRENOT?= Date: Wed, 13 Sep 2023 16:53:34 +0200 Subject: [PATCH 3/3] =?UTF-8?q?Corrige=20la=20num=C3=A9rotation=20du=2053?= =?UTF-8?q?=20pour=20les=20Secteurs=20Change=20Rive=20G=20et=20D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: #184842 Change-Id: I4b7c1139964983ed6e3288a253b35e84ea4faa00 --- .../repository/NumeroUtilRepository.java | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/remocra/src/main/java/fr/sdis83/remocra/repository/NumeroUtilRepository.java b/remocra/src/main/java/fr/sdis83/remocra/repository/NumeroUtilRepository.java index 2904b2946..31a831859 100755 --- a/remocra/src/main/java/fr/sdis83/remocra/repository/NumeroUtilRepository.java +++ b/remocra/src/main/java/fr/sdis83/remocra/repository/NumeroUtilRepository.java @@ -312,7 +312,7 @@ protected static String computeNumero53(Hydrant hydrant) { suffixe = "D"; break; case "SECTEUR CHANGE RIVE GAUCHE": // Rive gauche - suffixe = "D"; + suffixe = "G"; break; case "SECTEUR CHANGE 1": if ("PRIVE".equalsIgnoreCase(natureDeci)) { @@ -741,7 +741,7 @@ public static Integer computeNumeroInterne53(Hydrant hydrant) { case "SECTEUR CHANGE PRIVE": case "SECTEUR CHANGE RIVE DROITE": case "SECTEUR CHANGE RIVE GAUCHE": - numInterne = computeNumeroInterne53Private(hydrant); + numInterne = computeNumeroInterne53Private(hydrant, true); return numInterne; } } @@ -789,15 +789,29 @@ private static Integer computeNumeroInterne53Public(Hydrant hydrant, int startRa .fetchOneInto(Integer.class); return numInterne; } + + private static Integer computeNumeroInterne53Private(Hydrant hydrant) { + return computeNumeroInterne53Private(hydrant, false); + } + + private static Integer computeNumeroInterne53Private(Hydrant hydrant, boolean ignoreDECI) { Integer numInterne = null; if ("PIBI".equalsIgnoreCase(hydrant.getCode())){ - numInterne = context.resultQuery("select remocra.nextNumeroInterne(null, {0}, {1}, {2}, {3}, null, null, true)", - DSL.val(hydrant.getCode(), SQLDataType.VARCHAR), - DSL.val(hydrant.getNatureDeci(), SQLDataType.BIGINT), - (hydrant.getZoneSpeciale() == null) ? hydrant.getCommune() : DSL.val(null, SQLDataType.BIGINT), - (hydrant.getZoneSpeciale() != null) ? hydrant.getZoneSpeciale() : DSL.val(null, SQLDataType.BIGINT)) - .fetchOneInto(Integer.class); + if (ignoreDECI) { // si on ignore la nature DECI ; Cas des secteurs Changé Rive Gauche/Droite Et Changé Privé + numInterne = context.resultQuery("select remocra.nextNumeroInterne(null, {0}, null, {1}, {2}, null, null, true)", + DSL.val(hydrant.getCode(), SQLDataType.VARCHAR), + (hydrant.getZoneSpeciale() == null) ? hydrant.getCommune() : DSL.val(null, SQLDataType.BIGINT), + (hydrant.getZoneSpeciale() != null) ? hydrant.getZoneSpeciale() : DSL.val(null, SQLDataType.BIGINT)) + .fetchOneInto(Integer.class); + } else { + numInterne = context.resultQuery("select remocra.nextNumeroInterne(null, {0}, {1}, {2}, {3}, null, null, true)", + DSL.val(hydrant.getCode(), SQLDataType.VARCHAR), + DSL.val(hydrant.getNatureDeci(), SQLDataType.BIGINT), + (hydrant.getZoneSpeciale() == null) ? hydrant.getCommune() : DSL.val(null, SQLDataType.BIGINT), + (hydrant.getZoneSpeciale() != null) ? hydrant.getZoneSpeciale() : DSL.val(null, SQLDataType.BIGINT)) + .fetchOneInto(Integer.class); + } } else { numInterne = context.resultQuery("select remocra.nextNumeroInterne(null, {0}, null, {1}, null, null, null, true)", DSL.val(hydrant.getCode(), SQLDataType.VARCHAR),