RED-4219: Renalyse after accept/decline force/imageRecategorizations
This commit is contained in:
parent
6570f79177
commit
f42eefba9a
@ -588,6 +588,8 @@ public class ManualRedactionService {
|
|||||||
for (var annotationId : annotationIds) {
|
for (var annotationId : annotationIds) {
|
||||||
forceRedactionPersistenceService.updateStatus(fileId, annotationId, annotationStatus);
|
forceRedactionPersistenceService.updateStatus(fileId, annotationId, annotationStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reprocess(dossierId, fileId);
|
||||||
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -613,20 +615,14 @@ public class ManualRedactionService {
|
|||||||
public void updateImageRecategorizationStatus(String dossierId, String fileId, List<String> annotationIds,
|
public void updateImageRecategorizationStatus(String dossierId, String fileId, List<String> annotationIds,
|
||||||
AnnotationStatus annotationStatus) {
|
AnnotationStatus annotationStatus) {
|
||||||
|
|
||||||
var actionPerformed = false;
|
|
||||||
dossierPersistenceService.getAndValidateDossier(dossierId);
|
dossierPersistenceService.getAndValidateDossier(dossierId);
|
||||||
|
|
||||||
for (var annotationId : annotationIds) {
|
for (var annotationId : annotationIds) {
|
||||||
ManualImageRecategorizationEntity imageRecategorization = recategorizationPersistenceService.findRecategorization(fileId, annotationId);
|
|
||||||
|
|
||||||
actionPerformed = actionPerformed || AnnotationStatus.DECLINED.equals(annotationStatus) && AnnotationStatus.APPROVED.equals(imageRecategorization.getStatus());
|
|
||||||
actionPerformed = actionPerformed || AnnotationStatus.APPROVED.equals(annotationStatus);
|
|
||||||
|
|
||||||
recategorizationPersistenceService.updateStatus(fileId, annotationId, annotationStatus);
|
recategorizationPersistenceService.updateStatus(fileId, annotationId, annotationStatus);
|
||||||
}
|
}
|
||||||
if (actionPerformed) {
|
|
||||||
reprocess(dossierId, fileId);
|
reprocess(dossierId, fileId);
|
||||||
}
|
|
||||||
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -687,28 +683,28 @@ public class ManualRedactionService {
|
|||||||
|
|
||||||
if (manualRedactions.getEntriesToAdd() != null) {
|
if (manualRedactions.getEntriesToAdd() != null) {
|
||||||
manualRedactions.getEntriesToAdd().forEach(e -> {
|
manualRedactions.getEntriesToAdd().forEach(e -> {
|
||||||
if (e.getStatus().equals(AnnotationStatus.APPROVED) && e.getProcessedDate() == null) {
|
if (!e.getStatus().equals(AnnotationStatus.REQUESTED) && e.getProcessedDate() == null) {
|
||||||
addRedactionPersistenceService.markAsProcessed(e);
|
addRedactionPersistenceService.markAsProcessed(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (manualRedactions.getIdsToRemove() != null) {
|
if (manualRedactions.getIdsToRemove() != null) {
|
||||||
manualRedactions.getIdsToRemove().forEach(e -> {
|
manualRedactions.getIdsToRemove().forEach(e -> {
|
||||||
if (e.getStatus().equals(AnnotationStatus.APPROVED) && e.getProcessedDate() == null) {
|
if (!e.getStatus().equals(AnnotationStatus.REQUESTED) && e.getProcessedDate() == null) {
|
||||||
removeRedactionPersistenceService.markAsProcessed(e);
|
removeRedactionPersistenceService.markAsProcessed(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (manualRedactions.getForceRedactions() != null) {
|
if (manualRedactions.getForceRedactions() != null) {
|
||||||
manualRedactions.getForceRedactions().forEach(e -> {
|
manualRedactions.getForceRedactions().forEach(e -> {
|
||||||
if (e.getStatus().equals(AnnotationStatus.APPROVED) && e.getProcessedDate() == null) {
|
if (!e.getStatus().equals(AnnotationStatus.REQUESTED) && e.getProcessedDate() == null) {
|
||||||
forceRedactionPersistenceService.markAsProcessed(e);
|
forceRedactionPersistenceService.markAsProcessed(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (manualRedactions.getImageRecategorization() != null) {
|
if (manualRedactions.getImageRecategorization() != null) {
|
||||||
manualRedactions.getImageRecategorization().forEach(e -> {
|
manualRedactions.getImageRecategorization().forEach(e -> {
|
||||||
if (e.getStatus().equals(AnnotationStatus.APPROVED) && e.getProcessedDate() == null) {
|
if (!e.getStatus().equals(AnnotationStatus.REQUESTED) && e.getProcessedDate() == null) {
|
||||||
recategorizationPersistenceService.markAsProcessed(e);
|
recategorizationPersistenceService.markAsProcessed(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user