Merge branch 'dev' into feature/8103063

This commit is contained in:
Никита Фролов 2023-01-26 11:07:44 +05:00
commit 5d47652751
5 changed files with 7030 additions and 10 deletions

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, Id = 510,
Description = "Разрешение просматривать плановая траектория", Description = "Разрешение просматривать плановая траектория",
Name = "TelemetryWirelineRunOut.get" Name = "PlannedTrajectory.get"
}, },
new new
{ {
Id = 511, Id = 511,
Description = "Разрешение редактировать плановая траектория", Description = "Разрешение редактировать плановая траектория",
Name = "TelemetryWirelineRunOut.edit" Name = "PlannedTrajectory.edit"
}, },
new new
{ {
Id = 512, Id = 512,
Description = "Разрешение удалять плановая траектория", Description = "Разрешение удалять плановая траектория",
Name = "TelemetryWirelineRunOut.delete" Name = "PlannedTrajectory.delete"
}); });
}); });

View File

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

View File

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