handling add to dict requests
This commit is contained in:
parent
279fdc6985
commit
af46bdca90
@ -635,24 +635,26 @@ public class RedactionLogCreatorService {
|
|||||||
|
|
||||||
for (var manualRedaction : manualRedactions.getEntriesToAdd()) {
|
for (var manualRedaction : manualRedactions.getEntriesToAdd()) {
|
||||||
|
|
||||||
if (manualRedaction.isAddToDictionary() || manualRedaction.isAddToDossierDictionary()) {
|
if (manualRedaction.getProcessedDate() == null) {
|
||||||
var redactionLogEntry = createRedactionLogEntry(manualRedaction, manualRedaction.getId(), dossierTemplateId);
|
|
||||||
redactionLogEntry.setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
if (manualRedaction.isAddToDictionary() || manualRedaction.isAddToDossierDictionary()) {
|
||||||
redactionLogEntry.setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
var redactionLogEntry = createRedactionLogEntry(manualRedaction, manualRedaction.getId(), dossierTemplateId);
|
||||||
redactionLogEntry.setPositions(manualRedaction.getPositions());
|
redactionLogEntry.setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||||
|
redactionLogEntry.setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||||
|
redactionLogEntry.setPositions(manualRedaction.getPositions());
|
||||||
|
|
||||||
|
|
||||||
|
var found = redactionLog.getRedactionLogEntry().stream().filter(r -> r.getId().equalsIgnoreCase(redactionLogEntry.getId())).findAny();
|
||||||
|
if (found.isPresent()) {
|
||||||
|
found.get().setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||||
|
found.get().setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||||
|
found.get().setPositions(manualRedaction.getPositions());
|
||||||
|
} else {
|
||||||
|
redactionLog.getRedactionLogEntry().add(redactionLogEntry);
|
||||||
|
}
|
||||||
|
|
||||||
manualRedaction.
|
|
||||||
|
|
||||||
var found = redactionLog.getRedactionLogEntry().stream().filter(r -> r.getId().equalsIgnoreCase(redactionLogEntry.getId())).findAny();
|
|
||||||
if (found.isPresent()) {
|
|
||||||
found.get().setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
|
||||||
found.get().setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
|
||||||
found.get().setPositions(manualRedaction.getPositions());
|
|
||||||
} else {
|
|
||||||
redactionLog.getRedactionLogEntry().add(redactionLogEntry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user