forked from ddrilling/AsbCloudServer
This commit is contained in:
commit
aceefe637a
@ -25,12 +25,8 @@ namespace AsbCloudApp.Comparators
|
||||
/// <param name="y"></param>
|
||||
/// <returns></returns>
|
||||
public int Compare(IId? x, IId? y)
|
||||
{
|
||||
if (x is null || y is null)
|
||||
return 0;
|
||||
else
|
||||
return x.Id.CompareTo(y.Id);
|
||||
}
|
||||
=> (x?.Id??0).CompareTo(y?.Id??0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -39,11 +35,11 @@ namespace AsbCloudApp.Comparators
|
||||
/// <param name="y"></param>
|
||||
/// <returns></returns>
|
||||
public bool Equals(IId? x, IId? y)
|
||||
{
|
||||
if (x is null || y is null)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
if (x is not null && y is not null)
|
||||
return x.Id == y.Id;
|
||||
|
||||
return x == y;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -9,12 +9,10 @@ namespace AsbCloudApp.Comparators
|
||||
/// <inheritdoc/>
|
||||
public bool Equals(TelemetryUserDto? prevUser, TelemetryUserDto? nextUser)
|
||||
{
|
||||
if (prevUser is null || nextUser is null)
|
||||
return false;
|
||||
else if (prevUser.Id == nextUser.Id)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
if (prevUser is not null && nextUser is not null)
|
||||
return prevUser.Id == nextUser.Id;
|
||||
|
||||
return prevUser == nextUser;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
/// <summary>
|
||||
/// Название
|
||||
/// </summary>
|
||||
public string Caption { get; set; } = string.Empty;
|
||||
public string Caption { get; set; } = null!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public double? Latitude { get; set; }
|
||||
|
@ -28,7 +28,7 @@ namespace AsbCloudApp.Data
|
||||
/// <summary>
|
||||
/// пользователь панели оператора
|
||||
/// </summary>
|
||||
public string User { get; set; } = null!;
|
||||
public string? User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// текст сообщения
|
||||
|
@ -13,7 +13,7 @@
|
||||
/// <summary>
|
||||
/// название текущей операции генерации
|
||||
/// </summary>
|
||||
public string Operation { get; set; } = string.Empty;
|
||||
public string? Operation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// номер текущей страницы
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace AsbCloudApp.Data
|
||||
{
|
||||
#nullable enable
|
||||
/// <summary>
|
||||
/// DTO формирования рапорта
|
||||
/// </summary>
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace AsbCloudApp.Data
|
||||
{
|
||||
#nullable enable
|
||||
/// <summary>
|
||||
/// DTO журнала запросов
|
||||
/// </summary>
|
||||
@ -63,5 +62,4 @@ namespace AsbCloudApp.Data
|
||||
/// </summary>
|
||||
public string? ExceptionStack { get; set; } = null!;
|
||||
}
|
||||
#nullable disable
|
||||
}
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace AsbCloudApp.Data
|
||||
{
|
||||
#nullable enable
|
||||
/// <summary>
|
||||
/// DTO статистики запросов по пользователю
|
||||
/// </summary>
|
||||
@ -48,5 +47,4 @@ namespace AsbCloudApp.Data
|
||||
/// </summary>
|
||||
public UserDto User { get; set; } = null!;
|
||||
}
|
||||
#nullable disable
|
||||
}
|
||||
|
@ -41,6 +41,6 @@ namespace AsbCloudApp.Data
|
||||
/// <summary>
|
||||
/// Бурильщик
|
||||
/// </summary>
|
||||
public DrillerDto Driller { get; set; } = null!;
|
||||
public DrillerDto? Driller { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
namespace AsbCloudApp.Data
|
||||
{
|
||||
#nullable enable
|
||||
/// <summary>
|
||||
/// âðåìåííàÿ çîíà
|
||||
/// </summary>
|
||||
|
@ -45,7 +45,7 @@ namespace AsbCloudApp.Data
|
||||
/// <summary>
|
||||
/// статистика за всю скважину
|
||||
/// </summary>
|
||||
public PlanFactBase<StatOperationsDto>? Total { get; set; }
|
||||
public PlanFactBase<StatOperationsDto> Total { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// компании участвующие в строительстве скважины
|
||||
|
@ -34,6 +34,6 @@ namespace AsbCloudApp.Data
|
||||
/// <summary>
|
||||
/// DTO скважины
|
||||
/// </summary>
|
||||
public WellInfoDto Well { get; set; } = null!;
|
||||
public WellInfoDto? Well { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -118,11 +118,11 @@ namespace AsbCloudApp.Data
|
||||
public static bool operator >(TimeDto a, TimeDto b) => a.TotalSeconds > b.TotalSeconds;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int CompareTo(TimeDto other)
|
||||
=> TotalSeconds - other.TotalSeconds;
|
||||
public int CompareTo(TimeDto? other)
|
||||
=> TotalSeconds - other?.TotalSeconds??0;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool Equals(object obj)
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (ReferenceEquals(this, obj))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user