Gestiti salvataggi rest

This commit is contained in:
2026-03-02 10:50:34 +01:00
parent e027d8e5cf
commit ab9578a45f
58 changed files with 1235 additions and 305 deletions

View File

@@ -10,4 +10,11 @@ public interface IIntegrySteupService
Task<List<ActivityTypeDto>> RetrieveActivityType();
Task<List<ArticoliInGrigliaDto>?> RetrieveGrigliaPlu(RetrieveGrigliaPluRequestDto request);
Task<ArticoliInGrigliaDto?> RetrieveArtFromBarcode(string barcode);
Task<List<StbActivityDto>?> RetrieveStatoIspezioni(RetrieveStatoIspezioniRequestDto request);
//Save
Task<SaveSchedaResponseDto?> SaveScheda(SaveRequestDto request);
Task<SaveSchedaResponseDto?> SaveMultipleSchede(List<SaveRequestDto> request);
Task CompleteInspection(string activityId);
Task UploadFile(string activityId, byte[] file, string fileName);
}

View File

@@ -1,23 +1,27 @@
using SteUp.Shared.Core.Entities;
using SteUp.Shared.Core.Enum;
namespace SteUp.Shared.Core.Interface.LocalDb;
public interface IIspezioniService
{
// ISPEZIONI
Task<Ispezione?> GetIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
Task<Ispezione?> GetIspezioneAsync(string codMdep, DateTime data, string rilevatore);
Task<List<Ispezione>> GetAllIspezioniWithSchedeAsync();
Task AddIspezioneAsync(Ispezione ispezione);
Task<Ispezione> GetOrCreateIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
Task<Ispezione> GetOrCreateIspezioneAsync(string codMdep, DateTime data, string rilevatore);
Task<bool> UpdateIspezioneAsync(Ispezione ispezione);
Task<bool> DeleteIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
Task<bool> UpdateStatoIspezioneAsync(string codMdep, DateTime data, string rilevatore, StatusEnum stato);
Task<bool> UpdateActivityIdIspezioneAsync(string codMdep, DateTime data, string rilevatore, string? activityId);
Task<bool> DeleteIspezioneAsync(string codMdep, DateTime data, string rilevatore);
// SCHEDE
Task AddSchedaAsync(string codMdep, DateOnly data, string rilevatore, Scheda scheda);
Task<List<Scheda>> GetAllSchedeOfIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
Task AddSchedaAsync(string codMdep, DateTime data, string rilevatore, Scheda scheda);
Task<List<Scheda>> GetAllSchedeOfIspezioneAsync(string codMdep, DateTime data, string rilevatore);
Task<Scheda?> GetSchedaAsync(int schedaId);
Task<Scheda?> GetSchedaWithIspezioneAsync(int schedaId);
Task<bool> UpdateSchedaAsync(Scheda scheda);
Task<bool> UpdateActivityIdSchedaAsync(int schedaId, string? activityId);
Task<bool> DeleteSchedaAsync(int schedaId);
Task<int> DeleteAllSchedeOfIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
Task<int> DeleteAllSchedeOfIspezioneAsync(string codMdep, DateTime data, string rilevatore);
}

View File

@@ -8,13 +8,21 @@ public interface IAttachedService
Task<AttachedDto?> SelectImageFromCamera();
Task<List<AttachedDto>?> SelectImageFromGallery();
Task<List<AttachedDto>?> GetInspectionFiles(Ispezione ispezione);
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 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);
Task<(string originalUrl, string thumbUrl)> SaveAndCreateThumbAsync(byte[] bytes, string fileName,
CancellationToken ct = default);
}