migration

-edit default Data
-edit model
-update WellOperation
This commit is contained in:
eugeniy_ivanov 2022-12-03 00:48:40 +05:00
parent 64e51915c8
commit 6ed0dda96d
9 changed files with 22573 additions and 239 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,58 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class WellOperationCategory_editDBmodel : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "code",
table: "t_well_operation_category");
migrationBuilder.AddColumn<int>(
name: "id_parent",
table: "t_well_operation_category",
type: "integer",
nullable: true,
comment: "id родительской категории");
migrationBuilder.CreateIndex(
name: "IX_t_well_operation_category_id_parent",
table: "t_well_operation_category",
column: "id_parent");
migrationBuilder.AddForeignKey(
name: "FK_t_well_operation_category_t_well_operation_category_id_pare~",
table: "t_well_operation_category",
column: "id_parent",
principalTable: "t_well_operation_category",
principalColumn: "id");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_t_well_operation_category_t_well_operation_category_id_pare~",
table: "t_well_operation_category");
migrationBuilder.DropIndex(
name: "IX_t_well_operation_category_id_parent",
table: "t_well_operation_category");
migrationBuilder.DropColumn(
name: "id_parent",
table: "t_well_operation_category");
migrationBuilder.AddColumn<int>(
name: "code",
table: "t_well_operation_category",
type: "integer",
nullable: false,
defaultValue: 0,
comment: "Код операции");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,673 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class WellOperationCategory_editDefaultData : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 10);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 16);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 17);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1006);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1011);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1012);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1014);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1023);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1024);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1045);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1052);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 1055);
migrationBuilder.InsertData(
table: "t_well_operation_category",
columns: new[] { "id", "id_parent", "key_value_name", "key_value_units", "name" },
values: new object[,]
{
{ 3000, null, "dT", "м/ч", "БУРЕНИЕ" },
{ 3001, null, "dT", "мин", "СПО" },
{ 3002, null, "dT", "мин", "КРЕПЛЕНИЕ" },
{ 3003, null, "dT", "мин", "ГФР" },
{ 3004, null, "dT", "мин", "Вспомогательные операции" },
{ 3005, null, "dT", "мин", "Непроизводительное время (НПВ)" }
});
migrationBuilder.InsertData(
table: "t_well_operation_category",
columns: new[] { "id", "id_parent", "key_value_name", "key_value_units", "name" },
values: new object[,]
{
{ 4000, 3000, "dT", "мин", "КНБК" },
{ 4001, 3000, "dT", "м/ч", "Механическое. бурение" },
{ 4002, 3000, "dT", "мин", "Статический замер" },
{ 4003, 3000, "dT", "мин", "Нормализация диаметра скважины" },
{ 4004, 3000, "dT", "мин", "Наращивание" },
{ 4005, 3001, "dT", "мин", "СПО" },
{ 4006, 3002, "dT", "мин", "Спуск обсадной колонны" },
{ 4007, 3002, "dT", "мин", "Цементирование" },
{ 4008, 3002, "dT", "мин", "Вспомогательные работы при креплении" },
{ 4009, 3003, "dT", "мин", "Сборка/разборка приборов ГИС" },
{ 4010, 3003, "dT", "мин", "СПО" },
{ 4011, 3003, "dT", "мин", "ГИС" },
{ 4012, 3004, "dT", "мин", "Промывка, ОБР" },
{ 4013, 3004, "dT", "мин", "Вспомогательные работы" },
{ 4014, 3005, "dT", "мин", "Ремонт оборудования" },
{ 4015, 3005, "dT", "мин", "Аварийные работы" },
{ 4016, 3005, "dT", "мин", "Осложнение" },
{ 4017, 3005, "dT", "мин", "Незаложенные в ГГД операции" }
});
migrationBuilder.InsertData(
table: "t_well_operation_category",
columns: new[] { "id", "id_parent", "key_value_name", "key_value_units", "name" },
values: new object[,]
{
{ 2001, 4003, "dT", "мин", "Проработка во время бурения" },
{ 2002, 4003, "dT", "мин", "Шаблонировка во время бурения" },
{ 2003, 4004, "dT", "мин", "Наращивание" },
{ 2004, 4008, "dT", "мин", "ПЗР при спуске ОК" },
{ 2005, 4008, "dT", "мин", "ПЗР при цементировании" },
{ 2006, 4008, "dT", "мин", "Опрессовка ОК" },
{ 2007, 4008, "dT", "мин", "Опрессовка БИ" },
{ 2008, 4009, "dT", "мин", "Сборка комплекса приборов ГИС" },
{ 2009, 4009, "dT", "мин", "Разборка комплекса приборов ГИС" },
{ 2010, 4010, "dT", "мин", "Спуск приборов ГИС (на трубах)" },
{ 2011, 4010, "dT", "мин", "Подъем приборов ГИС (на трубах)" },
{ 2012, 4011, "dT", "мин", "Комплекс ГИС на трубах" },
{ 2013, 4011, "dT", "мин", "Комплекс ГИС на жестком кабеле" },
{ 2014, 4011, "dT", "мин", "Комплекс ГИС на кабеле" },
{ 2015, 4012, "dT", "мин", "Приготовление БР" },
{ 2016, 4012, "dT", "мин", "Ориентирование ТС при бурении" },
{ 2017, 4013, "dT", "мин", "Наработка жёлоба" },
{ 2018, 4013, "dT", "мин", "Тайм-дриллинг" },
{ 2019, 4013, "dT", "мин", "ПЗР при сборке КНБК" },
{ 2020, 4013, "dT", "мин", "ПР перед забуркой направления" },
{ 2021, 4013, "dT", "мин", "Перемонтаж ПВО " },
{ 2022, 4013, "dT", "мин", "Долив затруба при подъёме" },
{ 2024, 4013, "dT", "мин", "Обвязка устья с циркуляционной системой" },
{ 2025, 4013, "dT", "мин", "Продувка манифольда" },
{ 2026, 4013, "dT", "мин", "Полная замена талевого каната" },
{ 2027, 4013, "dT", "мин", "Перетяжка талевого каната" },
{ 2028, 4013, "dT", "мин", "Учебная тревога \"Выброс\"" },
{ 2029, 4013, "dT", "мин", "Чистка ЦСГО/емкостного блока" },
{ 2030, 4015, "dT", "мин", "Установка ванн" },
{ 2031, 4015, "dT", "мин", "Ожидание" },
{ 2032, 4015, "dT", "мин", "Работа яссом" },
{ 2033, 4015, "dT", "мин", "Расхаживание" },
{ 2034, 4015, "dT", "мин", "Ловильные работы" },
{ 2035, 4015, "dT", "мин", "Определение места прихвата и ЛМ" },
{ 2036, 4015, "dT", "мин", "Торпедирование (отстрел)" },
{ 2037, 4015, "dT", "мин", "СПО - овершот" },
{ 2038, 4015, "dT", "мин", "СПО - колокол" },
{ 2039, 4015, "dT", "мин", "СПО - метчик" },
{ 2040, 4015, "dT", "мин", "СПО - труболовка" },
{ 2041, 4015, "dT", "мин", "Торпедирование (встряхивание)" },
{ 2042, 4015, "dT", "мин", "Фрезеровка" },
{ 2043, 4016, "dT", "мин", "Поглощение" },
{ 2044, 4016, "dT", "мин", "Сальникообразование" },
{ 2045, 4016, "dT", "мин", "Контролируемое ГНВП" },
{ 2046, 4016, "dT", "мин", "Утяжеление БР" },
{ 2047, 4017, "dT", "мин", "Ревизия КНБК/инструмента/ЗТС" },
{ 2048, 4017, "dT", "мин", "подъем ОК" },
{ 2049, 4017, "dT", "мин", "Обработка раствора (несоответствие параметров)" },
{ 60001, 4001, "МСП", "м/ч", "Ротором (РУС)" },
{ 60002, 4001, "МСП", "м/ч", "Направленно (СЛАЙД)" },
{ 60003, 4002, "dT", "мин", "Замер ЗТС (запись MWD)" },
{ 60004, 4005, "dT", "мин", "Спуск инструмента" },
{ 60006, 4007, "dT", "мин", "Цементирование" },
{ 60007, 4012, "dT", "мин", "Обработка БР" },
{ 60008, 4012, "dT", "мин", "Перезапись гаммы-каротажа" },
{ 60009, 4012, "dT", "мин", "Спуск инструмента с проработкой" },
{ 60010, 4012, "dT", "мин", "Закачка/прокачка пачки" },
{ 60011, 4013, "dT", "мин", "Срезка" },
{ 60012, 4014, "dT", "мин", "Ремонт бурового оборудования" },
{ 60013, 4017, "dT", "мин", "НПВ / прочее" },
{ 60014, 4012, "dT", "мин", "Промывка" },
{ 60017, 4003, "dT", "мин", "Шаблонировка во время бурения" },
{ 60018, 4004, "dT", "мин", "Удержание в клиньях" },
{ 60019, 4011, "dT", "мин", "Комплекс ГИС на кабеле" },
{ 60020, 4011, "dT", "мин", "Комплекс ГИС на трубах" },
{ 60023, 4012, "dT", "мин", "Приготовление БР" },
{ 60026, 4003, "dT", "мин", "Проработка во время бурения" },
{ 60028, 4005, "dT", "мин", "Подъем инструмента" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2001);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2002);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2003);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2004);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2005);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2006);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2007);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2008);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2009);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2010);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2011);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2012);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2013);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2014);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2015);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2016);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2017);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2018);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2019);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2020);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2021);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2022);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2024);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2025);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2026);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2027);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2028);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2029);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2030);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2031);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2032);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2033);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2034);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2035);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2036);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2037);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2038);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2039);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2040);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2041);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2042);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2043);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2044);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2045);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2046);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2047);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2048);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 2049);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4000);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4006);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60001);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60002);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60003);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60004);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60006);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60007);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60008);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60009);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60010);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60011);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60012);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60013);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60014);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60017);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60018);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60019);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60020);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60023);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60026);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 60028);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4001);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4002);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4003);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4004);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4005);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4007);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4008);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4009);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4010);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4011);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4012);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4013);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4014);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4015);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4016);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 4017);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 3000);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 3001);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 3002);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 3003);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 3004);
migrationBuilder.DeleteData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 3005);
migrationBuilder.InsertData(
table: "t_well_operation_category",
columns: new[] { "id", "id_parent", "key_value_name", "key_value_units", "name" },
values: new object[,]
{
{ 1, null, "dT", "мин", "Невозможно определить операцию" },
{ 10, null, "dT", "мин", "Подъем из скважины" },
{ 16, null, "dT", "мин", "Вращение без циркуляции" },
{ 17, null, "dT", "мин", "На поверхности" },
{ 1006, null, "dT", "мин", "Установка ФА" },
{ 1011, null, "dT", "мин", "Начало цикла строительства скважины" },
{ 1012, null, "dT", "мин", "Окончание цикла строительства скважины" },
{ 1014, null, "dT", "мин", "Опрессовка Ц.К." },
{ 1023, null, "dT", "мин", "Сборка инструмента с мостков" },
{ 1024, null, "dT", "мин", "Подготовительные работы" },
{ 1045, null, "dT", "мин", "Прочее" },
{ 1052, null, "dT", "мин", "Тех. отстой" },
{ 1055, null, "dT", "мин", "Вспомогательные работы" }
});
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class WellOperation_Manual_updateIdCategory : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql
("UPDATE public.t_well_operation SET id_category=60001 WHERE id_category=2; " +
"UPDATE public.t_well_operation SET id_category=60002 WHERE id_category=3; " +
"UPDATE public.t_well_operation SET id_category=60003 WHERE id_category=21; " +
"UPDATE public.t_well_operation SET id_category=60004 WHERE id_category=8; " +
"UPDATE public.t_well_operation SET id_category=60006 WHERE id_category=1040; " +
"UPDATE public.t_well_operation SET id_category=60007 WHERE id_category=1053; " +
"UPDATE public.t_well_operation SET id_category=60008 WHERE id_category=1017; " +
"UPDATE public.t_well_operation SET id_category=60009 WHERE id_category=5; " +
"UPDATE public.t_well_operation SET id_category=60010 WHERE id_category=1029; " +
"UPDATE public.t_well_operation SET id_category=60011 WHERE id_category=1054; " +
"UPDATE public.t_well_operation SET id_category=60012 WHERE id_category=1031; " +
"UPDATE public.t_well_operation SET id_category=60013 WHERE id_category=1043; " +
"UPDATE public.t_well_operation SET id_category=60014 WHERE id_category=12; " +
"UPDATE public.t_well_operation SET id_category=60014 WHERE id_category=13; " +
"UPDATE public.t_well_operation SET id_category=60001 WHERE id_category=1001; " +
"UPDATE public.t_well_operation SET id_category=60017 WHERE id_category=23; " +
"UPDATE public.t_well_operation SET id_category=60018 WHERE id_category=15; " +
"UPDATE public.t_well_operation SET id_category=60019 WHERE id_category=1002; " +
"UPDATE public.t_well_operation SET id_category=60020 WHERE id_category=1003; " +
"UPDATE public.t_well_operation SET id_category=60014 WHERE id_category=1015; " +
"UPDATE public.t_well_operation SET id_category=60023 WHERE id_category=1016; " +
"UPDATE public.t_well_operation SET id_category=60014 WHERE id_category=1019; " +
"UPDATE public.t_well_operation SET id_category=60014 WHERE id_category=1028; " +
"UPDATE public.t_well_operation SET id_category=60026 WHERE id_category=1034; " +
"UPDATE public.t_well_operation SET id_category=60026 WHERE id_category=1035; " +
"UPDATE public.t_well_operation SET id_category=60028 WHERE id_category=1037; " +
"UPDATE public.t_well_operation SET id_category=60004 WHERE id_category=1038; " +
"UPDATE public.t_well_operation SET id_category=60009 WHERE id_category=1033; " +
"UPDATE public.t_well_operation SET id_category=60012 WHERE id_category=1039; " +
"UPDATE public.t_well_operation SET id_category=60017 WHERE id_category=1041; " +
"UPDATE public.t_well_operation SET id_category=60013 WHERE id_category=1042; " +
"UPDATE public.t_well_operation SET id_category=60003 WHERE id_category=1051; " +
"UPDATE public.t_well_operation SET id_category=60026 WHERE id_category=4; " +
"UPDATE public.t_well_operation SET id_category=60014 WHERE id_category=6; " +
"UPDATE public.t_well_operation SET id_category=60004 WHERE id_category=9; " +
"UPDATE public.t_well_operation SET id_category=60028 WHERE id_category=11; " +
"UPDATE public.t_well_operation SET id_category=60014 WHERE id_category=1021; " +
"UPDATE public.t_well_operation SET id_category=60026 WHERE id_category=1022;");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -4,82 +4,170 @@
{
public override WellOperationCategory[] GetData() => new WellOperationCategory[]{
// Автоматически определяемые операции
new () {Id = 1, Name = "Невозможно определить операцию", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин"},
new () {Id = 2, Name = "Роторное бурение", Code = 0, KeyValueName = "МСП", KeyValueUnits = "м/ч" },
new () {Id = 3, Name = "Слайдирование", Code = 0, KeyValueName = "МСП", KeyValueUnits = "м/ч" },
new () {Id = 4, Name = "Подъем с проработкой", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 5, Name = "Спуск с проработкой", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 6, Name = "Подъем с промывкой", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 7, Name = "Спуск с промывкой", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 8, Name = "Спуск в скважину", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 9, Name = "Спуск с вращением", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 10, Name = "Подъем из скважины", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 11, Name = "Подъем с вращением", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 12, Name = "Промывка в покое", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 13, Name = "Промывка с вращением", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 14, Name = "Удержание в клиньях", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 15, Name = "Неподвижное состояние", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 16, Name = "Вращение без циркуляции", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 17, Name = "На поверхности", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 18, Name = "Проработка перед наращиванием", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 19, Name = "Шаблонировка перед наращиванием", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 20, Name = "Промывка перед наращиванием", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 21, Name = "Статический замер телесистемы", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 22, Name = "Промывка", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 23, Name = "Шаблонировка при бурении", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2, Name = "Роторное бурение", KeyValueName = "МСП", KeyValueUnits = "м/ч" },
new () {Id = 3, Name = "Слайдирование", KeyValueName = "МСП", KeyValueUnits = "м/ч" },
new () {Id = 4, Name = "Подъем с проработкой", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 5, Name = "Спуск с проработкой", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 6, Name = "Подъем с промывкой", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 7, Name = "Спуск с промывкой", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 8, Name = "Спуск в скважину", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 9, Name = "Спуск с вращением", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 11, Name = "Подъем с вращением", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 12, Name = "Промывка в покое", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 13, Name = "Промывка с вращением", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 14, Name = "Удержание в клиньях", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 15, Name = "Неподвижное состояние", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 18, Name = "Проработка перед наращиванием", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 19, Name = "Шаблонировка перед наращиванием", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 20, Name = "Промывка перед наращиванием", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 21, Name = "Статический замер телесистемы", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 22, Name = "Промывка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 23, Name = "Шаблонировка при бурении", KeyValueName = "dT", KeyValueUnits = "мин" },
// Операции ручного ввода
new () {Id = 1001, Name = "Бурение", Code = 0, KeyValueName = "МСП", KeyValueUnits = "м/ч" },
new () {Id = 1002, Name = "ГИС", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1003, Name = "ГФР", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1004, Name = "Монтаж ПВО", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1005, Name = "Демонтаж ПВО", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1006, Name = "Установка ФА", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1007, Name = "Оборудование устья", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1008, Name = "ОЗЦ", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1011, Name = "Начало цикла строительства скважины", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1012, Name = "Окончание цикла строительства скважины", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1013, Name = "Опрессовка ПВО", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1014, Name = "Опрессовка Ц.К.", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1015, Name = "Опрессовка ВЗД", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1016, Name = "Перевод скв на другой тип промывочной жидкости", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1017, Name = "Перезапись каротажа", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1018, Name = "Перетяжка талевого каната", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1019, Name = "Наращивание, промывка", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1020, Name = "Подъем инструмента", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1021, Name = "Подъем инструмента с промывкой", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1022, Name = "Обратная проработка", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1023, Name = "Сборка инструмента с мостков", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1024, Name = "Подготовительные работы", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1025, Name = "Сборка КНБК", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1026, Name = "Разборка КНБК", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1027, Name = "Промывка", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1028, Name = "Промежуточная промывка", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1029, Name = "Прокачка пачек", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1030, Name = "Разбуривание тех.оснастки", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1031, Name = "Ремонт", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1032, Name = "Спуск инструмента", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1033, Name = "Спуск инструмента с промывкой", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1034, Name = "Прямая проработка", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1035, Name = "Принудительная проработка", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1037, Name = "Тех СПО-подъем", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1038, Name = "Тех СПО-спуск", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1039, Name = "Техническое обслуживание", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1040, Name = "Цементаж", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1041, Name = "Шаблонировка ствола", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1042, Name = "Геологическое осложнение", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1043, Name = "НПВ", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1044, Name = "ВМР", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1045, Name = "Прочее", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1046, Name = "Спуск КНБК", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1047, Name = "Подъем КНБК", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1048, Name = "Спуск ОК", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1050, Name = "Промывка при спуске ОК", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1051, Name = "Замер ТС", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1052, Name = "Тех. отстой", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1053, Name = "Циркуляция и Обработка БР", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1054, Name = "Срезка ствола", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1055, Name = "Вспомогательные работы", Code = 0, KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1001, Name = "Бурение", KeyValueName = "МСП", KeyValueUnits = "м/ч" },
new () {Id = 1002, Name = "ГИС", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1003, Name = "ГФР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1004, Name = "Монтаж ПВО", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1005, Name = "Демонтаж ПВО", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1007, Name = "Оборудование устья", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1008, Name = "ОЗЦ", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1013, Name = "Опрессовка ПВО", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1015, Name = "Опрессовка ВЗД", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1016, Name = "Перевод скв на другой тип промывочной жидкости", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1017, Name = "Перезапись каротажа", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1018, Name = "Перетяжка талевого каната", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1019, Name = "Наращивание, промывка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1020, Name = "Подъем инструмента", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1021, Name = "Подъем инструмента с промывкой", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1022, Name = "Обратная проработка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1025, Name = "Сборка КНБК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1026, Name = "Разборка КНБК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1027, Name = "Промывка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1028, Name = "Промежуточная промывка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1029, Name = "Прокачка пачек", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1030, Name = "Разбуривание тех.оснастки", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1031, Name = "Ремонт", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1032, Name = "Спуск инструмента", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1033, Name = "Спуск инструмента с промывкой", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1034, Name = "Прямая проработка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1035, Name = "Принудительная проработка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1037, Name = "Тех СПО-подъем", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1038, Name = "Тех СПО-спуск", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1039, Name = "Техническое обслуживание", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1040, Name = "Цементаж", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1041, Name = "Шаблонировка ствола", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1042, Name = "Геологическое осложнение", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1043, Name = "НПВ", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1044, Name = "ВМР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1046, Name = "Спуск КНБК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1047, Name = "Подъем КНБК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1048, Name = "Спуск ОК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1050, Name = "Промывка при спуске ОК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1051, Name = "Замер ТС", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1053, Name = "Циркуляция и Обработка БР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 1054, Name = "Срезка ствола", KeyValueName = "dT", KeyValueUnits = "мин" },
//Добавленные согласно постановке задачи
new () {Id = 2001 ,IdParent=4003, Name = "Проработка во время бурения", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2002 ,IdParent=4003, Name = "Шаблонировка во время бурения", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2003, IdParent=4004, Name = "Наращивание", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2004, IdParent=4008, Name = "ПЗР при спуске ОК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2005, IdParent=4008, Name = "ПЗР при цементировании", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2006,IdParent=4008, Name = "Опрессовка ОК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2007,IdParent=4008, Name = "Опрессовка БИ", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2008,IdParent=4009, Name = "Сборка комплекса приборов ГИС", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2009,IdParent=4009, Name = "Разборка комплекса приборов ГИС", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2010,IdParent=4010, Name = "Спуск приборов ГИС (на трубах)", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2011,IdParent=4010, Name = "Подъем приборов ГИС (на трубах)", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2012,IdParent=4011, Name = "Комплекс ГИС на трубах", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2013,IdParent=4011, Name = "Комплекс ГИС на жестком кабеле", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2014,IdParent=4011, Name = "Комплекс ГИС на кабеле", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2015,IdParent=4012, Name = "Приготовление БР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2016,IdParent=4012, Name = "Ориентирование ТС при бурении", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2017,IdParent=4013, Name = "Наработка жёлоба", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2018,IdParent=4013, Name = "Тайм-дриллинг", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2019,IdParent=4013, Name = "ПЗР при сборке КНБК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2020,IdParent=4013, Name = "ПР перед забуркой направления", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2021, IdParent=4013, Name = "Перемонтаж ПВО ", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2022, IdParent=4013, Name = "Долив затруба при подъёме", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2024, IdParent=4013, Name = "Обвязка устья с циркуляционной системой", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2025, IdParent=4013, Name = "Продувка манифольда", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2026, IdParent=4013, Name = "Полная замена талевого каната", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2027, IdParent=4013, Name = "Перетяжка талевого каната", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2028, IdParent=4013, Name = "Учебная тревога \"Выброс\"", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2029, IdParent=4013, Name = "Чистка ЦСГО/емкостного блока", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2030, IdParent=4015, Name = "Установка ванн", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2031, IdParent=4015, Name = "Ожидание", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2032, IdParent=4015, Name = "Работа яссом", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2033, IdParent=4015, Name = "Расхаживание", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2034, IdParent=4015, Name = "Ловильные работы", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2035, IdParent=4015, Name = "Определение места прихвата и ЛМ", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2036, IdParent=4015, Name = "Торпедирование (отстрел)", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2037, IdParent=4015, Name = "СПО - овершот", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2038, IdParent=4015, Name = "СПО - колокол", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2039, IdParent=4015, Name = "СПО - метчик", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2040, IdParent=4015, Name = "СПО - труболовка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2041, IdParent=4015, Name = "Торпедирование (встряхивание)", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2042, IdParent=4015, Name = "Фрезеровка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2043, IdParent=4016, Name = "Поглощение", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2044, IdParent=4016, Name = "Сальникообразование", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2045, IdParent=4016, Name = "Контролируемое ГНВП", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2046, IdParent=4016, Name = "Утяжеление БР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2047, IdParent=4017, Name = "Ревизия КНБК/инструмента/ЗТС", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2048, IdParent=4017, Name = "подъем ОК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 2049, IdParent=4017, Name = "Обработка раствора (несоответствие параметров)", KeyValueName = "dT", KeyValueUnits = "мин" },
// Этап работ
new () {Id = 3000, Name = "БУРЕНИЕ", KeyValueName = "dT", KeyValueUnits = "м/ч" },
new () {Id = 3001, Name = "СПО", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 3002, Name = "КРЕПЛЕНИЕ", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 3003, Name = "ГФР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 3004, Name = "Вспомогательные операции", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 3005, Name = "Непроизводительное время (НПВ)", KeyValueName = "dT", KeyValueUnits = "мин" },
// Виды работ
new () {Id = 4000, IdParent = 3000, Name = "КНБК", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4001, IdParent = 3000, Name = "Механическое. бурение", KeyValueName = "dT", KeyValueUnits = "м/ч" },
new () {Id = 4002, IdParent = 3000, Name = "Статический замер", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4003, IdParent = 3000, Name = "Нормализация диаметра скважины", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4004, IdParent = 3000, Name = "Наращивание", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4005, IdParent = 3001, Name = "СПО", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4006, IdParent = 3002, Name = "Спуск обсадной колонны", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4007, IdParent = 3002, Name = "Цементирование", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4008, IdParent = 3002, Name = "Вспомогательные работы при креплении", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4009, IdParent = 3003, Name = "Сборка/разборка приборов ГИС", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4010, IdParent = 3003, Name = "СПО", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4011, IdParent = 3003, Name = "ГИС", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4012, IdParent = 3004, Name = "Промывка, ОБР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4013, IdParent = 3004, Name = "Вспомогательные работы", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4014, IdParent = 3005, Name = "Ремонт оборудования", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4015, IdParent = 3005, Name = "Аварийные работы", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4016, IdParent = 3005, Name = "Осложнение", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 4017, IdParent = 3005, Name = "Незаложенные в ГГД операции", KeyValueName = "dT", KeyValueUnits = "мин" },
//переименованные категории с новым ИД
new () {Id = 60001,IdParent = 4001, Name = "Ротором (РУС)", KeyValueName = "МСП", KeyValueUnits = "м/ч" },
new () {Id = 60002,IdParent = 4001, Name = "Направленно (СЛАЙД)", KeyValueName = "МСП", KeyValueUnits = "м/ч" },
new () {Id = 60003, IdParent = 4002,Name = "Замер ЗТС (запись MWD)", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60004,IdParent=4005, Name = "Спуск инструмента", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60006, IdParent=4007, Name = "Цементирование", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60007, IdParent=4012, Name = "Обработка БР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60008, IdParent=4012, Name = "Перезапись гаммы-каротажа", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60009,IdParent=4012, Name = "Спуск инструмента с проработкой", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60010, IdParent=4012, Name = "Закачка/прокачка пачки", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60011, IdParent=4013, Name = "Срезка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60012, IdParent=4014, Name = "Ремонт бурового оборудования", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60013, IdParent=4017, Name = "НПВ / прочее", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60014,IdParent=4012, Name = "Промывка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60017 ,IdParent=4003, Name = "Шаблонировка во время бурения", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60018,IdParent=4004, Name = "Удержание в клиньях", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60019, IdParent=4011, Name = "Комплекс ГИС на кабеле", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60020, IdParent=4011, Name = "Комплекс ГИС на трубах", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60023, IdParent=4012, Name = "Приготовление БР", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60026 ,IdParent=4003, Name = "Проработка во время бурения", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 60028, IdParent=4005, Name = "Подъем инструмента", KeyValueName = "dT", KeyValueUnits = "мин" },
};
}
}

View File

@ -1,6 +1,7 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace AsbCloudDb.Model
{
@ -15,13 +16,17 @@ namespace AsbCloudDb.Model
[Column("name"), Comment("Название категории операции")]
public string Name { get; set; }
[Column("code"), Comment("Код операции")]
public int Code { get; set; }
[Column("id_parent"), Comment("id родительской категории")]
public int? IdParent { get; set; }
[Column("key_value_name"), Comment("Название ключевого показателя операции"), StringLength(32)]
public string KeyValueName { get; set; }
[Column("key_value_units"), Comment("Единицы измерения ключевого показателя операции"), StringLength(16)]
public string KeyValueUnits { get; set; }
[JsonIgnore]
[ForeignKey(nameof(IdParent))]
public virtual WellOperationCategory Parent { get; set; } = null!;
}
}