Правки после ревью

1. Переименовал свойство в SubsystemBlock
2. Добавил сортировку по умолчанию в метод получения списка суточных отчётов
This commit is contained in:
Степанов Дмитрий 2023-11-16 10:45:44 +05:00
parent cc4ef55c12
commit 71c3007168
5 changed files with 9 additions and 5 deletions

View File

@ -11,7 +11,7 @@ public class SubsystemBlockDto : ItemInfoDto
/// <summary> /// <summary>
/// Длина ствола скважины /// Длина ствола скважины
/// </summary> /// </summary>
public double? WellBore { get; set; } public double? Wellbore { get; set; }
/// <summary> /// <summary>
/// Кол-во замеров за сутки /// Кол-во замеров за сутки

View File

@ -4,7 +4,7 @@ namespace AsbCloudDb.Model.DailyReports.Blocks.Subsystem;
public class SubsystemBlock : ItemInfo public class SubsystemBlock : ItemInfo
{ {
public double? WellBore { get; set; } public double? Wellbore { get; set; }
public double? MeasurementsPerDay { get; set; } public double? MeasurementsPerDay { get; set; }

View File

@ -48,6 +48,10 @@ public class DailyReportRepository : CrudRepositoryBase<DailyReportDto, DailyRep
{ {
query = query.SortBy(request.SortFields); query = query.SortBy(request.SortFields);
} }
else
{
query = query.OrderBy(d => d.Date);
}
var entities = await query var entities = await query
.Skip(skip) .Skip(skip)

View File

@ -76,7 +76,7 @@ public class DailyReportExportService : IDailyReportExportService
private const string cellSubsystemComment = "D35"; private const string cellSubsystemComment = "D35";
private const string cellSubsystemTvgLagDays = "F80"; private const string cellSubsystemTvgLagDays = "F80";
private const string cellSubsystemMeasurementsPerDay = "F81"; private const string cellSubsystemMeasurementsPerDay = "F81";
private const string cellSubsystemWellBore = "C9"; private const string cellSubsystemWellbore = "C9";
private const string cellSubsystemTotalRopPlan = "E70"; private const string cellSubsystemTotalRopPlan = "E70";
private const string cellSignDrillingMaster = "C85"; private const string cellSignDrillingMaster = "C85";
@ -199,7 +199,7 @@ public class DailyReportExportService : IDailyReportExportService
sheet.Cell(cellSubsystemComment).Value = subsystemBlock.Comment; sheet.Cell(cellSubsystemComment).Value = subsystemBlock.Comment;
sheet.Cell(cellSubsystemTvgLagDays).Value = subsystemBlock.TvgLagDays; sheet.Cell(cellSubsystemTvgLagDays).Value = subsystemBlock.TvgLagDays;
sheet.Cell(cellSubsystemMeasurementsPerDay).Value = subsystemBlock.MeasurementsPerDay; sheet.Cell(cellSubsystemMeasurementsPerDay).Value = subsystemBlock.MeasurementsPerDay;
sheet.Cell(cellSubsystemWellBore).Value = subsystemBlock.WellBore; sheet.Cell(cellSubsystemWellbore).Value = subsystemBlock.Wellbore;
sheet.Cell(cellSubsystemTotalRopPlan).Value = subsystemBlock.TotalRopPlan; sheet.Cell(cellSubsystemTotalRopPlan).Value = subsystemBlock.TotalRopPlan;
} }

View File

@ -34,7 +34,7 @@ public class DailyReportServiceTest
private readonly SubsystemBlockDto fakeSubsystemBlock = new() private readonly SubsystemBlockDto fakeSubsystemBlock = new()
{ {
IdUser = idUser, IdUser = idUser,
WellBore = 999, Wellbore = 999,
MeasurementsPerDay = 999, MeasurementsPerDay = 999,
TotalRopPlan = 999, TotalRopPlan = 999,
Comment = "Увеличить обороты", Comment = "Увеличить обороты",