This is an automated email from the git hooks/post-receive script. New commit to branch feature/5923 in repository wao. See http://git.codelutin.com/wao.git commit 3c6b59f378f6bf90aa49835b838ad7cdeb216343 Author: Brendan Le Ny <bleny@codelutin.com> Date: Thu Feb 26 14:20:32 2015 +0100 Dans la synthèse, on compte désormais l'observation sur le mois avec le plus de jours de mer --- .../java/fr/ifremer/wao/services/service/SynthesisService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/SynthesisService.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/SynthesisService.java index 20b426f..4596c1e 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/SynthesisService.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/SynthesisService.java @@ -619,7 +619,13 @@ public class SynthesisService extends WaoServiceSupport { */ @Override protected Map<Date, Integer> getActualPerPeriods(Contact contact) { - Date month = truncateToTimePeriod(contact.getObservationBeginDate()); + // on calcule les jours de mers pour chaque mois + Map<Date, Integer> observationDaysByMonthsForObservation = + WaoUtils.getObservationDaysByMonths( + contact.getObservationBeginDate(), + contact.getObservationEndDate()); + // on prend le mois avec le plus de jours de mers pour compter 1 observation + Date month = WaoUtils.getKeyWithHighestValue(observationDaysByMonthsForObservation); return ImmutableMap.of(month, 1); } } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.