generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bug/PI-2257-make-recall-decisions-and-delius…
…-not-handling-merged-crn-cases
- Loading branch information
Showing
17 changed files
with
229 additions
and
19 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
...ects/create-and-vary-a-licence-and-delius/tech-docs/source/asyncapi-reference.html.md.erb
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,12 +1,12 @@ | ||
--- | ||
title: AsyncAPI Reference | ||
source_url: 'https://github.com/ministryofjustice/hmpps-probation-integration-services/blob/main/projects/court-case-and-delius/tech-docs/source/asyncapi-reference.html.md.erb' | ||
source_url: 'https://github.com/ministryofjustice/hmpps-probation-integration-services/blob/main/projects/create-and-vary-a-licence-and-delius/tech-docs/source/asyncapi-reference.html.md.erb' | ||
weight: 30 | ||
--- | ||
|
||
# AsyncAPI Reference | ||
|
||
<iframe src="https://studio.asyncapi.com/?url=https://ministryofjustice.github.io/hmpps-probation-integration-services/tech-docs/projects/court-case-and-delius/asyncapi-docs.json&readOnly" title="AsyncAPI Spec" width="100%" height="100%" frameborder=0 style="position: absolute; bottom: 0; background: white"></iframe> | ||
<iframe src="https://studio.asyncapi.com/?url=https://ministryofjustice.github.io/hmpps-probation-integration-services/tech-docs/projects/create-and-vary-a-licence-and-delius/asyncapi-docs.json&readOnly" title="AsyncAPI Spec" width="100%" height="100%" frameborder=0 style="position: absolute; bottom: 0; background: white"></iframe> | ||
|
||
<style>.app-pane__content { position: relative }</style> | ||
<script>document.querySelector('main').parentElement.appendChild(document.querySelector('main > iframe'))</script> |
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: 2 additions & 0 deletions
2
...and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/generator/MessageGenerator.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,10 @@ | ||
package uk.gov.justice.digital.hmpps.data.generator | ||
|
||
import uk.gov.justice.digital.hmpps.messaging.CustodyDateChanged | ||
import uk.gov.justice.digital.hmpps.messaging.ProbationOffenderEvent | ||
import uk.gov.justice.digital.hmpps.resourceloader.ResourceLoader | ||
|
||
object MessageGenerator { | ||
val SENTENCE_DATE_CHANGED = ResourceLoader.message<CustodyDateChanged>("sentence-date-changed") | ||
val SENTENCE_CHANGED = ResourceLoader.message<ProbationOffenderEvent>("sentence-changed") | ||
} |
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
29 changes: 29 additions & 0 deletions
29
projects/custody-key-dates-and-delius/src/dev/resources/messages/sentence-changed.json
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,29 @@ | ||
{ | ||
"Type": "Notification", | ||
"MessageId": "20e13002-d1be-56e7-be8c-66cdd7e23341", | ||
"TopicArn": "arn:aws:sns:eu-west-2:754256621582:cloud-platform-Digital-Prison-Services-f221e27fcfcf78f6ab4f4c3cc165eee7", | ||
"Message": "{\"eventType\":\"SENTENCE_CHANGED\",\"eventDatetime\":\"2020-02-25T11:24:32.935401\",\"offenderId\":1,\"crn\":\"A000002\",\"sourceId\":\"2500974056\"}", | ||
"Timestamp": "2020-02-25T11:25:16.169Z", | ||
"SignatureVersion": "1", | ||
"Signature": "h5p3FnnbsSHxj53RFePh8HR40cbVvgEZa6XUVTlYs/yuqfDsi17MPA+bX4ijKmmTT2l6xG2xYhcmRAbJWQ4wrwncTBm2azgiwSO5keRNWYVdiC0rI484KLZboP1SDsE+Y7hOU/R0dz49q7+0yd+QIocPteKB/8xG7/6kjGStAZKf3cEdlxOwLhN+7RU1Yk2ENuwAJjVRtvlAa76yKB3xvL2hId7P7ZLmHGlzZDNZNYxbg9C8HGxteOzZ9ZeeQsWDf9jmZ+5+7dKXQoW9LeqwHxEAq2vuwSZ8uwM5JljXbtS5w1P0psXPYNoin2gU1F5MDK8RPzjUtIvjINx08rmEOA==", | ||
"SigningCertURL": "https://sns.eu-west-2.amazonaws.com/SimpleNotificationService-a86cb10b4e1f29c941702d737128f7b6.pem", | ||
"UnsubscribeURL": "https://sns.eu-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-2:754256621582:cloud-platform-Digital-Prison-Services-f221e27fcfcf78f6ab4f4c3cc165eee7:92545cfe-de5d-43e1-8339-c366bf0172aa", | ||
"MessageAttributes": { | ||
"eventType": { | ||
"Type": "String", | ||
"Value": "SENTENCE_CHANGED" | ||
}, | ||
"id": { | ||
"Type": "String", | ||
"Value": "cb4645f2-d0c1-4677-806a-8036ed54bf69" | ||
}, | ||
"contentType": { | ||
"Type": "String", | ||
"Value": "text/plain;charset=UTF-8" | ||
}, | ||
"timestamp": { | ||
"Type": "Number.java.lang.Long", | ||
"Value": "1582629916147" | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...s/custody-key-dates-and-delius/src/dev/resources/simulations/__files/booking_1200837.json
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,10 @@ | ||
{ | ||
"bookingId": 1200837, | ||
"bookingNo": "48340A", | ||
"offenderNo": "A0002DY", | ||
"firstName": "Jim", | ||
"lastName": "Smith", | ||
"agencyId": "MDI", | ||
"activeFlag": true, | ||
"dateOfBirth": "1970-01-01" | ||
} |
6 changes: 6 additions & 0 deletions
6
...tody-key-dates-and-delius/src/dev/resources/simulations/__files/booking_noms_A0002DY.json
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,6 @@ | ||
{ | ||
"bookingId": 1200837, | ||
"bookingNo": "48340A", | ||
"offenderNo": "A0002DY", | ||
"active": true | ||
} |
10 changes: 10 additions & 0 deletions
10
...y-key-dates-and-delius/src/dev/resources/simulations/__files/sentence_detail_1200837.json
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,10 @@ | ||
{ | ||
"bookingId": 1200837, | ||
"sentenceExpiryDate": "2025-09-10", | ||
"conditionalReleaseDate": "2022-11-25", | ||
"conditionalReleaseOverrideDate": "2022-11-26", | ||
"licenceExpiryDate": "2025-09-11", | ||
"releaseDate": "2022-11-26", | ||
"confirmedReleaseDate": "2022-11-27", | ||
"homeDetentionCurfewEligibilityDate": "2022-10-28" | ||
} |
30 changes: 30 additions & 0 deletions
30
...stody-key-dates-and-delius/src/dev/resources/simulations/mappings/getBooking_1200837.json
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,30 @@ | ||
{ | ||
"mappings": [ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/api/bookings/1200837" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"bodyFileName": "booking_1200837.json" | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/api/bookings/offenderNo/A0002DY" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"bodyFileName": "booking_noms_A0002DY.json" | ||
} | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
...ey-dates-and-delius/src/dev/resources/simulations/mappings/getSentenceDetail_1200837.json
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,13 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/api/bookings/1200837/sentenceDetail" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"bodyFileName": "sentence_detail_1200837.json" | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
...c/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/person/PersonRepository.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,7 +1,12 @@ | ||
package uk.gov.justice.digital.hmpps.integrations.delius.person | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository | ||
import org.springframework.data.jpa.repository.Query | ||
|
||
interface PersonRepository : JpaRepository<Person, Long> { | ||
fun findByNomsIdIgnoreCaseAndSoftDeletedIsFalse(nomsId: String): Person? | ||
|
||
@Query("select p.nomsId from Person p where p.crn = :crn and p.softDeleted = false") | ||
fun findNomsIdByCrn(crn: String): String? | ||
} | ||
|
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.