feat: Add Markdown export service for DOCX and PDF formats
- Implemented MarkdownExportService to convert Markdown text into DOCX and PDF formats. - Supported Markdown elements include headings, bold, italic, blockquotes, tables, and specific emojis. - Added methods for generating DOCX and PDF documents with proper formatting and rendering. - Enhanced application properties to enable logging for production environment. - Introduced a test-run script to reset project state and trigger processing via API. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
public class ExportRequest {
|
||||
|
||||
private String content;
|
||||
private String format; // DOCX | PDF
|
||||
|
||||
public ExportRequest() {}
|
||||
|
||||
public String getContent() { return content; }
|
||||
public void setContent(String v) { this.content = v; }
|
||||
|
||||
public String getFormat() { return format; }
|
||||
public void setFormat(String v) { this.format = v; }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package de.frigosped.dc.model;
|
||||
|
||||
public class OrdsDocumentTexts {
|
||||
|
||||
private Long id;
|
||||
private String originalText;
|
||||
private String translatedText;
|
||||
private Integer hasOriginalText;
|
||||
private Integer hasTranslatedText;
|
||||
|
||||
public OrdsDocumentTexts() {}
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
|
||||
public String getOriginalText() { return originalText; }
|
||||
public void setOriginalText(String v) { this.originalText = v; }
|
||||
|
||||
public String getTranslatedText() { return translatedText; }
|
||||
public void setTranslatedText(String v) { this.translatedText = v; }
|
||||
|
||||
public Integer getHasOriginalText() { return hasOriginalText; }
|
||||
public void setHasOriginalText(Integer v) { this.hasOriginalText = v; }
|
||||
|
||||
public Integer getHasTranslatedText() { return hasTranslatedText; }
|
||||
public void setHasTranslatedText(Integer v) { this.hasTranslatedText = v; }
|
||||
}
|
||||
@@ -10,12 +10,14 @@ public class OrdsQuestion {
|
||||
private Long categoryId;
|
||||
private String categoryName;
|
||||
private String categoryDescription;
|
||||
private Integer categoryOrderNr;
|
||||
private String questionText;
|
||||
private String evaluationType; // z.B. SCORE, BINARY
|
||||
private Integer threshold; // Schwellwert 0–100
|
||||
private String resultHandling; // ABWEICHUNG | HINWEIS
|
||||
private String example0Percent; // Beispiel: Anforderung nicht erfüllt
|
||||
private String example100Percent; // Beispiel: Anforderung voll erfüllt
|
||||
private Integer orderNr;
|
||||
private Integer rowVersion;
|
||||
|
||||
public OrdsQuestion() {}
|
||||
@@ -50,6 +52,12 @@ public class OrdsQuestion {
|
||||
public String getExample100Percent() { return example100Percent; }
|
||||
public void setExample100Percent(String v) { this.example100Percent = v; }
|
||||
|
||||
public Integer getCategoryOrderNr() { return categoryOrderNr; }
|
||||
public void setCategoryOrderNr(Integer v) { this.categoryOrderNr = v; }
|
||||
|
||||
public Integer getOrderNr() { return orderNr; }
|
||||
public void setOrderNr(Integer v) { this.orderNr = v; }
|
||||
|
||||
public Integer getRowVersion() { return rowVersion; }
|
||||
public void setRowVersion(Integer v) { this.rowVersion = v; }
|
||||
}
|
||||
|
||||
@@ -2,11 +2,23 @@ package de.frigosped.dc.model;
|
||||
|
||||
/**
|
||||
* Request-Body für PUT /api/dc/projects/:id/progress
|
||||
* {"progress": 45}
|
||||
*
|
||||
* Felder (alle optional – null = nicht aktualisieren):
|
||||
* progress 0–100 Prozent
|
||||
* currentPhase OCR | QUESTIONS | COMPLETED
|
||||
* currentDocId ID des aktuell verarbeiteten Dokuments
|
||||
* currentQuestionId ID der aktuell ausgewerteten Frage (null bei OCR)
|
||||
* estimatedCompletionAt ISO-8601-Zeitstempel (Schätzung Fertigstellung)
|
||||
*
|
||||
* Jackson serialisiert camelCase → snake_case (quarkus.jackson.property-naming-strategy=SNAKE_CASE).
|
||||
*/
|
||||
public class ProgressRequest {
|
||||
|
||||
private Integer progress;
|
||||
private String currentPhase;
|
||||
private Long currentDocId;
|
||||
private Long currentQuestionId;
|
||||
private String estimatedCompletionAt;
|
||||
|
||||
public ProgressRequest() {}
|
||||
|
||||
@@ -14,6 +26,27 @@ public class ProgressRequest {
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
public Integer getProgress() { return progress; }
|
||||
public void setProgress(Integer v) { this.progress = v; }
|
||||
public ProgressRequest(int progress, String currentPhase, Long currentDocId,
|
||||
Long currentQuestionId, String estimatedCompletionAt) {
|
||||
this.progress = progress;
|
||||
this.currentPhase = currentPhase;
|
||||
this.currentDocId = currentDocId;
|
||||
this.currentQuestionId = currentQuestionId;
|
||||
this.estimatedCompletionAt = estimatedCompletionAt;
|
||||
}
|
||||
|
||||
public Integer getProgress() { return progress; }
|
||||
public void setProgress(Integer v) { this.progress = v; }
|
||||
|
||||
public String getCurrentPhase() { return currentPhase; }
|
||||
public void setCurrentPhase(String v) { this.currentPhase = v; }
|
||||
|
||||
public Long getCurrentDocId() { return currentDocId; }
|
||||
public void setCurrentDocId(Long v) { this.currentDocId = v; }
|
||||
|
||||
public Long getCurrentQuestionId() { return currentQuestionId; }
|
||||
public void setCurrentQuestionId(Long v) { this.currentQuestionId = v; }
|
||||
|
||||
public String getEstimatedCompletionAt() { return estimatedCompletionAt; }
|
||||
public void setEstimatedCompletionAt(String v) { this.estimatedCompletionAt = v; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user