forked from ddrilling/AsbCloudServer
Изменение типа дат для FileMarkDto
This commit is contained in:
parent
b66ca5a515
commit
593183ec87
@ -33,7 +33,7 @@ namespace AsbCloudApp.Data
|
||||
/// Необязательно указывать в запросе на создание.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DateCreated { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Полезный комментарий
|
||||
|
@ -282,7 +282,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
dto.FileMarks = entity.FileMarks.Select(m =>
|
||||
{
|
||||
var mark = m.Adapt<FileMarkDto>();
|
||||
mark.DateCreated = m.DateCreated.ToRemoteDateTime(timezoneOffset);
|
||||
mark.DateCreated = m.DateCreated.ToOffset(TimeSpan.FromHours(timezoneOffset));
|
||||
return mark;
|
||||
});
|
||||
return dto;
|
||||
|
@ -489,7 +489,7 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
||||
part.File.FileMarks = marks.Select(m =>
|
||||
{
|
||||
var mark = m.Adapt<FileMarkDto>();
|
||||
mark.DateCreated = m.DateCreated.ToRemoteDateTime(timezoneOffset);
|
||||
mark.DateCreated = m.DateCreated.ToOffset(TimeSpan.FromHours(timezoneOffset));
|
||||
return mark;
|
||||
});
|
||||
var hasReject = marks.Any(m => m.IdMarkType == idMarkTypeReject);
|
||||
|
@ -11,7 +11,7 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
||||
{
|
||||
private const string directionDirectorPositionName = "Руководитель направления по ТСБ";
|
||||
|
||||
private readonly DateTime totalDate;
|
||||
private readonly DateTimeOffset totalDate;
|
||||
private readonly FileMarkDto? acceptDirectionDirector;
|
||||
private readonly List<FileMarkDto> acceptsOthers;
|
||||
private readonly WellDto well;
|
||||
@ -157,7 +157,7 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
||||
.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left);
|
||||
}
|
||||
|
||||
private static string FormatDate(DateTime dateTime)
|
||||
private static string FormatDate(DateTimeOffset dateTime)
|
||||
=> $"{dateTime.Day:00}.{dateTime.Month:00}.{dateTime.Year:00}";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user