forked from ddrilling/AsbCloudServer
Merge branch 'dev' into feature/8879776_well_tree_with_stat
This commit is contained in:
commit
4750fe38d6
@ -30,6 +30,11 @@ namespace AsbCloudApp.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int IdCategory { get; set; }
|
public int IdCategory { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// id плановой операции для сопоставления
|
||||||
|
/// </summary>
|
||||||
|
public int? IdPlan { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// название категории операции
|
/// название категории операции
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -25,6 +25,14 @@ namespace AsbCloudApp.Repositories
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
IDictionary<int, string> GetSectionTypes();
|
IDictionary<int, string> GetSectionTypes();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// список плановых операций для сопоставления
|
||||||
|
/// <param name="idWell"></param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<IEnumerable<WellOperationDto>> GetOperationsPlanAsync(int idWell, CancellationToken token);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// дата/время первой операции по скважине
|
/// дата/время первой операции по скважине
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
6986
AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.Designer.cs
generated
Normal file
6986
AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace AsbCloudDb.Migrations
|
||||||
|
{
|
||||||
|
public partial class Add_FK_PlanOperation_to_WellOperation : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "id_plan",
|
||||||
|
table: "t_well_operation",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Id плановой операции");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "id_plan",
|
||||||
|
table: "t_well_operation");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4382,6 +4382,11 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasColumnName("id_category")
|
.HasColumnName("id_category")
|
||||||
.HasComment("Id категории операции");
|
.HasComment("Id категории операции");
|
||||||
|
|
||||||
|
b.Property<int?>("IdPlan")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("id_plan")
|
||||||
|
.HasComment("Id плановой операции");
|
||||||
|
|
||||||
b.Property<int>("IdType")
|
b.Property<int>("IdType")
|
||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("id_type")
|
.HasColumnName("id_type")
|
||||||
|
@ -32,6 +32,9 @@ namespace AsbCloudDb.Model
|
|||||||
[Column("id_type"), Comment("0 = План или 1 = Факт")]
|
[Column("id_type"), Comment("0 = План или 1 = Факт")]
|
||||||
public int IdType { get; set; }
|
public int IdType { get; set; }
|
||||||
|
|
||||||
|
[Column("id_plan"), Comment("Id плановой операции")]
|
||||||
|
public int? IdPlan { get; set; }
|
||||||
|
|
||||||
[Column("depth_start"), Comment("Глубина на начало операции, м")]
|
[Column("depth_start"), Comment("Глубина на начало операции, м")]
|
||||||
public double DepthStart { get; set; }
|
public double DepthStart { get; set; }
|
||||||
|
|
||||||
@ -61,6 +64,10 @@ namespace AsbCloudDb.Model
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey(nameof(IdCategory))]
|
[ForeignKey(nameof(IdCategory))]
|
||||||
public virtual WellOperationCategory OperationCategory { get; set; }
|
public virtual WellOperationCategory OperationCategory { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey(nameof(IdPlan))]
|
||||||
|
public virtual WellOperation OperationPlan { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
|
using AsbCloudApp.Repositories;
|
||||||
using AsbCloudApp.Requests;
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using AsbCloudDb;
|
using AsbCloudDb;
|
||||||
@ -9,9 +10,8 @@ using Microsoft.Extensions.Caching.Memory;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using AsbCloudApp.Repositories;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Repository
|
namespace AsbCloudInfrastructure.Repository
|
||||||
{
|
{
|
||||||
@ -63,6 +63,49 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
.GetOrCreateBasic<WellSectionType>(db)
|
.GetOrCreateBasic<WellSectionType>(db)
|
||||||
.ToDictionary(s => s.Id, s => s.Caption);
|
.ToDictionary(s => s.Id, s => s.Caption);
|
||||||
|
|
||||||
|
public async Task<IEnumerable<WellOperationDto>> GetOperationsPlanAsync(int idWell, CancellationToken token)
|
||||||
|
{
|
||||||
|
var lastFactOperation = await db.WellOperations
|
||||||
|
.Where(x => x.IdType == WellOperation.IdOperationTypeFact)
|
||||||
|
.Where(x => x.IdPlan != null)
|
||||||
|
.OrderByDescending(x => x.DateStart)
|
||||||
|
.FirstOrDefaultAsync(token)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
var query = db.WellOperations
|
||||||
|
.Include(x => x.OperationCategory)
|
||||||
|
.Where(x => x.IdWell == idWell)
|
||||||
|
.Where(x => x.IdType == WellOperation.IdOperationTypePlan);
|
||||||
|
|
||||||
|
|
||||||
|
if (lastFactOperation is not null)
|
||||||
|
{
|
||||||
|
var dateStart = lastFactOperation?.DateStart!;
|
||||||
|
query = query.Where(x => x.DateStart >= dateStart);
|
||||||
|
}
|
||||||
|
|
||||||
|
var timezone = wellService.GetTimezone(idWell);
|
||||||
|
var timeZoneOffset = TimeSpan.FromHours(timezone.Hours);
|
||||||
|
|
||||||
|
var entities = await query
|
||||||
|
.AsNoTracking()
|
||||||
|
.ToArrayAsync(token)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
var result = entities
|
||||||
|
.Select(o => new WellOperationDto()
|
||||||
|
{
|
||||||
|
IdWell = o.IdWell,
|
||||||
|
CategoryName = o.OperationCategory.Name,
|
||||||
|
IdCategory = o.IdCategory,
|
||||||
|
IdPlan = o.IdPlan,
|
||||||
|
DepthStart = o.DepthStart,
|
||||||
|
DateStart = DateTime.SpecifyKind(o.DateStart.UtcDateTime + timeZoneOffset, DateTimeKind.Unspecified),
|
||||||
|
Id = o.Id
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public DateTimeOffset? FirstOperationDate(int idWell)
|
public DateTimeOffset? FirstOperationDate(int idWell)
|
||||||
{
|
{
|
||||||
@ -256,40 +299,8 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
var query = db.WellOperations
|
var query = db.WellOperations
|
||||||
.Include(s => s.WellSectionType)
|
.Include(s => s.WellSectionType)
|
||||||
.Include(s => s.OperationCategory)
|
.Include(s => s.OperationCategory)
|
||||||
.Where(o => o.IdWell == request.IdWell)
|
.Where(o => o.IdWell == request.IdWell);
|
||||||
.Select(o => new WellOperationDto
|
|
||||||
{
|
|
||||||
Id = o.Id,
|
|
||||||
IdType = o.IdType,
|
|
||||||
IdWell = o.IdWell,
|
|
||||||
IdWellSectionType = o.IdWellSectionType,
|
|
||||||
IdCategory = o.IdCategory,
|
|
||||||
|
|
||||||
CategoryName = o.WellSectionType.Caption,
|
|
||||||
WellSectionTypeName = o.WellSectionType.Caption,
|
|
||||||
|
|
||||||
DateStart = DateTime.SpecifyKind( o.DateStart.UtcDateTime + timeZoneOffset, DateTimeKind.Unspecified),
|
|
||||||
DepthStart = o.DepthStart,
|
|
||||||
DepthEnd = o.DepthEnd,
|
|
||||||
DurationHours = o.DurationHours,
|
|
||||||
CategoryInfo = o.CategoryInfo,
|
|
||||||
Comment = o.Comment,
|
|
||||||
|
|
||||||
NptHours = db.WellOperations
|
|
||||||
.Where(subOp => subOp.IdWell == request.IdWell)
|
|
||||||
.Where(subOp => subOp.IdType == 1)
|
|
||||||
.Where(subOp => WellOperationCategory.NonProductiveTimeSubIds.Contains(subOp.IdCategory))
|
|
||||||
.Where(subOp => subOp.DateStart <= o.DateStart)
|
|
||||||
.Select(subOp => subOp.DurationHours)
|
|
||||||
.Sum(),
|
|
||||||
|
|
||||||
Day = (o.DateStart - db.WellOperations
|
|
||||||
.Where(subOp => subOp.IdWell == request.IdWell)
|
|
||||||
.Where(subOp => subOp.IdType == o.IdType)
|
|
||||||
.Where(subOp => subOp.DateStart <= o.DateStart)
|
|
||||||
.Min(subOp => subOp.DateStart))
|
|
||||||
.TotalDays,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (request.OperationType.HasValue)
|
if (request.OperationType.HasValue)
|
||||||
query = query.Where(e => e.IdType == request.OperationType.Value);
|
query = query.Where(e => e.IdType == request.OperationType.Value);
|
||||||
@ -318,19 +329,58 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
query = query.Where(e => e.DateStart <= leDateOffset);
|
query = query.Where(e => e.DateStart <= leDateOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var currentWellOperations = db.WellOperations
|
||||||
|
.Where(subOp => subOp.IdWell == request.IdWell);
|
||||||
|
|
||||||
|
var wellOperationsWithCategoryNPT = currentWellOperations
|
||||||
|
.Where(subOp => subOp.IdType == 1)
|
||||||
|
.Where(subOp => WellOperationCategory.NonProductiveTimeSubIds.Contains(subOp.IdCategory));
|
||||||
|
|
||||||
|
|
||||||
|
var result = query.Select(o => new WellOperationDto
|
||||||
|
{
|
||||||
|
Id = o.Id,
|
||||||
|
IdPlan = o.IdPlan,
|
||||||
|
IdType = o.IdType,
|
||||||
|
IdWell = o.IdWell,
|
||||||
|
IdWellSectionType = o.IdWellSectionType,
|
||||||
|
IdCategory = o.IdCategory,
|
||||||
|
|
||||||
|
CategoryName = o.WellSectionType.Caption,
|
||||||
|
WellSectionTypeName = o.WellSectionType.Caption,
|
||||||
|
|
||||||
|
DateStart = DateTime.SpecifyKind(o.DateStart.UtcDateTime + timeZoneOffset, DateTimeKind.Unspecified),
|
||||||
|
DepthStart = o.DepthStart,
|
||||||
|
DepthEnd = o.DepthEnd,
|
||||||
|
DurationHours = o.DurationHours,
|
||||||
|
CategoryInfo = o.CategoryInfo,
|
||||||
|
Comment = o.Comment,
|
||||||
|
|
||||||
|
NptHours = wellOperationsWithCategoryNPT
|
||||||
|
.Where(subOp => subOp.DateStart <= o.DateStart)
|
||||||
|
.Select(subOp => subOp.DurationHours)
|
||||||
|
.Sum(),
|
||||||
|
|
||||||
|
Day = (o.DateStart - currentWellOperations
|
||||||
|
.Where(subOp => subOp.IdType == o.IdType)
|
||||||
|
.Where(subOp => subOp.DateStart <= o.DateStart)
|
||||||
|
.Min(subOp => subOp.DateStart))
|
||||||
|
.TotalDays,
|
||||||
|
});
|
||||||
|
|
||||||
if (request.SortFields?.Any() == true)
|
if (request.SortFields?.Any() == true)
|
||||||
{
|
{
|
||||||
query = query.SortBy(request.SortFields);
|
result = result.SortBy(request.SortFields);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
query = query
|
result = result
|
||||||
.OrderBy(e => e.DateStart)
|
.OrderBy(e => e.DateStart)
|
||||||
.ThenBy(e => e.DepthEnd)
|
.ThenBy(e => e.DepthEnd)
|
||||||
.ThenBy(e => e.Id);
|
.ThenBy(e => e.Id);
|
||||||
}
|
};
|
||||||
|
|
||||||
return query;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
@ -236,7 +236,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
|||||||
BhaUpSpeed = CalcBhaUpSpeed(races),
|
BhaUpSpeed = CalcBhaUpSpeed(races),
|
||||||
CasingDownSpeed = CalcCasingDownSpeed(operations),
|
CasingDownSpeed = CalcCasingDownSpeed(operations),
|
||||||
NonProductiveHours = operations
|
NonProductiveHours = operations
|
||||||
.Where(o => WellOperationCategory.NonProductiveTimeSubIds.Contains( o.IdCategory))
|
.Where(o => WellOperationCategory.NonProductiveTimeSubIds.Contains(o.IdCategory))
|
||||||
.Sum(o => o.DurationHours),
|
.Sum(o => o.DurationHours),
|
||||||
};
|
};
|
||||||
return section;
|
return section;
|
||||||
@ -330,7 +330,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
|||||||
{
|
{
|
||||||
if (race.Operations[i].IdCategory == WellOperationCategory.IdBhaDown)
|
if (race.Operations[i].IdCategory == WellOperationCategory.IdBhaDown)
|
||||||
dHours += race.Operations[i].DurationHours;
|
dHours += race.Operations[i].DurationHours;
|
||||||
if (WellOperationCategory.MechanicalDrillingSubIds.Contains( race.Operations[i].IdCategory))
|
if (WellOperationCategory.MechanicalDrillingSubIds.Contains(race.Operations[i].IdCategory))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,6 +360,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
|||||||
var wellOperations = await db.WellOperations
|
var wellOperations = await db.WellOperations
|
||||||
.Include(o => o.OperationCategory)
|
.Include(o => o.OperationCategory)
|
||||||
.Include(o => o.WellSectionType)
|
.Include(o => o.WellSectionType)
|
||||||
|
.Include(o => o.OperationPlan)
|
||||||
.Where(o => o.IdWell == idWell)
|
.Where(o => o.IdWell == idWell)
|
||||||
.OrderBy(o => o.DateStart)
|
.OrderBy(o => o.DateStart)
|
||||||
.ThenBy(o => o.DepthEnd)
|
.ThenBy(o => o.DepthEnd)
|
||||||
@ -467,78 +468,35 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
|||||||
return merged;
|
return merged;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<Tuple<WellOperation, WellOperation>> MergeArrays(IEnumerable<WellOperation> array1, IEnumerable<WellOperation> array2)
|
private static List<Tuple<WellOperation, WellOperation>> MergeArrays(IEnumerable<WellOperation> operationsPlan, IEnumerable<WellOperation> operationsFact)
|
||||||
{
|
{
|
||||||
var a1 = array1.ToArray();
|
var result = new List<Tuple<WellOperation, WellOperation>>();
|
||||||
var a2 = array2.ToArray();
|
|
||||||
|
|
||||||
var m = new List<Tuple<WellOperation, WellOperation>>(a1.Length);
|
var oparationsFactWithNoPlan = operationsFact
|
||||||
void Add(WellOperation item1, WellOperation item2) =>
|
.Where(x => x.IdPlan == null)
|
||||||
m.Add(new Tuple<WellOperation, WellOperation>(item1, item2));
|
.Select(x => new Tuple<WellOperation, WellOperation>(null, x));
|
||||||
|
|
||||||
static bool Compare(WellOperation item1, WellOperation item2) =>
|
var oparationsFactWithPlan = operationsFact
|
||||||
item1.IdCategory == item2.IdCategory && Math.Abs(item1.DepthEnd - item2.DepthEnd) < (30d + 0.005d * (item1.DepthEnd + item2.DepthEnd));
|
.Where(x => x.IdPlan != null)
|
||||||
|
.Select(x => new Tuple<WellOperation, WellOperation>(x.OperationPlan, x));
|
||||||
|
|
||||||
int i1 = 0;
|
var idsPlanWithFact = operationsFact
|
||||||
int i2 = 0;
|
.Where(x => x.IdPlan is not null)
|
||||||
while (true)
|
.Select(x => x.IdPlan)
|
||||||
{
|
.Distinct();
|
||||||
var is1 = a1.Length > i1;
|
var oparationsPlanWithNoFact = operationsPlan
|
||||||
var is2 = a2.Length > i2;
|
.Where(x => !idsPlanWithFact.Contains(x.IdPlan))
|
||||||
if (!(is1 || is2))
|
.Select(x => new Tuple<WellOperation, WellOperation>(x, null));
|
||||||
break;
|
|
||||||
|
|
||||||
if (is1 && is2)
|
result.AddRange(oparationsFactWithNoPlan);
|
||||||
{
|
result.AddRange(oparationsFactWithPlan);
|
||||||
if (Compare(a1[i1], a2[i2]))
|
result.AddRange(oparationsPlanWithNoFact);
|
||||||
Add(a1[i1++], a2[i2++]);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int nextI1 = Array.FindIndex(a1, i1, (item) => Compare(item, a2[i2]));
|
|
||||||
int nextI2 = Array.FindIndex(a2, i2, (item) => Compare(item, a1[i1]));
|
|
||||||
|
|
||||||
bool deltaI1_Lt_deltaI2 = (nextI1 - i1) < (nextI2 - i2);
|
result = result
|
||||||
|
.OrderBy(x => x.Item1?.DateStart)
|
||||||
if (nextI1 == -1 && nextI2 == -1)
|
.ThenBy(x => x.Item2?.DateStart)
|
||||||
{
|
.ToList();
|
||||||
if (a1[i1].DepthEnd < a2[i2].DepthEnd)
|
return result;
|
||||||
{
|
|
||||||
Add(a1[i1++], null);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Add(null, a2[i2++]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (nextI1 > -1 && nextI2 == -1)
|
|
||||||
{
|
|
||||||
Add(a1[i1++], null);
|
|
||||||
}
|
|
||||||
else if (nextI1 == -1 && nextI2 > -1)
|
|
||||||
{
|
|
||||||
Add(null, a2[i2++]);
|
|
||||||
}
|
|
||||||
else if (deltaI1_Lt_deltaI2)
|
|
||||||
{
|
|
||||||
Add(a1[i1++], null);
|
|
||||||
}
|
|
||||||
else if (!deltaI1_Lt_deltaI2)
|
|
||||||
{
|
|
||||||
Add(null, a2[i2++]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (is1)
|
|
||||||
{
|
|
||||||
Add(a1[i1++], null);
|
|
||||||
}
|
|
||||||
else if (is2)
|
|
||||||
{
|
|
||||||
Add(null, a2[i2++]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return m;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static WellOperationDto Convert(WellOperation source, double tzOffsetHours)
|
private static WellOperationDto Convert(WellOperation source, double tzOffsetHours)
|
||||||
|
@ -60,6 +60,26 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Возвращает список плановых операций для сопоставления
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idWell">id скважины</param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
[Route("operationsPlan")]
|
||||||
|
[ProducesResponseType(typeof(IEnumerable<WellOperationDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||||
|
public async Task<IActionResult> GetOperationsPlanAsync([FromRoute] int idWell, CancellationToken token)
|
||||||
|
{
|
||||||
|
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
||||||
|
return Forbid();
|
||||||
|
|
||||||
|
var result = await operationRepository
|
||||||
|
.GetOperationsPlanAsync(idWell, token)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Отфильтрованный список операций на скважине. Если не применять фильтр, то вернется весь список. Сортированный по глубине затем по дате
|
/// Отфильтрованный список операций на скважине. Если не применять фильтр, то вернется весь список. Сортированный по глубине затем по дате
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -150,8 +170,8 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
||||||
return Forbid();
|
return Forbid();
|
||||||
|
|
||||||
foreach(var value in values)
|
foreach (var value in values)
|
||||||
value.IdWell= idWell;
|
value.IdWell = idWell;
|
||||||
|
|
||||||
var result = await operationRepository.InsertRangeAsync(values, token)
|
var result = await operationRepository.InsertRangeAsync(values, token)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
@ -176,7 +196,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
||||||
return Forbid();
|
return Forbid();
|
||||||
|
|
||||||
value.IdWell= idWell;
|
value.IdWell = idWell;
|
||||||
value.Id = idOperation;
|
value.Id = idOperation;
|
||||||
|
|
||||||
var result = await operationRepository.UpdateAsync(value, token)
|
var result = await operationRepository.UpdateAsync(value, token)
|
||||||
|
Loading…
Reference in New Issue
Block a user