update default WellOperationCategories

This commit is contained in:
Фролов 2021-12-08 15:38:38 +05:00
parent 6565957c34
commit 6dc3137627
6 changed files with 3109 additions and 24 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,89 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace AsbCloudDb.Migrations
{
public partial class Update_operations_list : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1009);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1010);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1036);
migrationBuilder.UpdateData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1023,
column: "name",
value: "Сборка инструмента с мостков");
migrationBuilder.InsertData(
table: "t_well_operation_category",
columns: new[] { "id", "code", "name" },
values: new object[,]
{
{ 1051, 0, "Замер ТС" },
{ 1052, 0, "Тех. отстой" },
{ 1053, 0, "Циркуляция и Обработка БР" },
{ 1054, 0, "Срезка ствола" },
{ 1055, 0, "Вспомогательные работы" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1051);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1052);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1053);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1054);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1055);
migrationBuilder.UpdateData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1023,
column: "name",
value: "Сборка инструмента");
migrationBuilder.InsertData(
table: "t_well_operation_category",
columns: new[] { "id", "code", "name" },
values: new object[,]
{
{ 1009, 0, "Оборудование устья" },
{ 1010, 0, "ОЗЦ" },
{ 1036, 0, "Спуск обсадной колонны" }
});
}
}
}

View File

@ -2137,18 +2137,6 @@ namespace AsbCloudDb.Migrations
Name = "ОЗЦ"
},
new
{
Id = 1009,
Code = 0,
Name = "Оборудование устья"
},
new
{
Id = 1010,
Code = 0,
Name = "ОЗЦ"
},
new
{
Id = 1011,
Code = 0,
@ -2224,7 +2212,7 @@ namespace AsbCloudDb.Migrations
{
Id = 1023,
Code = 0,
Name = "Сборка инструмента"
Name = "Сборка инструмента с мостков"
},
new
{
@ -2299,12 +2287,6 @@ namespace AsbCloudDb.Migrations
Name = "Принудительная проработка"
},
new
{
Id = 1036,
Code = 0,
Name = "Спуск обсадной колонны"
},
new
{
Id = 1037,
Code = 0,
@ -2381,6 +2363,36 @@ namespace AsbCloudDb.Migrations
Id = 1050,
Code = 0,
Name = "Промывка при спуске ОК"
},
new
{
Id = 1051,
Code = 0,
Name = "Замер ТС"
},
new
{
Id = 1052,
Code = 0,
Name = "Тех. отстой"
},
new
{
Id = 1053,
Code = 0,
Name = "Циркуляция и Обработка БР"
},
new
{
Id = 1054,
Code = 0,
Name = "Срезка ствола"
},
new
{
Id = 1055,
Code = 0,
Name = "Вспомогательные работы"
});
});

View File

@ -329,8 +329,6 @@ namespace AsbCloudDb.Model
new WellOperationCategory {Id = 1006, Name = "Установка ФА", Code = 0 },
new WellOperationCategory {Id = 1007, Name = "Оборудование устья", Code = 0 },
new WellOperationCategory {Id = 1008, Name = "ОЗЦ", Code = 0 },
new WellOperationCategory {Id = 1009, Name = "Оборудование устья", Code = 0 },
new WellOperationCategory {Id = 1010, Name = "ОЗЦ", Code = 0 },
new WellOperationCategory {Id = 1011, Name = "Начало цикла строительства скважины", Code = 0 },
new WellOperationCategory {Id = 1012, Name = "Окончание цикла строительства скважины", Code = 0 },
new WellOperationCategory {Id = 1013, Name = "Опрессовка ПВО", Code = 0 },
@ -343,7 +341,7 @@ namespace AsbCloudDb.Model
new WellOperationCategory {Id = 1020, Name = "Подъем инструмента", Code = 0 },
new WellOperationCategory {Id = 1021, Name = "Подъем инструмента с промывкой", Code = 0 },
new WellOperationCategory {Id = 1022, Name = "Обратная проработка", Code = 0 },
new WellOperationCategory {Id = 1023, Name = "Сборка инструмента", Code = 0 },
new WellOperationCategory {Id = 1023, Name = "Сборка инструмента с мостков", Code = 0 },
new WellOperationCategory {Id = 1024, Name = "Подготовительные работы", Code = 0 },
new WellOperationCategory {Id = 1025, Name = "Сборка КНБК", Code = 0 },
new WellOperationCategory {Id = 1026, Name = "Разборка КНБК", Code = 0 },
@ -356,7 +354,6 @@ namespace AsbCloudDb.Model
new WellOperationCategory {Id = 1033, Name = "Спуск инструмента с промывкой", Code = 0 },
new WellOperationCategory {Id = 1034, Name = "Прямая проработка", Code = 0 },
new WellOperationCategory {Id = 1035, Name = "Принудительная проработка", Code = 0 },
new WellOperationCategory {Id = 1036, Name = "Спуск обсадной колонны", Code = 0 },
new WellOperationCategory {Id = 1037, Name = "Тех СПО-подъем", Code = 0 },
new WellOperationCategory {Id = 1038, Name = "Тех СПО-спуск", Code = 0 },
new WellOperationCategory {Id = 1039, Name = "Техническое обслуживание", Code = 0 },
@ -369,7 +366,12 @@ namespace AsbCloudDb.Model
new WellOperationCategory {Id = 1046, Name = "Спуск КНБК", Code = 0 },
new WellOperationCategory {Id = 1047, Name = "Подъем КНБК", Code = 0 },
new WellOperationCategory {Id = 1048, Name = "Спуск ОК", Code = 0 },
new WellOperationCategory {Id = 1050, Name = "Промывка при спуске ОК", Code = 0 }
new WellOperationCategory {Id = 1050, Name = "Промывка при спуске ОК", Code = 0 },
new WellOperationCategory {Id = 1051, Name = "Замер ТС", Code = 0 },
new WellOperationCategory {Id = 1052, Name = "Тех. отстой", Code = 0 },
new WellOperationCategory {Id = 1053, Name = "Циркуляция и Обработка БР", Code = 0 },
new WellOperationCategory {Id = 1054, Name = "Срезка ствола", Code = 0 },
new WellOperationCategory {Id = 1055, Name = "Вспомогательные работы", Code = 0 },
});
});

View File

@ -11,6 +11,10 @@ using AsbCloudApp.Services;
namespace AsbCloudInfrastructure.Services.WellOperationService
{
/*
* password for WellOperationImportTemplate.xlsx is ASB2020!
*/
public class WellOperationImportService : IWellOperationImportService
{
private const string sheetNamePlan = "План";