forked from ddrilling/AsbCloudServer
Фикс
This commit is contained in:
parent
ca54ae517f
commit
84f0b2f340
@ -83,10 +83,10 @@ 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
|
||||
return new WellReportDto
|
||||
{
|
||||
Well = well,
|
||||
DateFrom = firstFactOperation?.DateStart,
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user