Merge branch 'develop' of https://gitlab.steamware.net/etis/lux into develop
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
namespace EgwCoreLib.Lux.Data.Repository.Items
|
||||
namespace EgwCoreLib.Lux.Data.Repository.Items
|
||||
{
|
||||
public interface IItemGroupRepository
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Inserisce nel database i gruppi di item mancanti dalla lista BOM fornita.
|
||||
/// </summary>
|
||||
/// <param name="bomList">Lista BOM da analizzare</param>
|
||||
Task<bool> AddMissingAsync(List<BomItemDTO> bomList);
|
||||
|
||||
/// <summary>
|
||||
/// Inserisce in batch molteplici record ItemGroup nel database.
|
||||
/// </summary>
|
||||
/// <param name="entityList">Lista di record da inserire</param>
|
||||
Task<bool> AddRangeAsync(List<ItemGroupModel> entityList);
|
||||
|
||||
/// <summary>
|
||||
/// Recupera l'elenco completo dei gruppi di item dal database.
|
||||
/// </summary>
|
||||
Task<List<ItemGroupModel>> GetAllAsync();
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> AddMissingAsync(List<BomItemDTO> bomList)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
@@ -46,6 +47,7 @@
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> AddRangeAsync(List<ItemGroupModel> entityList)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
@@ -53,6 +55,7 @@
|
||||
return await dbCtx.SaveChangesAsync() > 0;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<List<ItemGroupModel>> GetAllAsync()
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
|
||||
@@ -1,19 +1,44 @@
|
||||
namespace EgwCoreLib.Lux.Data.Repository.Job
|
||||
namespace EgwCoreLib.Lux.Data.Repository.Job
|
||||
{
|
||||
public interface IJobStepRepository : IBaseRepository
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Inserisce un nuovo record JobStep nel database.
|
||||
/// </summary>
|
||||
/// <param name="entity">Record da inserire</param>
|
||||
Task<bool> AddAsync(JobStepModel entity);
|
||||
|
||||
/// <summary>
|
||||
/// Elimina un record JobStep e aggiusta gli indici dei successivi.
|
||||
/// </summary>
|
||||
/// <param name="entity">Record da eliminare</param>
|
||||
Task<bool> DeleteAsync(JobStepModel entity);
|
||||
|
||||
/// <summary>
|
||||
/// Recupera un record JobStep specifico per ID.
|
||||
/// </summary>
|
||||
/// <param name="recId">ID del job step da recuperare</param>
|
||||
Task<JobStepModel?> GetByIdAsync(int recId);
|
||||
|
||||
/// <summary>
|
||||
/// Recupera tutti i job step associati a un Job specifico con le entità correlate.
|
||||
/// </summary>
|
||||
/// <param name="jobID">ID del Job padre</param>
|
||||
Task<List<JobStepModel>> GetByParentAsync(int jobID);
|
||||
|
||||
/// <summary>
|
||||
/// Sposta un job step su o giù nell'ordine di esecuzione.
|
||||
/// </summary>
|
||||
/// <param name="selRec">Record da spostare</param>
|
||||
/// <param name="moveUp">Se true sposta su, altrimenti giù</param>
|
||||
Task<bool> MoveAsync(JobStepModel selRec, bool moveUp);
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna un record JobStep esistente nel database.
|
||||
/// </summary>
|
||||
/// <param name="entity">Record aggiornato</param>
|
||||
Task<bool> UpdateAsync(JobStepModel entity);
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -1,21 +1,50 @@
|
||||
namespace EgwCoreLib.Lux.Data.Repository.Job
|
||||
namespace EgwCoreLib.Lux.Data.Repository.Job
|
||||
{
|
||||
public interface IJobTaskRepository : IBaseRepository
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Inserisce un nuovo record JobTask nel database.
|
||||
/// </summary>
|
||||
/// <param name="entity">Record da inserire</param>
|
||||
Task<bool> AddAsync(JobTaskModel entity);
|
||||
|
||||
/// <summary>
|
||||
/// Elimina un record JobTask e aggiusta gli indici dei successivi.
|
||||
/// </summary>
|
||||
/// <param name="entity">Record da eliminare</param>
|
||||
Task<bool> DeleteAsync(JobTaskModel entity);
|
||||
|
||||
/// <summary>
|
||||
/// Recupera l'elenco completo delle attività job con tag e step associati.
|
||||
/// </summary>
|
||||
Task<List<JobTaskModel>> GetAllAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Recupera un record JobTask specifico per ID.
|
||||
/// </summary>
|
||||
/// <param name="recId">ID del task da recuperare</param>
|
||||
Task<JobTaskModel?> GetByIdAsync(int recId);
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna i tag associati a un job, mantenendo solo quelli richiesti.
|
||||
/// </summary>
|
||||
/// <param name="JobID">ID del Job</param>
|
||||
/// <param name="reqTagList">Lista di tag richiesti</param>
|
||||
Task<bool> MergeTagsAsync(int JobID, List<string> reqTagList);
|
||||
|
||||
/// <summary>
|
||||
/// Sposta un job task su o giù nell'ordine di esecuzione.
|
||||
/// </summary>
|
||||
/// <param name="selRec">Record da spostare</param>
|
||||
/// <param name="moveUp">Se true sposta su, altrimenti giù</param>
|
||||
Task<bool> MoveAsync(JobTaskModel selRec, bool moveUp);
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna un record JobTask esistente nel database.
|
||||
/// </summary>
|
||||
/// <param name="entity">Record aggiornato</param>
|
||||
Task<bool> UpdateAsync(JobTaskModel entity);
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> AddAsync(JobStepModel entity)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
@@ -19,6 +20,7 @@
|
||||
return await dbCtx.SaveChangesAsync() > 0;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> DeleteAsync(JobStepModel rec2del)
|
||||
{
|
||||
// Add validation for null entity
|
||||
@@ -62,12 +64,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<JobStepModel?> GetByIdAsync(int recId)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
return await dbCtx.DbSetJobStep.FirstOrDefaultAsync(x => x.JobStepID == recId);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<List<JobStepModel>> GetByParentAsync(int jobID)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
@@ -82,6 +86,7 @@
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> MoveAsync(JobStepModel selRec, bool moveUp)
|
||||
{
|
||||
// Add validation for null entity
|
||||
@@ -134,6 +139,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> UpdateAsync(JobStepModel entity)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> AddAsync(JobTaskModel entity)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
@@ -19,6 +20,7 @@
|
||||
return await dbCtx.SaveChangesAsync() > 0;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> DeleteAsync(JobTaskModel rec2del)
|
||||
{
|
||||
// Add validation for null entity
|
||||
@@ -62,6 +64,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<List<JobTaskModel>> GetAllAsync()
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
@@ -72,12 +75,14 @@
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<JobTaskModel?> GetByIdAsync(int recId)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
return await dbCtx.DbSetJobTask.FirstOrDefaultAsync(x => x.JobID == recId);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> MergeTagsAsync(int JobID, List<string> reqTagList)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
@@ -133,6 +138,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> MoveAsync(JobTaskModel selRec, bool moveUp)
|
||||
{
|
||||
// Add validation for null entity
|
||||
@@ -185,6 +191,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> UpdateAsync(JobTaskModel entity)
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
|
||||
Reference in New Issue
Block a user