Pull request #44: RED-1911: Download should include excluded files, but without redactions
Merge in RED/redaction-report-service from RED-1911-master to master * commit '99805242ce2abe74e95cf13a88631974de857eac': RED-1911: Download should include excluded files, but without redactions
This commit is contained in:
commit
e983f51b8a
@ -14,6 +14,7 @@ import com.iqser.red.service.redaction.report.v1.server.model.MultiFileWorkbook;
|
||||
import com.iqser.red.service.redaction.report.v1.server.model.ReportRedactionEntry;
|
||||
import com.iqser.red.service.redaction.report.v1.server.storage.ReportStorageService;
|
||||
import com.iqser.red.service.redaction.v1.model.RedactionLog;
|
||||
import com.iqser.red.storage.commons.exception.StorageObjectDoesNotExist;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -83,12 +84,8 @@ public class ReportGenerationService {
|
||||
.get(j));
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
RedactionLog redactionLog = reportStorageService.getRedactionLog(reportMessage.getDossierId(), reportMessage
|
||||
.getFileIds()
|
||||
.get(j));
|
||||
List<LegalBasisMapping> legalBasisMappings = redactionLog.getLegalBasis();
|
||||
|
||||
List<ReportRedactionEntry> reportEntries = redactionLogConverterService.convertAndSort(redactionLog, legalBasisMappings);
|
||||
List<ReportRedactionEntry> reportEntries = getReportEntries(reportMessage.getDossierId(), reportMessage.getFileIds().get(j));
|
||||
|
||||
if (reportMessage.getReportTypes().contains(ReportType.EXCEL_MULTI_FILE)) {
|
||||
excelReportService.addEntries(excelMultiFileSheet, reportEntries, fileStatus.getFilename(), excelRowIndex);
|
||||
@ -168,4 +165,16 @@ public class ReportGenerationService {
|
||||
return storedFileInformation;
|
||||
}
|
||||
|
||||
private List<ReportRedactionEntry> getReportEntries(String dossierId, String fileId){
|
||||
RedactionLog redactionLog = null;
|
||||
try {
|
||||
redactionLog = reportStorageService.getRedactionLog(dossierId, fileId);
|
||||
} catch (StorageObjectDoesNotExist e){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<LegalBasisMapping> legalBasisMappings = redactionLog.getLegalBasis();
|
||||
|
||||
return redactionLogConverterService.convertAndSort(redactionLog, legalBasisMappings);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user