Merge branch 'dev' into convertToPdf

This commit is contained in:
Никита Фролов 2023-01-27 09:17:47 +05:00
commit d5fd53595e
9 changed files with 7040 additions and 13 deletions

View File

@ -63,6 +63,11 @@ namespace AsbCloudApp.Data.SAUB
/// </summary>
public float PressureDeltaLimitMax { get; set; }
/// <summary>
/// Перепад давления
/// </summary>
public float PressureDelta { get; set; }
/// <summary>
/// осевая нагрузка
/// </summary>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class Fix_PlannedTrajectory_permissions : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_permission",
keyColumn: "id",
keyValue: 510,
column: "name",
value: "PlannedTrajectory.get");
migrationBuilder.UpdateData(
table: "t_permission",
keyColumn: "id",
keyValue: 511,
column: "name",
value: "PlannedTrajectory.edit");
migrationBuilder.UpdateData(
table: "t_permission",
keyColumn: "id",
keyValue: 512,
column: "name",
value: "PlannedTrajectory.delete");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_permission",
keyColumn: "id",
keyValue: 510,
column: "name",
value: "TelemetryWirelineRunOut.get");
migrationBuilder.UpdateData(
table: "t_permission",
keyColumn: "id",
keyValue: 511,
column: "name",
value: "TelemetryWirelineRunOut.edit");
migrationBuilder.UpdateData(
table: "t_permission",
keyColumn: "id",
keyValue: 512,
column: "name",
value: "TelemetryWirelineRunOut.delete");
}
}
}

View File

@ -1770,19 +1770,19 @@ namespace AsbCloudDb.Migrations
{
Id = 510,
Description = "Разрешение просматривать плановая траектория",
Name = "TelemetryWirelineRunOut.get"
Name = "PlannedTrajectory.get"
},
new
{
Id = 511,
Description = "Разрешение редактировать плановая траектория",
Name = "TelemetryWirelineRunOut.edit"
Name = "PlannedTrajectory.edit"
},
new
{
Id = 512,
Description = "Разрешение удалять плановая траектория",
Name = "TelemetryWirelineRunOut.delete"
Name = "PlannedTrajectory.delete"
});
});

View File

@ -138,9 +138,9 @@
new (){ Id = 507, Name="TelemetryWirelineRunOut.get", Description="Разрешение просматривать наработка талевого каната"},
new (){ Id = 510, Name="TelemetryWirelineRunOut.get", Description="Разрешение просматривать плановая траектория"},
new (){ Id = 511, Name="TelemetryWirelineRunOut.edit", Description="Разрешение редактировать плановая траектория"},
new (){ Id = 512, Name="TelemetryWirelineRunOut.delete", Description="Разрешение удалять плановая траектория"},
new (){ Id = 510, Name="PlannedTrajectory.get", Description="Разрешение просматривать плановая траектория"},
new (){ Id = 511, Name="PlannedTrajectory.edit", Description="Разрешение редактировать плановая траектория"},
new (){ Id = 512, Name="PlannedTrajectory.delete", Description="Разрешение удалять плановая траектория"},
};
}
}

View File

@ -181,6 +181,7 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
result.PressureSp += item.PressureSp * itemWeight;
result.PressureSpRotor += item.PressureSpSlide * itemWeight;
result.PressureIdle += item.PressureIdle * itemWeight;
result.PressureDelta += item.PressureDelta * itemWeight;
result.AxialLoad += item.AxialLoad * itemWeight;
result.AxialLoadSp += item.AxialLoadSp * itemWeight;
@ -227,7 +228,7 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
if (telemetryDataStat is not null)
{
dto.PressureDiff.SetpointFact = telemetryDataStat.PressureSp;
dto.PressureDiff.Fact = telemetryDataStat.Pressure;
dto.PressureDiff.Fact = telemetryDataStat.PressureDelta;
dto.PressureDiff.Limit = telemetryDataStat.PressureDeltaLimitMax;
dto.AxialLoad.SetpointFact = telemetryDataStat.AxialLoadSp;

View File

@ -53,6 +53,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
PressureSpSlide = g.Average(t => t.PressureSpSlide!.Value),
PressureIdle = g.Average(t => t.PressureIdle!.Value),
PressureDeltaLimitMax = g.Average(t => t.PressureDeltaLimitMax!.Value),
PressureDelta = g.Average(t => t.Pressure!.Value - t.PressureIdle!.Value),
AxialLoad = g.Average(t => t.AxialLoad!.Value),
AxialLoadSp = g.Average(t => t.AxialLoadSp!.Value),

View File

@ -94,8 +94,8 @@ namespace AsbCloudInfrastructure.Services.Subsystems
var detectedOperationsRequest = new DetectedOperationRequest()
{
IdWell = request.IdWell,
IdsCategories = new List<int>() {
1,3
IdsCategories = new int[] {
WellOperationCategory.IdRotor, WellOperationCategory.IdSlide,
},
LtDate = request.LtDate,
GtDate = request.GtDate,
@ -158,9 +158,9 @@ namespace AsbCloudInfrastructure.Services.Subsystems
}
private static (double depthIntervalRotor, double depthIntervalSlide) GetDepthInterval (IEnumerable<DetectedOperationDto> detectedOperations)
{
var depthIntervalRotor = detectedOperations.Where(o => o.IdCategory == 1)
var depthIntervalRotor = detectedOperations.Where(o => o.IdCategory == WellOperationCategory.IdRotor)
.Sum(o => o.DepthEnd - o.DepthStart);
var depthIntervalSlide = detectedOperations.Where(o => o.IdCategory == 3)
var depthIntervalSlide = detectedOperations.Where(o => o.IdCategory == WellOperationCategory.IdSlide)
.Sum(o => o.DepthEnd - o.DepthStart);
var depthInterval = (depthIntervalRotor, depthIntervalSlide);

View File

@ -18,8 +18,8 @@
//},
"email": {
"smtpServer": "smtp.timeweb.ru",
"sender": "bot@autodrilling.ru",
"password": "xHhgwZ4D",
"sender": "bot@digitaldrilling.ru",
"password": "8wZrXSfP",
"platformName": "Цифровое бурение",
"platformUrl": "https://cloud.digitaldrilling.ru",