forked from ddrilling/AsbCloudServer
Замена типа дат в WellOperationRequestBase с DateTime на DateTimeOffset
This commit is contained in:
parent
271b9d363d
commit
9723ee3b9e
@ -11,12 +11,12 @@ namespace AsbCloudApp.Requests
|
||||
/// <summary>
|
||||
/// фильтр по дате начала операции
|
||||
/// </summary>
|
||||
public DateTime? GeDate { get; set; }
|
||||
public DateTimeOffset? GeDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// фильтр по дате окончания операции
|
||||
/// </summary>
|
||||
public DateTime? LtDate { get; set; }
|
||||
public DateTimeOffset? LeDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// фильтр. Больше или равно глубины скважины на начало операции.
|
||||
@ -60,7 +60,7 @@ namespace AsbCloudApp.Requests
|
||||
GeDepth = request.GeDepth;
|
||||
LeDepth = request.LeDepth;
|
||||
GeDate = request.GeDate;
|
||||
LtDate = request.LtDate;
|
||||
LeDate = request.LeDate;
|
||||
|
||||
OperationCategoryIds = request.OperationCategoryIds;
|
||||
OperationType = request.OperationType;
|
||||
|
@ -413,14 +413,14 @@ public class WellOperationRepository : IWellOperationRepository
|
||||
|
||||
if (request.GeDate.HasValue)
|
||||
{
|
||||
var geDateOffset = request.GeDate.Value.ToUtcDateTimeOffset(timeZoneOffset);
|
||||
query = query.Where(e => e.DateStart >= geDateOffset);
|
||||
//var geDateOffset = request.GeDate.Value.ToUtcDateTimeOffset(timeZoneOffset);
|
||||
query = query.Where(e => e.DateStart >= request.GeDate);
|
||||
}
|
||||
|
||||
if (request.LtDate.HasValue)
|
||||
if (request.LeDate.HasValue)
|
||||
{
|
||||
var ltDateOffset = request.LtDate.Value.ToUtcDateTimeOffset(timeZoneOffset);
|
||||
query = query.Where(e => e.DateStart < ltDateOffset);
|
||||
//var leDateOffset = request.LeDate.Value.ToUtcDateTimeOffset(timeZoneOffset);
|
||||
query = query.Where(e => e.DateStart <= request.LeDate);
|
||||
}
|
||||
|
||||
var currentWellOperations = db.WellOperations
|
||||
|
@ -114,7 +114,7 @@ public class DailyReportService : IDailyReportService
|
||||
IdWell = idWell,
|
||||
OperationType = WellOperation.IdOperationTypeFact,
|
||||
GeDate = geDate,
|
||||
LtDate = ltDate
|
||||
LeDate = ltDate
|
||||
};
|
||||
|
||||
var factWellOperations = (await wellOperationRepository.GetAsync(factOperationRequest, cancellationToken))
|
||||
@ -191,7 +191,7 @@ public class DailyReportService : IDailyReportService
|
||||
IdWell = idWell,
|
||||
OperationType = WellOperation.IdOperationTypeFact,
|
||||
GeDate = geDateFactWellOperation,
|
||||
LtDate = ltDateFactWellOperation
|
||||
LeDate = ltDateFactWellOperation
|
||||
};
|
||||
|
||||
var factWellOperations = await wellOperationRepository.GetAsync(factWellOperationRequest, cancellationToken);
|
||||
|
Loading…
Reference in New Issue
Block a user