RED-2115: Fixed dossier status report generation
This commit is contained in:
parent
46e9a278eb
commit
1b7982cfaa
@ -88,13 +88,21 @@ public class StatusReportGenerationService {
|
||||
XSSFCell cellPages = row.createCell(4);
|
||||
cellPages.setCellValue(pages);
|
||||
|
||||
sheet.autoSizeColumn(0);
|
||||
sheet.autoSizeColumn(1);
|
||||
sheet.autoSizeColumn(2);
|
||||
sheet.autoSizeColumn(3);
|
||||
sheet.autoSizeColumn(4);
|
||||
|
||||
Iterator<Map.Entry<String, String>> iterator = fileAttributes.getAttributeIdToValue().entrySet().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
var nextElement = iterator.next();
|
||||
if(attributesAssignment.get(nextElement.getKey()) != null) {
|
||||
XSSFCell cell = row.createCell(attributesAssignment.get(nextElement.getKey()));
|
||||
cell.setCellValue(nextElement.getValue());
|
||||
sheet.autoSizeColumn(attributesAssignment.get(nextElement.getKey()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -105,12 +113,6 @@ public class StatusReportGenerationService {
|
||||
|
||||
private void addHeader(XSSFSheet sheet, XSSFCellStyle style) {
|
||||
|
||||
sheet.autoSizeColumn(0);
|
||||
sheet.autoSizeColumn(1);
|
||||
sheet.autoSizeColumn(2);
|
||||
sheet.autoSizeColumn(3);
|
||||
sheet.autoSizeColumn(4);
|
||||
|
||||
XSSFRow row = sheet.createRow(0);
|
||||
|
||||
XSSFCell cellName = row.createCell(0);
|
||||
|
||||
@ -53,7 +53,7 @@ public class StatusReportGenerationServiceTest {
|
||||
FileAttributes fileAttributes1 = new FileAttributes(Map.of("a", "A", "config2", "B2"));
|
||||
FileStatus fileStatus1 = FileStatus.builder()
|
||||
.dossierId(dossierId)
|
||||
.filename("file1")
|
||||
.filename("file1desJahrhunderts")
|
||||
.lastUploaded(OffsetDateTime.now().minusHours(2))
|
||||
.currentReviewer("me")
|
||||
.status(Status.APPROVED)
|
||||
@ -64,7 +64,7 @@ public class StatusReportGenerationServiceTest {
|
||||
FileAttributes fileAttributes2 = new FileAttributes(Map.of("config1", "X1", "y", "Y"));
|
||||
FileStatus fileStatus2 = FileStatus.builder()
|
||||
.dossierId(dossierId)
|
||||
.filename("file2")
|
||||
.filename("file2desJahrtausendsGibtsJaNicht")
|
||||
.lastUploaded(OffsetDateTime.now())
|
||||
.currentReviewer("you")
|
||||
.status(Status.APPROVED)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user