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) {
|
||||
forceRedactionPersistenceService.updateStatus(fileId, annotationId, annotationStatus);
|
||||
}
|
||||
|
||||
reprocess(dossierId, fileId);
|
||||
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
||||
}
|
||||
|
||||
@ -613,20 +615,14 @@ public class ManualRedactionService {
|
||||
public void updateImageRecategorizationStatus(String dossierId, String fileId, List<String> annotationIds,
|
||||
AnnotationStatus annotationStatus) {
|
||||
|
||||
var actionPerformed = false;
|
||||
dossierPersistenceService.getAndValidateDossier(dossierId);
|
||||
|
||||
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);
|
||||
}
|
||||
if (actionPerformed) {
|
||||
reprocess(dossierId, fileId);
|
||||
}
|
||||
|
||||
reprocess(dossierId, fileId);
|
||||
|
||||
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
||||
}
|
||||
|
||||
@ -687,28 +683,28 @@ public class ManualRedactionService {
|
||||
|
||||
if (manualRedactions.getEntriesToAdd() != null) {
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (manualRedactions.getIdsToRemove() != null) {
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (manualRedactions.getForceRedactions() != null) {
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (manualRedactions.getImageRecategorization() != null) {
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user