From fdf7432484e8f9641a0d29a1f0ee2da08224e725 Mon Sep 17 00:00:00 2001 From: "marco.spasiano" Date: Tue, 23 Jul 2024 13:15:45 +0200 Subject: [PATCH] The text of the requirements has been added to the extraction of the Calls in Excel --- .../it/cnr/si/cool/jconon/service/PrintService.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cool-jconon-backend/src/main/java/it/cnr/si/cool/jconon/service/PrintService.java b/cool-jconon-backend/src/main/java/it/cnr/si/cool/jconon/service/PrintService.java index ec2efe705..c9e3cecad 100644 --- a/cool-jconon-backend/src/main/java/it/cnr/si/cool/jconon/service/PrintService.java +++ b/cool-jconon-backend/src/main/java/it/cnr/si/cool/jconon/service/PrintService.java @@ -100,6 +100,7 @@ import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang3.StringEscapeUtils; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage; import org.apache.pdfbox.pdmodel.PDPageContentStream; @@ -192,7 +193,7 @@ public class PrintService { "Codice bando", "Nome Utente", "Cognome", "Nome", "Codice Fiscale", "Matricola", "Stato Domanda" ); private final List headCSVCall = Arrays.asList( - "Tipologia", "Codice bando", "Sede di lavoro", "Struttura di riferimento", + "Tipologia", "Codice bando", "Requisiti","Sede di lavoro", "Struttura di riferimento", "N° G.U.R.I.", "Data G.U.R.I.", "Data scadenza", "Responsabile (Nominativo)", "Email Responsabile.", "N. Posti", "Profilo/Livello", "Bando - Num. Protocollo", "Bando - Data Protocollo", @@ -2861,6 +2862,13 @@ private void getRecordCSVCall(Session session, Folder callObject, CMISUser user, ); row.createCell(column++).setCellValue(callObject.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value())); + row.createCell(column++).setCellValue( + Optional.ofNullable(callObject.getPropertyValue(JCONONPropertyIds.CALL_REQUISITI.value())) + .map(s -> s.replaceAll("\\<.*?\\>", "")) + .map(s -> StringEscapeUtils.unescapeHtml4(s)) + .map(s -> s.trim()) + .orElse("") + ); row.createCell(column++).setCellValue(callObject.getPropertyValue(JCONONPropertyIds.CALL_STRUTTURA_DESTINATARIA.value())); row.createCell(column++).setCellValue(callObject.getPropertyValue(JCONONPropertyIds.CALL_SEDE.value())); row.createCell(column++).setCellValue(callObject.getPropertyValue(JCONONPropertyIds.CALL_NUMERO_GU.value()));