RED-4012: Dossier stats controller always returns numberOfSoftDeletedFiles = 0
This commit is contained in:
parent
1559a75e49
commit
4fb570bd8a
@ -381,9 +381,14 @@ public class FileStatusPersistenceService {
|
||||
}
|
||||
|
||||
|
||||
public int countSoftDeletedFiles(String dossierTemplateId) {
|
||||
public int countSoftDeletedFilesPerDossierTemplateId(String dossierTemplateId) {
|
||||
|
||||
return fileRepository.countSoftDeletedFiles(dossierTemplateId);
|
||||
return fileRepository.countSoftDeletedFilesPerDossierTemplateId(dossierTemplateId);
|
||||
}
|
||||
|
||||
public int countSoftDeletedFilesPerDossierId(String dossierId) {
|
||||
|
||||
return fileRepository.countSoftDeletedFilesPerDossierId(dossierId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -154,7 +154,12 @@ public interface FileRepository extends JpaRepository<FileEntity, String> {
|
||||
@Query("select count(f) from FileEntity f inner join DossierEntity d on d.id = f.dossierId where d.dossierTemplateId = :dossierTemplateId" +
|
||||
" and ((f.deleted is not null and f.hardDeletedTime is null) or " +
|
||||
" (d.softDeletedTime is not null and d.hardDeletedTime is null)) and d.archivedTime is null")
|
||||
int countSoftDeletedFiles(String dossierTemplateId);
|
||||
int countSoftDeletedFilesPerDossierTemplateId(String dossierTemplateId);
|
||||
|
||||
@Query("select count(f) from FileEntity f inner join DossierEntity d on d.id = f.dossierId where d.id = :dossierId" +
|
||||
" and ((f.deleted is not null and f.hardDeletedTime is null) or " +
|
||||
" (d.softDeletedTime is not null and d.hardDeletedTime is null)) and d.archivedTime is null")
|
||||
int countSoftDeletedFilesPerDossierId(String dossierId);
|
||||
|
||||
@Query("select distinct f.dossierId from FileEntity f where f.lastUpdated > :since")
|
||||
List<String> findDossierChangeByLastUpdatedIsAfter(OffsetDateTime since);
|
||||
|
||||
@ -93,7 +93,7 @@ public class DossierTemplateStatsService {
|
||||
dts.setNumberOfActiveDossiers(dossierRepository.countActive(dossierTemplateId));
|
||||
dts.setNumberOfDeletedDossiers(dossierRepository.countSofDeleted(dossierTemplateId));
|
||||
dts.setNumberOfActiveFiles(fileRepository.countActiveFiles(dossierTemplateId));
|
||||
dts.setNumberOfSoftDeletedFiles(fileRepository.countSoftDeletedFiles(dossierTemplateId));
|
||||
dts.setNumberOfSoftDeletedFiles(fileRepository.countSoftDeletedFilesPerDossierTemplateId(dossierTemplateId));
|
||||
|
||||
var processingCounts = fileRepository.countFilesByProcessingStatus(dossierTemplateId);
|
||||
var workflowCounts = fileRepository.countFilesByWorkflowStatus(dossierTemplateId);
|
||||
|
||||
@ -662,7 +662,7 @@ public class FileStatusService {
|
||||
|
||||
public int countSoftDeletedFiles(String dossierId) {
|
||||
|
||||
return fileStatusPersistenceService.countSoftDeletedFiles(dossierId);
|
||||
return fileStatusPersistenceService.countSoftDeletedFilesPerDossierId(dossierId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user