forked from ddrilling/AsbCloudServer
Merge pull request '#23421490 Переименования в справочниках' (#146) from fix/#23421490-add-or-update-dictionary-elements into dev
Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/146
This commit is contained in:
commit
b90dcf8483
8814
AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.Designer.cs
generated
Normal file
8814
AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,43 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Update_EntityFillerSubsystem : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "t_subsystem",
|
||||
keyColumn: "id",
|
||||
keyValue: 65536,
|
||||
columns: new[] { "description", "name" },
|
||||
values: new object[] { "Осцилляция", "Осцилляция" });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "t_subsystem",
|
||||
keyColumn: "id",
|
||||
keyValue: 65537,
|
||||
columns: new[] { "description", "name" },
|
||||
values: new object[] { "Демпфер", "Демпфер" });
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "t_subsystem",
|
||||
keyColumn: "id",
|
||||
keyValue: 65536,
|
||||
columns: new[] { "description", "name" },
|
||||
values: new object[] { "Spin master", "Spin master" });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "t_subsystem",
|
||||
keyColumn: "id",
|
||||
keyValue: 65537,
|
||||
columns: new[] { "description", "name" },
|
||||
values: new object[] { "Torque master", "Torque master" });
|
||||
}
|
||||
}
|
||||
}
|
8815
AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.Designer.cs
generated
Normal file
8815
AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Rename_Field_IsContact_In_CompanyType : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "IsContact",
|
||||
table: "t_company_type",
|
||||
newName: "is_contact");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "is_contact",
|
||||
table: "t_company_type",
|
||||
newName: "IsContact");
|
||||
}
|
||||
}
|
||||
}
|
8857
AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.Designer.cs
generated
Normal file
8857
AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,101 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Add_Or_Update_Data_In_CompanyType : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 1,
|
||||
columns: new[] { "caption", "order" },
|
||||
values: new object[] { "Недропользователь", 3 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 2,
|
||||
columns: new[] { "is_contact", "order" },
|
||||
values: new object[] { true, 2 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 3,
|
||||
columns: new[] { "is_contact", "order" },
|
||||
values: new object[] { true, 0 });
|
||||
|
||||
migrationBuilder.Sql(@"INSERT INTO public.t_company_type (id, caption, is_contact, ""order"") " +
|
||||
@"VALUES (4, 'Сервис по ГТИ', true, 6) " +
|
||||
@"ON CONFLICT (id) DO UPDATE SET caption='Сервис по ГТИ', is_contact=true, ""order""=6;");
|
||||
|
||||
migrationBuilder.Sql(@"INSERT INTO public.t_company_type (id, caption, is_contact, ""order"") " +
|
||||
@"VALUES (5, 'Растворный сервис', true, 4) " +
|
||||
@"ON CONFLICT (id) DO UPDATE SET caption='Растворный сервис', is_contact=true, ""order""=4;");
|
||||
|
||||
migrationBuilder.Sql(@"INSERT INTO public.t_company_type (id, caption, is_contact, ""order"") " +
|
||||
@"VALUES (6, 'Сервис по ННБ', true, 5) " +
|
||||
@"ON CONFLICT (id) DO UPDATE SET caption='Сервис по ННБ', is_contact=true, ""order""=5;");
|
||||
|
||||
migrationBuilder.Sql(@"INSERT INTO public.t_company_type (id, caption, is_contact, ""order"") " +
|
||||
@"VALUES (7, 'Служба супервайзинга', true, 1) " +
|
||||
@"ON CONFLICT (id) DO UPDATE SET caption='Служба супервайзинга', is_contact=true, ""order""=1;");
|
||||
|
||||
migrationBuilder.Sql(@"INSERT INTO public.t_company_type (id, caption, is_contact, ""order"") " +
|
||||
@"VALUES (9, 'Сервис по цементированию', true, 7) " +
|
||||
@"ON CONFLICT (id) DO UPDATE SET caption='Сервис по цементированию', is_contact=true, ""order""=7;");
|
||||
|
||||
migrationBuilder.Sql(@"INSERT INTO public.t_company_type (id, caption, is_contact, ""order"") " +
|
||||
@"VALUES (11, 'Дизельный сервис', false, 9) " +
|
||||
@"ON CONFLICT (id) DO UPDATE SET caption='Дизельный сервис', is_contact=false, ""order""=9;");
|
||||
|
||||
migrationBuilder.Sql(@"INSERT INTO public.t_company_type (id, caption, is_contact, ""order"") " +
|
||||
@"VALUES (12, 'Сервис по обслуживанию верхних силовых приводов', true, 8) " +
|
||||
@"ON CONFLICT (id) DO UPDATE SET caption='Сервис по обслуживанию верхних силовых приводов', is_contact=false, ""order""=8;");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 4);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 5);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 6);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 7);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 9);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 12);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "t_company_type",
|
||||
keyColumn: "id",
|
||||
keyValue: 1,
|
||||
columns: new[] { "caption", "order" },
|
||||
values: new object[] { "Недрапользователь", 1 });
|
||||
}
|
||||
}
|
||||
}
|
@ -120,7 +120,8 @@ namespace AsbCloudDb.Migrations
|
||||
.HasColumnName("caption");
|
||||
|
||||
b.Property<bool>("IsContact")
|
||||
.HasColumnType("boolean");
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_contact");
|
||||
|
||||
b.Property<int>("Order")
|
||||
.HasColumnType("integer")
|
||||
@ -134,9 +135,9 @@ namespace AsbCloudDb.Migrations
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Caption = "Недрапользователь",
|
||||
Caption = "Недропользователь",
|
||||
IsContact = false,
|
||||
Order = 1
|
||||
Order = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
@ -151,6 +152,48 @@ namespace AsbCloudDb.Migrations
|
||||
Caption = "Сервис автоматизации бурения",
|
||||
IsContact = false,
|
||||
Order = 0
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 4,
|
||||
Caption = "Сервис по ГТИ",
|
||||
IsContact = true,
|
||||
Order = 6
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 5,
|
||||
Caption = "Растворный сервис",
|
||||
IsContact = true,
|
||||
Order = 4
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 6,
|
||||
Caption = "Сервис по ННБ",
|
||||
IsContact = true,
|
||||
Order = 5
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 7,
|
||||
Caption = "Служба супервайзинга",
|
||||
IsContact = true,
|
||||
Order = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 9,
|
||||
Caption = "Сервис по цементированию",
|
||||
IsContact = true,
|
||||
Order = 7
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 12,
|
||||
Caption = "Сервис по обслуживанию верхних силовых приводов",
|
||||
IsContact = true,
|
||||
Order = 7
|
||||
});
|
||||
});
|
||||
|
||||
@ -4568,14 +4611,14 @@ namespace AsbCloudDb.Migrations
|
||||
new
|
||||
{
|
||||
Id = 65536,
|
||||
Description = "Spin master",
|
||||
Name = "Spin master"
|
||||
Description = "Осцилляция",
|
||||
Name = "Осцилляция"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 65537,
|
||||
Description = "Torque master",
|
||||
Name = "Torque master"
|
||||
Description = "Демпфер",
|
||||
Name = "Демпфер"
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -14,6 +14,8 @@ namespace AsbCloudDb.Model
|
||||
[Column("caption")]
|
||||
[StringLength(255)]
|
||||
public string Caption { get; set; } = null!;
|
||||
|
||||
[Column("is_contact")]
|
||||
public bool IsContact { get; set; }
|
||||
|
||||
[Column("order")]
|
||||
|
@ -3,9 +3,16 @@
|
||||
internal class EntityFillerCompanyType : EntityFiller<CompanyType>
|
||||
{
|
||||
public override CompanyType[] GetData() => new CompanyType[] {
|
||||
new (){ Id = 1, Caption = "Недрапользователь", Order = 1 },
|
||||
new (){ Id = 2, Caption = "Буровой подрядчик", Order = 2 },
|
||||
new (){ Id = 3, Caption = "Сервис автоматизации бурения", Order = 0 }
|
||||
new (){ Id = 1, Caption = "Недропользователь", IsContact = true, Order = 3 },
|
||||
new (){ Id = 2, Caption = "Буровой подрядчик", IsContact = true, Order = 2 },
|
||||
new (){ Id = 3, Caption = "Сервис автоматизации бурения", IsContact = true, Order = 0 },
|
||||
new (){ Id = 4, Caption = "Сервис по ГТИ", IsContact = true, Order = 6 },
|
||||
new (){ Id = 5, Caption = "Растворный сервис", IsContact = true, Order = 4 },
|
||||
new (){ Id = 6, Caption = "Сервис по ННБ", IsContact = true, Order = 5 },
|
||||
new (){ Id = 7, Caption = "Служба супервайзинга", Order = 1 },
|
||||
new (){ Id = 9, Caption = "Сервис по цементированию", IsContact = true, Order = 7 },
|
||||
new (){ Id = 11, Caption = "Дизельный сервис", IsContact = false, Order = 9 },
|
||||
new (){ Id = 12, Caption = "Сервис по обслуживанию верхних силовых приводов", IsContact = true, Order = 8 },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ namespace AsbCloudDb.Model.DefaultData
|
||||
new () {Id = 12, Name = "АПД слайд", Description = "Режим работы \"Бурение в слайде\""},
|
||||
new () {Id = 2, Name = "MSE", Description = "Алгоритм поиска оптимальных параметров бурения САУБ"},
|
||||
//Spin master - id подсистем с 65_536 до 131_071
|
||||
new () {Id = 65536, Name = "Spin master", Description = "Spin master"},
|
||||
new () {Id = 65537, Name = "Torque master", Description = "Torque master"}
|
||||
new () {Id = 65536, Name = "Осцилляция", Description = "Осцилляция"},
|
||||
new () {Id = 65537, Name = "Демпфер", Description = "Демпфер"}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user