Skip to content

Commit

Permalink
Merge pull request #205 from kaisersly/rmsignrequest
Browse files Browse the repository at this point in the history
 Annuler l'ancien parapheur lors d'un nouvel envoi en signature (ESUP-Signature) #204
  • Loading branch information
smattsck authored Oct 21, 2024
2 parents fc0aa46 + cbdcfd3 commit dc5ac4c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,18 @@ public int upload(IdsListDto idsListDto, boolean isAvenant) {
.bodyToMono(String.class)
.block();
if (documentId != null) {
// Que fait-on si un précédent envoi a déjà été fait avant ?
String previousDocumentId = isAvenant ? avenant.getDocumentId() : convention.getDocumentId();
if (previousDocumentId != null) {
// Pour ESUP-Signature, on supprime l'ancien avant de renseigner le nouveau
if (appSignature == AppSignatureEnum.ESUPSIGNATURE) {
webClient.delete()
.uri(applicationBootstrap.getAppConfig().getEsupSignatureUri() + "/signrequests/soft/" + previousDocumentId)
.retrieve()
.bodyToMono(String.class)
.block();
}
}
if (isAvenant) {
avenant.setDateEnvoiSignature(new Date());
avenant.setDocumentId(documentId);
Expand Down

0 comments on commit dc5ac4c

Please sign in to comment.