This commit is contained in:
Степанов Дмитрий 2024-09-03 11:52:10 +05:00
parent ca54ae517f
commit 84f0b2f340

View File

@ -83,8 +83,8 @@ public class WellReportService : IWellReportService
var planTrajectories = await trajectoryPlanRepository.GetAsync(idWell, token);
var factTrajectories = await trajectoryFactRepository.GetAsync(idWell, token);
var factOperationsWithoutNpt = factWellOperations
.Where(x => x.NptHours == 0);
var factOperationsWithoutNpt = factWellOperations.Where(o => WellOperationCategory.NonProductiveTimeSubIds
.Any(x => x != o.IdCategory));
return new WellReportDto
{
@ -106,7 +106,7 @@ public class WellReportService : IWellReportService
Plan = planTrajectories.Max(x => x.VerticalDepth),
Fact = factTrajectories.Max(x => x.VerticalDepth)
},
WithoutNtpDays = factOperationsWithoutNpt.Sum(x => x.Day),
WithoutNtpDays = factOperationsWithoutNpt.Sum(x => x.NptHours) / 24,
Contacts = contacts,
SectionReports = sectionReports,
DrillerReports = drillerReports,
@ -164,8 +164,8 @@ public class WellReportService : IWellReportService
{
Fact = new OperatingModeDto
{
DepthStart = factWellOperations.Min(w => w.DepthStart),
DepthEnd = factWellOperations.Max(w => w.DepthEnd)
DepthStart = group.Min(w => w.DepthStart),
DepthEnd = group.Max(w => w.DepthEnd)
}
}
};