refactor(aihit): удален старый проект синхронизации aihit. Удалены таблицы из БД.

This commit is contained in:
Mikhail Trubnikov
2024-02-05 16:56:44 +10:00
parent e6e3d57f8f
commit e9cd70e910
34 changed files with 2675 additions and 1574 deletions

View File

@@ -2,7 +2,6 @@
using PARR.Constants;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.DAL.Models.AIHIT;
namespace PARR.DAL.Context
{
@@ -17,8 +16,6 @@ namespace PARR.DAL.Context
public DbSet<ApplicationType> ApplicationTypes { get; set; }
public DbSet<ApplicationInHost> ApplicationsInHosts { get; set; }
public DbSet<Models.AIHIT.Setting> Settings { get; set; }
public DbSet<RawDataEK> RawDataEKs { get; set; }
public DbSet<Template> Templates { get; set; }
public DbSet<Models.TaskStatus> TaskStatuses { get; set; }
public DbSet<RobotStatus> RobotStatuses { get; set; }
@@ -72,33 +69,6 @@ namespace PARR.DAL.Context
});
#endregion
#region AIHIT_Setting
modelBuilder.Entity<Models.AIHIT.Setting>(f =>
{
f.HasData(
//new() { Id = new Guid("1AD12210-BE62-459A-AA6C-FDA7648503F7"), DateCreated = dateCreated, DateModified = null, Group = null, Name = "ConnectionString", Value = @"Data Source=10.248.19.97; Initial Catalog=mao2;User ID=awhit-ipp-parr;pwd=ET3h$9y1LH#D;TrustServerCertificate=true;", Description = "Строка подключения к базе данных АИХ ИТ" },
new() { Id = new Guid("B16AFD06-605B-499F-9E35-A19586DE96B0"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ГВЦ", Value = "00-ГВЦ", Description = "Зона ответственности" },
new() { Id = new Guid("42A2EC03-DA3A-45FC-971E-399910FDC5AE"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ОКТ", Value = "01-ОКТ", Description = "Зона ответственности" },
new() { Id = new Guid("17EFAF65-AE8C-45F1-B187-E6CB1BD6385B"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "КЛГ", Value = "10-КЛГ", Description = "Зона ответственности" },
new() { Id = new Guid("51270997-20F6-4A61-85AC-64F6B6DD5DC4"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "МСК", Value = "17-МСК", Description = "Зона ответственности" },
new() { Id = new Guid("B94F8C38-E78A-494E-81BA-39E4E902FFCC"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ГОР", Value = "24-ГОР", Description = "Зона ответственности" },
new() { Id = new Guid("52BA20EA-4E7A-4500-939B-E2CFF563809A"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "СЕВ", Value = "28-СЕВ", Description = "Зона ответственности" },
new() { Id = new Guid("CB9DA805-29E9-4E08-B1ED-D4B374920F77"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "СКВ", Value = "51-СКВ", Description = "Зона ответственности" },
new() { Id = new Guid("1943A65C-2060-4B5F-AF1F-ACEC74835481"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ЮВСТ", Value = "58-ЮВСТ", Description = "Зона ответственности" },
new() { Id = new Guid("4D9EF2EE-D4FA-4D28-A93B-6F1FD0A639F9"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ПРИВ", Value = "61-ПРИВ", Description = "Зона ответственности" },
new() { Id = new Guid("F1A54C25-A93A-4FE3-8268-AFBCC435B6E9"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "КБШ", Value = "63-КБШ", Description = "Зона ответственности" },
new() { Id = new Guid("CC839C48-62BB-46A8-924C-85B5E7A3E245"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "СВРД", Value = "76-СВРД", Description = "Зона ответственности" },
new() { Id = new Guid("C98FB684-FF03-441E-A9C3-AC5071D69857"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ЮУР", Value = "80-ЮУР", Description = "Зона ответственности" },
new() { Id = new Guid("F2684A90-6029-4476-BD3D-E713A8A228D6"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ЗСИБ", Value = "83-ЗСИБ", Description = "Зона ответственности" },
new() { Id = new Guid("B3C73162-21EA-42F0-B0E1-3C5076176F8A"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "КРАСН", Value = "88-КРАСН", Description = "Зона ответственности" },
new() { Id = new Guid("a8cff6fd-28b7-49f2-a412-9208c10f6516"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ВСИБ", Value = "92-ВСИБ", Description = "Зона ответственности" },
new() { Id = new Guid("50F66704-4D26-4587-BB1E-DCA70C8F4B89"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ЗАБ", Value = "94-ЗАБ", Description = "Зона ответственности" },
new() { Id = new Guid("1FD43634-4A06-4237-9727-EDFA6F3EEBE8"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ДВС", Value = "96-ДВС", Description = "Зона ответственности" },
new() { Id = new Guid("77C73C0A-8E4D-4676-B6E2-6A112F20E346"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.StatusGroupName, Name = "Exploitation", Value = "3-В эксплуатации", Description = "Статус актуальных ЭК" }
);
});
#endregion
#region TaskStatus
modelBuilder.Entity<Models.TaskStatus>(f =>
{

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,135 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class removeTblAihit : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RawDataEKs",
schema: "AIHIT");
migrationBuilder.DropTable(
name: "Settings",
schema: "AIHIT");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "AIHIT");
migrationBuilder.CreateTable(
name: "RawDataEKs",
schema: "AIHIT",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
AIHID = table.Column<int>(type: "integer", nullable: true),
APPType = table.Column<string>(type: "text", nullable: true),
AdditionalInfo = table.Column<string>(type: "text", nullable: true),
CKBSServerType = table.Column<string>(type: "text", nullable: true),
CTSDirection = table.Column<string>(type: "text", nullable: true),
ClientOS = table.Column<string>(type: "text", nullable: true),
ClientSoftware = table.Column<string>(type: "text", nullable: true),
Company = table.Column<string>(type: "text", nullable: true),
CreateTime = table.Column<string>(type: "text", nullable: true),
DBType = table.Column<string>(type: "text", nullable: true),
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
DateModified = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
EKCategory = table.Column<string>(type: "text", nullable: true),
EKFindCode = table.Column<string>(type: "text", nullable: true),
EKRegister = table.Column<string>(type: "text", nullable: true),
EKRevizor = table.Column<string>(type: "text", nullable: true),
EKSubCategory = table.Column<string>(type: "text", nullable: true),
EKType = table.Column<string>(type: "text", nullable: true),
EndExplotationDate = table.Column<string>(type: "text", nullable: true),
FullName = table.Column<string>(type: "text", nullable: true),
IBServerType = table.Column<string>(type: "text", nullable: true),
IP = table.Column<string>(type: "text", nullable: true),
InfrastructureServerType = table.Column<string>(type: "text", nullable: true),
IsActive = table.Column<string>(type: "text", nullable: true),
IsImportant = table.Column<string>(type: "text", nullable: true),
IsUnreliableData = table.Column<char>(type: "character(1)", nullable: true),
Location = table.Column<string>(type: "text", nullable: true),
Metka = table.Column<string>(type: "text", nullable: true),
MonitoringServerType = table.Column<string>(type: "text", nullable: true),
NetworkName = table.Column<string>(type: "text", nullable: true),
NewEKFindCode = table.Column<string>(type: "text", nullable: true),
OSType = table.Column<string>(type: "text", nullable: true),
OldEKFindCode = table.Column<string>(type: "text", nullable: true),
PlannedTimeToRepair = table.Column<string>(type: "text", nullable: true),
Prescription = table.Column<string>(type: "text", nullable: true),
ProductCode = table.Column<string>(type: "text", nullable: true),
ResponseArea = table.Column<string>(type: "text", nullable: true),
ResponsibleByEK = table.Column<string>(type: "text", nullable: true),
ServiceCode = table.Column<string>(type: "text", nullable: true),
ShiftWorkGroup = table.Column<string>(type: "text", nullable: true),
ShortName = table.Column<string>(type: "text", nullable: true),
StartExplotationDate = table.Column<string>(type: "text", nullable: true),
Status = table.Column<string>(type: "text", nullable: true),
SysModTime = table.Column<string>(type: "text", nullable: true),
SysModUser = table.Column<string>(type: "text", nullable: true),
TargetRepairTime = table.Column<string>(type: "text", nullable: true),
WorkGroup = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_RawDataEKs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Settings",
schema: "AIHIT",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
DateModified = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
Description = table.Column<string>(type: "text", nullable: true),
Group = table.Column<string>(type: "text", nullable: true),
Name = table.Column<string>(type: "text", nullable: false),
Value = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Settings", x => x.Id);
});
migrationBuilder.InsertData(
schema: "AIHIT",
table: "Settings",
columns: new[] { "Id", "DateCreated", "DateModified", "Description", "Group", "Name", "Value" },
values: new object[,]
{
{ new Guid("17efaf65-ae8c-45f1-b187-e6cb1bd6385b"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "КЛГ", "10-КЛГ" },
{ new Guid("1943a65c-2060-4b5f-af1f-acec74835481"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ЮВСТ", "58-ЮВСТ" },
{ new Guid("1fd43634-4a06-4237-9727-edfa6f3eebe8"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ДВС", "96-ДВС" },
{ new Guid("42a2ec03-da3a-45fc-971e-399910fdc5ae"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ОКТ", "01-ОКТ" },
{ new Guid("4d9ef2ee-d4fa-4d28-a93b-6f1fd0a639f9"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ПРИВ", "61-ПРИВ" },
{ new Guid("50f66704-4d26-4587-bb1e-dca70c8f4b89"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ЗАБ", "94-ЗАБ" },
{ new Guid("51270997-20f6-4a61-85ac-64f6b6dd5dc4"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "МСК", "17-МСК" },
{ new Guid("52ba20ea-4e7a-4500-939b-e2cff563809a"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "СЕВ", "28-СЕВ" },
{ new Guid("77c73c0a-8e4d-4676-b6e2-6a112f20e346"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Статус актуальных ЭК", "Status", "Exploitation", "3-В эксплуатации" },
{ new Guid("a8cff6fd-28b7-49f2-a412-9208c10f6516"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ВСИБ", "92-ВСИБ" },
{ new Guid("b16afd06-605b-499f-9e35-a19586de96b0"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ГВЦ", "00-ГВЦ" },
{ new Guid("b3c73162-21ea-42f0-b0e1-3c5076176f8a"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "КРАСН", "88-КРАСН" },
{ new Guid("b94f8c38-e78a-494e-81ba-39e4e902ffcc"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ГОР", "24-ГОР" },
{ new Guid("c98fb684-ff03-441e-a9c3-ac5071d69857"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ЮУР", "80-ЮУР" },
{ new Guid("cb9da805-29e9-4e08-b1ed-d4b374920f77"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "СКВ", "51-СКВ" },
{ new Guid("cc839c48-62bb-46a8-924c-85b5e7a3e245"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "СВРД", "76-СВРД" },
{ new Guid("f1a54c25-a93a-4fe3-8268-afbcc435b6e9"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "КБШ", "63-КБШ" },
{ new Guid("f2684a90-6029-4476-bd3d-e713a8a228d6"), new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), null, "Зона ответственности", "ResponsibleArea", "ЗСИБ", "83-ЗСИБ" }
});
}
}
}

View File

@@ -22,353 +22,6 @@ namespace PARR.DAL.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("PARR.DAL.Models.AIHIT.RawDataEK", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int?>("AIHID")
.HasColumnType("integer");
b.Property<string>("APPType")
.HasColumnType("text");
b.Property<string>("AdditionalInfo")
.HasColumnType("text");
b.Property<string>("CKBSServerType")
.HasColumnType("text");
b.Property<string>("CTSDirection")
.HasColumnType("text");
b.Property<string>("ClientOS")
.HasColumnType("text");
b.Property<string>("ClientSoftware")
.HasColumnType("text");
b.Property<string>("Company")
.HasColumnType("text");
b.Property<string>("CreateTime")
.HasColumnType("text");
b.Property<string>("DBType")
.HasColumnType("text");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("EKCategory")
.HasColumnType("text");
b.Property<string>("EKFindCode")
.HasColumnType("text");
b.Property<string>("EKRegister")
.HasColumnType("text");
b.Property<string>("EKRevizor")
.HasColumnType("text");
b.Property<string>("EKSubCategory")
.HasColumnType("text");
b.Property<string>("EKType")
.HasColumnType("text");
b.Property<string>("EndExplotationDate")
.HasColumnType("text");
b.Property<string>("FullName")
.HasColumnType("text");
b.Property<string>("IBServerType")
.HasColumnType("text");
b.Property<string>("IP")
.HasColumnType("text");
b.Property<string>("InfrastructureServerType")
.HasColumnType("text");
b.Property<string>("IsActive")
.HasColumnType("text");
b.Property<string>("IsImportant")
.HasColumnType("text");
b.Property<char?>("IsUnreliableData")
.HasColumnType("character(1)");
b.Property<string>("Location")
.HasColumnType("text");
b.Property<string>("Metka")
.HasColumnType("text");
b.Property<string>("MonitoringServerType")
.HasColumnType("text");
b.Property<string>("NetworkName")
.HasColumnType("text");
b.Property<string>("NewEKFindCode")
.HasColumnType("text");
b.Property<string>("OSType")
.HasColumnType("text");
b.Property<string>("OldEKFindCode")
.HasColumnType("text");
b.Property<string>("PlannedTimeToRepair")
.HasColumnType("text");
b.Property<string>("Prescription")
.HasColumnType("text");
b.Property<string>("ProductCode")
.HasColumnType("text");
b.Property<string>("ResponseArea")
.HasColumnType("text");
b.Property<string>("ResponsibleByEK")
.HasColumnType("text");
b.Property<string>("ServiceCode")
.HasColumnType("text");
b.Property<string>("ShiftWorkGroup")
.HasColumnType("text");
b.Property<string>("ShortName")
.HasColumnType("text");
b.Property<string>("StartExplotationDate")
.HasColumnType("text");
b.Property<string>("Status")
.HasColumnType("text");
b.Property<string>("SysModTime")
.HasColumnType("text");
b.Property<string>("SysModUser")
.HasColumnType("text");
b.Property<string>("TargetRepairTime")
.HasColumnType("text");
b.Property<string>("WorkGroup")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("RawDataEKs", "AIHIT");
});
modelBuilder.Entity("PARR.DAL.Models.AIHIT.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("Group")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Settings", "AIHIT");
b.HasData(
new
{
Id = new Guid("b16afd06-605b-499f-9e35-a19586de96b0"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ГВЦ",
Value = "00-ГВЦ"
},
new
{
Id = new Guid("42a2ec03-da3a-45fc-971e-399910fdc5ae"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ОКТ",
Value = "01-ОКТ"
},
new
{
Id = new Guid("17efaf65-ae8c-45f1-b187-e6cb1bd6385b"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "КЛГ",
Value = "10-КЛГ"
},
new
{
Id = new Guid("51270997-20f6-4a61-85ac-64f6b6dd5dc4"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "МСК",
Value = "17-МСК"
},
new
{
Id = new Guid("b94f8c38-e78a-494e-81ba-39e4e902ffcc"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ГОР",
Value = "24-ГОР"
},
new
{
Id = new Guid("52ba20ea-4e7a-4500-939b-e2cff563809a"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "СЕВ",
Value = "28-СЕВ"
},
new
{
Id = new Guid("cb9da805-29e9-4e08-b1ed-d4b374920f77"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "СКВ",
Value = "51-СКВ"
},
new
{
Id = new Guid("1943a65c-2060-4b5f-af1f-acec74835481"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ЮВСТ",
Value = "58-ЮВСТ"
},
new
{
Id = new Guid("4d9ef2ee-d4fa-4d28-a93b-6f1fd0a639f9"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ПРИВ",
Value = "61-ПРИВ"
},
new
{
Id = new Guid("f1a54c25-a93a-4fe3-8268-afbcc435b6e9"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "КБШ",
Value = "63-КБШ"
},
new
{
Id = new Guid("cc839c48-62bb-46a8-924c-85b5e7a3e245"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "СВРД",
Value = "76-СВРД"
},
new
{
Id = new Guid("c98fb684-ff03-441e-a9c3-ac5071d69857"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ЮУР",
Value = "80-ЮУР"
},
new
{
Id = new Guid("f2684a90-6029-4476-bd3d-e713a8a228d6"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ЗСИБ",
Value = "83-ЗСИБ"
},
new
{
Id = new Guid("b3c73162-21ea-42f0-b0e1-3c5076176f8a"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "КРАСН",
Value = "88-КРАСН"
},
new
{
Id = new Guid("a8cff6fd-28b7-49f2-a412-9208c10f6516"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ВСИБ",
Value = "92-ВСИБ"
},
new
{
Id = new Guid("50f66704-4d26-4587-bb1e-dca70c8f4b89"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ЗАБ",
Value = "94-ЗАБ"
},
new
{
Id = new Guid("1fd43634-4a06-4237-9727-edfa6f3eebe8"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Зона ответственности",
Group = "ResponsibleArea",
Name = "ДВС",
Value = "96-ДВС"
},
new
{
Id = new Guid("77c73c0a-8e4d-4676-b6e2-6a112f20e346"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
Description = "Статус актуальных ЭК",
Group = "Status",
Name = "Exploitation",
Value = "3-В эксплуатации"
});
});
modelBuilder.Entity("PARR.DAL.Models.AgentHistory", b =>
{
b.Property<Guid>("Id")

View File

@@ -1,60 +0,0 @@
using PARR.DAL.Models.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models.AIHIT
{
[Table("RawDataEKs", Schema = "AIHIT")]
public class RawDataEK:IBase
{
[Key]
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
public DateTimeOffset? DateModified { get; set; }
public string? IP { get; set; }
public string? Metka { get; set; }
public string? IsActive { get; set; }
public string? IsImportant { get; set; }
public string? CreateTime { get; set; }
public string? AdditionalInfo { get; set; }
public string? ResponseArea { get; set; }
public string? EKCategory { get; set; }
public string? EKFindCode { get; set; }
public string? ProductCode { get; set; }
public string? ServiceCode { get; set; }
public string? ShortName { get; set; }
public string? ResponsibleByEK { get; set; }
public string? PlannedTimeToRepair { get; set; }
public string? EKSubCategory { get; set; }
public string? FullName { get; set; }
public string? Prescription { get; set; }
public string? Company { get; set; }
public string? WorkGroup { get; set; }
public string? Location { get; set; }
public string? EKRevizor { get; set; }
public string? EKRegister { get; set; }
public string? NetworkName { get; set; }
public string? Status { get; set; }
public string? EKType { get; set; }
public string? EndExplotationDate { get; set; }
public string? StartExplotationDate { get; set; }
public string? TargetRepairTime { get; set; }
public string? SysModTime { get; set; }
public string? SysModUser { get; set; }
public string? NewEKFindCode { get; set; }
public string? OldEKFindCode { get; set; }
public string? CTSDirection { get; set; }
public int? AIHID { get; set; }
public char? IsUnreliableData { get; set; }
public string? ShiftWorkGroup { get; set; }
public string? ClientSoftware { get; set; }
public string? ClientOS { get; set; }
public string? DBType { get; set; }
public string? APPType { get; set; }
public string? CKBSServerType { get; set; }
public string? IBServerType { get; set; }
public string? InfrastructureServerType { get; set; }
public string? MonitoringServerType { get; set; }
public string? OSType { get; set; }
}
}

View File

@@ -1,21 +0,0 @@
using PARR.DAL.Models.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models.AIHIT
{
[Table("Settings", Schema = "AIHIT")]
public class Setting : IBase
{
[Key]
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
public DateTimeOffset? DateModified { get; set; }
public string? Group { get; set; }
public required string Name { get; set; }
public required string Value { get; set; }
public string? Description { get; set; }
}
}

View File

@@ -7,9 +7,7 @@ using PARR.DAL.Context;
using PARR.DAL.Contracts;
using PARR.DAL.Services.Implementation;
using PARR.DAL.Services.Implementations;
using PARR.DAL.Services.Implementations.AIHIT;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.AIHIT;
using PARR.DAL.Settings;
using PARR.DAL.TransformServices;
@@ -49,8 +47,6 @@ namespace PARR.DAL
services.AddTransient<IProcessService, ProcessService>();
services.AddTransient<ISubprocessService, SubprocessService>();
services.AddTransient<ITnkService, TnkService>();
services.AddTransient<IRawDataEKService, RawDataEKService>();
services.AddTransient<ISettingService, SettingService>();
services.AddTransient<ITemplateService, TemplateService>();
services.AddTransient<IStatusTemplateService, StatusTemplateService>();
services.AddTransient<IRobotHistoryLevelService, RobotHistoryLevelService>();

View File

@@ -1,39 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using PARR.DAL.Context;
using PARR.DAL.Models.AIHIT;
using PARR.DAL.Services.Abstracts;
using PARR.DAL.Services.Interfaces.AIHIT;
namespace PARR.DAL.Services.Implementations.AIHIT
{
internal class RawDataEKService : BaseService<RawDataEK>, IRawDataEKService
{
private readonly DataContext dataContext;
private readonly ILogger<RawDataEKService> logger;
public RawDataEKService(DataContext dataContext, ILogger<RawDataEKService> logger) : base(logger)
{
this.dataContext = dataContext;
this.logger = logger;
}
public void DeleteAll()
{
var startCount = EntitySet.Count();
if (startCount > 0)
{
EntitiContext.RawDataEKs.RemoveRange(EntitySet);
logger.LogInformation($"Из таблицы RawDataEK удалено {startCount} записей");
EntitiContext.SaveChanges();
}
}
protected override DbSet<RawDataEK> EntitySet => dataContext.RawDataEKs;
protected override DataContext EntitiContext => dataContext;
}
}

View File

@@ -1,23 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using PARR.DAL.Context;
using PARR.DAL.Models.AIHIT;
using PARR.DAL.Services.Abstracts;
using PARR.DAL.Services.Interfaces.AIHIT;
namespace PARR.DAL.Services.Implementations.AIHIT
{
internal class SettingService : BaseService<Setting>, ISettingService
{
private readonly DataContext dataContext;
private readonly ILogger<SettingService> logger;
public SettingService(DataContext dataContext, ILogger<SettingService> logger) : base(logger)
{
this.dataContext = dataContext;
this.logger = logger;
}
protected override DbSet<Setting> EntitySet => dataContext.Settings;
protected override DataContext EntitiContext => dataContext;
}
}

View File

@@ -1,9 +0,0 @@
using PARR.DAL.Services.Interfaces.Base;
namespace PARR.DAL.Services.Interfaces.AIHIT
{
public interface IRawDataEKService : IBaseService<Models.AIHIT.RawDataEK>
{
void DeleteAll();
}
}

View File

@@ -1,8 +0,0 @@
using PARR.DAL.Services.Interfaces.Base;
namespace PARR.DAL.Services.Interfaces.AIHIT
{
public interface ISettingService : IBaseService<Models.AIHIT.Setting>
{
}
}