RED-8670: add idp fields and llm tracking
This commit is contained in:
parent
b5c469c30c
commit
da9924d1e6
@ -316,6 +316,7 @@ public class DossierTemplateController implements DossierTemplateResource {
|
||||
.removeWatermark(dossierTemplate.isRemoveWatermark())
|
||||
.idpByDefault(dossierTemplate.isIdpByDefault())
|
||||
.rotationCorrectionByDefault(dossierTemplate.isRotationCorrectionByDefault())
|
||||
.fontStyleDetection(dossierTemplate.isFontStyleDetection())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@ -89,6 +89,9 @@ public class DossierTemplateEntity {
|
||||
@Column(name = "idp_by_default")
|
||||
private boolean idpByDefault;
|
||||
|
||||
@Column(name = "font_style_detection")
|
||||
private boolean fontStyleDetection;
|
||||
|
||||
@Column(name = "remove_watermark")
|
||||
private boolean removeWatermark;
|
||||
|
||||
@ -134,6 +137,7 @@ public class DossierTemplateEntity {
|
||||
@Enumerated(EnumType.STRING)
|
||||
private LayoutParsingType layoutParsingType;
|
||||
|
||||
|
||||
public static DossierTemplateEntity copyDossierTemplateEntityWithoutChildEntities(DossierTemplateEntity dossierTemplateEntity) {
|
||||
|
||||
DossierTemplateEntity dossierTemplateCopy = new DossierTemplateEntity();
|
||||
@ -156,6 +160,7 @@ public class DossierTemplateEntity {
|
||||
dossierTemplateCopy.layoutParsingType = dossierTemplateEntity.layoutParsingType;
|
||||
dossierTemplateCopy.rotationCorrectionByDefault = dossierTemplateEntity.rotationCorrectionByDefault;
|
||||
dossierTemplateCopy.idpByDefault = dossierTemplateEntity.idpByDefault;
|
||||
dossierTemplateCopy.fontStyleDetection = dossierTemplateEntity.fontStyleDetection;
|
||||
return dossierTemplateCopy;
|
||||
}
|
||||
|
||||
|
||||
@ -770,7 +770,9 @@ public class FileStatusService {
|
||||
DossierTemplateEntity dt = dossierTemplatePersistenceService.getDossierTemplate(dossierPersistenceService.getDossierTemplateId(dossierId));
|
||||
Set<AzureOcrFeature> features = new HashSet<>();
|
||||
|
||||
features.add(AzureOcrFeature.FONT_STYLE_DETECTION);
|
||||
if (dt.isFontStyleDetection()) {
|
||||
features.add(AzureOcrFeature.FONT_STYLE_DETECTION);
|
||||
}
|
||||
|
||||
if (dt.isRemoveWatermark()) {
|
||||
features.add(AzureOcrFeature.REMOVE_WATERMARKS);
|
||||
|
||||
@ -603,9 +603,9 @@ public class FileStatusPersistenceService {
|
||||
public int getNumberOfAssignedFiles(String userId) {
|
||||
|
||||
List<FileEntity> files = fileRepository.findFilesByAssignee(userId);
|
||||
return files.stream()
|
||||
.filter(fileEntity -> fileEntity.getHardDeletedTime() == null)
|
||||
.collect(Collectors.toList()).size();
|
||||
return Math.toIntExact(files.stream()
|
||||
.filter(fileEntity -> fileEntity.getHardDeletedTime() == null)
|
||||
.count());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -15,6 +15,11 @@ databaseChangeLog:
|
||||
name: rotation_correction_by_default
|
||||
type: boolean
|
||||
remarks: "Indicates if rotation correction is enabled by default"
|
||||
- column:
|
||||
name: font_style_detection
|
||||
type: boolean
|
||||
defaultValueBoolean: true
|
||||
remarks: "Indicates if bold detection is enabled in OCR"
|
||||
|
||||
- update:
|
||||
tableName: dossier_template
|
||||
@ -44,3 +49,7 @@ databaseChangeLog:
|
||||
tableName: dossier_template
|
||||
columnName: rotation_correction_by_default
|
||||
columnDataType: boolean
|
||||
- addNotNullConstraint:
|
||||
tableName: dossier_template
|
||||
columnName: font_style_detection
|
||||
columnDataType: boolean
|
||||
|
||||
@ -74,6 +74,9 @@ public class DossierTemplateModel {
|
||||
@Schema(description = "Flag that specifies if IDP is performed instead of OCR for all dossiers of this template")
|
||||
private boolean idpByDefault;
|
||||
|
||||
@Schema(description = "Flag that specifies if font style detection is performed during OCR")
|
||||
private boolean fontStyleDetection;
|
||||
|
||||
@Schema(description = "Flag that specifies the watermark removal in documents will be performed before the OCR processing")
|
||||
private boolean removeWatermark;
|
||||
|
||||
|
||||
@ -45,6 +45,8 @@ public class CreateOrUpdateDossierTemplateRequest {
|
||||
|
||||
private boolean rotationCorrectionByDefault;
|
||||
|
||||
private boolean fontStyleDetection;
|
||||
|
||||
private boolean removeWatermark;
|
||||
|
||||
private LayoutParsingType layoutParsingType;
|
||||
|
||||
@ -39,6 +39,7 @@ public class DossierTemplate {
|
||||
private boolean rotationCorrectionByDefault;
|
||||
private boolean idpByDefault;
|
||||
private boolean removeWatermark;
|
||||
private boolean fontStyleDetection;
|
||||
private LayoutParsingType layoutParsingType;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user