forked from ddrilling/AsbCloudServer
Merge branch 'dev' into feature/well_operation
This commit is contained in:
commit
ba2370ae15
@ -17,5 +17,5 @@ public class ProcessMapPlanAutoHoldTFDto : ProcessMapPlanBaseDto
|
|||||||
/// Примечание
|
/// Примечание
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
}
|
}
|
@ -17,5 +17,5 @@ public class ProcessMapPlanDamperDto : ProcessMapPlanBaseDto
|
|||||||
/// Примечание
|
/// Примечание
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
}
|
}
|
@ -41,5 +41,5 @@ public class ProcessMapPlanDrillTestDto : ProcessMapPlanBaseDto
|
|||||||
/// Примечание
|
/// Примечание
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символа")]
|
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символа")]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
}
|
}
|
@ -47,5 +47,5 @@ public class ProcessMapPlanOscillationDto : ProcessMapPlanBaseDto
|
|||||||
/// Примечание
|
/// Примечание
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
}
|
}
|
@ -47,5 +47,5 @@ public class ProcessMapPlanShockTestDto : ProcessMapPlanBaseDto
|
|||||||
/// Примечание
|
/// Примечание
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
}
|
}
|
@ -149,7 +149,7 @@ public class ProcessMapPlanReamingRotorDto : ProcessMapPlanBaseDto
|
|||||||
/// Проработка 3, Количество повторений, шт.
|
/// Проработка 3, Количество повторений, шт.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0, 99, ErrorMessage = "Проработка 3, Количество повторений, шт., должно быть в пределах от 0 до 99")]
|
[Range(0, 99, ErrorMessage = "Проработка 3, Количество повторений, шт., должно быть в пределах от 0 до 99")]
|
||||||
public double Reaming3RepetitionsCount { get; set; }
|
public int Reaming3RepetitionsCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Проработка 3, Скорость, м/ч., Вверх
|
/// Проработка 3, Скорость, м/ч., Вверх
|
||||||
@ -203,5 +203,5 @@ public class ProcessMapPlanReamingRotorDto : ProcessMapPlanBaseDto
|
|||||||
/// Примечание
|
/// Примечание
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
}
|
}
|
@ -41,7 +41,7 @@ public class ProcessMapPlanReamingSlideDto : ProcessMapPlanBaseDto
|
|||||||
/// Проработка 1, Количество повторений, шт.
|
/// Проработка 1, Количество повторений, шт.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0.0, 99.0, ErrorMessage = "Проработка 1, Количество повторений, шт., должно быть в пределах от 0 до 99")]
|
[Range(0.0, 99.0, ErrorMessage = "Проработка 1, Количество повторений, шт., должно быть в пределах от 0 до 99")]
|
||||||
public double Reaming1RepetitionsCount { get; set; }
|
public int Reaming1RepetitionsCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Проработка 1, Скорость, м/ч., Вверх
|
/// Проработка 1, Скорость, м/ч., Вверх
|
||||||
@ -95,7 +95,7 @@ public class ProcessMapPlanReamingSlideDto : ProcessMapPlanBaseDto
|
|||||||
/// Проработка 2, Количество повторений, шт.
|
/// Проработка 2, Количество повторений, шт.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0.0, 99.0, ErrorMessage = "Проработка 2, Количество повторений, шт., должно быть в пределах от 0 до 99")]
|
[Range(0.0, 99.0, ErrorMessage = "Проработка 2, Количество повторений, шт., должно быть в пределах от 0 до 99")]
|
||||||
public double Reaming2RepetitionsCount { get; set; }
|
public int Reaming2RepetitionsCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Проработка 2, Скорость, м/ч., Вверх
|
/// Проработка 2, Скорость, м/ч., Вверх
|
||||||
@ -149,7 +149,7 @@ public class ProcessMapPlanReamingSlideDto : ProcessMapPlanBaseDto
|
|||||||
/// Проработка 3, Количество повторений, шт.
|
/// Проработка 3, Количество повторений, шт.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0.0, 99.0, ErrorMessage = "Проработка 3, Количество повторений, шт., должно быть в пределах от 0 до 99")]
|
[Range(0.0, 99.0, ErrorMessage = "Проработка 3, Количество повторений, шт., должно быть в пределах от 0 до 99")]
|
||||||
public double Reaming3RepetitionsCount { get; set; }
|
public int? Reaming3RepetitionsCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Проработка 3, Скорость, м/ч., Вверх
|
/// Проработка 3, Скорость, м/ч., Вверх
|
||||||
@ -203,7 +203,7 @@ public class ProcessMapPlanReamingSlideDto : ProcessMapPlanBaseDto
|
|||||||
/// Примечание
|
/// Примечание
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
|
using AsbCloudApp.Services;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@ -9,7 +10,7 @@ namespace AsbCloudApp.Repositories
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Репозиторий работы с данными из таблицы t_data_daub_stat
|
/// Репозиторий работы с данными из таблицы t_data_daub_stat
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDataSaubStatRepository
|
public interface IDataSaubStatRepository : ITelemetryDataEditorService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение записей по ключу телеметрии
|
/// Получение записей по ключу телеметрии
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
using System;
|
using AsbCloudApp.Data;
|
||||||
using AsbCloudApp.Data.DetectedOperation;
|
using AsbCloudApp.Data.DetectedOperation;
|
||||||
using AsbCloudApp.Requests;
|
using AsbCloudApp.Requests;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using AsbCloudApp.Data;
|
using System.Threading.Tasks;
|
||||||
using AsbCloudApp.Data.WellOperation;
|
using AsbCloudApp.Services;
|
||||||
|
|
||||||
namespace AsbCloudApp.Repositories;
|
namespace AsbCloudApp.Repositories;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Таблица автоматически определенных операций
|
/// Таблица автоматически определенных операций
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDetectedOperationRepository
|
public interface IDetectedOperationRepository : ITelemetryDataEditorService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Добавление нескольких записей
|
/// Добавление нескольких записей
|
||||||
@ -55,11 +54,11 @@ public interface IDetectedOperationRepository
|
|||||||
Task<PaginationContainer<DetectedOperationDto>> GetPageAsync(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
Task<PaginationContainer<DetectedOperationDto>> GetPageAsync(DetectedOperationByTelemetryRequest request, CancellationToken token);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение дат последних определённых операций
|
/// Получение последних авто определённых операций
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<IDictionary<int, DateTimeOffset>> GetLastDetectedDatesAsync(CancellationToken token);
|
Task<IDictionary<int, DetectedOperationDto>> GetLastDetectedOperationsAsync(CancellationToken token);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Удалить операции
|
/// Удалить операции
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using AsbCloudApp.Data.SAUB;
|
using AsbCloudApp.Data.SAUB;
|
||||||
using AsbCloudApp.Requests;
|
using AsbCloudApp.Requests;
|
||||||
|
using AsbCloudApp.Services;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -9,7 +10,7 @@ namespace AsbCloudApp.Repositories
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// репозиторий по работе с данными drill_test
|
/// репозиторий по работе с данными drill_test
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDrillTestRepository
|
public interface IDrillTestRepository : ITelemetryDataEditorService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получить данные drill_test в соответствии с параметрами запроса
|
/// Получить данные drill_test в соответствии с параметрами запроса
|
||||||
|
@ -5,13 +5,14 @@ using System.Threading;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AsbCloudApp.Requests;
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
|
using AsbCloudApp.Services;
|
||||||
|
|
||||||
namespace AsbCloudApp.Repositories
|
namespace AsbCloudApp.Repositories
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// данные ГТИ
|
/// данные ГТИ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IGtrRepository
|
public interface IGtrRepository : ITelemetryDataEditorService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// добавить данные (для панели бурильщика)
|
/// добавить данные (для панели бурильщика)
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
using AsbCloudApp.Requests;
|
using AsbCloudApp.Requests;
|
||||||
|
using AsbCloudApp.Services;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace AsbCloudApp.Repositories
|
namespace AsbCloudApp.Repositories
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Репозиторий по ограничивающим параметрам с фильтрацией
|
/// Репозиторий по ограничивающим параметрам с фильтрацией
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILimitingParameterRepository
|
public interface ILimitingParameterRepository : ITelemetryDataEditorService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение списка ограничивающих параметров по идентификатору скважины
|
/// Получение списка ограничивающих параметров по идентификатору скважины
|
||||||
|
39
AsbCloudApp/Requests/TelemetryPartDeleteRequest.cs
Normal file
39
AsbCloudApp/Requests/TelemetryPartDeleteRequest.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace AsbCloudApp.Requests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Параметры запроса на удаление куска телеметрии
|
||||||
|
/// </summary>
|
||||||
|
public class TelemetryPartDeleteRequest : IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ключ телеметрии
|
||||||
|
/// </summary>
|
||||||
|
public int IdTelemetry { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// greater or equal then Date. Must be set one of GeDate or LeDate
|
||||||
|
/// </summary>
|
||||||
|
public DateTimeOffset? GeDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// less or equal then Date. Must be set one of GeDate or LeDate
|
||||||
|
/// </summary>
|
||||||
|
public DateTimeOffset? LeDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Валидация входящих данных
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
if (IdTelemetry == 0)
|
||||||
|
yield return new ValidationResult($"IdTelemetry must be defined");
|
||||||
|
if (!GeDate.HasValue && !LeDate.HasValue)
|
||||||
|
yield return new ValidationResult($"GeDate or LeDate must be defined");
|
||||||
|
}
|
||||||
|
}
|
@ -55,5 +55,4 @@ public class TelemetryDataRequest
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(1, MaxTake)]
|
[Range(1, MaxTake)]
|
||||||
public int Take { get; set; } = 1024;
|
public int Take { get; set; } = 1024;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ using System.Threading;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AsbCloudApp.Data.WellOperation;
|
using AsbCloudApp.Data.WellOperation;
|
||||||
|
|
||||||
namespace AsbCloudApp.Services
|
namespace AsbCloudApp.Services;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Сервис автоматически определенных по телеметрии операций
|
/// Сервис автоматически определенных по телеметрии операций
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -79,9 +79,12 @@ namespace AsbCloudApp.Services
|
|||||||
/// Определение операций
|
/// Определение операций
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idTelemetry"></param>
|
/// <param name="idTelemetry"></param>
|
||||||
/// <param name="beginDate"></param>
|
/// <param name="request"></param>
|
||||||
|
/// <param name="lastDetectedOperation"></param>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<IEnumerable<DetectedOperationDto>> DetectOperationsAsync(int idTelemetry, DateTimeOffset? beginDate, CancellationToken token);
|
Task<(DateTimeOffset LastDate, IEnumerable<DetectedOperationDto> Items)> DetectOperationsAsync(int idTelemetry,
|
||||||
}
|
TelemetryDataRequest request,
|
||||||
|
DetectedOperationDto? lastDetectedOperation,
|
||||||
|
CancellationToken token);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace AsbCloudApp.Services
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Сервис сообщений панели оператора
|
/// Сервис сообщений панели оператора
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMessageService
|
public interface IMessageService : ITelemetryDataEditorService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получить сообщения по параметрам
|
/// Получить сообщения по параметрам
|
||||||
|
19
AsbCloudApp/Services/ITelemetryDataEditorService.cs
Normal file
19
AsbCloudApp/Services/ITelemetryDataEditorService.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using AsbCloudApp.Requests;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AsbCloudApp.Services;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Сервис по работе с данными телеметрии
|
||||||
|
/// </summary>
|
||||||
|
public interface ITelemetryDataEditorService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Удаление части телеметрии по запросу
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token);
|
||||||
|
}
|
@ -5,8 +5,8 @@ using System.IO;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace AsbCloudApp.Services
|
namespace AsbCloudApp.Services;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Телеметрия САУБ
|
/// Телеметрия САУБ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -36,7 +36,7 @@ namespace AsbCloudApp.Services
|
|||||||
Task<IEnumerable<TelemetryDataSaubStatDto>> GetTelemetryDataStatAsync(int idTelemetry, CancellationToken token);
|
Task<IEnumerable<TelemetryDataSaubStatDto>> GetTelemetryDataStatAsync(int idTelemetry, CancellationToken token);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получить упакованый csv файл
|
/// Получить упакованный csv файл
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idWell"></param>
|
/// <param name="idWell"></param>
|
||||||
/// <param name="beginDate"></param>
|
/// <param name="beginDate"></param>
|
||||||
@ -45,4 +45,3 @@ namespace AsbCloudApp.Services
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<Stream> GetZippedCsv(int idWell, DateTime beginDate, DateTime endDate, CancellationToken token);
|
Task<Stream> GetZippedCsv(int idWell, DateTime beginDate, DateTime endDate, CancellationToken token);
|
||||||
}
|
}
|
||||||
}
|
|
@ -11,7 +11,7 @@ namespace AsbCloudApp.Services
|
|||||||
/// сервис данных тех. процесса
|
/// сервис данных тех. процесса
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TDto"></typeparam>
|
/// <typeparam name="TDto"></typeparam>
|
||||||
public interface ITelemetryDataService<TDto> where TDto : ITelemetryData
|
public interface ITelemetryDataService<TDto> : ITelemetryDataEditorService where TDto : ITelemetryData
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -60,5 +60,15 @@ namespace AsbCloudApp.Services
|
|||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<int> DeleteAsync(int idWell, int id, CancellationToken token);
|
Task<int> DeleteAsync(int idWell, int id, CancellationToken token);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Скопировать контакты в другую скважину
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idWell">ключ скважины, откуда копировать контакты</param>
|
||||||
|
/// <param name="idWellTarget">ключ скважины, куда копировать контакты</param>
|
||||||
|
/// <param name="contactIds"></param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<int> CopyAsync(int idWell, int idWellTarget, IEnumerable<int> contactIds, CancellationToken token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@ -9,7 +10,7 @@ namespace AsbCloudApp.Services
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The wits record repository.
|
/// The wits record repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IWitsRecordRepository<TDto>
|
public interface IWitsRecordRepository<TDto> : ITelemetryDataEditorService
|
||||||
where TDto : ITelemetryData
|
where TDto : ITelemetryData
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
12236
AsbCloudDb/Migrations/20240718044823_Update_Tables_ProcessMapOperationsAndFunctions2.Designer.cs
generated
Normal file
12236
AsbCloudDb/Migrations/20240718044823_Update_Tables_ProcessMapOperationsAndFunctions2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
12236
AsbCloudDb/Migrations/20240723055049_NotNullable_Fields_ProcessMapPlanReamingRotorAndSlide.Designer.cs
generated
Normal file
12236
AsbCloudDb/Migrations/20240723055049_NotNullable_Fields_ProcessMapPlanReamingRotorAndSlide.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,810 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace AsbCloudDb.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class NotNullable_Fields_ProcessMapPlanReamingRotorAndSlide : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_stop_point_off_bottom",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Остановка над забоем, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Остановка над забоем, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rpm_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Обороты, об/мин., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Обороты, об/мин., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rpm_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Обороты, об/мин., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Обороты, об/мин., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rop_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Скорость, м/ч., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Скорость, м/ч., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rop_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Скорость, м/ч., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Скорость, м/ч., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "reaming3_repetitions_count",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0,
|
||||||
|
comment: "Проработка 3, Количество повторений, шт.",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "integer",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Количество повторений, шт.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_interval",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Интервал проработки, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Интервал проработки, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_flow_rate_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Расход, л/с., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Расход, л/с., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_flow_rate_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Расход, л/с., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Расход, л/с., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_stop_point_off_bottom",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Остановка над забоем, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Остановка над забоем, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rpm_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Обороты, об/мин., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Обороты, об/мин., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rpm_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Обороты, об/мин., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Обороты, об/мин., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rop_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Скорость, м/ч., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Скорость, м/ч., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rop_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Скорость, м/ч., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Скорость, м/ч., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "reaming2_repetitions_count",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0,
|
||||||
|
comment: "Проработка 2, Количество повторений, шт.",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "integer",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Количество повторений, шт.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_interval",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Интервал проработки, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Интервал проработки, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_flow_rate_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Расход, л/с., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Расход, л/с., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_flow_rate_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Расход, л/с., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Расход, л/с., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_stop_point_off_bottom",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Остановка над забоем, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Остановка над забоем, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rpm_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Обороты, об/мин., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Обороты, об/мин., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rpm_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Обороты, об/мин., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Обороты, об/мин., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rop_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Скорость, м/ч., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Скорость, м/ч., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rop_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Скорость, м/ч., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Скорость, м/ч., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "reaming3_repetitions_count",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0,
|
||||||
|
comment: "Проработка 3, Количество повторений, шт.",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "integer",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Количество повторений, шт.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_interval",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Интервал проработки, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Интервал проработки, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_flow_rate_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Расход, л/с., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Расход, л/с., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_flow_rate_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 3, Расход, л/с., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 3, Расход, л/с., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_stop_point_off_bottom",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Остановка над забоем, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Остановка над забоем, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rpm_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Обороты, об/мин., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Обороты, об/мин., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rpm_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Обороты, об/мин., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Обороты, об/мин., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rop_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Скорость, м/ч., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Скорость, м/ч., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rop_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Скорость, м/ч., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Скорость, м/ч., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "reaming2_repetitions_count",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0,
|
||||||
|
comment: "Проработка 2, Количество повторений, шт.",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "integer",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Количество повторений, шт.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_interval",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Интервал проработки, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Интервал проработки, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_flow_rate_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Расход, л/с., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Расход, л/с., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_flow_rate_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0,
|
||||||
|
comment: "Проработка 2, Расход, л/с., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "Проработка 2, Расход, л/с., Вниз");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_stop_point_off_bottom",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Остановка над забоем, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Остановка над забоем, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rpm_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Обороты, об/мин., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Обороты, об/мин., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rpm_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Обороты, об/мин., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Обороты, об/мин., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rop_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Скорость, м/ч., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Скорость, м/ч., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rop_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Скорость, м/ч., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Скорость, м/ч., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "reaming3_repetitions_count",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Количество повторений, шт.",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "integer",
|
||||||
|
oldComment: "Проработка 3, Количество повторений, шт.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_interval",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Интервал проработки, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Интервал проработки, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_flow_rate_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Расход, л/с., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Расход, л/с., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_flow_rate_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Расход, л/с., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Расход, л/с., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_stop_point_off_bottom",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Остановка над забоем, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Остановка над забоем, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rpm_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Обороты, об/мин., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Обороты, об/мин., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rpm_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Обороты, об/мин., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Обороты, об/мин., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rop_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Скорость, м/ч., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Скорость, м/ч., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rop_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Скорость, м/ч., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Скорость, м/ч., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "reaming2_repetitions_count",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Количество повторений, шт.",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "integer",
|
||||||
|
oldComment: "Проработка 2, Количество повторений, шт.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_interval",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Интервал проработки, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Интервал проработки, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_flow_rate_up",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Расход, л/с., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Расход, л/с., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_flow_rate_down",
|
||||||
|
table: "t_process_map_plan_reaming_slide",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Расход, л/с., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Расход, л/с., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_stop_point_off_bottom",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Остановка над забоем, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Остановка над забоем, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rpm_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Обороты, об/мин., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Обороты, об/мин., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rpm_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Обороты, об/мин., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Обороты, об/мин., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rop_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Скорость, м/ч., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Скорость, м/ч., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_rop_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Скорость, м/ч., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Скорость, м/ч., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "reaming3_repetitions_count",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Количество повторений, шт.",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "integer",
|
||||||
|
oldComment: "Проработка 3, Количество повторений, шт.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_interval",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Интервал проработки, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Интервал проработки, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_flow_rate_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Расход, л/с., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Расход, л/с., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming3_flow_rate_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 3, Расход, л/с., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 3, Расход, л/с., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_stop_point_off_bottom",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Остановка над забоем, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Остановка над забоем, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rpm_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Обороты, об/мин., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Обороты, об/мин., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rpm_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Обороты, об/мин., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Обороты, об/мин., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rop_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Скорость, м/ч., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Скорость, м/ч., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_rop_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Скорость, м/ч., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Скорость, м/ч., Вниз");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "reaming2_repetitions_count",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Количество повторений, шт.",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "integer",
|
||||||
|
oldComment: "Проработка 2, Количество повторений, шт.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_interval",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Интервал проработки, м.",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Интервал проработки, м.");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_flow_rate_up",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Расход, л/с., Вверх",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Расход, л/с., Вверх");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "reaming2_flow_rate_down",
|
||||||
|
table: "t_process_map_plan_operation_reaming_rotor",
|
||||||
|
type: "double precision",
|
||||||
|
nullable: true,
|
||||||
|
comment: "Проработка 2, Расход, л/с., Вниз",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double precision",
|
||||||
|
oldComment: "Проработка 2, Расход, л/с., Вниз");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12236
AsbCloudDb/Migrations/20240724070443_Update_WellSectionType_Order.Designer.cs
generated
Normal file
12236
AsbCloudDb/Migrations/20240724070443_Update_WellSectionType_Order.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,158 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace AsbCloudDb.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Update_WellSectionType_Order : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 1,
|
||||||
|
column: "order",
|
||||||
|
value: 5f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 5,
|
||||||
|
column: "order",
|
||||||
|
value: 4f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 7,
|
||||||
|
column: "order",
|
||||||
|
value: 5.1f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 11,
|
||||||
|
column: "order",
|
||||||
|
value: 4.1f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 13,
|
||||||
|
column: "order",
|
||||||
|
value: 5.2f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 17,
|
||||||
|
column: "order",
|
||||||
|
value: 4.2f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 19,
|
||||||
|
column: "order",
|
||||||
|
value: 5.3f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 23,
|
||||||
|
column: "order",
|
||||||
|
value: 4.3f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 25,
|
||||||
|
column: "order",
|
||||||
|
value: 5.4f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 29,
|
||||||
|
column: "order",
|
||||||
|
value: 4.4f);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 1,
|
||||||
|
column: "order",
|
||||||
|
value: 4f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 5,
|
||||||
|
column: "order",
|
||||||
|
value: 5f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 7,
|
||||||
|
column: "order",
|
||||||
|
value: 4.1f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 11,
|
||||||
|
column: "order",
|
||||||
|
value: 5.1f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 13,
|
||||||
|
column: "order",
|
||||||
|
value: 4.2f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 17,
|
||||||
|
column: "order",
|
||||||
|
value: 5.2f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 19,
|
||||||
|
column: "order",
|
||||||
|
value: 4.3f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 23,
|
||||||
|
column: "order",
|
||||||
|
value: 5.3f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 25,
|
||||||
|
column: "order",
|
||||||
|
value: 4.4f);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 29,
|
||||||
|
column: "order",
|
||||||
|
value: 5.4f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12236
AsbCloudDb/Migrations/20240729063346_Update_WellSectionType_Caption.Designer.cs
generated
Normal file
12236
AsbCloudDb/Migrations/20240729063346_Update_WellSectionType_Caption.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,116 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace AsbCloudDb.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Update_WellSectionType_Caption : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 1,
|
||||||
|
column: "caption",
|
||||||
|
value: "Пилотный ствол 1");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 2,
|
||||||
|
column: "caption",
|
||||||
|
value: "Направление 1");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 3,
|
||||||
|
column: "caption",
|
||||||
|
value: "Кондуктор 1");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 4,
|
||||||
|
column: "caption",
|
||||||
|
value: "Эксплуатационная колонна 1");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 5,
|
||||||
|
column: "caption",
|
||||||
|
value: "Транспортный ствол 1");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 6,
|
||||||
|
column: "caption",
|
||||||
|
value: "Хвостовик 1");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 31,
|
||||||
|
column: "caption",
|
||||||
|
value: "Техническая колонна 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 1,
|
||||||
|
column: "caption",
|
||||||
|
value: "Пилотный ствол");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 2,
|
||||||
|
column: "caption",
|
||||||
|
value: "Направление");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 3,
|
||||||
|
column: "caption",
|
||||||
|
value: "Кондуктор");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 4,
|
||||||
|
column: "caption",
|
||||||
|
value: "Эксплуатационная колонна");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 5,
|
||||||
|
column: "caption",
|
||||||
|
value: "Транспортный ствол");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 6,
|
||||||
|
column: "caption",
|
||||||
|
value: "Хвостовик");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "t_well_section_type",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 31,
|
||||||
|
column: "caption",
|
||||||
|
value: "Техническая колонна");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using System;
|
using System;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using AsbCloudDb.Model;
|
using AsbCloudDb.Model;
|
||||||
@ -19,7 +19,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.UseCollation("Russian_Russia.1251")
|
.UseCollation("Russian_Russia.1251")
|
||||||
.HasAnnotation("ProductVersion", "8.0.2")
|
.HasAnnotation("ProductVersion", "8.0.4")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "adminpack");
|
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "adminpack");
|
||||||
@ -2785,7 +2785,6 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasComment("Тип секции");
|
.HasComment("Тип секции");
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(1024)
|
.HasMaxLength(1024)
|
||||||
.HasColumnType("character varying(1024)")
|
.HasColumnType("character varying(1024)")
|
||||||
.HasColumnName("note")
|
.HasColumnName("note")
|
||||||
@ -2875,7 +2874,6 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasComment("Тип секции");
|
.HasComment("Тип секции");
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(1024)
|
.HasMaxLength(1024)
|
||||||
.HasColumnType("character varying(1024)")
|
.HasColumnType("character varying(1024)")
|
||||||
.HasColumnName("note")
|
.HasColumnName("note")
|
||||||
@ -2970,7 +2968,6 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasComment("Величина проходки шага, м.");
|
.HasComment("Величина проходки шага, м.");
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(1024)
|
.HasMaxLength(1024)
|
||||||
.HasColumnType("character varying(1024)")
|
.HasColumnType("character varying(1024)")
|
||||||
.HasColumnName("note")
|
.HasColumnName("note")
|
||||||
@ -3080,7 +3077,6 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasComment("Режим Авто/Руч");
|
.HasComment("Режим Авто/Руч");
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(1024)
|
.HasMaxLength(1024)
|
||||||
.HasColumnType("character varying(1024)")
|
.HasColumnType("character varying(1024)")
|
||||||
.HasColumnName("note")
|
.HasColumnName("note")
|
||||||
@ -3200,7 +3196,6 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasComment("Тип секции");
|
.HasComment("Тип секции");
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(1024)
|
.HasMaxLength(1024)
|
||||||
.HasColumnType("character varying(1024)")
|
.HasColumnType("character varying(1024)")
|
||||||
.HasColumnName("note")
|
.HasColumnName("note")
|
||||||
@ -3750,7 +3745,6 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasComment("Тип секции");
|
.HasComment("Тип секции");
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(1024)
|
.HasMaxLength(1024)
|
||||||
.HasColumnType("character varying(1024)")
|
.HasColumnType("character varying(1024)")
|
||||||
.HasColumnName("note")
|
.HasColumnName("note")
|
||||||
@ -3995,7 +3989,6 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasComment("Тип секции");
|
.HasComment("Тип секции");
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(1024)
|
.HasMaxLength(1024)
|
||||||
.HasColumnType("character varying(1024)")
|
.HasColumnType("character varying(1024)")
|
||||||
.HasColumnName("note")
|
.HasColumnName("note")
|
||||||
@ -4026,8 +4019,8 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasColumnName("reaming1_interval")
|
.HasColumnName("reaming1_interval")
|
||||||
.HasComment("Проработка 1, Интервал проработки, м.");
|
.HasComment("Проработка 1, Интервал проработки, м.");
|
||||||
|
|
||||||
b.Property<double>("Reaming1RepetitionsCount")
|
b.Property<int>("Reaming1RepetitionsCount")
|
||||||
.HasColumnType("double precision")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("reaming1_repetitions_count")
|
.HasColumnName("reaming1_repetitions_count")
|
||||||
.HasComment("Проработка 1. Количество повторений, шт.");
|
.HasComment("Проработка 1. Количество повторений, шт.");
|
||||||
|
|
||||||
@ -4071,8 +4064,8 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasColumnName("reaming2_interval")
|
.HasColumnName("reaming2_interval")
|
||||||
.HasComment("Проработка 2, Интервал проработки, м.");
|
.HasComment("Проработка 2, Интервал проработки, м.");
|
||||||
|
|
||||||
b.Property<double>("Reaming2RepetitionsCount")
|
b.Property<int>("Reaming2RepetitionsCount")
|
||||||
.HasColumnType("double precision")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("reaming2_repetitions_count")
|
.HasColumnName("reaming2_repetitions_count")
|
||||||
.HasComment("Проработка 2, Количество повторений, шт.");
|
.HasComment("Проработка 2, Количество повторений, шт.");
|
||||||
|
|
||||||
@ -4116,8 +4109,8 @@ namespace AsbCloudDb.Migrations
|
|||||||
.HasColumnName("reaming3_interval")
|
.HasColumnName("reaming3_interval")
|
||||||
.HasComment("Проработка 3, Интервал проработки, м.");
|
.HasComment("Проработка 3, Интервал проработки, м.");
|
||||||
|
|
||||||
b.Property<double>("Reaming3RepetitionsCount")
|
b.Property<int>("Reaming3RepetitionsCount")
|
||||||
.HasColumnType("double precision")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("reaming3_repetitions_count")
|
.HasColumnName("reaming3_repetitions_count")
|
||||||
.HasComment("Проработка 3, Количество повторений, шт.");
|
.HasComment("Проработка 3, Количество повторений, шт.");
|
||||||
|
|
||||||
@ -9551,44 +9544,44 @@ namespace AsbCloudDb.Migrations
|
|||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 1,
|
Id = 1,
|
||||||
Caption = "Пилотный ствол",
|
Caption = "Пилотный ствол 1",
|
||||||
Order = 4f
|
Order = 5f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 2,
|
Id = 2,
|
||||||
Caption = "Направление",
|
Caption = "Направление 1",
|
||||||
Order = 0f
|
Order = 0f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 3,
|
Id = 3,
|
||||||
Caption = "Кондуктор",
|
Caption = "Кондуктор 1",
|
||||||
Order = 1f
|
Order = 1f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 4,
|
Id = 4,
|
||||||
Caption = "Эксплуатационная колонна",
|
Caption = "Эксплуатационная колонна 1",
|
||||||
Order = 3f
|
Order = 3f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 5,
|
Id = 5,
|
||||||
Caption = "Транспортный ствол",
|
Caption = "Транспортный ствол 1",
|
||||||
Order = 5f
|
Order = 4f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 6,
|
Id = 6,
|
||||||
Caption = "Хвостовик",
|
Caption = "Хвостовик 1",
|
||||||
Order = 6f
|
Order = 6f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 7,
|
Id = 7,
|
||||||
Caption = "Пилотный ствол 2",
|
Caption = "Пилотный ствол 2",
|
||||||
Order = 4.1f
|
Order = 5.1f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@ -9612,7 +9605,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
{
|
{
|
||||||
Id = 11,
|
Id = 11,
|
||||||
Caption = "Транспортный ствол 2",
|
Caption = "Транспортный ствол 2",
|
||||||
Order = 5.1f
|
Order = 4.1f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@ -9624,7 +9617,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
{
|
{
|
||||||
Id = 13,
|
Id = 13,
|
||||||
Caption = "Пилотный ствол 3",
|
Caption = "Пилотный ствол 3",
|
||||||
Order = 4.2f
|
Order = 5.2f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@ -9648,7 +9641,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
{
|
{
|
||||||
Id = 17,
|
Id = 17,
|
||||||
Caption = "Транспортный ствол 3",
|
Caption = "Транспортный ствол 3",
|
||||||
Order = 5.2f
|
Order = 4.2f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@ -9660,7 +9653,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
{
|
{
|
||||||
Id = 19,
|
Id = 19,
|
||||||
Caption = "Пилотный ствол 4",
|
Caption = "Пилотный ствол 4",
|
||||||
Order = 4.3f
|
Order = 5.3f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@ -9684,7 +9677,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
{
|
{
|
||||||
Id = 23,
|
Id = 23,
|
||||||
Caption = "Транспортный ствол 4",
|
Caption = "Транспортный ствол 4",
|
||||||
Order = 5.3f
|
Order = 4.3f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@ -9696,7 +9689,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
{
|
{
|
||||||
Id = 25,
|
Id = 25,
|
||||||
Caption = "Пилотный ствол 5",
|
Caption = "Пилотный ствол 5",
|
||||||
Order = 4.4f
|
Order = 5.4f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@ -9720,7 +9713,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
{
|
{
|
||||||
Id = 29,
|
Id = 29,
|
||||||
Caption = "Транспортный ствол 5",
|
Caption = "Транспортный ствол 5",
|
||||||
Order = 5.4f
|
Order = 4.4f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@ -9731,7 +9724,7 @@ namespace AsbCloudDb.Migrations
|
|||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = 31,
|
Id = 31,
|
||||||
Caption = "Техническая колонна",
|
Caption = "Техническая колонна 1",
|
||||||
Order = 2f
|
Order = 2f
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
|
@ -4,42 +4,42 @@ namespace AsbCloudDb.Model.DefaultData
|
|||||||
{
|
{
|
||||||
public override WellSectionType[] GetData() => new WellSectionType[]
|
public override WellSectionType[] GetData() => new WellSectionType[]
|
||||||
{
|
{
|
||||||
new (){ Id = 1, Caption = "Пилотный ствол", Order = 4},
|
new (){ Id = 1, Caption = "Пилотный ствол 1", Order = 5},
|
||||||
new (){ Id = 2, Caption = "Направление", Order = 0},
|
new (){ Id = 2, Caption = "Направление 1", Order = 0},
|
||||||
new (){ Id = 3, Caption = "Кондуктор", Order = 1},
|
new (){ Id = 3, Caption = "Кондуктор 1", Order = 1},
|
||||||
new (){ Id = 4, Caption = "Эксплуатационная колонна", Order = 3},
|
new (){ Id = 4, Caption = "Эксплуатационная колонна 1", Order = 3},
|
||||||
new (){ Id = 5, Caption = "Транспортный ствол", Order = 5},
|
new (){ Id = 5, Caption = "Транспортный ствол 1", Order = 4},
|
||||||
new (){ Id = 6, Caption = "Хвостовик", Order = 6},
|
new (){ Id = 6, Caption = "Хвостовик 1", Order = 6},
|
||||||
|
|
||||||
new (){ Id = 7, Caption = "Пилотный ствол 2", Order = 4.1f},
|
new (){ Id = 7, Caption = "Пилотный ствол 2", Order = 5.1f},
|
||||||
new (){ Id = 8, Caption = "Направление 2", Order = 0.1f},
|
new (){ Id = 8, Caption = "Направление 2", Order = 0.1f},
|
||||||
new (){ Id = 9, Caption = "Кондуктор 2", Order = 1.1f},
|
new (){ Id = 9, Caption = "Кондуктор 2", Order = 1.1f},
|
||||||
new (){ Id = 10, Caption = "Эксплуатационная колонна 2", Order = 3.1f},
|
new (){ Id = 10, Caption = "Эксплуатационная колонна 2", Order = 3.1f},
|
||||||
new (){ Id = 11, Caption = "Транспортный ствол 2", Order = 5.1f},
|
new (){ Id = 11, Caption = "Транспортный ствол 2", Order = 4.1f},
|
||||||
new (){ Id = 12, Caption = "Хвостовик 2", Order = 6.1f},
|
new (){ Id = 12, Caption = "Хвостовик 2", Order = 6.1f},
|
||||||
|
|
||||||
new (){ Id = 13, Caption = "Пилотный ствол 3", Order = 4.2f},
|
new (){ Id = 13, Caption = "Пилотный ствол 3", Order = 5.2f},
|
||||||
new (){ Id = 14, Caption = "Направление 3", Order = 0.2f},
|
new (){ Id = 14, Caption = "Направление 3", Order = 0.2f},
|
||||||
new (){ Id = 15, Caption = "Кондуктор 3", Order = 1.2f},
|
new (){ Id = 15, Caption = "Кондуктор 3", Order = 1.2f},
|
||||||
new (){ Id = 16, Caption = "Эксплуатационная колонна 3", Order = 3.2f},
|
new (){ Id = 16, Caption = "Эксплуатационная колонна 3", Order = 3.2f},
|
||||||
new (){ Id = 17, Caption = "Транспортный ствол 3", Order = 5.2f},
|
new (){ Id = 17, Caption = "Транспортный ствол 3", Order = 4.2f},
|
||||||
new (){ Id = 18, Caption = "Хвостовик 3", Order = 6.2f},
|
new (){ Id = 18, Caption = "Хвостовик 3", Order = 6.2f},
|
||||||
|
|
||||||
new (){ Id = 19, Caption = "Пилотный ствол 4", Order = 4.3f},
|
new (){ Id = 19, Caption = "Пилотный ствол 4", Order = 5.3f},
|
||||||
new (){ Id = 20, Caption = "Направление 4", Order = 0.3f},
|
new (){ Id = 20, Caption = "Направление 4", Order = 0.3f},
|
||||||
new (){ Id = 21, Caption = "Кондуктор 4", Order = 1.3f},
|
new (){ Id = 21, Caption = "Кондуктор 4", Order = 1.3f},
|
||||||
new (){ Id = 22, Caption = "Эксплуатационная колонна 4", Order = 3.3f},
|
new (){ Id = 22, Caption = "Эксплуатационная колонна 4", Order = 3.3f},
|
||||||
new (){ Id = 23, Caption = "Транспортный ствол 4", Order = 5.3f},
|
new (){ Id = 23, Caption = "Транспортный ствол 4", Order = 4.3f},
|
||||||
new (){ Id = 24, Caption = "Хвостовик 4", Order = 6.3f},
|
new (){ Id = 24, Caption = "Хвостовик 4", Order = 6.3f},
|
||||||
|
|
||||||
new (){ Id = 25, Caption = "Пилотный ствол 5", Order = 4.4f},
|
new (){ Id = 25, Caption = "Пилотный ствол 5", Order = 5.4f},
|
||||||
new (){ Id = 26, Caption = "Направление 5", Order = 0.4f},
|
new (){ Id = 26, Caption = "Направление 5", Order = 0.4f},
|
||||||
new (){ Id = 27, Caption = "Кондуктор 5", Order = 1.4f},
|
new (){ Id = 27, Caption = "Кондуктор 5", Order = 1.4f},
|
||||||
new (){ Id = 28, Caption = "Эксплуатационная колонна 5", Order = 3.4f},
|
new (){ Id = 28, Caption = "Эксплуатационная колонна 5", Order = 3.4f},
|
||||||
new (){ Id = 29, Caption = "Транспортный ствол 5", Order = 5.4f},
|
new (){ Id = 29, Caption = "Транспортный ствол 5", Order = 4.4f},
|
||||||
new (){ Id = 30, Caption = "Хвостовик 5", Order = 6.4f},
|
new (){ Id = 30, Caption = "Хвостовик 5", Order = 6.4f},
|
||||||
|
|
||||||
new (){ Id = 31, Caption = "Техническая колонна", Order = 2},
|
new (){ Id = 31, Caption = "Техническая колонна 1", Order = 2},
|
||||||
new (){ Id = 32, Caption = "Техническая колонна 2", Order = 2.1f},
|
new (){ Id = 32, Caption = "Техническая колонна 2", Order = 2.1f},
|
||||||
new (){ Id = 33, Caption = "Техническая колонна 3", Order = 2.2f},
|
new (){ Id = 33, Caption = "Техническая колонна 3", Order = 2.2f},
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public class ProcessMapPlanAutoHoldTF : ProcessMapPlanBase
|
|||||||
public double ZenithAngle { get; set; }
|
public double ZenithAngle { get; set; }
|
||||||
|
|
||||||
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
|
|
||||||
[ForeignKey(nameof(IdPrevious))]
|
[ForeignKey(nameof(IdPrevious))]
|
||||||
public virtual ProcessMapPlanAutoHoldTF? Previous { get; set; }
|
public virtual ProcessMapPlanAutoHoldTF? Previous { get; set; }
|
||||||
|
@ -14,7 +14,7 @@ public class ProcessMapPlanDamper : ProcessMapPlanBase
|
|||||||
public double StickSlip { get; set; }
|
public double StickSlip { get; set; }
|
||||||
|
|
||||||
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
|
|
||||||
[ForeignKey(nameof(IdPrevious))]
|
[ForeignKey(nameof(IdPrevious))]
|
||||||
public virtual ProcessMapPlanDamper? Previous { get; set; }
|
public virtual ProcessMapPlanDamper? Previous { get; set; }
|
||||||
|
@ -34,7 +34,7 @@ public class ProcessMapPlanDrillTest : ProcessMapPlanBase
|
|||||||
public double LengthStep { get; set; }
|
public double LengthStep { get; set; }
|
||||||
|
|
||||||
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
|
|
||||||
[ForeignKey(nameof(IdPrevious))]
|
[ForeignKey(nameof(IdPrevious))]
|
||||||
public virtual ProcessMapPlanDrillTest? Previous { get; set; }
|
public virtual ProcessMapPlanDrillTest? Previous { get; set; }
|
||||||
|
@ -39,7 +39,7 @@ public class ProcessMapPlanOscillation : ProcessMapPlanBase
|
|||||||
public int Mode { get; set; }
|
public int Mode { get; set; }
|
||||||
|
|
||||||
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
|
|
||||||
[ForeignKey(nameof(IdPrevious))]
|
[ForeignKey(nameof(IdPrevious))]
|
||||||
public virtual ProcessMapPlanOscillation? Previous { get; set; }
|
public virtual ProcessMapPlanOscillation? Previous { get; set; }
|
||||||
|
@ -39,7 +39,7 @@ public class ProcessMapPlanShockTest : ProcessMapPlanBase
|
|||||||
public double RpmMin { get; set; }
|
public double RpmMin { get; set; }
|
||||||
|
|
||||||
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
|
|
||||||
[ForeignKey(nameof(IdPrevious))]
|
[ForeignKey(nameof(IdPrevious))]
|
||||||
public virtual ProcessMapPlanShockTest? Previous { get; set; }
|
public virtual ProcessMapPlanShockTest? Previous { get; set; }
|
||||||
|
@ -80,78 +80,96 @@ public class ProcessMapPlanReamingRotor : ProcessMapPlanBase
|
|||||||
|
|
||||||
[Column("reaming2_repetitions_count"), Comment("Проработка 2, Количество повторений, шт.")]
|
[Column("reaming2_repetitions_count"), Comment("Проработка 2, Количество повторений, шт.")]
|
||||||
[Range(0, 99)]
|
[Range(0, 99)]
|
||||||
|
[Required]
|
||||||
public int Reaming2RepetitionsCount { get; set; }
|
public int Reaming2RepetitionsCount { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_rop_up"), Comment("Проработка 2, Скорость, м/ч., Вверх")]
|
[Column("reaming2_rop_up"), Comment("Проработка 2, Скорость, м/ч., Вверх")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2RopUp { get; set; }
|
public double Reaming2RopUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_rop_down"), Comment("Проработка 2, Скорость, м/ч., Вниз")]
|
[Column("reaming2_rop_down"), Comment("Проработка 2, Скорость, м/ч., Вниз")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2RopDown { get; set; }
|
public double Reaming2RopDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_rpm_up"), Comment("Проработка 2, Обороты, об/мин., Вверх")]
|
[Column("reaming2_rpm_up"), Comment("Проработка 2, Обороты, об/мин., Вверх")]
|
||||||
[Range(0.0, 270.0)]
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2RpmUp { get; set; }
|
public double Reaming2RpmUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_rpm_down"), Comment("Проработка 2, Обороты, об/мин., Вниз")]
|
[Column("reaming2_rpm_down"), Comment("Проработка 2, Обороты, об/мин., Вниз")]
|
||||||
[Range(0.0, 270.0)]
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2RpmDown { get; set; }
|
public double Reaming2RpmDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_flow_rate_up"), Comment("Проработка 2, Расход, л/с., Вверх")]
|
[Column("reaming2_flow_rate_up"), Comment("Проработка 2, Расход, л/с., Вверх")]
|
||||||
[Range(0.0, 100.0)]
|
[Range(0.0, 100.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2FlowRateUp { get; set; }
|
public double Reaming2FlowRateUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_flow_rate_down"), Comment("Проработка 2, Расход, л/с., Вниз")]
|
[Column("reaming2_flow_rate_down"), Comment("Проработка 2, Расход, л/с., Вниз")]
|
||||||
[Range(0.0, 100.0)]
|
[Range(0.0, 100.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2FlowRateDown { get; set; }
|
public double Reaming2FlowRateDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_interval"), Comment("Проработка 2, Интервал проработки, м.")]
|
[Column("reaming2_interval"), Comment("Проработка 2, Интервал проработки, м.")]
|
||||||
[Range(0.0, 30.0)]
|
[Range(0.0, 30.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2Interval { get; set; }
|
public double Reaming2Interval { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_stop_point_off_bottom"), Comment("Остановка над забоем, м.")]
|
[Column("reaming2_stop_point_off_bottom"), Comment("Остановка над забоем, м.")]
|
||||||
[Range(0.0, 10.0)]
|
[Range(0.0, 10.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2StopPointOffBottom { get; set; }
|
public double Reaming2StopPointOffBottom { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_repetitions_count"), Comment("Проработка 3, Количество повторений, шт.")]
|
[Column("reaming3_repetitions_count"), Comment("Проработка 3, Количество повторений, шт.")]
|
||||||
[Range(0, 99)]
|
[Range(0, 99)]
|
||||||
|
[Required]
|
||||||
public int Reaming3RepetitionsCount { get; set; }
|
public int Reaming3RepetitionsCount { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_rop_up"), Comment("Проработка 3, Скорость, м/ч., Вверх")]
|
[Column("reaming3_rop_up"), Comment("Проработка 3, Скорость, м/ч., Вверх")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3RopUp { get; set; }
|
public double Reaming3RopUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_rop_down"), Comment("Проработка 3, Скорость, м/ч., Вниз")]
|
[Column("reaming3_rop_down"), Comment("Проработка 3, Скорость, м/ч., Вниз")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3RopDown { get; set; }
|
public double Reaming3RopDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_rpm_up"), Comment("Проработка 3, Обороты, об/мин., Вверх")]
|
[Column("reaming3_rpm_up"), Comment("Проработка 3, Обороты, об/мин., Вверх")]
|
||||||
[Range(0.0, 270.0)]
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3RpmUp { get; set; }
|
public double Reaming3RpmUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_rpm_down"), Comment("Проработка 3, Обороты, об/мин., Вниз")]
|
[Column("reaming3_rpm_down"), Comment("Проработка 3, Обороты, об/мин., Вниз")]
|
||||||
[Range(0.0, 270.0)]
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3RpmDown { get; set; }
|
public double Reaming3RpmDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_flow_rate_up"), Comment("Проработка 3, Расход, л/с., Вверх")]
|
[Column("reaming3_flow_rate_up"), Comment("Проработка 3, Расход, л/с., Вверх")]
|
||||||
[Range(0.0, 100.0)]
|
[Range(0.0, 100.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3FlowRateUp { get; set; }
|
public double Reaming3FlowRateUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_flow_rate_down"), Comment("Проработка 3, Расход, л/с., Вниз")]
|
[Column("reaming3_flow_rate_down"), Comment("Проработка 3, Расход, л/с., Вниз")]
|
||||||
[Range(0.0, 100.0)]
|
[Range(0.0, 100.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3FlowRateDown { get; set; }
|
public double Reaming3FlowRateDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_interval"), Comment("Проработка 3, Интервал проработки, м.")]
|
[Column("reaming3_interval"), Comment("Проработка 3, Интервал проработки, м.")]
|
||||||
[Range(0.0, 30.0)]
|
[Range(0.0, 30.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3Interval { get; set; }
|
public double Reaming3Interval { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_stop_point_off_bottom"), Comment("Остановка над забоем, м.")]
|
[Column("reaming3_stop_point_off_bottom"), Comment("Остановка над забоем, м.")]
|
||||||
[Range(0.0, 10.0)]
|
[Range(0.0, 10.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3StopPointOffBottom { get; set; }
|
public double Reaming3StopPointOffBottom { get; set; }
|
||||||
|
|
||||||
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
|
|
||||||
[ForeignKey(nameof(IdPrevious))]
|
[ForeignKey(nameof(IdPrevious))]
|
||||||
public virtual ProcessMapPlanReamingRotor? Previous { get; set; }
|
public virtual ProcessMapPlanReamingRotor? Previous { get; set; }
|
||||||
|
@ -36,7 +36,7 @@ public class ProcessMapPlanReamingSlide : ProcessMapPlanBase
|
|||||||
[Column("reaming1_repetitions_count"), Comment("Проработка 1. Количество повторений, шт.")]
|
[Column("reaming1_repetitions_count"), Comment("Проработка 1. Количество повторений, шт.")]
|
||||||
[Range(0.0, 99.0)]
|
[Range(0.0, 99.0)]
|
||||||
[Required]
|
[Required]
|
||||||
public double Reaming1RepetitionsCount { get; set; }
|
public int Reaming1RepetitionsCount { get; set; }
|
||||||
|
|
||||||
[Column("reaming1_rop_up"), Comment("Проработка 1. Скорость вверх, м/ч.")]
|
[Column("reaming1_rop_up"), Comment("Проработка 1. Скорость вверх, м/ч.")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
@ -80,78 +80,96 @@ public class ProcessMapPlanReamingSlide : ProcessMapPlanBase
|
|||||||
|
|
||||||
[Column("reaming2_repetitions_count"), Comment("Проработка 2, Количество повторений, шт.")]
|
[Column("reaming2_repetitions_count"), Comment("Проработка 2, Количество повторений, шт.")]
|
||||||
[Range(0.0, 99.0)]
|
[Range(0.0, 99.0)]
|
||||||
public double Reaming2RepetitionsCount { get; set; }
|
[Required]
|
||||||
|
public int Reaming2RepetitionsCount { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_rop_up"), Comment("Проработка 2, Скорость, м/ч., Вверх")]
|
[Column("reaming2_rop_up"), Comment("Проработка 2, Скорость, м/ч., Вверх")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2RopUp { get; set; }
|
public double Reaming2RopUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_rop_down"), Comment("Проработка 2, Скорость, м/ч., Вниз")]
|
[Column("reaming2_rop_down"), Comment("Проработка 2, Скорость, м/ч., Вниз")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2RopDown { get; set; }
|
public double Reaming2RopDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_rpm_up"), Comment("Проработка 2, Обороты, об/мин., Вверх")]
|
[Column("reaming2_rpm_up"), Comment("Проработка 2, Обороты, об/мин., Вверх")]
|
||||||
[Range(0.0, 270.0)]
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2RpmUp { get; set; }
|
public double Reaming2RpmUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_rpm_down"), Comment("Проработка 2, Обороты, об/мин., Вниз")]
|
[Column("reaming2_rpm_down"), Comment("Проработка 2, Обороты, об/мин., Вниз")]
|
||||||
[Range(0.0, 270.0)]
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2RpmDown { get; set; }
|
public double Reaming2RpmDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_flow_rate_up"), Comment("Проработка 2, Расход, л/с., Вверх")]
|
[Column("reaming2_flow_rate_up"), Comment("Проработка 2, Расход, л/с., Вверх")]
|
||||||
[Range(0.0, 100.0)]
|
[Range(0.0, 100.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2FlowRateUp { get; set; }
|
public double Reaming2FlowRateUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_flow_rate_down"), Comment("Проработка 2, Расход, л/с., Вниз")]
|
[Column("reaming2_flow_rate_down"), Comment("Проработка 2, Расход, л/с., Вниз")]
|
||||||
[Range(0.0, 100.0)]
|
[Range(0.0, 100.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2FlowRateDown { get; set; }
|
public double Reaming2FlowRateDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_interval"), Comment("Проработка 2, Интервал проработки, м.")]
|
[Column("reaming2_interval"), Comment("Проработка 2, Интервал проработки, м.")]
|
||||||
[Range(0.0, 30.0)]
|
[Range(0.0, 30.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2Interval { get; set; }
|
public double Reaming2Interval { get; set; }
|
||||||
|
|
||||||
[Column("reaming2_stop_point_off_bottom"), Comment("Остановка над забоем, м.")]
|
[Column("reaming2_stop_point_off_bottom"), Comment("Остановка над забоем, м.")]
|
||||||
[Range(0.0, 10.0)]
|
[Range(0.0, 10.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming2StopPointOffBottom { get; set; }
|
public double Reaming2StopPointOffBottom { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_repetitions_count"), Comment("Проработка 3, Количество повторений, шт.")]
|
[Column("reaming3_repetitions_count"), Comment("Проработка 3, Количество повторений, шт.")]
|
||||||
[Range(0.0, 99.0)]
|
[Range(0.0, 99.0)]
|
||||||
public double Reaming3RepetitionsCount { get; set; }
|
[Required]
|
||||||
|
public int Reaming3RepetitionsCount { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_rop_up"), Comment("Проработка 3, Скорость, м/ч., Вверх")]
|
[Column("reaming3_rop_up"), Comment("Проработка 3, Скорость, м/ч., Вверх")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3RopUp { get; set; }
|
public double Reaming3RopUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_rop_down"), Comment("Проработка 3, Скорость, м/ч., Вниз")]
|
[Column("reaming3_rop_down"), Comment("Проработка 3, Скорость, м/ч., Вниз")]
|
||||||
[Range(0.0, 999.0)]
|
[Range(0.0, 999.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3RopDown { get; set; }
|
public double Reaming3RopDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_rpm_up"), Comment("Проработка 3, Обороты, об/мин., Вверх")]
|
[Column("reaming3_rpm_up"), Comment("Проработка 3, Обороты, об/мин., Вверх")]
|
||||||
[Range(0.0, 270.0)]
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3RpmUp { get; set; }
|
public double Reaming3RpmUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_rpm_down"), Comment("Проработка 3, Обороты, об/мин., Вниз")]
|
[Column("reaming3_rpm_down"), Comment("Проработка 3, Обороты, об/мин., Вниз")]
|
||||||
[Range(0.0, 270.0)]
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3RpmDown { get; set; }
|
public double Reaming3RpmDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_flow_rate_up"), Comment("Проработка 3, Расход, л/с., Вверх")]
|
[Column("reaming3_flow_rate_up"), Comment("Проработка 3, Расход, л/с., Вверх")]
|
||||||
[Range(0.0, 100.0)]
|
[Range(0.0, 100.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3FlowRateUp { get; set; }
|
public double Reaming3FlowRateUp { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_flow_rate_down"), Comment("Проработка 3, Расход, л/с., Вниз")]
|
[Column("reaming3_flow_rate_down"), Comment("Проработка 3, Расход, л/с., Вниз")]
|
||||||
[Range(0.0, 100.0)]
|
[Range(0.0, 100.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3FlowRateDown { get; set; }
|
public double Reaming3FlowRateDown { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_interval"), Comment("Проработка 3, Интервал проработки, м.")]
|
[Column("reaming3_interval"), Comment("Проработка 3, Интервал проработки, м.")]
|
||||||
[Range(0.0, 30.0)]
|
[Range(0.0, 30.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3Interval { get; set; }
|
public double Reaming3Interval { get; set; }
|
||||||
|
|
||||||
[Column("reaming3_stop_point_off_bottom"), Comment("Остановка над забоем, м.")]
|
[Column("reaming3_stop_point_off_bottom"), Comment("Остановка над забоем, м.")]
|
||||||
[Range(0.0, 10.0)]
|
[Range(0.0, 10.0)]
|
||||||
|
[Required]
|
||||||
public double Reaming3StopPointOffBottom { get; set; }
|
public double Reaming3StopPointOffBottom { get; set; }
|
||||||
|
|
||||||
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
||||||
public string Note { get; set; } = string.Empty;
|
public string? Note { get; set; }
|
||||||
|
|
||||||
[ForeignKey(nameof(IdPrevious))]
|
[ForeignKey(nameof(IdPrevious))]
|
||||||
public virtual ProcessMapPlanReamingSlide? Previous { get; set; }
|
public virtual ProcessMapPlanReamingSlide? Previous { get; set; }
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
<NoWarn>1701;1702;IDE0090;IDE0063;IDE0066;IDE0054</NoWarn>
|
<NoWarn>1701;1702;IDE0090;IDE0063;IDE0066;IDE0054</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Services\ProcessMapPlan\Templates\ProcessMapPlanReamingSlide.xlsx" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="CommonLibs\logo_720x404.png">
|
<Content Include="CommonLibs\logo_720x404.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
@ -34,8 +38,6 @@
|
|||||||
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanReamingSlide.xlsx" />
|
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanReamingSlide.xlsx" />
|
||||||
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanRecordingStaticMeasurement.xlsx" />
|
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanRecordingStaticMeasurement.xlsx" />
|
||||||
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanRotor.xlsx" />
|
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanRotor.xlsx" />
|
||||||
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanRotorLoweringBit.xlsx" />
|
|
||||||
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanRotorRpmAcceleration.xlsx" />
|
|
||||||
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanShockTest.xlsx" />
|
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanShockTest.xlsx" />
|
||||||
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanSlide.xlsx" />
|
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanSlide.xlsx" />
|
||||||
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanStaticMeasurementOutput.xlsx" />
|
<EmbeddedResource Include="Services\ProcessMapPlan\Templates\ProcessMapPlanStaticMeasurementOutput.xlsx" />
|
||||||
|
@ -493,6 +493,8 @@ namespace AsbCloudInfrastructure
|
|||||||
|
|
||||||
services.AddTransient<IWellboreService, WellboreService>();
|
services.AddTransient<IWellboreService, WellboreService>();
|
||||||
|
|
||||||
|
services.AddTransient<ITelemetryDataEditorService, TelemetryDataEditorService>();
|
||||||
|
|
||||||
services.AddTransient<DetectedOperationExportService>();
|
services.AddTransient<DetectedOperationExportService>();
|
||||||
|
|
||||||
services.AddTransient<IDailyReportService, DailyReportService>();
|
services.AddTransient<IDailyReportService, DailyReportService>();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
using AsbCloudApp.Repositories;
|
using AsbCloudApp.Repositories;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using AsbCloudDb.Model;
|
using AsbCloudDb.Model;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
@ -81,5 +82,32 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IQueryable<DataSaubStat> BuildQuery(TelemetryPartDeleteRequest request)
|
||||||
|
{
|
||||||
|
var query = db.Set<DataSaubStat>()
|
||||||
|
.Where(o => o.IdTelemetry == request.IdTelemetry);
|
||||||
|
|
||||||
|
if (request.LeDate is not null)
|
||||||
|
{
|
||||||
|
var leDate = request.LeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateStart <= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.GeDate is not null)
|
||||||
|
{
|
||||||
|
var geDate = request.GeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateEnd >= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var query = BuildQuery(request);
|
||||||
|
db.Set<DataSaubStat>().RemoveRange(query);
|
||||||
|
return await db.SaveChangesAsync(token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,8 @@ using AsbCloudApp.Data;
|
|||||||
|
|
||||||
namespace AsbCloudInfrastructure.Repository;
|
namespace AsbCloudInfrastructure.Repository;
|
||||||
|
|
||||||
public class DetectedOperationRepository : CrudRepositoryBase<DetectedOperationDto, DetectedOperation>, IDetectedOperationRepository
|
public class DetectedOperationRepository
|
||||||
|
: CrudRepositoryBase<DetectedOperationDto, DetectedOperation>, IDetectedOperationRepository
|
||||||
{
|
{
|
||||||
private readonly ITelemetryService telemetryService;
|
private readonly ITelemetryService telemetryService;
|
||||||
|
|
||||||
@ -26,6 +27,23 @@ public class DetectedOperationRepository : CrudRepositoryBase<DetectedOperationD
|
|||||||
this.telemetryService = telemetryService;
|
this.telemetryService = telemetryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IDictionary<int, DetectedOperationDto>> GetLastDetectedOperationsAsync(CancellationToken token)
|
||||||
|
{
|
||||||
|
var entities = await dbContext.Set<DetectedOperation>()
|
||||||
|
.GroupBy(o => o.IdTelemetry)
|
||||||
|
.Select(g => new
|
||||||
|
{
|
||||||
|
IdTelemetry = g.Key,
|
||||||
|
LastDetectedOperation = g.OrderBy(o => o.DateEnd).Last()
|
||||||
|
})
|
||||||
|
.ToArrayAsync(token);
|
||||||
|
|
||||||
|
var dtos = entities.ToDictionary(x => x.IdTelemetry,
|
||||||
|
x => Convert(x.LastDetectedOperation));
|
||||||
|
|
||||||
|
return dtos;
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<int> DeleteAsync(DetectedOperationByTelemetryRequest request, CancellationToken token)
|
public async Task<int> DeleteAsync(DetectedOperationByTelemetryRequest request, CancellationToken token)
|
||||||
{
|
{
|
||||||
var query = BuildQuery(request);
|
var query = BuildQuery(request);
|
||||||
@ -33,6 +51,13 @@ public class DetectedOperationRepository : CrudRepositoryBase<DetectedOperationD
|
|||||||
return await dbContext.SaveChangesAsync(token);
|
return await dbContext.SaveChangesAsync(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var query = BuildQuery(request);
|
||||||
|
dbContext.Set<DetectedOperation>().RemoveRange(query);
|
||||||
|
return await dbContext.SaveChangesAsync(token);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<PaginationContainer<DetectedOperationDto>> GetPageAsync(DetectedOperationByTelemetryRequest request, CancellationToken token)
|
public async Task<PaginationContainer<DetectedOperationDto>> GetPageAsync(DetectedOperationByTelemetryRequest request, CancellationToken token)
|
||||||
{
|
{
|
||||||
var skip = request.Skip ?? 0;
|
var skip = request.Skip ?? 0;
|
||||||
@ -58,16 +83,6 @@ public class DetectedOperationRepository : CrudRepositoryBase<DetectedOperationD
|
|||||||
return paginationContainer;
|
return paginationContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IDictionary<int, DateTimeOffset>> GetLastDetectedDatesAsync(CancellationToken token) =>
|
|
||||||
await dbContext.Set<DetectedOperation>()
|
|
||||||
.GroupBy(o => o.IdTelemetry)
|
|
||||||
.Select(g => new
|
|
||||||
{
|
|
||||||
IdTelemetry = g.Key,
|
|
||||||
LastDate = g.Max(o => o.DateEnd)
|
|
||||||
})
|
|
||||||
.ToDictionaryAsync(x => x.IdTelemetry, x => x.LastDate, token);
|
|
||||||
|
|
||||||
public async Task<IEnumerable<DetectedOperationDto>> Get(DetectedOperationByTelemetryRequest request, CancellationToken token)
|
public async Task<IEnumerable<DetectedOperationDto>> Get(DetectedOperationByTelemetryRequest request, CancellationToken token)
|
||||||
{
|
{
|
||||||
var query = BuildQuery(request)
|
var query = BuildQuery(request)
|
||||||
@ -113,6 +128,26 @@ public class DetectedOperationRepository : CrudRepositoryBase<DetectedOperationD
|
|||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IQueryable<DetectedOperation> BuildQuery(TelemetryPartDeleteRequest request)
|
||||||
|
{
|
||||||
|
var query = dbContext.Set<DetectedOperation>()
|
||||||
|
.Where(o => o.IdTelemetry == request.IdTelemetry);
|
||||||
|
|
||||||
|
if (request.LeDate is not null)
|
||||||
|
{
|
||||||
|
var leDate = request.LeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateStart <= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.GeDate is not null)
|
||||||
|
{
|
||||||
|
var geDate = request.GeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateEnd >= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
private static DetectedOperationDto Convert(DetectedOperation src, TimeSpan offset)
|
private static DetectedOperationDto Convert(DetectedOperation src, TimeSpan offset)
|
||||||
{
|
{
|
||||||
var dto = src.Adapt<DetectedOperationDto>();
|
var dto = src.Adapt<DetectedOperationDto>();
|
||||||
|
@ -84,5 +84,33 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
dto.TimeStampStart = dto.TimeStampStart.ToRemoteDateTime(dto.Telemetry?.TimeZone?.Hours ?? 0);
|
dto.TimeStampStart = dto.TimeStampStart.ToRemoteDateTime(dto.Telemetry?.TimeZone?.Hours ?? 0);
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: Унифицировать модели данных телеметрии.Чтобы в будущем унифицировать репозитории данных телеметрии.
|
||||||
|
private IQueryable<DrillTest> BuildQuery(TelemetryPartDeleteRequest request)
|
||||||
|
{
|
||||||
|
var query = db.Set<DrillTest>()
|
||||||
|
.Where(o => o.IdTelemetry == request.IdTelemetry);
|
||||||
|
|
||||||
|
if (request.LeDate is not null)
|
||||||
|
{
|
||||||
|
var leDate = request.LeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.TimeStampStart <= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.GeDate is not null)
|
||||||
|
{
|
||||||
|
var geDate = request.GeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.TimeStampStart >= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var query = BuildQuery(request);
|
||||||
|
db.Set<DrillTest>().RemoveRange(query);
|
||||||
|
return await db.SaveChangesAsync(token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
|
using AsbCloudApp.Data;
|
||||||
using AsbCloudApp.Data.GTR;
|
using AsbCloudApp.Data.GTR;
|
||||||
|
using AsbCloudApp.Exceptions;
|
||||||
using AsbCloudApp.Repositories;
|
using AsbCloudApp.Repositories;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using AsbCloudDb;
|
using AsbCloudDb;
|
||||||
using AsbCloudDb.Model;
|
using AsbCloudDb.Model;
|
||||||
using AsbCloudDb.Model.GTR;
|
using AsbCloudDb.Model.GTR;
|
||||||
|
using Mapster;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
@ -12,11 +16,6 @@ using System.Diagnostics;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AsbCloudApp.Exceptions;
|
|
||||||
using AsbCloudApp.Requests;
|
|
||||||
using Mapster;
|
|
||||||
using AsbCloudApp.Data;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Repository
|
namespace AsbCloudInfrastructure.Repository
|
||||||
{
|
{
|
||||||
@ -369,7 +368,8 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
|
|
||||||
cache.AddOrUpdate(idTelemetry,
|
cache.AddOrUpdate(idTelemetry,
|
||||||
(_) => MakeNewCache(dtos),
|
(_) => MakeNewCache(dtos),
|
||||||
(_, oldItemsDictionary) => {
|
(_, oldItemsDictionary) =>
|
||||||
|
{
|
||||||
foreach (var record in dtos)
|
foreach (var record in dtos)
|
||||||
foreach (var item in record.Items)
|
foreach (var item in record.Items)
|
||||||
{
|
{
|
||||||
@ -398,7 +398,8 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
{
|
{
|
||||||
var items = dtos.SelectMany(record =>
|
var items = dtos.SelectMany(record =>
|
||||||
record.Items.Select(
|
record.Items.Select(
|
||||||
item => new WitsItemRecordDto {
|
item => new WitsItemRecordDto
|
||||||
|
{
|
||||||
IdItem = item.Key,
|
IdItem = item.Key,
|
||||||
IdRecord = record.Id,
|
IdRecord = record.Id,
|
||||||
Date = record.Date,
|
Date = record.Date,
|
||||||
@ -439,6 +440,47 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
Value = (TValue)dto.Value.Value,
|
Value = (TValue)dto.Value.Value,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private IQueryable<TEntity> BuildQuery<TEntity, TValue>(TelemetryPartDeleteRequest request)
|
||||||
|
where TEntity : WitsItemBase<TValue>
|
||||||
|
where TValue : notnull
|
||||||
|
{
|
||||||
|
var query = db.Set<TEntity>().Where(i => i.IdTelemetry == request.IdTelemetry);
|
||||||
|
|
||||||
|
if (request.LeDate is not null)
|
||||||
|
{
|
||||||
|
var leDate = request.LeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateTime <= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.GeDate is not null)
|
||||||
|
{
|
||||||
|
var geDate = request.GeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateTime >= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var result = 0;
|
||||||
|
result += await DeleteAsync<WitsItemFloat, float>(request, token);
|
||||||
|
result += await DeleteAsync<WitsItemInt, int>(request, token);
|
||||||
|
result += await DeleteAsync<WitsItemString, string>(request, token);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<int> DeleteAsync<TEntity, TType>(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
where TEntity : WitsItemBase<TType>
|
||||||
|
where TType : notnull
|
||||||
|
{
|
||||||
|
var query = BuildQuery<TEntity, TType>(request);
|
||||||
|
db.Set<TEntity>().RemoveRange(query);
|
||||||
|
return await db.SaveChangesAsync(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private class WitsRequest
|
private class WitsRequest
|
||||||
{
|
{
|
||||||
public int IdTelemetry { get; set; }
|
public int IdTelemetry { get; set; }
|
||||||
|
@ -21,6 +21,13 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var query = BuildQuery(request);
|
||||||
|
context.Set<LimitingParameter>().RemoveRange(query);
|
||||||
|
return await context.SaveChangesAsync(token);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<LimitingParameterDataDto>> GetLimitingParametersAsync(LimitingParameterRequest request, WellDto wellDto, CancellationToken token)
|
public async Task<IEnumerable<LimitingParameterDataDto>> GetLimitingParametersAsync(LimitingParameterRequest request, WellDto wellDto, CancellationToken token)
|
||||||
{
|
{
|
||||||
var timezoneOffset = wellDto.Timezone.Hours;
|
var timezoneOffset = wellDto.Timezone.Hours;
|
||||||
@ -74,6 +81,26 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IQueryable<LimitingParameter> BuildQuery(TelemetryPartDeleteRequest request)
|
||||||
|
{
|
||||||
|
var query = context.Set<LimitingParameter>()
|
||||||
|
.Where(o => o.IdTelemetry == request.IdTelemetry);
|
||||||
|
|
||||||
|
if (request.LeDate is not null)
|
||||||
|
{
|
||||||
|
var leDate = request.LeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateStart <= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.GeDate is not null)
|
||||||
|
{
|
||||||
|
var geDate = request.GeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateEnd >= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using AsbCloudDb.Model;
|
using AsbCloudDb.Model;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
@ -58,6 +59,33 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
return data.Select(d => Convert(d, timezoneHours));
|
return data.Select(d => Convert(d, timezoneHours));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IQueryable<TEntity> BuildQuery(TelemetryPartDeleteRequest request)
|
||||||
|
{
|
||||||
|
var query = db.Set<TEntity>()
|
||||||
|
.Where(o => o.IdTelemetry == request.IdTelemetry);
|
||||||
|
|
||||||
|
if (request.LeDate is not null)
|
||||||
|
{
|
||||||
|
var leDate = request.LeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateTime <= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.GeDate is not null)
|
||||||
|
{
|
||||||
|
var geDate = request.GeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateTime >= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var query = BuildQuery(request);
|
||||||
|
dbset.RemoveRange(query);
|
||||||
|
return await db.SaveChangesAsync(token);
|
||||||
|
}
|
||||||
|
|
||||||
public TDto? GetLastOrDefault(int idTelemetry)
|
public TDto? GetLastOrDefault(int idTelemetry)
|
||||||
=> cache.GetValueOrDefault(idTelemetry);
|
=> cache.GetValueOrDefault(idTelemetry);
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using AsbCloudDb.Model;
|
using AsbCloudDb.Model;
|
||||||
using ClosedXML.Excel;
|
using ClosedXML.Excel;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -14,6 +13,7 @@ using AsbCloudApp.Exceptions;
|
|||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
using AsbCloudApp.Data.WellOperation;
|
using AsbCloudApp.Data.WellOperation;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudInfrastructure.Services.DetectOperations.Detectors;
|
using AsbCloudInfrastructure.Services.DetectOperations.Detectors;
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Services.DetectOperations;
|
namespace AsbCloudInfrastructure.Services.DetectOperations;
|
||||||
@ -22,7 +22,7 @@ public class DetectedOperationExportService
|
|||||||
{
|
{
|
||||||
private readonly IWellService wellService;
|
private readonly IWellService wellService;
|
||||||
private readonly IWellOperationCategoryRepository wellOperationCategoryRepository;
|
private readonly IWellOperationCategoryRepository wellOperationCategoryRepository;
|
||||||
private readonly IDetectedOperationService detectedOperationService;
|
private readonly IDetectedOperationRepository detectedOperationRepository;
|
||||||
private const int headerRowsCount = 1;
|
private const int headerRowsCount = 1;
|
||||||
|
|
||||||
private const string cellDepositName = "B1";
|
private const string cellDepositName = "B1";
|
||||||
@ -43,11 +43,11 @@ public class DetectedOperationExportService
|
|||||||
|
|
||||||
public DetectedOperationExportService(IWellService wellService,
|
public DetectedOperationExportService(IWellService wellService,
|
||||||
IWellOperationCategoryRepository wellOperationCategoryRepository,
|
IWellOperationCategoryRepository wellOperationCategoryRepository,
|
||||||
IDetectedOperationService detectedOperationService)
|
IDetectedOperationRepository detectedOperationRepository)
|
||||||
{
|
{
|
||||||
this.wellService = wellService;
|
this.wellService = wellService;
|
||||||
this.wellOperationCategoryRepository = wellOperationCategoryRepository;
|
this.wellOperationCategoryRepository = wellOperationCategoryRepository;
|
||||||
this.detectedOperationService = detectedOperationService;
|
this.detectedOperationRepository = detectedOperationRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -68,12 +68,19 @@ public class DetectedOperationExportService
|
|||||||
if (!well.IdTelemetry.HasValue)
|
if (!well.IdTelemetry.HasValue)
|
||||||
throw new ArgumentInvalidException(nameof(idWell), $"Well {idWell} has no telemetry");
|
throw new ArgumentInvalidException(nameof(idWell), $"Well {idWell} has no telemetry");
|
||||||
|
|
||||||
var operations = await detectedOperationService.DetectOperationsAsync(well.IdTelemetry.Value, DateTime.UnixEpoch, token);
|
var request = new DetectedOperationByTelemetryRequest
|
||||||
|
{
|
||||||
|
IdTelemetry = well.IdTelemetry.Value
|
||||||
|
};
|
||||||
|
|
||||||
|
var operations = await detectedOperationRepository.Get(request, token);
|
||||||
|
|
||||||
return await GenerateExcelFileStreamAsync(well, host, operations, token);
|
return await GenerateExcelFileStreamAsync(well, host, operations, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<Stream> GenerateExcelFileStreamAsync(WellDto well, string host, IEnumerable<DetectedOperationDto> operationDetectorResults,
|
private async Task<Stream> GenerateExcelFileStreamAsync(WellDto well,
|
||||||
|
string host,
|
||||||
|
IEnumerable<DetectedOperationDto> operationDetectorResults,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
using var excelTemplateStream = await GetExcelTemplateStreamAsync(cancellationToken);
|
using var excelTemplateStream = await GetExcelTemplateStreamAsync(cancellationToken);
|
||||||
@ -174,7 +181,8 @@ public class DetectedOperationExportService
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static string GetIdReasonOfEnd(int idReasonOfEnd)
|
private static string GetIdReasonOfEnd(int idReasonOfEnd)
|
||||||
=> idReasonOfEnd switch {
|
=> idReasonOfEnd switch
|
||||||
|
{
|
||||||
0 => "Не определена",
|
0 => "Не определена",
|
||||||
1 => "Не определено начало операции",
|
1 => "Не определено начало операции",
|
||||||
101 => "Разница глубин забоя и положением долота",
|
101 => "Разница глубин забоя и положением долота",
|
||||||
@ -182,7 +190,6 @@ public class DetectedOperationExportService
|
|||||||
301 => "Высокое давление",
|
301 => "Высокое давление",
|
||||||
700 => "Изменение глубины долота и осевая нагрузка < веса на крюке",
|
700 => "Изменение глубины долота и осевая нагрузка < веса на крюке",
|
||||||
_ => idReasonOfEnd.ToString($"Причина № {idReasonOfEnd}"),
|
_ => idReasonOfEnd.ToString($"Причина № {idReasonOfEnd}"),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private async Task<Stream> GetExcelTemplateStreamAsync(CancellationToken cancellationToken)
|
private async Task<Stream> GetExcelTemplateStreamAsync(CancellationToken cancellationToken)
|
||||||
@ -211,7 +218,8 @@ public class DetectedOperationExportService
|
|||||||
if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyAvgRotorSpeed, out object? oAvgRotorSpeed))
|
if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyAvgRotorSpeed, out object? oAvgRotorSpeed))
|
||||||
comment += $"Средняя скорость оборотов ротора: {oAvgRotorSpeed}\r\n";
|
comment += $"Средняя скорость оборотов ротора: {oAvgRotorSpeed}\r\n";
|
||||||
|
|
||||||
if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyDispersionOfNormalizedRotorSpeed, out object? oDispersionOfNormalizedRotorSpeed))
|
if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyDispersionOfNormalizedRotorSpeed,
|
||||||
|
out object? oDispersionOfNormalizedRotorSpeed))
|
||||||
comment += $"Дисперсия нормированных оборотов ротора: {oDispersionOfNormalizedRotorSpeed}";
|
comment += $"Дисперсия нормированных оборотов ротора: {oDispersionOfNormalizedRotorSpeed}";
|
||||||
|
|
||||||
return comment;
|
return comment;
|
||||||
|
@ -110,7 +110,7 @@ public class DetectedOperationService : IDetectedOperationService
|
|||||||
private async Task<int> GetIdTelemetryByWell(int idWell, CancellationToken token)
|
private async Task<int> GetIdTelemetryByWell(int idWell, CancellationToken token)
|
||||||
{
|
{
|
||||||
var well = await wellService.GetOrDefaultAsync(idWell, token) ??
|
var well = await wellService.GetOrDefaultAsync(idWell, token) ??
|
||||||
throw new ArgumentInvalidException(nameof(idWell), "Well doesn`t exist");
|
throw new ArgumentInvalidException(nameof(idWell), "Well doesn't exist");
|
||||||
|
|
||||||
var idTelemetry = well.IdTelemetry ??
|
var idTelemetry = well.IdTelemetry ??
|
||||||
throw new ArgumentInvalidException(nameof(idWell), "У скважины отсутствует телеметрия");
|
throw new ArgumentInvalidException(nameof(idWell), "У скважины отсутствует телеметрия");
|
||||||
@ -177,32 +177,31 @@ public class DetectedOperationService : IDetectedOperationService
|
|||||||
return dtos;
|
return dtos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<DetectedOperationDto>> DetectOperationsAsync(int idTelemetry, DateTimeOffset? beginDate, CancellationToken token)
|
public async Task<(DateTimeOffset LastDate, IEnumerable<DetectedOperationDto> Items)> DetectOperationsAsync(int idTelemetry,
|
||||||
|
TelemetryDataRequest request,
|
||||||
|
DetectedOperationDto? lastDetectedOperation,
|
||||||
|
CancellationToken token)
|
||||||
{
|
{
|
||||||
const int take = 4 * 86_400;
|
|
||||||
|
|
||||||
var detectedOperations = new List<DetectedOperationDto>();
|
|
||||||
DetectedOperationDto? lastDetectedOperation = null;
|
|
||||||
const int minOperationLength = 5;
|
const int minOperationLength = 5;
|
||||||
const int maxDetectorsInterpolationFrameLength = 30;
|
const int maxDetectorsInterpolationFrameLength = 30;
|
||||||
const int gap = maxDetectorsInterpolationFrameLength + minOperationLength;
|
const int gap = maxDetectorsInterpolationFrameLength + minOperationLength;
|
||||||
var timezone = telemetryService.GetTimezone(idTelemetry);
|
|
||||||
|
|
||||||
while (true)
|
var telemetries = await telemetryDataSaubService.GetByTelemetryAsync(idTelemetry, request, token);
|
||||||
{
|
|
||||||
var request = new TelemetryDataRequest
|
|
||||||
{
|
|
||||||
GeDate = beginDate,
|
|
||||||
Take = take,
|
|
||||||
Order = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
var dtos = await telemetryDataSaubService.GetByTelemetryAsync(idTelemetry, request, token);
|
var count = telemetries.Count();
|
||||||
var detectableTelemetries = dtos
|
|
||||||
|
if (count == 0)
|
||||||
|
throw new InvalidOperationException("InvalidOperation_EmptyTelemetries");
|
||||||
|
|
||||||
|
var timeZone = telemetryService.GetTimezone(idTelemetry);
|
||||||
|
|
||||||
|
var detectedOperations = new List<DetectedOperationDto>();
|
||||||
|
|
||||||
|
var detectableTelemetries = telemetries
|
||||||
.Where(t => t.BlockPosition >= 0)
|
.Where(t => t.BlockPosition >= 0)
|
||||||
.Select(t => new DetectableTelemetry
|
.Select(t => new DetectableTelemetry
|
||||||
{
|
{
|
||||||
DateTime = new DateTimeOffset(t.DateTime, timezone.Offset),
|
DateTime = new DateTimeOffset(t.DateTime, timeZone.Offset),
|
||||||
IdUser = t.IdUser,
|
IdUser = t.IdUser,
|
||||||
Mode = t.Mode,
|
Mode = t.Mode,
|
||||||
WellDepth = t.WellDepth,
|
WellDepth = t.WellDepth,
|
||||||
@ -215,34 +214,36 @@ public class DetectedOperationService : IDetectedOperationService
|
|||||||
}).ToArray();
|
}).ToArray();
|
||||||
|
|
||||||
if (detectableTelemetries.Length <= gap)
|
if (detectableTelemetries.Length <= gap)
|
||||||
break;
|
{
|
||||||
|
var lastTelemetry = telemetries.Last();
|
||||||
|
var lastDateTelemetry = new DateTimeOffset(lastTelemetry.DateTime, timeZone.Offset);
|
||||||
|
return (lastDateTelemetry, Enumerable.Empty<DetectedOperationDto>());
|
||||||
|
}
|
||||||
|
|
||||||
var isDetected = false;
|
|
||||||
var positionBegin = 0;
|
var positionBegin = 0;
|
||||||
var positionEnd = detectableTelemetries.Length - gap;
|
var positionEnd = detectableTelemetries.Length - gap;
|
||||||
|
|
||||||
while (positionEnd > positionBegin)
|
while (positionEnd > positionBegin)
|
||||||
{
|
{
|
||||||
foreach (var detector in detectors)
|
foreach (var detector in detectors)
|
||||||
{
|
{
|
||||||
if (!detector.TryDetect(idTelemetry, detectableTelemetries, positionBegin, positionEnd, lastDetectedOperation, out var result))
|
if (!detector.TryDetect(idTelemetry, detectableTelemetries, positionBegin, positionEnd, lastDetectedOperation,
|
||||||
|
out var result))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
detectedOperations.Add(result!.Operation);
|
detectedOperations.Add(result!.Operation);
|
||||||
lastDetectedOperation = result.Operation;
|
lastDetectedOperation = result.Operation;
|
||||||
isDetected = true;
|
|
||||||
positionBegin = result.TelemetryEnd;
|
positionBegin = result.TelemetryEnd;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
positionBegin += 1;
|
var point0 = detectableTelemetries[positionBegin];
|
||||||
|
|
||||||
|
while (positionBegin < positionEnd && IsChangingTelemetryInterval(point0, detectableTelemetries[positionBegin]))
|
||||||
|
positionBegin++;
|
||||||
}
|
}
|
||||||
|
|
||||||
beginDate = isDetected
|
return (detectableTelemetries[positionBegin].DateTime, detectedOperations);
|
||||||
? lastDetectedOperation!.DateEnd
|
|
||||||
: detectableTelemetries[positionEnd].DateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
return detectedOperations;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> DeleteAsync(DetectedOperationByWellRequest request, CancellationToken token)
|
public async Task<int> DeleteAsync(DetectedOperationByWellRequest request, CancellationToken token)
|
||||||
@ -256,6 +257,23 @@ public class DetectedOperationService : IDetectedOperationService
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool IsChangingTelemetryInterval(DetectableTelemetry telemetryBegin, DetectableTelemetry telemetryEnd)
|
||||||
|
{
|
||||||
|
return telemetryBegin.Mode == telemetryEnd.Mode &&
|
||||||
|
EqualParameter(telemetryBegin.WellDepth, telemetryEnd.WellDepth, 0.01f) &&
|
||||||
|
EqualParameter(telemetryBegin.Pressure, telemetryEnd.Pressure, 0.1f) &&
|
||||||
|
EqualParameter(telemetryBegin.HookWeight, telemetryEnd.HookWeight, 0.1f) &&
|
||||||
|
EqualParameter(telemetryBegin.BlockPosition, telemetryEnd.BlockPosition, 0.01f) &&
|
||||||
|
EqualParameter(telemetryBegin.BitDepth, telemetryEnd.BitDepth, 0.01f) &&
|
||||||
|
EqualParameter(telemetryBegin.RotorSpeed, telemetryEnd.RotorSpeed, 0.01f) &&
|
||||||
|
EqualParameter(telemetryBegin.AxialLoad, telemetryEnd.AxialLoad, 0.1f);
|
||||||
|
|
||||||
|
static bool EqualParameter(float value, float origin, float tolerance)
|
||||||
|
{
|
||||||
|
return value <= origin + tolerance && value >= origin - tolerance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static IEnumerable<DetectedOperationDrillersStatDto> GetOperationsDrillersStat(IEnumerable<DetectedOperationWithDrillerDto> operations)
|
private static IEnumerable<DetectedOperationDrillersStatDto> GetOperationsDrillersStat(IEnumerable<DetectedOperationWithDrillerDto> operations)
|
||||||
{
|
{
|
||||||
var groups = operations.GroupBy(o => o.Driller);
|
var groups = operations.GroupBy(o => o.Driller);
|
||||||
@ -305,7 +323,6 @@ public class DetectedOperationService : IDetectedOperationService
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static DetectedOperationWithDrillerDto Convert(DetectedOperationDto operation, IEnumerable<OperationValueDto> operationValues, IEnumerable<ScheduleDto> schedules)
|
private static DetectedOperationWithDrillerDto Convert(DetectedOperationDto operation, IEnumerable<OperationValueDto> operationValues, IEnumerable<ScheduleDto> schedules)
|
||||||
{
|
{
|
||||||
var dto = operation.Adapt<DetectedOperationWithDrillerDto>();
|
var dto = operation.Adapt<DetectedOperationWithDrillerDto>();
|
||||||
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using AsbCloudApp.Data.DetectedOperation;
|
using AsbCloudApp.Data.DetectedOperation;
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors;
|
||||||
{
|
|
||||||
public abstract class DetectorAbstract
|
public abstract class DetectorAbstract
|
||||||
{
|
{
|
||||||
protected const int IdReasonOfEnd_NotDetected = 0;
|
protected const int IdReasonOfEnd_NotDetected = 0;
|
||||||
@ -30,11 +30,11 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
|||||||
|
|
||||||
protected const int IdReasonOfEnd_Drilling = 600;
|
protected const int IdReasonOfEnd_Drilling = 600;
|
||||||
|
|
||||||
protected const int IdReasonOfEnd_ChangeBithDepthAndAxiloadLessHookWeight = 700;
|
protected const int IdReasonOfEnd_ChangeBitDepthAndAxiLoadLessHookWeight = 700;
|
||||||
|
|
||||||
protected const int IdReasonOfEnd_DeltaWellDepthAndBithDepthIsLo = 800;
|
protected const int IdReasonOfEnd_DeltaWellDepthAndBitDepthIsLo = 800;
|
||||||
|
|
||||||
protected const int IdReasonOfEnd_BithDepthIsLo = 900;
|
protected const int IdReasonOfEnd_BitDepthIsLo = 900;
|
||||||
|
|
||||||
public bool TryDetect(int idTelemetry, DetectableTelemetry[] telemetry, int begin, int end, DetectedOperationDto? previousOperation,
|
public bool TryDetect(int idTelemetry, DetectableTelemetry[] telemetry, int begin, int end, DetectedOperationDto? previousOperation,
|
||||||
out OperationDetectorResult? result)
|
out OperationDetectorResult? result)
|
||||||
@ -52,6 +52,8 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
|||||||
if (positionEnd > end)
|
if (positionEnd > end)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
//TODO: поиск провалов телеметрий. Следует обсудить, так как алгоритмы теряют в точности.
|
||||||
|
|
||||||
idReasonOfEnd = DetectEnd(telemetry, positionEnd, previousOperation);
|
idReasonOfEnd = DetectEnd(telemetry, positionEnd, previousOperation);
|
||||||
|
|
||||||
if (idReasonOfEnd != IdReasonOfEnd_NotDetected)
|
if (idReasonOfEnd != IdReasonOfEnd_NotDetected)
|
||||||
@ -407,5 +409,3 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -41,9 +41,9 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
|||||||
if (currentPoint.RotorSpeed <=8)
|
if (currentPoint.RotorSpeed <=8)
|
||||||
return IdReasonOfEnd_RotorSpeedIsHi;
|
return IdReasonOfEnd_RotorSpeedIsHi;
|
||||||
if ((currentPoint.WellDepth - currentPoint.BitDepth) < 0.03d)
|
if ((currentPoint.WellDepth - currentPoint.BitDepth) < 0.03d)
|
||||||
return IdReasonOfEnd_DeltaWellDepthAndBithDepthIsLo;
|
return IdReasonOfEnd_DeltaWellDepthAndBitDepthIsLo;
|
||||||
if (currentPoint.BitDepth < 150)
|
if (currentPoint.BitDepth < 150)
|
||||||
return IdReasonOfEnd_BithDepthIsLo;
|
return IdReasonOfEnd_BitDepthIsLo;
|
||||||
return IdReasonOfEnd_NotDetected;
|
return IdReasonOfEnd_NotDetected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,11 +48,11 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
|||||||
if (currentPoint.Pressure < 10)
|
if (currentPoint.Pressure < 10)
|
||||||
return IdReasonOfEnd_PressureIsLo;
|
return IdReasonOfEnd_PressureIsLo;
|
||||||
if ((currentPoint.WellDepth - currentPoint.BitDepth) < 0.01d)
|
if ((currentPoint.WellDepth - currentPoint.BitDepth) < 0.01d)
|
||||||
return IdReasonOfEnd_DeltaWellDepthAndBithDepthIsLo;
|
return IdReasonOfEnd_DeltaWellDepthAndBitDepthIsLo;
|
||||||
if (currentPoint.RotorSpeed > 8)
|
if (currentPoint.RotorSpeed > 8)
|
||||||
return IdReasonOfEnd_RotorSpeedIsHi;
|
return IdReasonOfEnd_RotorSpeedIsHi;
|
||||||
if (currentPoint.BitDepth < 150)
|
if (currentPoint.BitDepth < 150)
|
||||||
return IdReasonOfEnd_BithDepthIsLo;
|
return IdReasonOfEnd_BitDepthIsLo;
|
||||||
return IdReasonOfEnd_NotDetected;
|
return IdReasonOfEnd_NotDetected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class DetectorSlipsTime : DetectorAbstract
|
|||||||
var deltaBitDepth = Math.Abs(currentPoint.BitDepth - prevPoint.BitDepth);
|
var deltaBitDepth = Math.Abs(currentPoint.BitDepth - prevPoint.BitDepth);
|
||||||
|
|
||||||
if (deltaBitDepth > 0.001d && currentPoint.AxialLoad < currentPoint.HookWeight)
|
if (deltaBitDepth > 0.001d && currentPoint.AxialLoad < currentPoint.HookWeight)
|
||||||
return IdReasonOfEnd_ChangeBithDepthAndAxiloadLessHookWeight;
|
return IdReasonOfEnd_ChangeBitDepthAndAxiLoadLessHookWeight;
|
||||||
|
|
||||||
return IdReasonOfEnd_NotDetected;
|
return IdReasonOfEnd_NotDetected;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
|
using AsbCloudApp.Data.SAUB;
|
||||||
using AsbCloudApp.Repositories;
|
using AsbCloudApp.Repositories;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using AsbCloudInfrastructure.Background;
|
using AsbCloudInfrastructure.Background;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
@ -13,12 +16,13 @@ namespace AsbCloudInfrastructure.Services.DetectOperations;
|
|||||||
|
|
||||||
public class WorkOperationDetection : Work
|
public class WorkOperationDetection : Work
|
||||||
{
|
{
|
||||||
|
private static readonly IDictionary<int, DateTimeOffset> CacheOfStartDatesByTelemetryId = new Dictionary<int, DateTimeOffset>();
|
||||||
|
|
||||||
public WorkOperationDetection()
|
public WorkOperationDetection()
|
||||||
: base("Operation detection")
|
: base("Operation detection")
|
||||||
{
|
{
|
||||||
Timeout = TimeSpan.FromMinutes(20);
|
Timeout = TimeSpan.FromMinutes(20);
|
||||||
OnErrorAsync = (id, exception, token) =>
|
OnErrorAsync = (id, exception, _) =>
|
||||||
{
|
{
|
||||||
var text = $"work {id}, when {CurrentState?.State}, throw error:{exception.Message}";
|
var text = $"work {id}, when {CurrentState?.State}, throw error:{exception.Message}";
|
||||||
Trace.TraceWarning(text);
|
Trace.TraceWarning(text);
|
||||||
@ -26,29 +30,62 @@ public class WorkOperationDetection: Work
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task Action(string id, IServiceProvider services, Action<string, double?> onProgressCallback, CancellationToken token)
|
protected override async Task Action(string id,
|
||||||
|
IServiceProvider services,
|
||||||
|
Action<string, double?> onProgressCallback,
|
||||||
|
CancellationToken token)
|
||||||
{
|
{
|
||||||
var telemetryRepository = services.GetRequiredService<ICrudRepository<TelemetryDto>>();
|
var telemetryRepository = services.GetRequiredService<ICrudRepository<TelemetryDto>>();
|
||||||
var detectedOperationRepository = services.GetRequiredService<IDetectedOperationRepository>();
|
var detectedOperationRepository = services.GetRequiredService<IDetectedOperationRepository>();
|
||||||
var detectedOperationService = services.GetRequiredService<IDetectedOperationService>();
|
var detectedOperationService = services.GetRequiredService<IDetectedOperationService>();
|
||||||
|
var telemetryDataCache = services.GetRequiredService<ITelemetryDataCache<TelemetryDataSaubDto>>();
|
||||||
|
|
||||||
var telemetryIds = (await telemetryRepository.GetAllAsync(token))
|
var idsTelemetry = (await telemetryRepository.GetAllAsync(token))
|
||||||
.Select(t => t.Id)
|
.Select(t => t.Id)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
var lastDetectedDates = await detectedOperationRepository.GetLastDetectedDatesAsync(token);
|
var lastDetectedOperations = await detectedOperationRepository.GetLastDetectedOperationsAsync(token);
|
||||||
|
|
||||||
for (var i = 0; i < telemetryIds.Length; i++)
|
for (int i = 0; i < idsTelemetry.Length; i++)
|
||||||
{
|
{
|
||||||
var telemetryId = telemetryIds[i];
|
var idTelemetry = idsTelemetry[i];
|
||||||
|
|
||||||
var beginDate = lastDetectedDates.TryGetValue(telemetryId, out var date) ? date : (DateTimeOffset?)null;
|
var telemetryDateRange = telemetryDataCache.GetOrDefaultWellDataDateRange(idTelemetry);
|
||||||
|
|
||||||
onProgressCallback($"Start detecting telemetry: {telemetryId} from {beginDate}", i / telemetryIds.Length);
|
if(telemetryDateRange == null)
|
||||||
var detectedOperations = await detectedOperationService.DetectOperationsAsync(telemetryId, beginDate, token);
|
continue;
|
||||||
|
|
||||||
if (detectedOperations.Any())
|
var dateBegin = telemetryDateRange.From;
|
||||||
await detectedOperationRepository.InsertRangeAsync(detectedOperations, token);
|
var dateEnd = telemetryDateRange.To;
|
||||||
|
|
||||||
|
if (lastDetectedOperations.TryGetValue(idTelemetry, out var lastDetectedOperation))
|
||||||
|
dateBegin = lastDetectedOperation.DateEnd;
|
||||||
|
|
||||||
|
if (CacheOfStartDatesByTelemetryId.TryGetValue(idTelemetry, out var dateBeginFromCache))
|
||||||
|
dateBegin = dateBeginFromCache;
|
||||||
|
|
||||||
|
onProgressCallback.Invoke($"Start detecting telemetry: {idTelemetry} from {dateBegin}", i / idsTelemetry.Length);
|
||||||
|
|
||||||
|
const int pointsCount = 4 * 86_400;
|
||||||
|
|
||||||
|
while (dateBegin < dateEnd)
|
||||||
|
{
|
||||||
|
var request = new TelemetryDataRequest
|
||||||
|
{
|
||||||
|
GeDate = dateBegin,
|
||||||
|
Take = pointsCount,
|
||||||
|
Order = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
var detectedOperations =
|
||||||
|
await detectedOperationService.DetectOperationsAsync(idTelemetry, request, lastDetectedOperation, token);
|
||||||
|
|
||||||
|
dateBegin = detectedOperations.LastDate;
|
||||||
|
|
||||||
|
CacheOfStartDatesByTelemetryId[idTelemetry] = dateBegin;
|
||||||
|
|
||||||
|
await detectedOperationRepository.InsertRangeAsync(detectedOperations.Items, token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,9 +8,9 @@ public class ProcessMapPlanAntiCrashRotationTemplate : ITemplateParameters
|
|||||||
{
|
{
|
||||||
public string SheetName => "Противоаварийное вращение";
|
public string SheetName => "Противоаварийное вращение";
|
||||||
|
|
||||||
public int HeaderRowsCount => 3;
|
public int HeaderRowsCount => 2;
|
||||||
|
|
||||||
public string FileName => "ProcessMapPlanAntiCrashRotation.xlsx";
|
public string FileName => "ProcessMapPlanAnticrashRotation.xlsx";
|
||||||
|
|
||||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlan
|
|||||||
|
|
||||||
public class ProcessMapPlanDrillTestTemplate : ITemplateParameters
|
public class ProcessMapPlanDrillTestTemplate : ITemplateParameters
|
||||||
{
|
{
|
||||||
public string SheetName => "Дрилтест";
|
public string SheetName => "DrillTest";
|
||||||
|
|
||||||
public int HeaderRowsCount => 2;
|
public int HeaderRowsCount => 2;
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using AsbCloudApp.Data.ProcessMaps.Functions;
|
|
||||||
using AsbCloudApp.Data.ProcessMaps.Operations;
|
using AsbCloudApp.Data.ProcessMaps.Operations;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@ -8,7 +7,7 @@ public class ProcessMapPlanLoadCapacityTemplate : ITemplateParameters
|
|||||||
{
|
{
|
||||||
public string SheetName => "Выработка нагрузки";
|
public string SheetName => "Выработка нагрузки";
|
||||||
|
|
||||||
public int HeaderRowsCount => 3;
|
public int HeaderRowsCount => 2;
|
||||||
|
|
||||||
public string FileName => "ProcessMapPlanLoadCapacity.xlsx";
|
public string FileName => "ProcessMapPlanLoadCapacity.xlsx";
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ public class ProcessMapPlanOscillationAnglesTemplate : ITemplateParameters
|
|||||||
{
|
{
|
||||||
public string SheetName => "Определение углов осцилляции";
|
public string SheetName => "Определение углов осцилляции";
|
||||||
|
|
||||||
public int HeaderRowsCount => 2;
|
public int HeaderRowsCount => 3;
|
||||||
|
|
||||||
public string FileName => "ProcessMapPlanOscillationAngles.xlsx";
|
public string FileName => "ProcessMapPlanOscillationAngles.xlsx";
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ public class ProcessMapPlanOscillationTemplate : ITemplateParameters
|
|||||||
{
|
{
|
||||||
public string SheetName => "Осцилляция";
|
public string SheetName => "Осцилляция";
|
||||||
|
|
||||||
public int HeaderRowsCount => 3;
|
public int HeaderRowsCount => 2;
|
||||||
|
|
||||||
public string FileName => "ProcessMapPlanOscillation.xlsx";
|
public string FileName => "ProcessMapPlanOscillation.xlsx";
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ public class ProcessMapPlanOscillationTemplate : ITemplateParameters
|
|||||||
{ nameof(ProcessMapPlanOscillationDto.RpmLeft), new Cell(6, typeof(double)) },
|
{ nameof(ProcessMapPlanOscillationDto.RpmLeft), new Cell(6, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanOscillationDto.TorqueMaxRight), new Cell(7, typeof(double)) },
|
{ nameof(ProcessMapPlanOscillationDto.TorqueMaxRight), new Cell(7, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanOscillationDto.TorqueMaxLeft), new Cell(8, typeof(double)) },
|
{ nameof(ProcessMapPlanOscillationDto.TorqueMaxLeft), new Cell(8, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanOscillationDto.Mode), new Cell(10, typeof(int)) },
|
{ nameof(ProcessMapPlanOscillationDto.Mode), new Cell(9, typeof(int)) },
|
||||||
{ nameof(ProcessMapPlanOscillationDto.Note), new Cell(11, typeof(string)) },
|
{ nameof(ProcessMapPlanOscillationDto.Note), new Cell(10, typeof(string)) },
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -6,9 +6,9 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlan
|
|||||||
|
|
||||||
public class ProcessMapPlanReamingRotorTemplate : ITemplateParameters
|
public class ProcessMapPlanReamingRotorTemplate : ITemplateParameters
|
||||||
{
|
{
|
||||||
public string SheetName => "Проработка ротор";
|
public string SheetName => "Проработка для ротора";
|
||||||
|
|
||||||
public int HeaderRowsCount => 2;
|
public int HeaderRowsCount => 3;
|
||||||
|
|
||||||
public string FileName => "ProcessMapPlanReamingRotor.xlsx";
|
public string FileName => "ProcessMapPlanReamingRotor.xlsx";
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ public class ProcessMapPlanReamingRotorTemplate : ITemplateParameters
|
|||||||
{ nameof(ProcessMapPlanReamingRotorDto.Reaming2StopPointOffBottom), new Cell(26, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingRotorDto.Reaming2StopPointOffBottom), new Cell(26, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RepetitionsCount), new Cell(27, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RepetitionsCount), new Cell(27, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RopUp), new Cell(28, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RopUp), new Cell(28, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingRotorDto.Reaming1RopDown), new Cell(29, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RopDown), new Cell(29, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RpmUp), new Cell(30, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RpmUp), new Cell(30, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RpmDown), new Cell(31, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3RpmDown), new Cell(31, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3FlowRateUp), new Cell(32, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingRotorDto.Reaming3FlowRateUp), new Cell(32, typeof(double)) },
|
||||||
|
@ -5,9 +5,9 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlan
|
|||||||
|
|
||||||
public class ProcessMapPlanReamingSlideTemplate : ITemplateParameters
|
public class ProcessMapPlanReamingSlideTemplate : ITemplateParameters
|
||||||
{
|
{
|
||||||
public string SheetName => "Проработка слайд";
|
public string SheetName => "Проработка для слайда";
|
||||||
|
|
||||||
public int HeaderRowsCount => 2;
|
public int HeaderRowsCount => 3;
|
||||||
|
|
||||||
public string FileName => "ProcessMapPlanReamingSlide.xlsx";
|
public string FileName => "ProcessMapPlanReamingSlide.xlsx";
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ public class ProcessMapPlanReamingSlideTemplate : ITemplateParameters
|
|||||||
{ nameof(ProcessMapPlanReamingSlideDto.Reaming2StopPointOffBottom), new Cell(26, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingSlideDto.Reaming2StopPointOffBottom), new Cell(26, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RepetitionsCount), new Cell(27, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RepetitionsCount), new Cell(27, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RopUp), new Cell(28, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RopUp), new Cell(28, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingSlideDto.Reaming1RopDown), new Cell(29, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RopDown), new Cell(29, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RpmUp), new Cell(30, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RpmUp), new Cell(30, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RpmDown), new Cell(31, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3RpmDown), new Cell(31, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3FlowRateUp), new Cell(32, typeof(double)) },
|
{ nameof(ProcessMapPlanReamingSlideDto.Reaming3FlowRateUp), new Cell(32, typeof(double)) },
|
||||||
|
@ -28,6 +28,6 @@ public class ProcessMapPlanRotorTemplate : ITemplateParameters
|
|||||||
{ nameof(ProcessMapPlanRotorDto.RpmMax), new Cell(13, typeof(double)) },
|
{ nameof(ProcessMapPlanRotorDto.RpmMax), new Cell(13, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanRotorDto.FlowRate), new Cell(14, typeof(double)) },
|
{ nameof(ProcessMapPlanRotorDto.FlowRate), new Cell(14, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanRotorDto.FlowRateMax), new Cell(15, typeof(double)) },
|
{ nameof(ProcessMapPlanRotorDto.FlowRateMax), new Cell(15, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanRotorDto.Note), new Cell(16, typeof(double)) },
|
{ nameof(ProcessMapPlanRotorDto.Note), new Cell(16, typeof(string)) },
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -5,7 +5,7 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlan
|
|||||||
|
|
||||||
public class ProcessMapPlanShockTestTemplate : ITemplateParameters
|
public class ProcessMapPlanShockTestTemplate : ITemplateParameters
|
||||||
{
|
{
|
||||||
public string SheetName => "Запись shock test";
|
public string SheetName => "ShockTest";
|
||||||
|
|
||||||
public int HeaderRowsCount => 2;
|
public int HeaderRowsCount => 2;
|
||||||
|
|
||||||
|
@ -26,6 +26,6 @@ public class ProcessMapPlanSlideTemplate : ITemplateParameters
|
|||||||
{ nameof(ProcessMapPlanSlideDto.FlowRateMax), new Cell(11, typeof(double)) },
|
{ nameof(ProcessMapPlanSlideDto.FlowRateMax), new Cell(11, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanSlideDto.Spring), new Cell(12, typeof(double)) },
|
{ nameof(ProcessMapPlanSlideDto.Spring), new Cell(12, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanSlideDto.Buckling), new Cell(13, typeof(double)) },
|
{ nameof(ProcessMapPlanSlideDto.Buckling), new Cell(13, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanSlideDto.Note), new Cell(14, typeof(double)) }
|
{ nameof(ProcessMapPlanSlideDto.Note), new Cell(14, typeof(string)) }
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -17,10 +17,8 @@ public class ProcessMapPlanSwitchingOffThePumpTemplate : ITemplateParameters
|
|||||||
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.Section), new Cell(1, typeof(string)) },
|
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.Section), new Cell(1, typeof(string)) },
|
||||||
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.DepthStart), new Cell(2, typeof(double)) },
|
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.DepthStart), new Cell(2, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.DepthEnd), new Cell(3, typeof(double)) },
|
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.DepthEnd), new Cell(3, typeof(double)) },
|
||||||
|
|
||||||
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.Duration), new Cell(4, typeof(double)) },
|
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.Duration), new Cell(4, typeof(double)) },
|
||||||
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.ResidualPressureLimit), new Cell(5, typeof(double)) },
|
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.ResidualPressureLimit), new Cell(5, typeof(double)) },
|
||||||
|
|
||||||
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.Note), new Cell(6, typeof(string)) },
|
{ nameof(ProcessMapPlanSwitchingOffThePumpDto.Note), new Cell(6, typeof(string)) },
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -9,7 +9,7 @@ public class ProcessMapPlanSwitchingToTheModeTemplate : ITemplateParameters
|
|||||||
{
|
{
|
||||||
public string SheetName => "Выход на плановый расход";
|
public string SheetName => "Выход на плановый расход";
|
||||||
|
|
||||||
public int HeaderRowsCount => 3;
|
public int HeaderRowsCount => 2;
|
||||||
|
|
||||||
public string FileName => "ProcessMapPlanSwitchingToTheMode.xlsx";
|
public string FileName => "ProcessMapPlanSwitchingToTheMode.xlsx";
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -154,6 +154,33 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
|||||||
|
|
||||||
return db.SaveChangesAsync(token);
|
return db.SaveChangesAsync(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IQueryable<TelemetryMessage> BuildQuery(TelemetryPartDeleteRequest request)
|
||||||
|
{
|
||||||
|
var query = db.Set<TelemetryMessage>()
|
||||||
|
.Where(o => o.IdTelemetry == request.IdTelemetry);
|
||||||
|
|
||||||
|
if (request.GeDate is not null)
|
||||||
|
{
|
||||||
|
var geDate = request.GeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateTime <= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.LeDate is not null)
|
||||||
|
{
|
||||||
|
var leDate = request.LeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateTime >= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var query = BuildQuery(request);
|
||||||
|
db.Set<TelemetryMessage>().RemoveRange(query);
|
||||||
|
return await db.SaveChangesAsync(token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
using AsbCloudApp.Exceptions;
|
using AsbCloudApp.Exceptions;
|
||||||
using AsbCloudApp.Repositories;
|
using AsbCloudApp.Repositories;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using AsbCloudDb;
|
using AsbCloudDb;
|
||||||
using AsbCloudDb.Model;
|
using AsbCloudDb.Model;
|
||||||
@ -11,11 +12,9 @@ using System.Diagnostics;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AsbCloudApp.Requests;
|
|
||||||
using Mapster;
|
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Services.SAUB
|
namespace AsbCloudInfrastructure.Services.SAUB;
|
||||||
{
|
|
||||||
public abstract class TelemetryDataBaseService<TDto, TEntity> : ITelemetryDataService<TDto>
|
public abstract class TelemetryDataBaseService<TDto, TEntity> : ITelemetryDataService<TDto>
|
||||||
where TDto : AsbCloudApp.Data.ITelemetryData
|
where TDto : AsbCloudApp.Data.ITelemetryData
|
||||||
where TEntity : class, AsbCloudDb.Model.ITelemetryData
|
where TEntity : class, AsbCloudDb.Model.ITelemetryData
|
||||||
@ -56,13 +55,13 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
|||||||
}
|
}
|
||||||
|
|
||||||
var telemetry = telemetryService.GetOrCreateTelemetryByUid(uid);
|
var telemetry = telemetryService.GetOrCreateTelemetryByUid(uid);
|
||||||
var timezone = telemetryService.GetTimezone(telemetry.Id);
|
var timeZone = telemetryService.GetTimezone(telemetry.Id);
|
||||||
|
|
||||||
telemetryDataCache.AddRange(telemetry.Id, dtos);
|
telemetryDataCache.AddRange(telemetry.Id, dtos);
|
||||||
|
|
||||||
var entities = dtosList.Select(dto =>
|
var entities = dtosList.Select(dto =>
|
||||||
{
|
{
|
||||||
var entity = Convert(dto, timezone.Hours);
|
var entity = Convert(dto, timeZone.Hours);
|
||||||
entity.IdTelemetry = telemetry.Id;
|
entity.IdTelemetry = telemetry.Id;
|
||||||
return entity;
|
return entity;
|
||||||
});
|
});
|
||||||
@ -159,7 +158,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
|||||||
|
|
||||||
public async Task<IEnumerable<TDto>> GetByTelemetryAsync(int idTelemetry, TelemetryDataRequest request, CancellationToken token)
|
public async Task<IEnumerable<TDto>> GetByTelemetryAsync(int idTelemetry, TelemetryDataRequest request, CancellationToken token)
|
||||||
{
|
{
|
||||||
var timezone = telemetryService.GetTimezone(idTelemetry);
|
var timeZone = telemetryService.GetTimezone(idTelemetry);
|
||||||
|
|
||||||
var cache = telemetryDataCache.GetOrDefault(idTelemetry, request);
|
var cache = telemetryDataCache.GetOrDefault(idTelemetry, request);
|
||||||
|
|
||||||
@ -172,7 +171,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
|||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.ToArrayAsync(token);
|
.ToArrayAsync(token);
|
||||||
|
|
||||||
var dtos = entities.Select(e => Convert(e, timezone.Hours));
|
var dtos = entities.Select(e => Convert(e, timeZone.Hours));
|
||||||
|
|
||||||
return dtos;
|
return dtos;
|
||||||
}
|
}
|
||||||
@ -219,6 +218,26 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
|||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IQueryable<TEntity> BuildQuery(TelemetryPartDeleteRequest request)
|
||||||
|
{
|
||||||
|
var query = db.Set<TEntity>()
|
||||||
|
.Where(o => o.IdTelemetry == request.IdTelemetry);
|
||||||
|
|
||||||
|
if (request.GeDate is not null)
|
||||||
|
{
|
||||||
|
var geDate = request.GeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateTime <= geDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.LeDate is not null)
|
||||||
|
{
|
||||||
|
var leDate = request.LeDate.Value.ToUniversalTime();
|
||||||
|
query = query.Where(o => o.DateTime >= leDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public async Task<DatesRangeDto?> GetRangeAsync(int idWell, DateTimeOffset geDate, DateTimeOffset? leDate, CancellationToken token)
|
public async Task<DatesRangeDto?> GetRangeAsync(int idWell, DateTimeOffset geDate, DateTimeOffset? leDate, CancellationToken token)
|
||||||
{
|
{
|
||||||
@ -278,9 +297,14 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
|||||||
return telemetryDataCache.GetOrDefaultWellDataDateRange(telemetry.Id);
|
return telemetryDataCache.GetOrDefaultWellDataDateRange(telemetry.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract TDto Convert(TEntity src, double timezoneOffset);
|
protected abstract TDto Convert(TEntity src, double timeZoneOffset);
|
||||||
|
|
||||||
protected abstract TEntity Convert(TDto src, double timezoneOffset);
|
protected abstract TEntity Convert(TDto src, double timeZoneOffset);
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var query = BuildQuery(request);
|
||||||
|
db.Set<TEntity>().RemoveRange(query);
|
||||||
|
return await db.SaveChangesAsync(token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,8 +153,8 @@ public class TelemetryDataCache<TDto> : ITelemetryDataCache<TDto> where TDto : A
|
|||||||
if (cacheItem.LastData.Count == 0)
|
if (cacheItem.LastData.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var to = FromDate(cacheItem.FirstByDate.DateTime, cacheItem.TimezoneOffset);
|
var to = FromDate(cacheItem.LastData[^1].DateTime, cacheItem.TimezoneOffset);
|
||||||
var from = FromDate(cacheItem.LastData[^1].DateTime, cacheItem.TimezoneOffset);
|
var from = FromDate(cacheItem.FirstByDate.DateTime, cacheItem.TimezoneOffset);
|
||||||
|
|
||||||
return new DatesRangeDto { From = from, To = to };
|
return new DatesRangeDto { From = from, To = to };
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,82 @@
|
|||||||
|
using AsbCloudApp.Data.SAUB;
|
||||||
|
using AsbCloudApp.Data.WITS;
|
||||||
|
using AsbCloudApp.Repositories;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
|
using AsbCloudApp.Services;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AsbCloudInfrastructure.Services.SAUB
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Сервис по работе с данными телеметрии
|
||||||
|
/// </summary>
|
||||||
|
public class TelemetryDataEditorService : ITelemetryDataEditorService
|
||||||
|
{
|
||||||
|
private readonly ITelemetryDataEditorService[] repositories;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dataSaubService"></param>
|
||||||
|
/// <param name="dataSpinService"></param>
|
||||||
|
/// <param name="dataSaubStatRepository"></param>
|
||||||
|
/// <param name="messageService"></param>
|
||||||
|
/// <param name="drillTestRepository"></param>
|
||||||
|
/// <param name="limitingParameterRepository"></param>
|
||||||
|
/// <param name="detectedOperationRepository"></param>
|
||||||
|
/// <param name="witsRecord1Repository"></param>
|
||||||
|
/// <param name="witsRecord7Repository"></param>
|
||||||
|
/// <param name="witsRecord8Repository"></param>
|
||||||
|
/// <param name="witsRecord50Repository"></param>
|
||||||
|
/// <param name="witsRecord60Repository"></param>
|
||||||
|
/// <param name="witsRecord61Repository"></param>
|
||||||
|
/// <param name="gtrRepository"></param>
|
||||||
|
public TelemetryDataEditorService(
|
||||||
|
ITelemetryDataSaubService dataSaubService,
|
||||||
|
ITelemetryDataService<TelemetryDataSpinDto> dataSpinService,
|
||||||
|
IDataSaubStatRepository dataSaubStatRepository,
|
||||||
|
IMessageService messageService,
|
||||||
|
IDrillTestRepository drillTestRepository,
|
||||||
|
ILimitingParameterRepository limitingParameterRepository,
|
||||||
|
IDetectedOperationRepository detectedOperationRepository,
|
||||||
|
IWitsRecordRepository<Record1Dto> witsRecord1Repository,
|
||||||
|
IWitsRecordRepository<Record7Dto> witsRecord7Repository,
|
||||||
|
IWitsRecordRepository<Record8Dto> witsRecord8Repository,
|
||||||
|
IWitsRecordRepository<Record50Dto> witsRecord50Repository,
|
||||||
|
IWitsRecordRepository<Record60Dto> witsRecord60Repository,
|
||||||
|
IWitsRecordRepository<Record61Dto> witsRecord61Repository,
|
||||||
|
IGtrRepository gtrRepository
|
||||||
|
)
|
||||||
|
{
|
||||||
|
repositories =
|
||||||
|
[
|
||||||
|
dataSaubService,
|
||||||
|
dataSpinService,
|
||||||
|
dataSaubStatRepository,
|
||||||
|
messageService,
|
||||||
|
drillTestRepository,
|
||||||
|
limitingParameterRepository,
|
||||||
|
detectedOperationRepository,
|
||||||
|
witsRecord1Repository,
|
||||||
|
witsRecord7Repository,
|
||||||
|
witsRecord8Repository,
|
||||||
|
witsRecord50Repository,
|
||||||
|
witsRecord60Repository,
|
||||||
|
witsRecord61Repository,
|
||||||
|
gtrRepository,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> DeleteAsync(TelemetryPartDeleteRequest request, CancellationToken token)
|
||||||
|
{
|
||||||
|
var result = 0;
|
||||||
|
foreach (var repository in repositories)
|
||||||
|
{
|
||||||
|
result += await repository.DeleteAsync(request, token);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -13,6 +13,8 @@ using System.Linq;
|
|||||||
using System.Text.Csv;
|
using System.Text.Csv;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using AsbCloudApp.Data;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Services.SAUB;
|
namespace AsbCloudInfrastructure.Services.SAUB;
|
||||||
|
|
||||||
|
@ -90,6 +90,26 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
return await db.SaveChangesAsync(token);
|
return await db.SaveChangesAsync(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<int> CopyAsync(int idWell, int idWellTarget, IEnumerable<int> contactIds, CancellationToken token)
|
||||||
|
{
|
||||||
|
var contacts = await GetContacts(idWell, contactIds, token);
|
||||||
|
if (!contacts.Any())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
var newContacts = contacts.Select(contact =>
|
||||||
|
{
|
||||||
|
var newContact = contact.Adapt<Contact>();
|
||||||
|
newContact.IdWell = idWellTarget;
|
||||||
|
newContact.Id = default;
|
||||||
|
|
||||||
|
return newContact;
|
||||||
|
});
|
||||||
|
|
||||||
|
db.Contacts.AddRange(newContacts);
|
||||||
|
|
||||||
|
return await db.SaveChangesAsync(token);
|
||||||
|
}
|
||||||
|
|
||||||
private async Task<Contact?> GetContact(int idWell, int idContact, CancellationToken token)
|
private async Task<Contact?> GetContact(int idWell, int idContact, CancellationToken token)
|
||||||
{
|
{
|
||||||
var contact = await db.Contacts
|
var contact = await db.Contacts
|
||||||
@ -100,5 +120,16 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
|
|
||||||
return contact;
|
return contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task<Contact[]> GetContacts(int idWell, IEnumerable<int> contactIds, CancellationToken token)
|
||||||
|
{
|
||||||
|
var contacts = await db.Contacts
|
||||||
|
.Where(c => c.IdWell == idWell)
|
||||||
|
.Where(c => contactIds.Contains(c.Id))
|
||||||
|
.AsNoTracking()
|
||||||
|
.ToArrayAsync(token);
|
||||||
|
|
||||||
|
return contacts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
using AsbCloudApp.Repositories;
|
|
||||||
using AsbCloudApp.Requests;
|
|
||||||
using AsbCloudApp.Services;
|
|
||||||
using AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
|
||||||
using AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
|
||||||
using AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan;
|
|
||||||
using AsbCloudWebApi.IntegrationTests;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Xunit;
|
|
||||||
using AsbCloudDb.Model.ProcessMapPlan.Functions;
|
|
||||||
using AsbCloudApp.Data.ProcessMaps.Functions;
|
|
||||||
|
|
||||||
namespace AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan.Functions;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// РТК план обновление холостого хода
|
|
||||||
/// </summary>
|
|
||||||
public class ProcessMapPlanUpdatingNoloadParametersControllerTest :
|
|
||||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanUpdatingNoloadParameters, ProcessMapPlanUpdatingNoloadParametersDto>
|
|
||||||
{
|
|
||||||
public ProcessMapPlanUpdatingNoloadParametersControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanUpdatingNoloadParameters")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
private readonly ProcessMapPlanUpdatingNoloadParametersDto dto = new ProcessMapPlanUpdatingNoloadParametersDto()
|
|
||||||
{
|
|
||||||
IdWell = 1,
|
|
||||||
DepthStart = 1,
|
|
||||||
DepthEnd = 2,
|
|
||||||
Id = 0,
|
|
||||||
IdWellSectionType = 1,
|
|
||||||
IdDeclineSocketColumn = true,
|
|
||||||
Note = "1",
|
|
||||||
};
|
|
||||||
|
|
||||||
private readonly ProcessMapPlanUpdatingNoloadParameters entity = new ProcessMapPlanUpdatingNoloadParameters()
|
|
||||||
{
|
|
||||||
IdWell = 1,
|
|
||||||
DepthEnd = 10,
|
|
||||||
DepthStart = 2,
|
|
||||||
Id = 0,
|
|
||||||
IdWellSectionType = 1,
|
|
||||||
IdAuthor = 1,
|
|
||||||
IdEditor = 1,
|
|
||||||
Creation = DateTimeOffset.UtcNow,
|
|
||||||
IdDeclineSocketColumn = true,
|
|
||||||
Note = "1"
|
|
||||||
};
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task Get_actual_returns_success()
|
|
||||||
{
|
|
||||||
await Get(entity, dto);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanUpdatingNoloadParameters GetByNote(DbSet<ProcessMapPlanUpdatingNoloadParameters> dbSet, ProcessMapPlanUpdatingNoloadParametersDto dto)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanUpdatingNoloadParametersDto GetByNote(IEnumerable<ProcessMapPlanUpdatingNoloadParametersDto> dtos, ProcessMapPlanUpdatingNoloadParametersDto dto)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanUpdatingNoloadParameters? GetByWellId()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
using AsbCloudApp.Data.ProcessMaps.Operations;
|
|
||||||
using AsbCloudDb.Model.ProcessMapPlan.Operations;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Xunit;
|
|
||||||
|
|
||||||
namespace AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan.Operations;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// РТК план встряхивание бурового инструмента
|
|
||||||
/// </summary>
|
|
||||||
public class ProcessMapPlanRotorRpmAccelerationControllerTest :
|
|
||||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanRotorRpmAcceleration, ProcessMapPlanRotorRpmAccelerationDto>
|
|
||||||
{
|
|
||||||
public ProcessMapPlanRotorRpmAccelerationControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanRotorRpmAcceleration")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
private readonly ProcessMapPlanRotorRpmAccelerationDto dto = new ProcessMapPlanRotorRpmAccelerationDto()
|
|
||||||
{
|
|
||||||
IdWell = 1,
|
|
||||||
DepthStart = 1,
|
|
||||||
DepthEnd = 2,
|
|
||||||
Id = 0,
|
|
||||||
IdWellSectionType = 1,
|
|
||||||
Note = "1",
|
|
||||||
Rpm = 1,
|
|
||||||
RpmMax = 2,
|
|
||||||
TopDriveTorque = 2,
|
|
||||||
TopDriveTorqueMax = 3,
|
|
||||||
};
|
|
||||||
|
|
||||||
private readonly ProcessMapPlanRotorRpmAcceleration entity = new ProcessMapPlanRotorRpmAcceleration()
|
|
||||||
{
|
|
||||||
IdWell = 1,
|
|
||||||
DepthEnd = 10,
|
|
||||||
DepthStart = 2,
|
|
||||||
Id = 0,
|
|
||||||
IdWellSectionType = 1,
|
|
||||||
IdAuthor = 1,
|
|
||||||
IdEditor = 1,
|
|
||||||
Creation = DateTimeOffset.UtcNow,
|
|
||||||
Note = "1",
|
|
||||||
Rpm = 1,
|
|
||||||
RpmMax = 2,
|
|
||||||
TopDriveTorque = 2,
|
|
||||||
TopDriveTorqueMax = 3,
|
|
||||||
};
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task Get_actual_returns_success()
|
|
||||||
{
|
|
||||||
await Get(entity, dto);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanRotorRpmAcceleration GetByNote(DbSet<ProcessMapPlanRotorRpmAcceleration> dbSet, ProcessMapPlanRotorRpmAccelerationDto dto)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanRotorRpmAccelerationDto GetByNote(IEnumerable<ProcessMapPlanRotorRpmAccelerationDto> dtos, ProcessMapPlanRotorRpmAccelerationDto dto)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanRotorRpmAcceleration? GetByWellId()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +1,10 @@
|
|||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
|
using AsbCloudApp.Requests;
|
||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@ -16,12 +19,15 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
public class AdminTelemetryController : CrudController<TelemetryDto, ICrudRepository<TelemetryDto>>
|
public class AdminTelemetryController : CrudController<TelemetryDto, ICrudRepository<TelemetryDto>>
|
||||||
{
|
{
|
||||||
private readonly ITelemetryService telemetryService;
|
private readonly ITelemetryService telemetryService;
|
||||||
|
private readonly ITelemetryDataEditorService telemetryEditorService;
|
||||||
|
|
||||||
public AdminTelemetryController(ICrudRepository<TelemetryDto> service,
|
public AdminTelemetryController(ICrudRepository<TelemetryDto> service,
|
||||||
ITelemetryService telemetryService)
|
ITelemetryService telemetryService,
|
||||||
|
ITelemetryDataEditorService telemetryEditorService)
|
||||||
: base(service)
|
: base(service)
|
||||||
{
|
{
|
||||||
this.telemetryService = telemetryService;
|
this.telemetryService = telemetryService;
|
||||||
|
this.telemetryEditorService = telemetryEditorService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -36,5 +42,22 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
return Ok(count);
|
return Ok(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Удаление куска телеметрии по запросу
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">запрос</param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpDelete("part")]
|
||||||
|
[Permission]
|
||||||
|
[ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
|
||||||
|
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||||
|
public async Task<IActionResult> DeleteAsync([FromQuery] TelemetryPartDeleteRequest request,CancellationToken token)
|
||||||
|
{
|
||||||
|
var result = await telemetryEditorService.DeleteAsync(request, token);
|
||||||
|
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,5 @@ public class ProcessMapPlanLoadCapacityController :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string TemplateFileName => "ЕЦП_шаблон_файла_РТК_план_проработка_слайд.xlsx";
|
protected override string TemplateFileName => "ЕЦП_шаблон_файла_РТК_план_выработка_нагрузки.xlsx";
|
||||||
}
|
}
|
@ -139,6 +139,34 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Скопировать контакты в другую скважину
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idWell">ключ скважины, откуда копировать контакты</param>
|
||||||
|
/// <param name="idWellTarget">ключ скважины, куда копировать контакты</param>
|
||||||
|
/// <param name="contactIds"></param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("copy/{idWellTarget}")]
|
||||||
|
[Permission]
|
||||||
|
[ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
|
||||||
|
public async Task<IActionResult> CopyAsync(
|
||||||
|
int idWell,
|
||||||
|
int idWellTarget,
|
||||||
|
[FromBody] IEnumerable<int> contactIds,
|
||||||
|
CancellationToken token)
|
||||||
|
{
|
||||||
|
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
||||||
|
return Forbid();
|
||||||
|
|
||||||
|
if (!await CanUserAccessToWellAsync(idWellTarget, token).ConfigureAwait(false))
|
||||||
|
return Forbid();
|
||||||
|
|
||||||
|
var result = await wellContactsRepository.CopyAsync(idWell, idWellTarget, contactIds, token);
|
||||||
|
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
private async Task<bool> CanUserAccessToWellAsync(int idWell, CancellationToken token)
|
private async Task<bool> CanUserAccessToWellAsync(int idWell, CancellationToken token)
|
||||||
{
|
{
|
||||||
int? idCompany = User.GetCompanyId();
|
int? idCompany = User.GetCompanyId();
|
||||||
|
Loading…
Reference in New Issue
Block a user