- Атрибут валидации даты
- Даты по умолчанию - мин и макс дата по телеметрии САУБ.
This commit is contained in:
ngfrolov 2023-09-26 17:05:01 +05:00
parent cef609fbdb
commit d88ea454a8
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7
9 changed files with 19 additions and 1393 deletions

View File

@ -1,3 +1,4 @@
using AsbCloudApp.ValidationAttributes;
using System;
namespace AsbCloudApp.Requests;
@ -20,10 +21,12 @@ public class ReportParametersRequest
/// <summary>
/// Дата начала интервала
/// </summary>
[DateValidation(GtDate ="2000-01-01")]
public DateTime Begin { get; set; } = default;
/// <summary>
/// Дата окончания интервала
/// </summary>
public DateTime End { get; set; } = default;
/// <summary>
/// Дата окончания интервала
/// </summary>
[DateValidation(GtDate ="2000-01-01")]
public DateTime End { get; set; } = default;
}

View File

@ -40,6 +40,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="AsbSaubReport" Version="3.2.1" />
<PackageReference Include="AsbSaubReportLas" Version="3.2.1" />
<PackageReference Include="AsbSaubReportPdf" Version="3.2.1" />
<PackageReference Include="CliWrap" Version="3.6.0" />
<PackageReference Include="ClosedXML" Version="0.96.0" />
<PackageReference Include="itext7" Version="7.2.3" />
@ -59,15 +62,6 @@
</ItemGroup>
<ItemGroup>
<Reference Include="AsbSaubReport">
<HintPath>CommonLibs\AsbSaubReport.dll</HintPath>
</Reference>
<Reference Include="AsbSaubReportLas">
<HintPath>CommonLibs\AsbSaubReportLas.dll</HintPath>
</Reference>
<Reference Include="AsbSaubReportPdf">
<HintPath>CommonLibs\AsbSaubReportPdf.dll</HintPath>
</Reference>
<Reference Include="AsbWitsInfo">
<HintPath>CommonLibs\AsbWitsInfo.dll</HintPath>
</Reference>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
using AsbCloudApp.Exceptions;
using AsbCloudDb.Model;
using AsbSaubReport.Model;
using iText.Forms.Xfdf;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;

View File

@ -168,6 +168,14 @@ namespace AsbCloudInfrastructure.Services
//PDF
_ => new AsbSaubReportPdf.ReprotGeneratorPdf(dataSource),
};
if(begin == default || end == default)
{
var analyzeResult = dataSource.Analyze();
begin = begin == default ? analyzeResult.MinDate : begin;
end = end == default ? begin.AddDays(1) : end;
}
generator.Begin = begin;
generator.End = end;
generator.Step = TimeSpan.FromSeconds(stepSeconds);

View File

@ -1 +1 @@
<!doctype html><html lang="ru"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="white"/><meta name="theme-color" media="(prefers-color-scheme: light)" content="white"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="black"/><meta name="description" content="Онлайн мониторинг процесса бурения в реальном времени в офисе заказчика"/><title>DDrilling</title><script defer="defer" src="/runtime~main.af5f343a.js"></script><script defer="defer" src="/vendors.a8e3bd9c.js"></script><script defer="defer" src="/main.8a0ba951.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="ru"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="white"/><meta name="theme-color" media="(prefers-color-scheme: light)" content="white"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="black"/><meta name="description" content="Онлайн мониторинг процесса бурения в реальном времени в офисе заказчика"/><title>DDrill</title><script defer="defer" src="/runtime~main.5f05be65.js"></script><script defer="defer" src="/vendors.408d069b.js"></script><script defer="defer" src="/main.c3c166db.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>