forked from ddrilling/AsbCloudServer
Merge branch 'dev' into feature/refactoring-daily-report-form
This commit is contained in:
commit
a97fd12b74
@ -24,6 +24,6 @@ namespace AsbCloudApp.Data
|
||||
/// <summary>
|
||||
/// Название типа компании
|
||||
/// </summary>
|
||||
public string CompanyTypeCaption { get; set; } = null!;
|
||||
public string? CompanyTypeCaption { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,11 @@ namespace AsbCloudApp.Data
|
||||
/// информация о бурении, панели оператора и контроллерах
|
||||
/// </summary>
|
||||
public TelemetryInfoDto? Info { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Смещение часового пояса от UTC
|
||||
/// </summary>
|
||||
public SimpleTimezoneDto? TimeZone { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,5 +1,7 @@
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -20,5 +22,15 @@ namespace AsbCloudApp.Services
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<TelemetryDataSaubStatDto>> GetTelemetryDataStatAsync(int idTelemetry, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Получить упакованый csv файл
|
||||
/// </summary>
|
||||
/// <param name="idWell"></param>
|
||||
/// <param name="beginDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<Stream> GetZippedCsv(int idWell, DateTime beginDate, DateTime endDate, CancellationToken token);
|
||||
}
|
||||
}
|
@ -54,7 +54,7 @@ namespace AsbCloudApp.Services
|
||||
/// </summary>
|
||||
/// <param name="idWell"></param>
|
||||
/// <returns></returns>
|
||||
int? GetOrDefaultIdTelemetryByIdWell(int idWell);
|
||||
TelemetryBaseDto? GetOrDefaultTelemetryByIdWell(int idWell);
|
||||
|
||||
/// <summary>
|
||||
/// получить диапазон дат за которые есть данные
|
||||
|
7803
AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.Designer.cs
generated
Normal file
7803
AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,757 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Add_new_permissions_for_root : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
string sql = @"INSERT INTO t_relation_user_role_permission (id_user_role, id_permission) values
|
||||
(1, 100),
|
||||
(1, 101),
|
||||
(1, 102),
|
||||
(1, 103),
|
||||
(1, 104),
|
||||
(1, 105),
|
||||
(1, 106),
|
||||
(1, 107),
|
||||
(1, 108),
|
||||
(1, 109),
|
||||
(1, 110),
|
||||
(1, 111),
|
||||
(1, 112),
|
||||
(1, 113),
|
||||
(1, 114),
|
||||
(1, 115),
|
||||
(1, 116),
|
||||
(1, 117),
|
||||
(1, 118),
|
||||
(1, 119),
|
||||
(1, 120),
|
||||
(1, 121),
|
||||
(1, 122),
|
||||
(1, 123),
|
||||
(1, 124),
|
||||
(1, 125),
|
||||
(1, 126),
|
||||
(1, 127),
|
||||
(1, 128),
|
||||
(1, 129),
|
||||
(1, 200),
|
||||
(1, 201),
|
||||
(1, 202),
|
||||
(1, 203),
|
||||
(1, 204),
|
||||
(1, 205),
|
||||
(1, 206),
|
||||
(1, 207),
|
||||
(1, 208),
|
||||
(1, 209),
|
||||
(1, 210),
|
||||
(1, 211),
|
||||
(1, 212),
|
||||
(1, 213),
|
||||
(1, 214),
|
||||
(1, 215),
|
||||
(1, 216),
|
||||
(1, 217),
|
||||
(1, 218),
|
||||
(1, 219),
|
||||
(1, 220),
|
||||
(1, 221),
|
||||
(1, 222),
|
||||
(1, 223),
|
||||
(1, 224),
|
||||
(1, 225),
|
||||
(1, 226),
|
||||
(1, 227),
|
||||
(1, 228),
|
||||
(1, 229),
|
||||
(1, 230),
|
||||
(1, 231),
|
||||
(1, 232),
|
||||
(1, 233),
|
||||
(1, 234),
|
||||
(1, 235),
|
||||
(1, 236),
|
||||
(1, 237),
|
||||
(1, 238),
|
||||
(1, 239),
|
||||
(1, 240),
|
||||
(1, 241),
|
||||
(1, 242),
|
||||
(1, 243),
|
||||
(1, 244),
|
||||
(1, 245),
|
||||
(1, 246),
|
||||
(1, 247),
|
||||
(1, 248),
|
||||
(1, 249),
|
||||
(1, 250),
|
||||
(1, 251),
|
||||
(1, 252),
|
||||
(1, 253),
|
||||
(1, 254),
|
||||
(1, 255),
|
||||
(1, 256),
|
||||
(1, 257),
|
||||
(1, 258),
|
||||
(1, 259),
|
||||
(1, 260),
|
||||
(1, 261),
|
||||
(1, 262),
|
||||
(1, 263),
|
||||
(1, 264),
|
||||
(1, 265),
|
||||
(1, 266),
|
||||
(1, 267),
|
||||
(1, 268),
|
||||
(1, 269),
|
||||
(1, 380),
|
||||
(1, 381),
|
||||
(1, 382),
|
||||
(1, 383),
|
||||
(1, 384),
|
||||
(1, 385),
|
||||
(1, 386),
|
||||
(1, 387),
|
||||
(1, 388),
|
||||
(1, 389),
|
||||
(1, 390),
|
||||
(1, 391),
|
||||
(1, 400),
|
||||
(1, 401),
|
||||
(1, 407),
|
||||
(1, 408),
|
||||
(1, 450),
|
||||
(1, 460),
|
||||
(1, 461),
|
||||
(1, 507),
|
||||
(1, 513),
|
||||
(1, 514),
|
||||
(1, 515)
|
||||
ON CONFLICT DO NOTHING;";
|
||||
migrationBuilder.Sql(sql);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 100, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 101, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 102, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 103, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 104, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 105, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 106, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 107, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 108, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 109, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 110, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 111, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 112, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 113, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 114, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 115, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 116, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 117, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 118, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 119, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 120, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 121, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 122, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 123, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 124, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 125, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 126, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 127, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 128, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 129, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 200, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 201, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 202, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 203, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 204, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 205, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 206, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 207, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 208, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 209, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 210, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 211, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 212, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 213, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 214, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 215, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 216, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 217, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 218, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 219, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 220, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 221, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 222, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 223, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 224, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 225, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 226, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 227, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 228, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 229, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 230, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 231, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 232, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 233, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 234, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 235, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 236, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 237, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 238, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 239, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 240, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 241, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 242, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 243, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 244, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 245, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 246, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 247, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 248, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 249, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 250, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 251, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 252, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 253, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 254, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 255, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 256, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 257, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 258, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 259, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 260, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 261, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 262, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 263, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 264, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 265, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 266, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 267, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 268, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 269, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 380, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 381, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 382, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 383, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 384, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 385, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 386, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 387, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 388, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 389, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 390, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 391, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 400, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 401, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 407, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 408, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 450, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 460, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 461, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 507, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 513, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 514, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 515, 1 });
|
||||
}
|
||||
}
|
||||
}
|
@ -2665,6 +2665,601 @@ namespace AsbCloudDb.Migrations
|
||||
IdPermission = 204
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 100
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 101
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 102
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 103
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 104
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 105
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 106
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 107
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 108
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 109
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 110
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 111
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 112
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 113
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 114
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 115
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 116
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 117
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 118
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 119
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 120
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 121
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 122
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 123
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 124
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 125
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 126
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 127
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 128
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 129
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 200
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 201
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 202
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 203
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 204
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 205
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 206
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 207
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 208
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 209
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 210
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 211
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 212
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 213
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 214
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 215
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 216
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 217
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 218
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 219
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 220
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 221
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 222
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 223
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 224
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 225
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 226
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 227
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 228
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 229
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 230
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 231
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 232
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 233
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 234
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 235
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 236
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 237
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 238
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 239
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 240
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 241
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 242
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 243
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 244
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 245
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 246
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 247
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 248
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 249
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 250
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 251
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 252
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 253
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 254
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 255
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 256
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 257
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 258
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 259
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 260
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 261
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 262
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 263
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 264
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 265
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 266
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 267
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 268
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 269
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 380
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 381
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 382
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 383
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 384
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 385
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 386
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 387
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 388
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 389
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 390
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 391
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 400
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 401
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 407
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 408
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 450
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 460
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 461
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 500
|
||||
@ -2700,6 +3295,11 @@ namespace AsbCloudDb.Migrations
|
||||
IdPermission = 506
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 507
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 510
|
||||
@ -2713,6 +3313,21 @@ namespace AsbCloudDb.Migrations
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 512
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 513
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 514
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 515
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1,60 +1,72 @@
|
||||
namespace AsbCloudDb.Model.DefaultData
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudDb.Model.DefaultData
|
||||
{
|
||||
internal class EntityFillerRelationUserRolePermission: EntityFiller<RelationUserRolePermission>
|
||||
{
|
||||
public override RelationUserRolePermission[] GetData() => new RelationUserRolePermission[]{
|
||||
new (){ IdUserRole = 1100, IdPermission = 102}, new (){ IdUserRole = 1100, IdPermission = 111},
|
||||
new (){ IdUserRole = 1101, IdPermission = 101}, new (){ IdUserRole = 1101, IdPermission = 100},
|
||||
new (){ IdUserRole = 1102, IdPermission = 105}, new (){ IdUserRole = 1102, IdPermission = 108},
|
||||
new (){ IdUserRole = 1103, IdPermission = 104}, new (){ IdUserRole = 1103, IdPermission = 103},
|
||||
new (){ IdUserRole = 1104, IdPermission = 108},
|
||||
new (){ IdUserRole = 1105, IdPermission = 107}, new (){ IdUserRole = 1105, IdPermission = 106},
|
||||
new (){ IdUserRole = 1106, IdPermission = 111},
|
||||
new (){ IdUserRole = 1107, IdPermission = 110}, new (){ IdUserRole = 1107, IdPermission = 109},
|
||||
new (){ IdUserRole = 1108, IdPermission = 114},
|
||||
new (){ IdUserRole = 1109, IdPermission = 113}, new (){ IdUserRole = 1109, IdPermission = 112},
|
||||
new (){ IdUserRole = 1110, IdPermission = 123}, new (){ IdUserRole = 1110, IdPermission = 114},
|
||||
new (){ IdUserRole = 1111, IdPermission = 122}, new (){ IdUserRole = 1111, IdPermission = 121},
|
||||
new (){ IdUserRole = 1112, IdPermission = 117},
|
||||
new (){ IdUserRole = 1113, IdPermission = 105}, new (){ IdUserRole = 1113, IdPermission = 123}, new (){ IdUserRole = 1113, IdPermission = 120},
|
||||
new (){ IdUserRole = 1114, IdPermission = 119}, new (){ IdUserRole = 1114, IdPermission = 118}, new (){ IdUserRole = 1114, IdPermission = 200},
|
||||
new (){ IdUserRole = 1115, IdPermission = 223},
|
||||
new (){ IdUserRole = 1116, IdPermission = 105}, new (){ IdUserRole = 1116, IdPermission = 102}, new (){ IdUserRole = 1116, IdPermission = 117}, new (){ IdUserRole = 1116, IdPermission = 126},
|
||||
new (){ IdUserRole = 1117, IdPermission = 125}, new (){ IdUserRole = 1117, IdPermission = 124},
|
||||
new (){ IdUserRole = 1200, IdPermission = 203}, new (){ IdUserRole = 1200, IdPermission = 230},
|
||||
new (){ IdUserRole = 1201, IdPermission = 202}, new (){ IdUserRole = 1201, IdPermission = 203}, new (){ IdUserRole = 1201, IdPermission = 220},
|
||||
new (){ IdUserRole = 1202, IdPermission = 203}, new (){ IdUserRole = 1202, IdPermission = 220}, new (){ IdUserRole = 1202, IdPermission = 236}, new (){ IdUserRole = 1202, IdPermission = 212},
|
||||
new (){ IdUserRole = 1203, IdPermission = 235},
|
||||
new (){ IdUserRole = 1204, IdPermission = 202}, new (){ IdUserRole = 1204, IdPermission = 203},
|
||||
new (){ IdUserRole = 1205, IdPermission = 215},
|
||||
new (){ IdUserRole = 1206, IdPermission = 203}, new (){ IdUserRole = 1206, IdPermission = 206},
|
||||
new (){ IdUserRole = 1207, IdPermission = 205},
|
||||
new (){ IdUserRole = 1208, IdPermission = 218},
|
||||
new (){ IdUserRole = 1209, IdPermission = 217},
|
||||
new (){ IdUserRole = 1210, IdPermission = 203}, new (){ IdUserRole = 1210, IdPermission = 230}, new (){ IdUserRole = 1210, IdPermission = 219},
|
||||
new (){ IdUserRole = 1211, IdPermission = 203}, new (){ IdUserRole = 1211, IdPermission = 220}, new (){ IdUserRole = 1211, IdPermission = 239},
|
||||
new (){ IdUserRole = 1212, IdPermission = 238}, new (){ IdUserRole = 1212, IdPermission = 237},
|
||||
new (){ IdUserRole = 1213, IdPermission = 203}, new (){ IdUserRole = 1213, IdPermission = 239}, new (){ IdUserRole = 1213, IdPermission = 212},
|
||||
new (){ IdUserRole = 1214, IdPermission = 211}, new (){ IdUserRole = 1214, IdPermission = 210},
|
||||
new (){ IdUserRole = 1215, IdPermission = 203}, new (){ IdUserRole = 1215, IdPermission = 222},
|
||||
new (){ IdUserRole = 1216, IdPermission = 221},
|
||||
new (){ IdUserRole = 1217, IdPermission = 226},
|
||||
new (){ IdUserRole = 1218, IdPermission = 225}, new (){ IdUserRole = 1218, IdPermission = 224},
|
||||
new (){ IdUserRole = 1219, IdPermission = 203}, new (){ IdUserRole = 1219, IdPermission = 206}, new (){ IdUserRole = 1219, IdPermission = 230}, new (){ IdUserRole = 1219, IdPermission = 232},
|
||||
new (){ IdUserRole = 1220, IdPermission = 203}, new (){ IdUserRole = 1220, IdPermission = 228},
|
||||
new (){ IdUserRole = 1221, IdPermission = 202}, new (){ IdUserRole = 1221, IdPermission = 203}, new (){ IdUserRole = 1221, IdPermission = 220}, new (){ IdUserRole = 1221, IdPermission = 234},
|
||||
new (){ IdUserRole = 1500, IdPermission = 507}, new (){ IdUserRole = 1500, IdPermission = 510},
|
||||
new (){ IdUserRole = 1501, IdPermission = 214}, new (){ IdUserRole = 1501, IdPermission = 213},
|
||||
new (){ IdUserRole = 1502, IdPermission = 207}, new (){ IdUserRole = 1502, IdPermission = 208},
|
||||
new (){ IdUserRole = 2000, IdPermission = 205}, new (){ IdUserRole = 2000, IdPermission = 204}, new (){ IdUserRole = 2000, IdPermission = 245},
|
||||
new (){ IdUserRole = 2001, IdPermission = 244}, new (){ IdUserRole = 2001, IdPermission = 245},
|
||||
new (){ IdUserRole = 2002, IdPermission = 244}, new (){ IdUserRole = 2002, IdPermission = 246}, new (){ IdUserRole = 2002, IdPermission = 237}, new (){ IdUserRole = 2002, IdPermission = 238},
|
||||
new (){ IdUserRole = 2003, IdPermission = 240}, new (){ IdUserRole = 2003, IdPermission = 217}, new (){ IdUserRole = 2003, IdPermission = 216},
|
||||
new (){ IdUserRole = 2004, IdPermission = 242}, new (){ IdUserRole = 2004, IdPermission = 217}, new (){ IdUserRole = 2004, IdPermission = 216}, new (){ IdUserRole = 2004, IdPermission = 205}, new (){ IdUserRole = 2004, IdPermission = 204},
|
||||
new (){ IdUserRole = 2005, IdPermission = 247}, new (){ IdUserRole = 2005, IdPermission = 205}, new (){ IdUserRole = 2005, IdPermission = 204},
|
||||
new (){ IdUserRole = 2006, IdPermission = 243}, new (){ IdUserRole = 2006, IdPermission = 205}, new (){ IdUserRole = 2006, IdPermission = 204},
|
||||
new (){ IdUserRole = 2007, IdPermission = 241}, new (){ IdUserRole = 2007, IdPermission = 205}, new (){ IdUserRole = 2007, IdPermission = 204},
|
||||
new (){ IdUserRole = 1, IdPermission = 500}, new (){ IdUserRole = 1, IdPermission = 501}, new (){ IdUserRole = 1, IdPermission = 502}, new (){ IdUserRole = 1, IdPermission = 503}, new (){ IdUserRole = 1, IdPermission = 504}, new (){ IdUserRole = 1, IdPermission = 505}, new (){ IdUserRole = 1, IdPermission = 506}, new (){ IdUserRole = 1, IdPermission = 510}, new (){ IdUserRole = 1, IdPermission = 511}, new (){ IdUserRole = 1, IdPermission = 512},
|
||||
};
|
||||
public override RelationUserRolePermission[] GetData()
|
||||
{
|
||||
var result = new List<RelationUserRolePermission>{
|
||||
new (){ IdUserRole = 1100, IdPermission = 102}, new (){ IdUserRole = 1100, IdPermission = 111},
|
||||
new (){ IdUserRole = 1101, IdPermission = 101}, new (){ IdUserRole = 1101, IdPermission = 100},
|
||||
new (){ IdUserRole = 1102, IdPermission = 105}, new (){ IdUserRole = 1102, IdPermission = 108},
|
||||
new (){ IdUserRole = 1103, IdPermission = 104}, new (){ IdUserRole = 1103, IdPermission = 103},
|
||||
new (){ IdUserRole = 1104, IdPermission = 108},
|
||||
new (){ IdUserRole = 1105, IdPermission = 107}, new (){ IdUserRole = 1105, IdPermission = 106},
|
||||
new (){ IdUserRole = 1106, IdPermission = 111},
|
||||
new (){ IdUserRole = 1107, IdPermission = 110}, new (){ IdUserRole = 1107, IdPermission = 109},
|
||||
new (){ IdUserRole = 1108, IdPermission = 114},
|
||||
new (){ IdUserRole = 1109, IdPermission = 113}, new (){ IdUserRole = 1109, IdPermission = 112},
|
||||
new (){ IdUserRole = 1110, IdPermission = 123}, new (){ IdUserRole = 1110, IdPermission = 114},
|
||||
new (){ IdUserRole = 1111, IdPermission = 122}, new (){ IdUserRole = 1111, IdPermission = 121},
|
||||
new (){ IdUserRole = 1112, IdPermission = 117},
|
||||
new (){ IdUserRole = 1113, IdPermission = 105}, new (){ IdUserRole = 1113, IdPermission = 123}, new (){ IdUserRole = 1113, IdPermission = 120},
|
||||
new (){ IdUserRole = 1114, IdPermission = 119}, new (){ IdUserRole = 1114, IdPermission = 118}, new (){ IdUserRole = 1114, IdPermission = 200},
|
||||
new (){ IdUserRole = 1115, IdPermission = 223},
|
||||
new (){ IdUserRole = 1116, IdPermission = 105}, new (){ IdUserRole = 1116, IdPermission = 102}, new (){ IdUserRole = 1116, IdPermission = 117}, new (){ IdUserRole = 1116, IdPermission = 126},
|
||||
new (){ IdUserRole = 1117, IdPermission = 125}, new (){ IdUserRole = 1117, IdPermission = 124},
|
||||
new (){ IdUserRole = 1200, IdPermission = 203}, new (){ IdUserRole = 1200, IdPermission = 230},
|
||||
new (){ IdUserRole = 1201, IdPermission = 202}, new (){ IdUserRole = 1201, IdPermission = 203}, new (){ IdUserRole = 1201, IdPermission = 220},
|
||||
new (){ IdUserRole = 1202, IdPermission = 203}, new (){ IdUserRole = 1202, IdPermission = 220}, new (){ IdUserRole = 1202, IdPermission = 236}, new (){ IdUserRole = 1202, IdPermission = 212},
|
||||
new (){ IdUserRole = 1203, IdPermission = 235},
|
||||
new (){ IdUserRole = 1204, IdPermission = 202}, new (){ IdUserRole = 1204, IdPermission = 203},
|
||||
new (){ IdUserRole = 1205, IdPermission = 215},
|
||||
new (){ IdUserRole = 1206, IdPermission = 203}, new (){ IdUserRole = 1206, IdPermission = 206},
|
||||
new (){ IdUserRole = 1207, IdPermission = 205},
|
||||
new (){ IdUserRole = 1208, IdPermission = 218},
|
||||
new (){ IdUserRole = 1209, IdPermission = 217},
|
||||
new (){ IdUserRole = 1210, IdPermission = 203}, new (){ IdUserRole = 1210, IdPermission = 230}, new (){ IdUserRole = 1210, IdPermission = 219},
|
||||
new (){ IdUserRole = 1211, IdPermission = 203}, new (){ IdUserRole = 1211, IdPermission = 220}, new (){ IdUserRole = 1211, IdPermission = 239},
|
||||
new (){ IdUserRole = 1212, IdPermission = 238}, new (){ IdUserRole = 1212, IdPermission = 237},
|
||||
new (){ IdUserRole = 1213, IdPermission = 203}, new (){ IdUserRole = 1213, IdPermission = 239}, new (){ IdUserRole = 1213, IdPermission = 212},
|
||||
new (){ IdUserRole = 1214, IdPermission = 211}, new (){ IdUserRole = 1214, IdPermission = 210},
|
||||
new (){ IdUserRole = 1215, IdPermission = 203}, new (){ IdUserRole = 1215, IdPermission = 222},
|
||||
new (){ IdUserRole = 1216, IdPermission = 221},
|
||||
new (){ IdUserRole = 1217, IdPermission = 226},
|
||||
new (){ IdUserRole = 1218, IdPermission = 225}, new (){ IdUserRole = 1218, IdPermission = 224},
|
||||
new (){ IdUserRole = 1219, IdPermission = 203}, new (){ IdUserRole = 1219, IdPermission = 206}, new (){ IdUserRole = 1219, IdPermission = 230}, new (){ IdUserRole = 1219, IdPermission = 232},
|
||||
new (){ IdUserRole = 1220, IdPermission = 203}, new (){ IdUserRole = 1220, IdPermission = 228},
|
||||
new (){ IdUserRole = 1221, IdPermission = 202}, new (){ IdUserRole = 1221, IdPermission = 203}, new (){ IdUserRole = 1221, IdPermission = 220}, new (){ IdUserRole = 1221, IdPermission = 234},
|
||||
new (){ IdUserRole = 1500, IdPermission = 507}, new (){ IdUserRole = 1500, IdPermission = 510},
|
||||
new (){ IdUserRole = 1501, IdPermission = 214}, new (){ IdUserRole = 1501, IdPermission = 213},
|
||||
new (){ IdUserRole = 1502, IdPermission = 207}, new (){ IdUserRole = 1502, IdPermission = 208},
|
||||
new (){ IdUserRole = 2000, IdPermission = 205}, new (){ IdUserRole = 2000, IdPermission = 204}, new (){ IdUserRole = 2000, IdPermission = 245},
|
||||
new (){ IdUserRole = 2001, IdPermission = 244}, new (){ IdUserRole = 2001, IdPermission = 245},
|
||||
new (){ IdUserRole = 2002, IdPermission = 244}, new (){ IdUserRole = 2002, IdPermission = 246}, new (){ IdUserRole = 2002, IdPermission = 237}, new (){ IdUserRole = 2002, IdPermission = 238},
|
||||
new (){ IdUserRole = 2003, IdPermission = 240}, new (){ IdUserRole = 2003, IdPermission = 217}, new (){ IdUserRole = 2003, IdPermission = 216},
|
||||
new (){ IdUserRole = 2004, IdPermission = 242}, new (){ IdUserRole = 2004, IdPermission = 217}, new (){ IdUserRole = 2004, IdPermission = 216}, new (){ IdUserRole = 2004, IdPermission = 205}, new (){ IdUserRole = 2004, IdPermission = 204},
|
||||
new (){ IdUserRole = 2005, IdPermission = 247}, new (){ IdUserRole = 2005, IdPermission = 205}, new (){ IdUserRole = 2005, IdPermission = 204},
|
||||
new (){ IdUserRole = 2006, IdPermission = 243}, new (){ IdUserRole = 2006, IdPermission = 205}, new (){ IdUserRole = 2006, IdPermission = 204},
|
||||
new (){ IdUserRole = 2007, IdPermission = 241}, new (){ IdUserRole = 2007, IdPermission = 205}, new (){ IdUserRole = 2007, IdPermission = 204},
|
||||
//new (){ IdUserRole = 1, IdPermission = 500}, new (){ IdUserRole = 1, IdPermission = 501}, new (){ IdUserRole = 1, IdPermission = 502}, new (){ IdUserRole = 1, IdPermission = 503}, new (){ IdUserRole = 1, IdPermission = 504}, new (){ IdUserRole = 1, IdPermission = 505}, new (){ IdUserRole = 1, IdPermission = 506}, new (){ IdUserRole = 1, IdPermission = 510}, new (){ IdUserRole = 1, IdPermission = 511}, new (){ IdUserRole = 1, IdPermission = 512}, new (){ IdUserRole = 1, IdPermission = 513}, new (){ IdUserRole = 1, IdPermission = 514}, new (){ IdUserRole = 1, IdPermission = 515},
|
||||
};
|
||||
var allPermissions = (new EntityFillerPermission()).GetData();
|
||||
foreach ( var permission in allPermissions)
|
||||
{
|
||||
var rootRelation = new RelationUserRolePermission() { IdUserRole = 1, IdPermission = permission.Id };
|
||||
result.Add( rootRelation );
|
||||
}
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,12 +55,12 @@ namespace AsbCloudInfrastructure.Repository
|
||||
|
||||
private async Task<TelemetryWirelineRunOutDto?> GetOrDefaultAsync(WellDto well, CancellationToken token)
|
||||
{
|
||||
var idTelemetry = telemetryService.GetOrDefaultIdTelemetryByIdWell(well.Id);
|
||||
if (idTelemetry is null)
|
||||
var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(well.Id);
|
||||
if (telemetry is null)
|
||||
return null;
|
||||
|
||||
var entity = await context.TelemetryWirelineRunOut
|
||||
.Where(x => x.IdTelemetry == idTelemetry)
|
||||
.Where(x => x.IdTelemetry == telemetry.Id)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefaultAsync(token)
|
||||
.ConfigureAwait(false);
|
||||
|
@ -138,7 +138,7 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
dto.DateStart = GetInterpolatedDate(firstIntervalOperation, depthInterval.min);
|
||||
dto.IdWell = firstIntervalOperation.IdWell;
|
||||
dto.IdWellSectionType = firstIntervalOperation.IdWellSectionType;
|
||||
dto.WellSectionTypeName = firstIntervalOperation.WellSectionTypeName;
|
||||
dto.WellSectionTypeName = firstIntervalOperation.WellSectionTypeName ?? string.Empty;
|
||||
dto.MechDrillingHours = CalcHours(depthInterval, intervalOperations);
|
||||
}
|
||||
|
||||
|
@ -116,10 +116,10 @@ namespace AsbCloudInfrastructure.Services
|
||||
|
||||
public DatesRangeDto? GetDatesRangeOrDefault(int idWell)
|
||||
{
|
||||
var idTelemetry = telemetryService.GetOrDefaultIdTelemetryByIdWell(idWell);
|
||||
if (idTelemetry is null)
|
||||
var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(idWell);
|
||||
if (telemetry is null)
|
||||
return null;
|
||||
var range = telemetryService.GetDatesRange((int)idTelemetry);
|
||||
var range = telemetryService.GetDatesRange(telemetry.Id);
|
||||
return range;
|
||||
}
|
||||
|
||||
|
85
AsbCloudInfrastructure/Services/SAUB/CsvSerializer.cs
Normal file
85
AsbCloudInfrastructure/Services/SAUB/CsvSerializer.cs
Normal file
@ -0,0 +1,85 @@
|
||||
using DocumentFormat.OpenXml.Drawing.Diagrams;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace System.Text.Csv
|
||||
{
|
||||
#nullable enable
|
||||
public class CsvSerializer<T>
|
||||
{
|
||||
private readonly PropertyInfo[] props;
|
||||
private readonly static Regex numbers = new Regex(@"^[0-9\-\+\.]+$");
|
||||
|
||||
public string Separator { get; set; } = ";";
|
||||
public string NewLine { get; set; } = "\r\n";
|
||||
public string Quot { get; set; } = "\"";
|
||||
public Encoding Encoding { get; set; } = Encoding.UTF8;
|
||||
public string FloatingPointFormat { get; set; } = "#0.000#";
|
||||
public string DateTimeFormat { get; set; } = "yyyy-MM-dd HH:mm:ss";
|
||||
public string objDateTimeOffsetFormat { get; set; } = "yyyy-MM-dd HH:mm:ss zzz";
|
||||
public string TimeOnlyFormat { get; set; } = "HH:mm:ss";
|
||||
public string DateOnlyFormat { get; set; } = "yyyy-MM-dd";
|
||||
|
||||
public CsvSerializer()
|
||||
{
|
||||
props = typeof(T).GetProperties();
|
||||
}
|
||||
|
||||
public void Serialize(IEnumerable<T> data, Stream toStream)
|
||||
{
|
||||
if (!data.Any())
|
||||
return;
|
||||
|
||||
if(!props.Any())
|
||||
return;
|
||||
|
||||
void HandleRow(IEnumerable<object?> rowData)
|
||||
{
|
||||
var row = string.Join(Separator, rowData);
|
||||
var bytes = Encoding.GetBytes(row + NewLine);
|
||||
toStream.Write(bytes);
|
||||
}
|
||||
|
||||
|
||||
HandleRow(props.Select(p => p.Name));
|
||||
|
||||
foreach ( var item in data)
|
||||
HandleRow(props.Select(p => CsvSerializer<T>.Escape(Fromat(p.GetValue(item)))));
|
||||
}
|
||||
|
||||
private string Fromat(object? obj)
|
||||
{
|
||||
if (obj is double objDouble)
|
||||
return objDouble.ToString(FloatingPointFormat);
|
||||
|
||||
if (obj is float objfloat)
|
||||
return objfloat.ToString(FloatingPointFormat);
|
||||
|
||||
if (obj is DateTime objDateTime)
|
||||
return objDateTime.ToString(DateTimeFormat);
|
||||
|
||||
if (obj is DateTimeOffset objDateTimeOffset)
|
||||
return objDateTimeOffset.ToString(objDateTimeOffsetFormat);
|
||||
|
||||
if (obj is DateOnly objDateOnly)
|
||||
return objDateOnly.ToString(DateOnlyFormat);
|
||||
|
||||
if (obj is TimeOnly objTimeOnly)
|
||||
return objTimeOnly.ToString(TimeOnlyFormat);
|
||||
|
||||
return obj?.ToString() ?? string.Empty;
|
||||
}
|
||||
|
||||
private static string Escape(string inString)
|
||||
{
|
||||
if (numbers.IsMatch(inString))
|
||||
return inString;
|
||||
|
||||
return $"\"{inString}\"";
|
||||
}
|
||||
}
|
||||
#nullable disable
|
||||
}
|
@ -37,17 +37,17 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
Take = request.Take ?? 32,
|
||||
};
|
||||
|
||||
var idTelemetry = telemetryService.GetOrDefaultIdTelemetryByIdWell(request.IdWell);
|
||||
if (idTelemetry is null)
|
||||
var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(request.IdWell);
|
||||
if (telemetry is null)
|
||||
return result;
|
||||
|
||||
var allEvents = await memoryCache.GetOrCreateBasicAsync(db.Set<TelemetryEvent>(), token);
|
||||
var events = allEvents.Where(e => e.IdTelemetry == idTelemetry);
|
||||
var events = allEvents.Where(e => e.IdTelemetry == telemetry.Id);
|
||||
|
||||
if (!events.Any())
|
||||
return result;
|
||||
|
||||
var query = db.TelemetryMessages.Where(m => m.IdTelemetry == idTelemetry)
|
||||
var query = db.TelemetryMessages.Where(m => m.IdTelemetry == telemetry.Id)
|
||||
.OrderBy(m => m.DateTime).AsNoTracking();
|
||||
|
||||
if (request.Categoryids?.Any() == true || !string.IsNullOrEmpty(request.SearchString))
|
||||
@ -68,7 +68,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
|
||||
query = query.OrderByDescending(m => m.DateTime);
|
||||
|
||||
var timezone = telemetryService.GetTimezone(idTelemetry ?? default);
|
||||
var timezone = telemetryService.GetTimezone(telemetry.Id);
|
||||
|
||||
if (request.Begin is not null)
|
||||
{
|
||||
@ -96,7 +96,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
return result;
|
||||
|
||||
var allUsers = await memoryCache.GetOrCreateBasicAsync(db.Set<TelemetryUser>(), token);
|
||||
var users = allUsers.Where(u => u.IdTelemetry == idTelemetry);
|
||||
var users = allUsers.Where(u => u.IdTelemetry == telemetry.Id);
|
||||
|
||||
var eventsDict = events.ToDictionary(x=>x.IdEvent, x => x);
|
||||
var usersDict = users.ToDictionary(x => x.IdUser, x => x);
|
||||
|
@ -93,17 +93,17 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
DateTime dateBegin = default, double intervalSec = 600d,
|
||||
int approxPointsCount = 1024, CancellationToken token = default)
|
||||
{
|
||||
var idTelemetry = telemetryService.GetOrDefaultIdTelemetryByIdWell(idWell) ?? -1;
|
||||
if (idTelemetry == -1)
|
||||
var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(idWell);
|
||||
if (telemetry is null)
|
||||
return null;
|
||||
|
||||
var timezone = telemetryService.GetTimezone(idTelemetry);
|
||||
var timezone = telemetryService.GetTimezone(telemetry.Id);
|
||||
|
||||
var filterByDateEnd = dateBegin != default;
|
||||
DateTimeOffset dateBeginUtc;
|
||||
if (dateBegin == default)
|
||||
{
|
||||
dateBeginUtc = telemetryService.GetLastTelemetryDate(idTelemetry)
|
||||
dateBeginUtc = telemetryService.GetLastTelemetryDate(telemetry.Id)
|
||||
.ToUtcDateTimeOffset(timezone.Hours);
|
||||
if (dateBeginUtc != default)
|
||||
dateBeginUtc = dateBeginUtc.AddSeconds(-intervalSec);
|
||||
@ -116,7 +116,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
if (dateBeginUtc == default)
|
||||
dateBeginUtc = DateTime.UtcNow.AddSeconds(-intervalSec);
|
||||
|
||||
var cacheData = telemetryDataCache.GetOrDefault(idTelemetry, dateBeginUtc.ToRemoteDateTime(timezone.Hours), intervalSec, approxPointsCount);
|
||||
var cacheData = telemetryDataCache.GetOrDefault(telemetry.Id, dateBeginUtc.ToRemoteDateTime(timezone.Hours), intervalSec, approxPointsCount);
|
||||
if (cacheData is not null)
|
||||
return cacheData;
|
||||
|
||||
@ -124,7 +124,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
var dbSet = db.Set<TEntity>();
|
||||
|
||||
var query = dbSet
|
||||
.Where(d => d.IdTelemetry == idTelemetry
|
||||
.Where(d => d.IdTelemetry == telemetry.Id
|
||||
&& d.DateTime >= dateBeginUtc);
|
||||
|
||||
if (filterByDateEnd)
|
||||
|
@ -1,11 +1,17 @@
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using AsbCloudApp.Exceptions;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Csv;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -97,6 +103,42 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
: src.WellDepth;
|
||||
return dto;
|
||||
}
|
||||
|
||||
public async Task<Stream> GetZippedCsv(int idWell, DateTime beginDate, DateTime endDate, CancellationToken token)
|
||||
{
|
||||
double intervalSec = (endDate - beginDate).TotalSeconds;
|
||||
if (intervalSec > 60*60*24*3)
|
||||
throw new ArgumentInvalidException("Слишком большой диапазон", nameof(endDate));
|
||||
|
||||
var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(idWell)
|
||||
?? throw new ArgumentInvalidException($"Скважина id:{idWell} не содержит телеметрии", nameof(idWell));
|
||||
|
||||
var approxPointsCount = intervalSec switch
|
||||
{
|
||||
< 2048 => 2048,
|
||||
< 8_192 => 4_096,
|
||||
< 131_072 => 16_384,
|
||||
_ => 32_768
|
||||
};
|
||||
|
||||
var data = await GetOrDefaultAsync(idWell, beginDate, intervalSec, approxPointsCount, token );
|
||||
|
||||
var fileName = $"DataSaub idWell{idWell}";
|
||||
if (telemetry.Info is not null)
|
||||
fileName += $" {telemetry.Info?.Cluster}, {telemetry.Info?.Well}";
|
||||
fileName += $" {beginDate:yyyy-MM-DDTHH-mm} - {endDate:yyyy-MM-DDTHH-mm}.csv";
|
||||
|
||||
var outStream = new MemoryStream();
|
||||
using (var archive = new ZipArchive(outStream, ZipArchiveMode.Create, true))
|
||||
{
|
||||
var entryFile = archive.CreateEntry(fileName, CompressionLevel.Optimal);
|
||||
using var entryStream = entryFile.Open();
|
||||
var serializer = new CsvSerializer<TelemetryDataSaubDto>();
|
||||
serializer.Serialize(data, entryStream);
|
||||
}
|
||||
outStream.Seek(0, SeekOrigin.Begin);
|
||||
return outStream;
|
||||
}
|
||||
}
|
||||
#nullable disable
|
||||
}
|
||||
|
@ -138,11 +138,11 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
throw new Exception($"Telemetry id: {idTelemetry} can't find timezone.");
|
||||
}
|
||||
|
||||
public int? GetOrDefaultIdTelemetryByIdWell(int idWell)
|
||||
public TelemetryBaseDto? GetOrDefaultTelemetryByIdWell(int idWell)
|
||||
{
|
||||
var telemetry = GetTelemetryCache()
|
||||
.FirstOrDefault(t => t.Well?.Id == idWell);
|
||||
return telemetry?.Id;
|
||||
return telemetry?.Adapt<TelemetryBaseDto>();
|
||||
}
|
||||
|
||||
private Well? GetWellByTelemetryUid(string uid)
|
||||
|
@ -47,7 +47,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
.Options;
|
||||
var db = new AsbCloudDbContext(contextOptions);
|
||||
|
||||
var cacheTelemetry = memoryCache.GetOrCreateBasic(db.Set<Telemetry>());
|
||||
var cacheTelemetry = memoryCache.GetOrCreateBasic(db.Set<Telemetry>().Include(t=>t.Well));
|
||||
var keyValuePairs = new Dictionary<string, TrackerStat>(cacheTelemetry.Count());
|
||||
foreach (var telemetry in cacheTelemetry)
|
||||
{
|
||||
|
@ -18,9 +18,9 @@ namespace AsbCloudWebApi.Controllers.SAUB
|
||||
public abstract class TelemetryDataBaseController<TDto> : ControllerBase
|
||||
where TDto : ITelemetryData
|
||||
{
|
||||
protected readonly IWellService wellService;
|
||||
private readonly ITelemetryService telemetryService;
|
||||
private readonly ITelemetryDataService<TDto> telemetryDataService;
|
||||
private readonly IWellService wellService;
|
||||
private readonly IHubContext<TelemetryHub> telemetryHubContext;
|
||||
|
||||
public string SirnalRMethodGetDataName { get; protected set; } = "ReceiveData";
|
||||
|
@ -3,6 +3,11 @@ using AsbCloudApp.Services;
|
||||
using AsbCloudWebApi.SignalR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using AsbCloudInfrastructure.Services;
|
||||
using System;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers.SAUB
|
||||
{
|
||||
@ -13,6 +18,8 @@ namespace AsbCloudWebApi.Controllers.SAUB
|
||||
[ApiController]
|
||||
public class TelemetryDataSaubController : TelemetryDataBaseController<TelemetryDataSaubDto>
|
||||
{
|
||||
private readonly ITelemetryDataSaubService telemetryDataSaubService;
|
||||
|
||||
public TelemetryDataSaubController(
|
||||
ITelemetryService telemetryService,
|
||||
ITelemetryDataSaubService telemetryDataService,
|
||||
@ -25,6 +32,35 @@ namespace AsbCloudWebApi.Controllers.SAUB
|
||||
telemetryHubContext)
|
||||
{
|
||||
SirnalRMethodGetDataName = "ReceiveDataSaub";
|
||||
telemetryDataSaubService = telemetryDataService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Выгрузка архива. Не более 3-х суток. Формат даты строгий.
|
||||
/// </summary>
|
||||
/// <param name="idWell">id скважины (из адресной строки)</param>
|
||||
/// <param name="beginDate">начало интервала в формате: yyyy-MM-DD HH:mm</param>
|
||||
/// <param name="endDate">конец интервала в формате: yyyy-MM-DD HH:mm</param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{idWell}/export/csv")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetZippedCsv(int idWell, DateTime beginDate, DateTime endDate, CancellationToken token)
|
||||
{
|
||||
int? idCompany = User.GetCompanyId();
|
||||
|
||||
if (idCompany is null)
|
||||
return Forbid();
|
||||
|
||||
bool isCompanyOwnsWell = await wellService.IsCompanyInvolvedInWellAsync((int)idCompany,
|
||||
idWell, token).ConfigureAwait(false);
|
||||
|
||||
if (!isCompanyOwnsWell)
|
||||
return Forbid();
|
||||
|
||||
var stream = await telemetryDataSaubService.GetZippedCsv(idWell, beginDate, endDate, token).ConfigureAwait(false);
|
||||
var fileName = $"DataSaub idWell{idWell} {beginDate:yyyy-MM-DDTHH-mm} - {endDate:yyyy-MM-DDTHH-mm}.zip";
|
||||
return File(stream, "application/octet-stream", fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,10 +72,10 @@ namespace AsbCloudWebApi.Controllers.WITS
|
||||
[FromServices] IWitsRecordRepository<TDto> witsRecordRepository,
|
||||
CancellationToken token)
|
||||
{
|
||||
var idTelemetry = telemetryService.GetOrDefaultIdTelemetryByIdWell(idWell);
|
||||
if (idTelemetry is null)
|
||||
var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(idWell);
|
||||
if (telemetry is null)
|
||||
return NoContent();
|
||||
var dtos = await witsRecordRepository.GetLastAsync((int)idTelemetry, token);
|
||||
var dtos = await witsRecordRepository.GetLastAsync(telemetry.Id, token);
|
||||
return Ok(dtos);
|
||||
}
|
||||
|
||||
@ -96,10 +96,10 @@ namespace AsbCloudWebApi.Controllers.WITS
|
||||
[FromServices] IWitsRecordRepository<TDto> witsRecordRepository,
|
||||
CancellationToken token)
|
||||
{
|
||||
var idTelemetry = telemetryService.GetOrDefaultIdTelemetryByIdWell(idWell);
|
||||
if (idTelemetry is null)
|
||||
var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(idWell);
|
||||
if (telemetry is null)
|
||||
return NoContent();
|
||||
var dtos = await witsRecordRepository.GetAsync((int)idTelemetry, begin, end, token);
|
||||
var dtos = await witsRecordRepository.GetAsync(telemetry.Id, begin, end, token);
|
||||
return Ok(dtos);
|
||||
}
|
||||
|
||||
@ -118,10 +118,10 @@ namespace AsbCloudWebApi.Controllers.WITS
|
||||
[FromServices] IWitsRecordRepository<TDto> witsRecordRepository,
|
||||
CancellationToken token)
|
||||
{
|
||||
var idTelemetry = telemetryService.GetOrDefaultIdTelemetryByIdWell(idWell);
|
||||
if (idTelemetry is null)
|
||||
var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(idWell);
|
||||
if (telemetry is null)
|
||||
return NoContent();
|
||||
var dtos = await witsRecordRepository.GetStatAsync((int)idTelemetry, token);
|
||||
var dtos = await witsRecordRepository.GetStatAsync(telemetry.Id, token);
|
||||
return Ok(dtos);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudApp.Data;
|
||||
@ -19,20 +17,11 @@ namespace ConsoleApp1
|
||||
{
|
||||
static void Main(/*string[] args*/)
|
||||
{
|
||||
var db = ServiceFactory.Context;
|
||||
var q = db.TelemetryDataSaub
|
||||
.Select(t => new {
|
||||
t.IdTelemetry,
|
||||
t.DateTime,
|
||||
t.WellDepth,
|
||||
})
|
||||
.GroupBy(t => t.IdTelemetry)
|
||||
.Select(g => new {
|
||||
Id = g.Key,
|
||||
First = g.OrderBy(t => t.DateTime).FirstOrDefault(),
|
||||
Last = g.OrderBy(t => t.DateTime).LastOrDefault(),
|
||||
});
|
||||
var d = q.AsNoTracking().ToArray();
|
||||
|
||||
var n = "-159.99";
|
||||
var s = "159.99s";
|
||||
var r1 = reg.IsMatch( n );
|
||||
var r2 = reg.IsMatch( s );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user