-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajout d'infos de balises VMS et JPE (#3227)
- Loading branch information
Showing
72 changed files
with
1,331 additions
and
529 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...nd/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/beacon_malfunctions/Beacon.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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package fr.gouv.cnsp.monitorfish.domain.entities.beacon_malfunctions | ||
|
||
import java.time.ZonedDateTime | ||
|
||
data class Beacon( | ||
val beaconNumber: String, | ||
val vesselId: Int?, | ||
val beaconStatus: BeaconStatus? = null, | ||
val satelliteOperatorId: Int? = null, | ||
val isCoastal: Boolean? = null, | ||
val loggingDatetimeUtc: ZonedDateTime? = null, | ||
) |
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
39 changes: 39 additions & 0 deletions
39
backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/logbook/LogbookSoftware.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 |
---|---|---|
@@ -1,6 +1,45 @@ | ||
package fr.gouv.cnsp.monitorfish.domain.entities.logbook | ||
|
||
enum class LogbookSoftware(val software: String) { | ||
/** | ||
* Examples: | ||
* - JP/05883989/VISIOCaptures V1.7.6 | ||
* - FP/01641449/VISIOCaptures 2.1.6 | ||
* - JP/07210344/VISIOCaptures 2.1.6 | ||
*/ | ||
VISIOCAPTURE("VISIOCaptures"), | ||
|
||
/** | ||
* Examples: | ||
* - e-Sacapt Secours ERSV3 V 1.3.1 | ||
*/ | ||
E_SACAPT("e-Sacapt"), | ||
; | ||
|
||
companion object { | ||
/** | ||
* True for: | ||
* - VisioCaptures in real time (JP and JT) | ||
* - VisioCaptures in sheets (FP) | ||
*/ | ||
fun isVisioCapture(software: String?): Boolean { | ||
val isVisioCapture = software?.contains(VISIOCAPTURE.software) | ||
|
||
return isVisioCapture ?: false | ||
} | ||
|
||
fun isESacapt(software: String?): Boolean { | ||
val isESacapt = software?.contains(E_SACAPT.software) | ||
|
||
return isESacapt ?: false | ||
} | ||
|
||
fun isVisioCaptureInRealTime(software: String?): Boolean { | ||
val isVisioCapture = software?.let { | ||
it.startsWith("FT") || it.startsWith("JT") | ||
} | ||
|
||
return isVisioCapture ?: 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
8 changes: 8 additions & 0 deletions
8
backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/vessel/VesselAndBeacon.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,8 @@ | ||
package fr.gouv.cnsp.monitorfish.domain.entities.vessel | ||
|
||
import fr.gouv.cnsp.monitorfish.domain.entities.beacon_malfunctions.Beacon | ||
|
||
data class VesselAndBeacon( | ||
val vessel: Vessel, | ||
val beacon: Beacon? = null, | ||
) |
2 changes: 2 additions & 0 deletions
2
backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/vessel/VesselInformation.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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package fr.gouv.cnsp.monitorfish.domain.entities.vessel | ||
|
||
import fr.gouv.cnsp.monitorfish.domain.entities.beacon_malfunctions.Beacon | ||
import fr.gouv.cnsp.monitorfish.domain.entities.position.Position | ||
import fr.gouv.cnsp.monitorfish.domain.entities.risk_factor.VesselRiskFactor | ||
|
||
data class VesselInformation( | ||
val vessel: Vessel?, | ||
val beacon: Beacon?, | ||
val positions: List<Position>, | ||
val vesselRiskFactor: VesselRiskFactor, | ||
) |
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
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
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
20 changes: 20 additions & 0 deletions
20
...d/src/main/kotlin/fr/gouv/cnsp/monitorfish/infrastructure/api/outputs/BeaconDataOutput.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,20 @@ | ||
package fr.gouv.cnsp.monitorfish.infrastructure.api.outputs | ||
|
||
import fr.gouv.cnsp.monitorfish.domain.entities.beacon_malfunctions.Beacon | ||
import java.time.ZonedDateTime | ||
|
||
data class BeaconDataOutput( | ||
val beaconNumber: String, | ||
val isCoastal: Boolean? = null, | ||
val loggingDatetimeUtc: ZonedDateTime? = null, | ||
) { | ||
companion object { | ||
fun fromBeacon(beacon: Beacon): BeaconDataOutput { | ||
return BeaconDataOutput( | ||
beaconNumber = beacon.beaconNumber, | ||
isCoastal = beacon.isCoastal, | ||
loggingDatetimeUtc = beacon.loggingDatetimeUtc, | ||
) | ||
} | ||
} | ||
} |
Oops, something went wrong.