-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Missions] Ajout d'un booléen pour calculer automatiquement la zone d…
…e missions à partir des contrôles (#664) Lié à la PR MTES-MCT/monitorfish#2334
- Loading branch information
Showing
35 changed files
with
123 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...rc/main/kotlin/fr/gouv/cacem/monitorenv/infrastructure/api/ControllersExceptionHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ure/api/adapters/outputs/AMPDataOutput.kt → ...api/adapters/bff/outputs/AMPDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tructure/api/adapters/outputs/ApiError.kt → ...ture/api/adapters/bff/outputs/ApiError.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ters/outputs/ControlResourceDataOutput.kt → .../bff/outputs/ControlResourceDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...dapters/outputs/ControlThemeDataOutput.kt → ...ers/bff/outputs/ControlThemeDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...adapters/outputs/ControlUnitDataOutput.kt → ...ters/bff/outputs/ControlUnitDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ure/api/adapters/outputs/GeoJsonOutput.kt → ...api/adapters/bff/outputs/GeoJsonOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../api/adapters/outputs/HealthDataOutput.kt → .../adapters/bff/outputs/HealthDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...gouv/cacem/monitorenv/infrastructure/api/adapters/bff/outputs/MissingParameterApiError.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package fr.gouv.cacem.monitorenv.infrastructure.api.adapters.bff.outputs | ||
|
||
data class MissingParameterApiError(val error: String) |
2 changes: 1 addition & 1 deletion
2
...api/adapters/outputs/MissionDataOutput.kt → ...adapters/bff/outputs/MissionDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../api/adapters/outputs/NatinfDataOutput.kt → .../adapters/bff/outputs/NatinfDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...pters/outputs/RegulatoryAreaDataOutput.kt → ...s/bff/outputs/RegulatoryAreaDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...i/adapters/outputs/SemaphoreDataOutput.kt → ...apters/bff/outputs/SemaphoreDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
.../fr/gouv/cacem/monitorenv/infrastructure/api/adapters/outputs/MissingParameterApiError.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
.../gouv/cacem/monitorenv/infrastructure/api/adapters/publicapi/outputs/MissionDataOutput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package fr.gouv.cacem.monitorenv.infrastructure.api.adapters.publicapi.outputs | ||
|
||
import fr.gouv.cacem.monitorenv.domain.entities.controlResources.ControlUnitEntity | ||
import fr.gouv.cacem.monitorenv.domain.entities.missions.EnvActionEntity | ||
import fr.gouv.cacem.monitorenv.domain.entities.missions.MissionEntity | ||
import fr.gouv.cacem.monitorenv.domain.entities.missions.MissionSourceEnum | ||
import fr.gouv.cacem.monitorenv.domain.entities.missions.MissionTypeEnum | ||
import org.locationtech.jts.geom.MultiPolygon | ||
import java.time.ZonedDateTime | ||
|
||
data class MissionDataOutput( | ||
val id: Int, | ||
val missionTypes: List<MissionTypeEnum>, | ||
val controlUnits: List<ControlUnitEntity>? = listOf(), | ||
val openBy: String? = null, | ||
val closedBy: String? = null, | ||
val observationsCacem: String? = null, | ||
val observationsCnsp: String? = null, | ||
val facade: String? = null, | ||
val geom: MultiPolygon? = null, | ||
val startDateTimeUtc: ZonedDateTime, | ||
val endDateTimeUtc: ZonedDateTime? = null, | ||
val envActions: List<EnvActionEntity>? = null, | ||
val missionSource: MissionSourceEnum, | ||
val isClosed: Boolean, | ||
val hasMissionOrder: Boolean, | ||
val isUnderJdp: Boolean, | ||
val isGeometryComputedFromControls: Boolean | ||
) { | ||
companion object { | ||
fun fromMission(mission: MissionEntity): MissionDataOutput { | ||
requireNotNull(mission.id) { | ||
"a mission must have an id" | ||
} | ||
|
||
return MissionDataOutput( | ||
id = mission.id, | ||
missionTypes = mission.missionTypes, | ||
controlUnits = mission.controlUnits, | ||
openBy = mission.openBy, | ||
closedBy = mission.closedBy, | ||
observationsCacem = mission.observationsCacem, | ||
observationsCnsp = mission.observationsCnsp, | ||
facade = mission.facade, | ||
geom = mission.geom, | ||
startDateTimeUtc = mission.startDateTimeUtc, | ||
endDateTimeUtc = mission.endDateTimeUtc, | ||
envActions = mission.envActions, | ||
missionSource = mission.missionSource, | ||
isClosed = mission.isClosed, | ||
hasMissionOrder = mission.hasMissionOrder, | ||
isUnderJdp = mission.isUnderJdp, | ||
isGeometryComputedFromControls = mission.isGeometryComputedFromControls | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...otlin/fr/gouv/cacem/monitorenv/infrastructure/api/endpoints/bff/ControlUnitsController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...kotlin/fr/gouv/cacem/monitorenv/infrastructure/api/endpoints/bff/HealthcheckController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ain/kotlin/fr/gouv/cacem/monitorenv/infrastructure/api/endpoints/bff/NatinfsController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...gouv/cacem/monitorenv/infrastructure/api/endpoints/publicapi/ApiControlUnitsController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../gouv/cacem/monitorenv/infrastructure/api/endpoints/publicapi/ApiHealthcheckController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
backend/src/main/resources/db/migration/internal/V0.088__update_missions_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE public.missions ADD COLUMN is_geometry_computed_from_controls boolean NOT NULL default false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.