branch feature/2264 updated (8de096c -> cceafbe)
This is an automated email from the git hooks/post-receive script. New change to branch feature/2264 in repository wao. See http://git.codelutin.com/wao.git from 8de096c Ajout des totaux en individus dans le plan new ca4479f On supprime les notions de nombre d'observations du plan scléro new cceafbe Filtres scléro pour l'onglet Contacts The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit cceafbecc5173a9a0f7192c2d805dd5be807b334 Author: Brendan Le Ny <bleny@codelutin.com> Date: Fri Dec 26 14:34:39 2014 +0100 Filtres scléro pour l'onglet Contacts commit ca4479f20c4424c1232b8c32b396480c999a1f7e Author: Brendan Le Ny <bleny@codelutin.com> Date: Fri Dec 26 13:56:49 2014 +0100 On supprime les notions de nombre d'observations du plan scléro Summary of changes: .../service/SclerochronologySamplingPlan.java | 31 ++++++++--- .../SclerochronologySamplingPlanBuilder.java | 42 +-------------- .../src/main/webapp/WEB-INF/content/contacts.jsp | 61 ++++++++++++++-------- 3 files changed, 67 insertions(+), 67 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/2264 in repository wao. See http://git.codelutin.com/wao.git commit ca4479f20c4424c1232b8c32b396480c999a1f7e Author: Brendan Le Ny <bleny@codelutin.com> Date: Fri Dec 26 13:56:49 2014 +0100 On supprime les notions de nombre d'observations du plan scléro --- .../service/SclerochronologySamplingPlan.java | 31 ++++++++++++---- .../SclerochronologySamplingPlanBuilder.java | 42 ++-------------------- 2 files changed, 27 insertions(+), 46 deletions(-) diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/SclerochronologySamplingPlan.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/SclerochronologySamplingPlan.java index cc13303..0f6ab70 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/SclerochronologySamplingPlan.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/SclerochronologySamplingPlan.java @@ -26,6 +26,7 @@ import fr.ifremer.wao.entity.ObsProgram; import fr.ifremer.wao.entity.SampleRow; import java.util.Collection; +import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Locale; @@ -40,13 +41,11 @@ public class SclerochronologySamplingPlan extends SamplingPlan implements Iterab public SclerochronologySamplingPlan(List<Date> months, Collection<SamplingPlanFacadePart> facadeParts, - Map<Date, Effort> totalEffortInObservationsPerMonths, Map<Date, Effort> totalEffortInIndividualsPerMonths, - Effort highTotalEffortInObservations, Effort highTotalEffortInIndividuals, SampleRowsFilterValues filterValues, Set<String> sampleRowIds) { - super(months, facadeParts, totalEffortInObservationsPerMonths, highTotalEffortInObservations, filterValues, sampleRowIds); + super(months, facadeParts, Collections.<Date, Effort>emptyMap(), null, filterValues, sampleRowIds); this.totalEffortInIndividualsPerMonths = totalEffortInIndividualsPerMonths; this.highTotalEffortInIndividuals = highTotalEffortInIndividuals; } @@ -59,9 +58,19 @@ public class SclerochronologySamplingPlan extends SamplingPlan implements Iterab return highTotalEffortInIndividuals; } + @Override + public Effort getHighTotalEffortInObservations() { + throw new UnsupportedOperationException("not in " + ObsProgram.SCLEROCHRONOLOGY); + } + + @Override + public Map<Date, Effort> getTotalEffortInObservationsPerMonths() { + throw new UnsupportedOperationException("not in " + ObsProgram.SCLEROCHRONOLOGY); + } + public static class SclerochronologySamplingPlanSampleRowPart extends SamplingPlanSampleRowPart { - protected final String organisationFullName; + protected String organisationFullName; protected String samplingContext; @@ -75,8 +84,8 @@ public class SclerochronologySamplingPlan extends SamplingPlan implements Iterab protected Effort totalIndividuals; - public SclerochronologySamplingPlanSampleRowPart(Locale locale, Map<Date, Effort> effortInObservationsPerMonths, Map<Date, Effort> effortInIndividualsPerMonths, SampleRow sampleRow, long sampleRowContactCounts) { - super(locale, effortInObservationsPerMonths, sampleRow, sampleRowContactCounts); + public SclerochronologySamplingPlanSampleRowPart(Locale locale, Map<Date, Effort> effortInIndividualsPerMonths, SampleRow sampleRow, long sampleRowContactCounts) { + super(locale, Collections.<Date, Effort>emptyMap(), sampleRow, sampleRowContactCounts); this.effortInIndividualsPerMonths = effortInIndividualsPerMonths; species = sampleRow.getSpecies().getVernacularName(); samplingContext = WaoUtils.l(locale, sampleRow.getSclerochronologySamplingContext()); @@ -111,11 +120,21 @@ public class SclerochronologySamplingPlan extends SamplingPlan implements Iterab } @Override + public Map<Date, Effort> getEffortInObservationsPerMonths() { + throw new UnsupportedOperationException("not in " + ObsProgram.SCLEROCHRONOLOGY); + } + + @Override public Map<String, String> getDcf5CodesAndDescriptions() { throw new UnsupportedOperationException("not in " + ObsProgram.SCLEROCHRONOLOGY); } @Override + public Effort getTotalObservations() { + throw new UnsupportedOperationException("not in " + ObsProgram.SCLEROCHRONOLOGY); + } + + @Override public String getProfessionMeshSize() { throw new UnsupportedOperationException("not in " + ObsProgram.SCLEROCHRONOLOGY); } diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/SclerochronologySamplingPlanBuilder.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/SclerochronologySamplingPlanBuilder.java index cc99a98..0aff1fb 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/SclerochronologySamplingPlanBuilder.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/SclerochronologySamplingPlanBuilder.java @@ -78,8 +78,6 @@ public class SclerochronologySamplingPlanBuilder { */ protected Map<String, FacadeContext> facadeMap = new TreeMap<>(); - protected ListMultimap<Date, SamplingPlan.Effort> totalObservationsForMonths = LinkedListMultimap.create(); - protected ListMultimap<Date, SamplingPlan.Effort> totalIndividualsForMonths = LinkedListMultimap.create(); public SclerochronologySamplingPlanBuilder(Locale locale, @@ -109,19 +107,16 @@ public class SclerochronologySamplingPlanBuilder { // get sector context SectorContext sectorPart = facadeContext.getOrAddSectorContext(sectors); - // calcul de l'effort en nombre d'observations puis en nombre d'individus - Map<Date, SamplingPlan.Effort> effortInObservationsPerMonths = getEffortInObservationsPerMonths(sampleRow); + // calcul de l'effort en nombre en nombre d'individus Map<Date, SamplingPlan.Effort> effortInIndividualsPerMonths = getEffortInIndividualsPerMonths(sampleRow, doneObservations); // ajout dans les totaux par mois - totalObservationsForMonths.putAll(Multimaps.forMap(effortInObservationsPerMonths)); totalIndividualsForMonths.putAll(Multimaps.forMap(effortInIndividualsPerMonths)); // add sample row sectorPart.addSampleRow(sampleRowsFilterValues.getLocale(), sampleRow, - effortInObservationsPerMonths, - effortInIndividualsPerMonths, + effortInIndividualsPerMonths, sampleRowContactCounts); sampleRowsFilterValues.addSampleRow(sampleRow); @@ -148,15 +143,10 @@ public class SclerochronologySamplingPlanBuilder { }).immutableSortedCopy(facadeParts); // On a accumulé les totaux en nombre d'observation / par mois, on fait les calculs finaux - Map<Date, SamplingPlan.Effort> totalEffortInObservationsPerMonths = new TreeMap<>(); Map<Date, SamplingPlan.Effort> totalEffortInIndividualsPerMonths = new TreeMap<>(); for (Date month : months) { - Collection<SamplingPlan.Effort> totalObservationsForMonth = totalObservationsForMonths.asMap().get(month); - SamplingPlan.Effort totalEffortInObservationsForMonth = SamplingPlan.Effort.sum(totalObservationsForMonth); - totalEffortInObservationsPerMonths.put(month, totalEffortInObservationsForMonth); - Collection<SamplingPlan.Effort> totalIndividualsForMonth = totalIndividualsForMonths.asMap().get(month); SamplingPlan.Effort totalEffortInIndividualsForMonth = SamplingPlan.Effort.sum(totalIndividualsForMonth); totalEffortInIndividualsPerMonths.put(month, totalEffortInIndividualsForMonth); @@ -164,15 +154,12 @@ public class SclerochronologySamplingPlanBuilder { } // on calcule le grand total en faisant la somme sur tous les mois - SamplingPlan.Effort highTotalEffortInObservations = SamplingPlan.Effort.sum(totalEffortInObservationsPerMonths.values()); SamplingPlan.Effort highTotalEffortInIndividuals = SamplingPlan.Effort.sum(totalEffortInIndividualsPerMonths.values()); SclerochronologySamplingPlan result = new SclerochronologySamplingPlan( months, sortedFacades, - totalEffortInObservationsPerMonths, totalEffortInIndividualsPerMonths, - highTotalEffortInObservations, highTotalEffortInIndividuals, sampleRowsFilterValues, sampleRowIds); @@ -180,29 +167,6 @@ public class SclerochronologySamplingPlanBuilder { return result; } - protected Map<Date, SamplingPlan.Effort> getEffortInObservationsPerMonths(SampleRow sampleRow) { - - Map<Date, SamplingPlan.Effort> effortInObservationsPerMonths = new TreeMap<>(); - - for (Date month : months) { - - // FIXME brendan 26/12/14 n'a aucun sens puisqu'on récupère des individus - Integer expectedTidesValue = SampleRows.getExpectedTidesValue(sampleRow, month); - Integer estimatedTidesValue = SampleRows.getEstimatedTidesValue(sampleRow, month); - Integer realTidesValue = SampleRows.getRealTidesValue(sampleRow, month); - - SamplingPlan.Effort effortForMonth = - new SamplingPlan.Effort( - expectedTidesValue, - realTidesValue, - estimatedTidesValue); - effortInObservationsPerMonths.put(month, effortForMonth); - - } - - return effortInObservationsPerMonths; - } - protected Map<Date, SamplingPlan.Effort> getEffortInIndividualsPerMonths(SampleRow sampleRow, Collection<Contact> doneObservations) { // Pour chaque observation réalisée, on ajoute dans ces multimaps, une ou plusieurs @@ -313,14 +277,12 @@ public class SclerochronologySamplingPlanBuilder { protected ObsMerSamplingPlan.SamplingPlanSampleRowPart addSampleRow( Locale locale, SampleRow row, - Map<Date, SamplingPlan.Effort> effortInObservationsPerMonths, Map<Date, SamplingPlan.Effort> effortInIndividualsPerMonths, long sampleRowContactCounts) { SclerochronologySamplingPlan.SclerochronologySamplingPlanSampleRowPart rowPart = new SclerochronologySamplingPlan.SclerochronologySamplingPlanSampleRowPart( locale, - effortInObservationsPerMonths, effortInIndividualsPerMonths, row, sampleRowContactCounts); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/2264 in repository wao. See http://git.codelutin.com/wao.git commit cceafbecc5173a9a0f7192c2d805dd5be807b334 Author: Brendan Le Ny <bleny@codelutin.com> Date: Fri Dec 26 14:34:39 2014 +0100 Filtres scléro pour l'onglet Contacts --- .../src/main/webapp/WEB-INF/content/contacts.jsp | 61 ++++++++++++++-------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp b/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp index b3df83d..c62d67d 100644 --- a/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp +++ b/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp @@ -36,7 +36,7 @@ <s:if test="authenticatedWaoUser.authorizedToViewOtherCompanies"> { filterName: 'sampleRowFilter.organisationIds', - filterLabel: "<s:text name="wao.ui.entity.Company"/>", + filterLabel: "<s:text name="wao.ui.entity.Organisation"/>", filterValuesField: 'sampleRowsFilterValues.companies', }, </s:if> @@ -67,30 +67,32 @@ filterValuesField: 'terrestrialLocations' }, </s:if> - { - filterName: 'sampleRowFilter.fishingGearDcfIds', - filterLabel: "<s:text name="wao.ui.entity.fishingGearDcf"/>", - filterValuesField: 'sampleRowsFilterValues.fishingGearDcfs', - }, - { - filterName: 'sampleRowFilter.targetSpeciesDcfIds', - filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDcf"/>", - filterValuesField: 'sampleRowsFilterValues.targetSpeciesDcfs', - }, - <s:if test="authenticatedWaoUser.authorizedToFilterOnBoats"> + <s:if test="obsMer || obsVente"> + { + filterName: 'sampleRowFilter.fishingGearDcfIds', + filterLabel: "<s:text name="wao.ui.entity.fishingGearDcf"/>", + filterValuesField: 'sampleRowsFilterValues.fishingGearDcfs', + }, + { + filterName: 'sampleRowFilter.targetSpeciesDcfIds', + filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDcf"/>", + filterValuesField: 'sampleRowsFilterValues.targetSpeciesDcfs', + }, + <s:if test="authenticatedWaoUser.authorizedToFilterOnBoats"> + { + filterName: 'boatFilter.boatIds', + filterLabel: "<s:text name="wao.ui.entity.Boat"/>", + filterValuesField: 'boatsFilterValues.boats', + minimumInputLength: 3 + }, + </s:if> { - filterName: 'boatFilter.boatIds', - filterLabel: "<s:text name="wao.ui.entity.Boat"/>", - filterValuesField: 'boatsFilterValues.boats', - minimumInputLength: 3 + filterName: 'boatFilter.districtIds', + filterLabel: "<s:text name="wao.ui.field.Boat.district"/>", + filterValuesField: 'boatsFilterValues.districts' }, </s:if> { - filterName: 'boatFilter.districtIds', - filterLabel: "<s:text name="wao.ui.field.Boat.district"/>", - filterValuesField: 'boatsFilterValues.districts' - }, - { filterName: 'observerIds', filterLabel: "<s:text name="wao.ui.misc.observer"/>", filterValuesField: 'observers' @@ -144,6 +146,23 @@ filterValuesField: 'completeSamplings' } </s:if> + <s:if test="sclerochronology"> + { + filterName: 'sampleRowFilter.sclerochronologySamplingContexts', + filterLabel: "<s:text name="wao.ui.field.SampleRow.sclerochronologySamplingContext"/>", + filterValuesField: 'sampleRowsFilterValues.sclerochronologySamplingContexts' + }, + { + filterName: 'sampleRowFilter.individualMeasurementStrategies', + filterLabel: "<s:text name="wao.ui.field.SampleRow.individualMeasurementStrategy"/>", + filterValuesField: 'sampleRowsFilterValues.individualMeasurementStrategies' + }, + { + filterName: 'sampleRowFilter.species', + filterLabel: "<s:text name="wao.ui.field.SampleRow.species"/>", + filterValuesField: 'sampleRowsFilterValues.species' + } + </s:if> ]; filter = <s:property value="filter" escapeHtml="false"/>; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm