Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
aca4d4c4
by tchemit at 2019-06-27T09:11:51Z
13 changed files:
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/observation/SetSeineUI.jaxx
- dto/src/main/models/Observe-20-data-ps-observation.model
- persistence/src/main/java/fr/ird/observe/binder/data/ps/observation/SetSeineEntityDtoBinder.java
- persistence/src/main/models/Observe-20-data-ps-observation.model
- persistence/src/main/resources/db/migration/7.3/02_ps_modify_data_tables-H2.sql
- persistence/src/main/resources/db/migration/7.3/02_ps_modify_data_tables-PG.sql
- services-local/src/main/java/fr/ird/observe/services/local/service/data/ps/observation/NonTargetCatchServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/data/ps/observation/TargetCatchServiceLocal.java
- test/src/main/resources/db/7.3/dataForTestLongline.sql.gz
- test/src/main/resources/db/7.3/dataForTestSeine.sql.gz
- test/src/main/resources/db/7.3/empty_h2.sql.gz
- test/src/main/resources/db/7.3/empty_pg.sql.gz
- test/src/main/resources/db/7.3/referentiel.sql.gz
Changes:
| ... | ... | @@ -33,8 +33,6 @@ |
| 33 | 33 |
fr.ird.observe.client.ui.actions.content.data.ps.delete.DeleteSetSeineUIAction
|
| 34 | 34 |
fr.ird.observe.client.ui.actions.content.data.ps.save.SaveSetSeineUIAction
|
| 35 | 35 |
|
| 36 |
- fr.ird.observe.client.ui.util.BooleanEditor
|
|
| 37 |
- |
|
| 38 | 36 |
org.nuiton.jaxx.widgets.number.NumberEditor
|
| 39 | 37 |
org.nuiton.jaxx.widgets.select.BeanFilterableComboBox
|
| 40 | 38 |
org.nuiton.jaxx.widgets.datetime.DateTimeEditor
|
| ... | ... | @@ -94,22 +92,6 @@ |
| 94 | 92 |
<NormalTextEditor id='supportVesselName'/>
|
| 95 | 93 |
</cell>
|
| 96 | 94 |
</row>
|
| 97 |
- <row>
|
|
| 98 |
- <cell anchor="west">
|
|
| 99 |
- <JLabel id='targetDiscardedLabel'/>
|
|
| 100 |
- </cell>
|
|
| 101 |
- <cell anchor='east' fill="both">
|
|
| 102 |
- <BooleanEditor id='targetDiscarded'/>
|
|
| 103 |
- </cell>
|
|
| 104 |
- </row>
|
|
| 105 |
- <row>
|
|
| 106 |
- <cell anchor="west">
|
|
| 107 |
- <JLabel id='nonTargetDiscardedLabel'/>
|
|
| 108 |
- </cell>
|
|
| 109 |
- <cell anchor='east' fill="both">
|
|
| 110 |
- <BooleanEditor id='nonTargetDiscarded'/>
|
|
| 111 |
- </cell>
|
|
| 112 |
- </row>
|
|
| 113 | 95 |
<row>
|
| 114 | 96 |
<cell anchor='west'>
|
| 115 | 97 |
<JLabel id='schoolTypeLabel' styleClass="information"/>
|
| ... | ... | @@ -144,8 +144,6 @@ schoolTopDepth + {*:1} Integer |
| 144 | 144 |
schoolMeanDepth + {*:1} Integer
|
| 145 | 145 |
schoolThickness + {*:1} Integer
|
| 146 | 146 |
supportVesselName + {*:1} String
|
| 147 |
-targetDiscarded + {*:1} Boolean
|
|
| 148 |
-nonTargetDiscarded + {*:1} Boolean
|
|
| 149 | 147 |
currentMeasureDepth + {*:1} Integer
|
| 150 | 148 |
schoolType + {*:1} fr.ird.observe.dto.referential.ps.common.SchoolTypeReference
|
| 151 | 149 |
targetCatchCompositionEstimatedByObserver + {*:1} boolean
|
| ... | ... | @@ -52,8 +52,6 @@ public class SetSeineEntityDtoBinder extends DataEntityDtoBinderSupport<SetSeine |
| 52 | 52 |
entity.setSchoolMeanDepth(dto.getSchoolMeanDepth());
|
| 53 | 53 |
entity.setSchoolThickness(dto.getSchoolThickness());
|
| 54 | 54 |
entity.setSupportVesselName(dto.getSupportVesselName());
|
| 55 |
- entity.setTargetDiscarded(dto.getTargetDiscarded());
|
|
| 56 |
- entity.setNonTargetDiscarded(dto.getNonTargetDiscarded());
|
|
| 57 | 55 |
entity.setCurrentMeasureDepth(dto.getCurrentMeasureDepth());
|
| 58 | 56 |
entity.setLastUpdateDate(dto.getLastUpdateDate());
|
| 59 | 57 |
entity.setTargetCatchCompositionEstimatedByObserver(dto.isTargetCatchCompositionEstimatedByObserver());
|
| ... | ... | @@ -76,8 +74,6 @@ public class SetSeineEntityDtoBinder extends DataEntityDtoBinderSupport<SetSeine |
| 76 | 74 |
dto.setSchoolMeanDepth(entity.getSchoolMeanDepth());
|
| 77 | 75 |
dto.setSchoolThickness(entity.getSchoolThickness());
|
| 78 | 76 |
dto.setSupportVesselName(entity.getSupportVesselName());
|
| 79 |
- dto.setTargetDiscarded(entity.getTargetDiscarded());
|
|
| 80 |
- dto.setNonTargetDiscarded(entity.getNonTargetDiscarded());
|
|
| 81 | 77 |
dto.setCurrentMeasureDepth(entity.getCurrentMeasureDepth());
|
| 82 | 78 |
dto.setTargetCatchCompositionEstimatedByObserver(entity.isTargetCatchCompositionEstimatedByObserver());
|
| 83 | 79 |
dto.setTargetDiscardCatchCompositionEstimatedByObserver(entity.isTargetDiscardCatchCompositionEstimatedByObserver());
|
| ... | ... | @@ -151,8 +151,6 @@ schoolTopDepth + {*:1} Integer |
| 151 | 151 |
schoolMeanDepth + {*:1} Integer
|
| 152 | 152 |
schoolThickness + {*:1} Integer
|
| 153 | 153 |
supportVesselName + {*:1} String
|
| 154 |
-targetDiscarded + {*:1} Boolean
|
|
| 155 |
-nonTargetDiscarded + {*:1} Boolean
|
|
| 156 | 154 |
currentMeasureDepth + {*:1} Integer
|
| 157 | 155 |
schoolType + {*:1} referential.ps.common.SchoolType
|
| 158 | 156 |
targetCatchCompositionEstimatedByObserver + {*:1} boolean
|
| ... | ... | @@ -40,3 +40,6 @@ ALTER TABLE ps_observation.TransmittingBuoy ADD CONSTRAINT fk_ps_observation_Tra |
| 40 | 40 |
CREATE INDEX idx_ps_observation_ObservedSystem_schoolType ON ps_observation.ObservedSystem(schoolType);
|
| 41 | 41 |
CREATE INDEX idx_ps_observation_Set_schoolType ON ps_observation.Set(schoolType);
|
| 42 | 42 |
CREATE INDEX idx_ps_observation_TransmittingBuoy_TransmittingBuoyOwnership ON ps_observation.TransmittingBuoy(TransmittingBuoyOwnership);
|
| 43 |
+ |
|
| 44 |
+ALTER TABLE ps_observation.Set DROP COLUMN targetDiscarded;
|
|
| 45 |
+ALTER TABLE ps_observation.Set DROP COLUMN nonTargetDiscarded;
|
|
| \ No newline at end of file |
| ... | ... | @@ -40,3 +40,6 @@ ALTER TABLE ps_observation.TransmittingBuoy ADD CONSTRAINT fk_ps_observation_Tra |
| 40 | 40 |
CREATE INDEX idx_ps_observation_ObservedSystem_schoolType ON ps_observation.ObservedSystem(schoolType);
|
| 41 | 41 |
CREATE INDEX idx_ps_observation_Set_schoolType ON ps_observation.Set(schoolType);
|
| 42 | 42 |
CREATE INDEX idx_ps_observation_TransmittingBuoy_TransmittingBuoyOwnership ON ps_observation.TransmittingBuoy(TransmittingBuoyOwnership);
|
| 43 |
+ |
|
| 44 |
+ALTER TABLE ps_observation.Set DROP COLUMN targetDiscarded;
|
|
| 45 |
+ALTER TABLE ps_observation.Set DROP COLUMN nonTargetDiscarded;
|
| ... | ... | @@ -90,18 +90,6 @@ public class NonTargetCatchServiceLocal extends ObserveServiceLocal implements N |
| 90 | 90 |
checkLastUpdateDate(entity, dto);
|
| 91 | 91 |
SET_SEINE_NON_TARGET_SPI.copyDtoToEntity(dto, entity, getReferentialLocale());
|
| 92 | 92 |
|
| 93 |
- // mise a jour de la propriete nonTargetDiscarded sur la calée
|
|
| 94 |
- |
|
| 95 |
- boolean nonTargetDiscarded = entity.getNonTargetCatch().stream()
|
|
| 96 |
- .anyMatch(nonTargetCatch -> nonTargetCatch.getReasonForDiscard() != null);
|
|
| 97 |
-// for (NonTargetCatch nonTargetCatch : entity.getNonTargetCatch()) {
|
|
| 98 |
-// if (nonTargetCatch.getReasonForDiscard() != null) {
|
|
| 99 |
-// // on a trouve un rejet de faune
|
|
| 100 |
-// nonTargetDiscarded = true;
|
|
| 101 |
-// break;
|
|
| 102 |
-// }
|
|
| 103 |
-// }
|
|
| 104 |
- entity.setNonTargetDiscarded(nonTargetDiscarded);
|
|
| 105 | 93 |
// on supprime les échantillons dont les espèces ne sont plus dans les captures
|
| 106 | 94 |
if (entity.isNonTargetSampleNotEmpty()) {
|
| 107 | 95 |
NonTargetSample nonTargetSample = entity.getNonTargetSample().iterator().next();
|
| ... | ... | @@ -109,17 +109,6 @@ public class TargetCatchServiceLocal extends ObserveServiceLocal implements Targ |
| 109 | 109 |
for (TargetCatch targetCatch : entity.getTargetCatch()) {
|
| 110 | 110 |
targetCatch.setSetSeine(entity);
|
| 111 | 111 |
}
|
| 112 |
- // Calcul du champs SetSeine.targetDiscarded
|
|
| 113 |
- boolean targetDiscarded;
|
|
| 114 |
- if (discarded) {
|
|
| 115 |
- // on est sur des captures il suffit que les données entrantes contiennent une capture
|
|
| 116 |
- targetDiscarded = dto.sizeTargetCatch() > 0;
|
|
| 117 |
- } else {
|
|
| 118 |
- // on est sur des rejets il suffit que les autres données contiennent une capture
|
|
| 119 |
- targetDiscarded = otherTargetCatches.size() > 0;
|
|
| 120 |
- }
|
|
| 121 |
- log.info("SetSeine " + entity.getTopiaId() + ", targetDiscarded: " + targetDiscarded);
|
|
| 122 |
- entity.setTargetDiscarded(targetDiscarded);
|
|
| 123 | 112 |
return saveEntity(entity);
|
| 124 | 113 |
}
|
| 125 | 114 |
|
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type