merge dev to .

This commit is contained in:
ngfrolov 2024-04-15 11:00:07 +05:00
commit 2f052fada0
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7
6 changed files with 9438 additions and 9 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
/// <inheritdoc />
public partial class Update_WellOperationName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 5089,
column: "name",
value: "Спуск КО на транспортной колонне");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_well_operation_category",
keyColumn: "id",
keyValue: 5089,
column: "name",
value: "Спуск КО на транспотрной колонне");
}
}
}

View File

@ -7269,7 +7269,7 @@ namespace AsbCloudDb.Migrations
IsHidden = false, IsHidden = false,
KeyValueName = "dT", KeyValueName = "dT",
KeyValueUnits = "мин", KeyValueUnits = "мин",
Name = "Спуск КО на транспотрной колонне" Name = "Спуск КО на транспортной колонне"
}, },
new new
{ {

View File

@ -370,7 +370,7 @@ namespace AsbCloudDb.Model
new () {Id = 5086, IdParent = 4005, Name = "Подъем БИ с выбросом на мостки", KeyValueName = "dT", KeyValueUnits = "мин" }, new () {Id = 5086, IdParent = 4005, Name = "Подъем БИ с выбросом на мостки", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 5087, IdParent = 4005, Name = "Спуск БИ со сборкой с мостков", KeyValueName = "dT", KeyValueUnits = "мин" }, new () {Id = 5087, IdParent = 4005, Name = "Спуск БИ со сборкой с мостков", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 5088, IdParent = 4005, Name = "Сборка и спуск ТБТ", KeyValueName = "dT", KeyValueUnits = "мин" }, new () {Id = 5088, IdParent = 4005, Name = "Сборка и спуск ТБТ", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 5089, IdParent = 4005, Name = "Спуск КО на транспотрной колонне", KeyValueName = "dT", KeyValueUnits = "мин" }, new () {Id = 5089, IdParent = 4005, Name = "Спуск КО на транспортной колонне", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 5090, IdParent = 4008, Name = "Отворот допускной трубы", KeyValueName = "dT", KeyValueUnits = "мин" }, new () {Id = 5090, IdParent = 4008, Name = "Отворот допускной трубы", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 5091, IdParent = 4008, Name = "Активация подвески, опрессовка", KeyValueName = "dT", KeyValueUnits = "мин" }, new () {Id = 5091, IdParent = 4008, Name = "Активация подвески, опрессовка", KeyValueName = "dT", KeyValueUnits = "мин" },
new () {Id = 5092, IdParent = 4008, Name = "Монтаж, опрессовка ФА", KeyValueName = "dT", KeyValueUnits = "мин" }, new () {Id = 5092, IdParent = 4008, Name = "Монтаж, опрессовка ФА", KeyValueName = "dT", KeyValueUnits = "мин" },

View File

@ -142,11 +142,9 @@ namespace AsbCloudInfrastructure.Repository
if (ids.Length != existingEntitiesCount) if (ids.Length != existingEntitiesCount)
throw new ArgumentInvalidException(nameof(dtos), "Все записи должны существовать в БД"); throw new ArgumentInvalidException(nameof(dtos), "Все записи должны существовать в БД");
var entities = dtos.Select(Convert); var entities = dbContext.Set<TEntity>().Where(e => ids.Contains(e.Id));
var entries = entities.Select(entity => dbSet.Update(entity)).Cast<EntityEntry>().ToList(); dbContext.Set<TEntity>().UpdateRange(entities);
var affected = await dbContext.SaveChangesAsync(token); return await dbContext.SaveChangesAsync(token);
entries.ForEach(e => e.State = EntityState.Detached);
return affected;
} }
/// <inheritdoc/> /// <inheritdoc/>

View File

@ -50,7 +50,7 @@ public class WellOperationParser<TTemplateParameters> : ExcelWellRelatedParser<W
var message = string.Format(XLExtentions.ProblemDetailsTemplate, var message = string.Format(XLExtentions.ProblemDetailsTemplate,
TemplateParameters.SheetName, TemplateParameters.SheetName,
rowNumber, rowNumber,
TemplateParameters.Cells[nameof(WellOperationDto.WellSectionTypeCaption)], TemplateParameters.Cells[nameof(WellOperationDto.WellSectionTypeCaption)].ColumnNumber,
"Указана некорректная секция"); "Указана некорректная секция");
throw new FileFormatException(message); throw new FileFormatException(message);
} }
@ -63,7 +63,7 @@ public class WellOperationParser<TTemplateParameters> : ExcelWellRelatedParser<W
var message = string.Format(XLExtentions.ProblemDetailsTemplate, var message = string.Format(XLExtentions.ProblemDetailsTemplate,
TemplateParameters.SheetName, TemplateParameters.SheetName,
rowNumber, rowNumber,
TemplateParameters.Cells[nameof(WellOperationDto.OperationCategoryName)], TemplateParameters.Cells[nameof(WellOperationDto.OperationCategoryName)].ColumnNumber,
"Указана некорректная операция"); "Указана некорректная операция");
throw new FileFormatException(message); throw new FileFormatException(message);
} }