forked from ddrilling/AsbCloudServer
Merge pull request 'Права для просмотра страницы Качества' (#335) from feature/#79219300-drilling-quality into dev
Reviewed-on: https://test.digitaldrilling.ru:8443/DDrilling/AsbCloudServer/pulls/335
This commit is contained in:
commit
2492b1d06b
38
AsbCloudApp/Data/DrillingQualityDto.cs
Normal file
38
AsbCloudApp/Data/DrillingQualityDto.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AsbCloudApp.Data;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DTO, представляющая качество бурения
|
||||||
|
/// </summary>
|
||||||
|
public class DrillingQualityDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ключ скважины
|
||||||
|
/// </summary>
|
||||||
|
public int IdWell { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// КПД скорости
|
||||||
|
/// </summary>
|
||||||
|
public double? KpdRop { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// КПД момента на ВСП
|
||||||
|
/// </summary>
|
||||||
|
public double? KpdTorque { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// КПД перепада давления
|
||||||
|
/// </summary>
|
||||||
|
public double? KpdPressureDelta { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// КПД нагрузки
|
||||||
|
/// </summary>
|
||||||
|
public double? KpdAxialLoad { get; set; }
|
||||||
|
}
|
12475
AsbCloudDb/Migrations/20241018050509_Add_Permission_DrillingQuality.Designer.cs
generated
Normal file
12475
AsbCloudDb/Migrations/20241018050509_Add_Permission_DrillingQuality.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace AsbCloudDb.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_Permission_DrillingQuality : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "t_permission",
|
||||||
|
columns: new[] { "id", "description", "name" },
|
||||||
|
values: new object[] { 535, "Разрешение просматривать страницу \"Качество\"", "DrillingQuality.get" });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "t_relation_user_role_permission",
|
||||||
|
columns: new[] { "id_permission", "id_user_role" },
|
||||||
|
values: new object[] { 535, 1 });
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "t_relation_user_role_permission",
|
||||||
|
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||||
|
keyValues: new object[] { 535, 1 });
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "t_permission",
|
||||||
|
keyColumn: "id",
|
||||||
|
keyValue: 535);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2698,6 +2698,12 @@ namespace AsbCloudDb.Migrations
|
|||||||
Id = 534,
|
Id = 534,
|
||||||
Description = "Разрешение просматривать статистику по плановым и фактическим подсистемам на скважинах",
|
Description = "Разрешение просматривать статистику по плановым и фактическим подсистемам на скважинах",
|
||||||
Name = "SubsystemStatPlanFact.get"
|
Name = "SubsystemStatPlanFact.get"
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = 535,
|
||||||
|
Description = "Разрешение просматривать страницу \"Качество\"",
|
||||||
|
Name = "DrillingQuality.get"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -6453,6 +6459,11 @@ namespace AsbCloudDb.Migrations
|
|||||||
{
|
{
|
||||||
IdUserRole = 1,
|
IdUserRole = 1,
|
||||||
IdPermission = 534
|
IdPermission = 534
|
||||||
|
},
|
||||||
|
new
|
||||||
|
{
|
||||||
|
IdUserRole = 1,
|
||||||
|
IdPermission = 535
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -168,6 +168,7 @@ namespace AsbCloudDb.Model.DefaultData
|
|||||||
new() { Id = 532, Name = "Version.get", Description = "Разрешение просматривать информацию о телеметрии"},
|
new() { Id = 532, Name = "Version.get", Description = "Разрешение просматривать информацию о телеметрии"},
|
||||||
new() { Id = 533, Name = "CriticalMessage.get", Description = "Разрешение просматривать критические сообщения"},
|
new() { Id = 533, Name = "CriticalMessage.get", Description = "Разрешение просматривать критические сообщения"},
|
||||||
new() { Id = 534, Name = "SubsystemStatPlanFact.get", Description = "Разрешение просматривать статистику по плановым и фактическим подсистемам на скважинах"},
|
new() { Id = 534, Name = "SubsystemStatPlanFact.get", Description = "Разрешение просматривать статистику по плановым и фактическим подсистемам на скважинах"},
|
||||||
|
new() { Id = 535, Name = "DrillingQuality.get", Description = "Разрешение просматривать страницу \"Качество\""},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,11 @@ using AsbCloudApp.Data.SAUB;
|
|||||||
using AsbCloudApp.Repositories;
|
using AsbCloudApp.Repositories;
|
||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using AsbCloudInfrastructure.Services;
|
using AsbCloudInfrastructure.Services;
|
||||||
using AsbCloudInfrastructure.Tests.MapData;
|
using AsbCloudInfrastructure.Tests.Services.DataSaubStat;
|
||||||
using CsvHelper;
|
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using NSubstitute;
|
using NSubstitute;
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using CsvHelper.Configuration.Attributes;
|
using CsvHelper.Configuration.Attributes;
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Tests.MapData
|
namespace AsbCloudInfrastructure.Tests.Services.DataSaubStat
|
||||||
{
|
{
|
||||||
public class DataSaubStatDrillingQualityDtoMap
|
public class DataSaubStatDrillingQualityDtoMap
|
||||||
{
|
{
|
||||||
@ -12,7 +12,7 @@ namespace AsbCloudInfrastructure.Tests.MapData
|
|||||||
|
|
||||||
[Name("depth_end")]
|
[Name("depth_end")]
|
||||||
public float DepthEnd { get; set; }
|
public float DepthEnd { get; set; }
|
||||||
|
|
||||||
[Name("depth_drilling_quality")]
|
[Name("depth_drilling_quality")]
|
||||||
public float DepthDrillingQuality { get; set; }
|
public float DepthDrillingQuality { get; set; }
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
using CsvHelper.Configuration.Attributes;
|
using CsvHelper.Configuration.Attributes;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Tests.MapData
|
namespace AsbCloudInfrastructure.Tests.Services.DataSaubStat
|
||||||
{
|
{
|
||||||
public class TelemetryDataSaubMap
|
public class TelemetryDataSaubMap
|
||||||
{
|
{
|
Loading…
Reference in New Issue
Block a user