Pull request #135: RED-3242
Merge in RED/redaction-report-service from RED-3242 to master * commit '972d4f891aebe76719dd7426578c783ae0c563e5': test correction RED-3242 - excluded from automatic analysis - reworked redactionLog architecture - adaptations for services correction
This commit is contained in:
commit
ab193323ec
@ -13,6 +13,10 @@
|
||||
<artifactId>redaction-report-service-api-v1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<persistence-service.version>1.25.0</persistence-service.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!-- This dependency contains annotations that are used in specifying REST endpoints. -->
|
||||
@ -29,8 +33,7 @@
|
||||
<dependency>
|
||||
<groupId>com.iqser.red.service</groupId>
|
||||
<artifactId>persistence-service-api-v1</artifactId>
|
||||
<version>0.151.0</version>
|
||||
<scope>compile</scope>
|
||||
<version>${persistence-service.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@ -13,6 +13,11 @@
|
||||
<artifactId>redaction-report-service-server-v1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<persistence-service.version>1.25.0</persistence-service.version>
|
||||
<redaction-service.version>3.68.0</redaction-service.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.iqser.red.service</groupId>
|
||||
@ -24,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>com.iqser.red.service</groupId>
|
||||
<artifactId>redaction-service-api-v1</artifactId>
|
||||
<version>3.21.0</version>
|
||||
<version>${redaction-service.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.iqser.red.service</groupId>
|
||||
@ -33,18 +38,6 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.iqser.red.service</groupId>
|
||||
<artifactId>persistence-service-api-v1</artifactId>
|
||||
<version>0.83.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.iqser.red.service</groupId>
|
||||
<artifactId>redaction-service-api-v1</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
|
||||
@ -23,7 +23,7 @@ public class StatusReportController implements StatusReportResource {
|
||||
@Override
|
||||
public StatusReportResponse generateStatusReport(@PathVariable(DOSSIER_ID) String dossierId) {
|
||||
|
||||
Dossier dossier = dossierClient.getDossierById(dossierId, false);
|
||||
Dossier dossier = dossierClient.getDossierById(dossierId, true,false);
|
||||
byte[] report = statusReportGenerationService.generateReport(dossier);
|
||||
return new StatusReportResponse(report, dossier.getDossierName() + ".xlsx");
|
||||
}
|
||||
|
||||
@ -30,10 +30,7 @@ public class RedactionLogConverterService {
|
||||
|
||||
if (entry.isRedacted()) {
|
||||
|
||||
if (entry.getChanges() != null && entry.getChanges().size() > 1 && entry.getChanges()
|
||||
.get(entry.getChanges().size() - 1)
|
||||
.getType()
|
||||
.equals(ChangeType.REMOVED)) {
|
||||
if(entry.lastChangeIsRemoved()){
|
||||
return;
|
||||
}
|
||||
|
||||
@ -45,16 +42,6 @@ public class RedactionLogConverterService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (entry.isManual() && entry.getManualRedactionType()
|
||||
.equals(ManualRedactionType.ADD) && !entry.getStatus().equals(AnnotationStatus.APPROVED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (entry.isManual() && entry.getManualRedactionType()
|
||||
.equals(ManualRedactionType.REMOVE) && entry.getStatus().equals(AnnotationStatus.APPROVED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Set<Integer> pages = new HashSet<>();
|
||||
for (Rectangle position : entry.getPositions()) {
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ public class ReportGenerationService {
|
||||
|
||||
List<StoredFileInformation> storedFileInformation = new ArrayList<>();
|
||||
|
||||
Dossier project = dossierClient.getDossierById(reportMessage.getDossierId(), false);
|
||||
Dossier project = dossierClient.getDossierById(reportMessage.getDossierId(), true,false);
|
||||
|
||||
List<ReportTemplate> singleFilesTemplates = new ArrayList<>();
|
||||
List<MultiFileWorkbook> multiFileWorkbooks = new ArrayList<>();
|
||||
|
||||
@ -59,7 +59,7 @@ public class StatusReportGenerationService {
|
||||
|
||||
String name = fileStatus.getFilename();
|
||||
OffsetDateTime uploadDate = fileStatus.getLastUploaded();
|
||||
String assignedTo = fileStatus.getCurrentReviewer();
|
||||
String assignedTo = fileStatus.getAssignee();
|
||||
var status = fileStatus.getWorkflowStatus();
|
||||
int pages = fileStatus.getNumberOfPages();
|
||||
var fileAttributes = fileStatus.getFileAttributes();
|
||||
|
||||
@ -47,13 +47,13 @@ public class StatusReportGenerationServiceTest {
|
||||
String dossierId = "dossierId";
|
||||
|
||||
Dossier dossier = Dossier.builder().dossierName("dossierName").id(dossierId).build();
|
||||
when(dossierClient.getDossierById(dossierId, false)).thenReturn(dossier);
|
||||
when(dossierClient.getDossierById(dossierId, true,false)).thenReturn(dossier);
|
||||
|
||||
FileModel fileStatus1 = FileModel.builder()
|
||||
.dossierId(dossierId)
|
||||
.filename("file1desJahrhunderts")
|
||||
.lastUploaded(OffsetDateTime.now().minusHours(2))
|
||||
.currentReviewer("me")
|
||||
.assignee("me")
|
||||
.workflowStatus(WorkflowStatus.APPROVED)
|
||||
.numberOfPages(3)
|
||||
.fileAttributes(Map.of("a", "A","config2","B2" ))
|
||||
@ -64,7 +64,7 @@ public class StatusReportGenerationServiceTest {
|
||||
.dossierId(dossierId)
|
||||
.filename("file2desJahrtausendsGibtsJaNicht")
|
||||
.lastUploaded(OffsetDateTime.now())
|
||||
.currentReviewer("you")
|
||||
.assignee("you")
|
||||
.workflowStatus(WorkflowStatus.APPROVED)
|
||||
.numberOfPages(21)
|
||||
.fileAttributes(Map.of("config1","X1","y", "Y"))
|
||||
@ -85,4 +85,4 @@ public class StatusReportGenerationServiceTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user