forked from ddrilling/AsbCloudServer
IProcessMapPlanRepository поправил документацию, переименовал метод
This commit is contained in:
parent
c3aa8d443a
commit
7ba021c9e7
@ -9,12 +9,12 @@ using System.Threading.Tasks;
|
||||
namespace AsbCloudApp.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// РТК
|
||||
/// РТК-план
|
||||
/// </summary>
|
||||
public interface IProcessMapPlanRepository : IRepositoryWellRelated<ProcessMapPlanDto>
|
||||
{
|
||||
/// <summary>
|
||||
/// Получить параметры бурения начиная с даты.
|
||||
/// Получить РТК-план начиная с даты.
|
||||
/// </summary>
|
||||
/// <param name="idWell"></param>
|
||||
/// <param name="updateFrom"></param>
|
||||
@ -24,7 +24,7 @@ namespace AsbCloudApp.Repositories
|
||||
DateTime? updateFrom, CancellationToken token = default);
|
||||
|
||||
/// <summary>
|
||||
/// Получить параметры бурения
|
||||
/// Получить РТК-план
|
||||
/// </summary>
|
||||
/// <param name="requests"></param>
|
||||
/// <param name="token"></param>
|
||||
@ -33,11 +33,11 @@ namespace AsbCloudApp.Repositories
|
||||
CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Удалить РТК
|
||||
/// Удалить РТК-план по скважине
|
||||
/// </summary>
|
||||
/// <param name="idWell"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> RemoveRangeAsync(int idWell, CancellationToken cancellationToken);
|
||||
Task<int> RemoveByWellAsync(int idWell, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
@ -60,11 +60,11 @@ namespace AsbCloudInfrastructure.Repository
|
||||
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);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class ProcessMapPlanImportService : IProcessMapPlanImportService
|
||||
var processPlanMaps = ParseWorkBook(workBook);
|
||||
|
||||
if (deleteProcessMapPlansBeforeImport)
|
||||
await processMapPlanRepository.RemoveRangeAsync(idWell, cancellationToken);
|
||||
await processMapPlanRepository.RemoveByWellAsync(idWell, cancellationToken);
|
||||
|
||||
foreach (var processPlanMap in processPlanMaps)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user