IProcessMapPlanRepository поправил документацию, переименовал метод

This commit is contained in:
ngfrolov 2023-07-25 16:40:25 +05:00
parent c3aa8d443a
commit 7ba021c9e7
Signed by: ng.frolov
GPG Key ID: E99907A0357B29A7
3 changed files with 9 additions and 9 deletions

View File

@ -9,12 +9,12 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Repositories namespace AsbCloudApp.Repositories
{ {
/// <summary> /// <summary>
/// РТК /// РТК-план
/// </summary> /// </summary>
public interface IProcessMapPlanRepository : IRepositoryWellRelated<ProcessMapPlanDto> public interface IProcessMapPlanRepository : IRepositoryWellRelated<ProcessMapPlanDto>
{ {
/// <summary> /// <summary>
/// Получить параметры бурения начиная с даты. /// Получить РТК-план начиная с даты.
/// </summary> /// </summary>
/// <param name="idWell"></param> /// <param name="idWell"></param>
/// <param name="updateFrom"></param> /// <param name="updateFrom"></param>
@ -24,7 +24,7 @@ namespace AsbCloudApp.Repositories
DateTime? updateFrom, CancellationToken token = default); DateTime? updateFrom, CancellationToken token = default);
/// <summary> /// <summary>
/// Получить параметры бурения /// Получить РТК-план
/// </summary> /// </summary>
/// <param name="requests"></param> /// <param name="requests"></param>
/// <param name="token"></param> /// <param name="token"></param>
@ -33,11 +33,11 @@ namespace AsbCloudApp.Repositories
CancellationToken token); CancellationToken token);
/// <summary> /// <summary>
/// Удалить РТК /// Удалить РТК-план по скважине
/// </summary> /// </summary>
/// <param name="idWell"></param> /// <param name="idWell"></param>
/// <param name="cancellationToken"></param> /// <param name="cancellationToken"></param>
/// <returns></returns> /// <returns></returns>
Task<int> RemoveRangeAsync(int idWell, CancellationToken cancellationToken); Task<int> RemoveByWellAsync(int idWell, CancellationToken cancellationToken);
} }
} }

View File

@ -60,11 +60,11 @@ namespace AsbCloudInfrastructure.Repository
return dtos; return dtos;
} }
public Task<int> RemoveRangeAsync(int idWell, CancellationToken cancellationToken) public Task<int> RemoveByWellAsync(int idWell, CancellationToken cancellationToken)
{ {
var entitites = dbContext.ProcessMap.Where(x => x.IdWell == idWell); var query = dbContext.ProcessMap.Where(x => x.IdWell == idWell);
dbContext.ProcessMap.RemoveRange(entitites); dbContext.ProcessMap.RemoveRange(query);
return dbContext.SaveChangesAsync(cancellationToken); return dbContext.SaveChangesAsync(cancellationToken);
} }

View File

@ -62,7 +62,7 @@ public class ProcessMapPlanImportService : IProcessMapPlanImportService
var processPlanMaps = ParseWorkBook(workBook); var processPlanMaps = ParseWorkBook(workBook);
if (deleteProcessMapPlansBeforeImport) if (deleteProcessMapPlansBeforeImport)
await processMapPlanRepository.RemoveRangeAsync(idWell, cancellationToken); await processMapPlanRepository.RemoveByWellAsync(idWell, cancellationToken);
foreach (var processPlanMap in processPlanMaps) foreach (var processPlanMap in processPlanMaps)
{ {