Fix gestione allegati e creato metodo di esportazione log

This commit is contained in:
2026-03-04 11:51:42 +01:00
parent 3760e38c8d
commit 2d938fb210
26 changed files with 986 additions and 384 deletions

View File

@@ -7,4 +7,6 @@ public interface IIntegryApiService
Task<bool> SystemOk();
Task<List<StbActivityTyperDto>?> SuggestActivityDescription(string activityTypeId);
Task SendEmail(SendEmailDto sendEmail);
}

View File

@@ -24,6 +24,7 @@ public interface IIspezioniService
Task<Scheda?> GetSchedaWithIspezioneAsync(int schedaId);
Task<bool> UpdateSchedaAsync(Scheda scheda);
Task<bool> UpdateActivityIdSchedaAsync(int schedaId, string? activityId);
Task<bool> UpdateFileListSchedaAsync(int schedaId, List<string>? imageNames);
Task<bool> DeleteSchedaAsync(int schedaId);
Task<int> DeleteAllSchedeOfIspezioneAsync(string codMdep, DateTime data, string rilevatore);
}

View File

@@ -1,5 +1,4 @@
using SteUp.Shared.Core.Dto;
using SteUp.Shared.Core.Entities;
using SteUp.Shared.Core.Dto;
namespace SteUp.Shared.Core.Interface.System;
@@ -7,22 +6,4 @@ public interface IAttachedService
{
Task<AttachedDto?> SelectImageFromCamera();
Task<List<AttachedDto>?> SelectImageFromGallery();
Task<List<AttachedDto>?> GetInspectionFiles(Ispezione ispezione, List<string> fileNameFilter,
bool includeToUpload = true, CancellationToken ct = default);
Task<string?> SaveInspectionFile(Ispezione ispezione, byte[] file, string fileName, CancellationToken ct = default);
bool RemoveInspectionFile(Ispezione ispezione, string fileName, bool removeAlsoFromFinal = true,
bool removeAlsoFromToUpload = true);
Task<bool> MoveInspectionFileFromToUploadToFinal(Ispezione ispezione, string fileName, bool overwrite = true,
CancellationToken ct = default);
Task<string> SaveToTempStorage(Stream file, string fileName, CancellationToken ct = default);
Task CleanTempStorageAsync(CancellationToken ct = default);
Task OpenFile(string fileName, string filePath);
Task<(string originalUrl, string thumbUrl)> SaveAndCreateThumbAsync(byte[] bytes, string fileName,
CancellationToken ct = default);
}

View File

@@ -0,0 +1,29 @@
using SteUp.Shared.Core.Dto;
using SteUp.Shared.Core.Entities;
namespace SteUp.Shared.Core.Interface.System;
public interface IFileManager
{
Task<List<AttachedDto>?> GetInspectionFiles(Ispezione ispezione, List<string> fileNameFilter,
bool includeToUpload = true, CancellationToken ct = default);
Task<string?> SaveInspectionFile(Ispezione ispezione, byte[] file, string fileName, CancellationToken ct = default);
string GetFileToUploadDir(Ispezione ispezione, string fileName);
bool RemoveInspectionFile(Ispezione ispezione, string fileName, bool removeAlsoFromFinal = true,
bool removeAlsoFromToUpload = true);
Task<string?> MoveInspectionFileFromToUploadToFinal(Ispezione ispezione, string fileName, bool overwrite = true,
CancellationToken ct = default);
Task<string> SaveToTempStorage(Stream file, string fileName, CancellationToken ct = default);
Task CleanTempStorageAsync(CancellationToken ct = default);
Task OpenFile(string fileName, string filePath);
Task<(string originalUrl, string thumbUrl)> SaveAndCreateThumbAsync(byte[] bytes, string fileName,
CancellationToken ct = default);
List<SendEmailDto.AttachmentsDto> GetFileForExport();
}