diff --git a/AsbCloudApp/Data/ReportPropertiesDto.cs b/AsbCloudApp/Data/ReportPropertiesDto.cs new file mode 100644 index 00000000..0da8a6bf --- /dev/null +++ b/AsbCloudApp/Data/ReportPropertiesDto.cs @@ -0,0 +1,11 @@ +using System.IO; + +namespace AsbCloudApp.Data +{ + public class ReportPropertiesDto + { + public FileStream Filestream { get; set; } + public string ContentType { get; set; } + public string FileName { get; set; } + } +} diff --git a/AsbCloudApp/Services/IReportService.cs b/AsbCloudApp/Services/IReportService.cs new file mode 100644 index 00000000..916f7d89 --- /dev/null +++ b/AsbCloudApp/Services/IReportService.cs @@ -0,0 +1,12 @@ +using System; +using AsbCloudApp.Data; + +namespace AsbCloudApp.Services +{ + public interface IReportService + { + int GetReportPagesCount(int wellId, DateTime begin, DateTime end, int stepSeconds, int format); + ReportPropertiesDto GetReportFileProperties(string reportName, string rootPath); + DatesRangeDto GetReportsDatesRange(int wellId); + } +} diff --git a/AsbCloudDb/Model/Report.cs b/AsbCloudDb/Model/Report.cs new file mode 100644 index 00000000..b3eb7265 --- /dev/null +++ b/AsbCloudDb/Model/Report.cs @@ -0,0 +1,11 @@ +using System; + +namespace AsbCloudDb.Model +{ + public class Report : IId, IIdTelemetryDate + { + public int Id { get; set; } + public int IdTelemetry { get; set; } + public DateTime Date { get; set; } + } +} diff --git a/AsbCloudInfrastructure/AsbCloudInfrastructure.csproj b/AsbCloudInfrastructure/AsbCloudInfrastructure.csproj index e5d3104a..ab446ac9 100644 --- a/AsbCloudInfrastructure/AsbCloudInfrastructure.csproj +++ b/AsbCloudInfrastructure/AsbCloudInfrastructure.csproj @@ -6,6 +6,7 @@ + @@ -14,4 +15,10 @@ + + + CommonLibs\AsbSaubReport\AsbSaubReport.dll + + + diff --git a/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/AsbSaubReport.deps.json b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/AsbSaubReport.deps.json new file mode 100644 index 00000000..314afa14 --- /dev/null +++ b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/AsbSaubReport.deps.json @@ -0,0 +1,1287 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v5.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v5.0": { + "AsbSaubReport/1.0.0": { + "dependencies": { + "itext7": "7.1.15" + }, + "runtime": { + "AsbSaubReport.dll": {} + } + }, + "Common.Logging/3.4.1": { + "dependencies": { + "Common.Logging.Core": "3.4.1", + "Microsoft.CSharp": "4.0.1", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + }, + "runtime": { + "lib/netstandard1.3/Common.Logging.dll": { + "assemblyVersion": "3.4.1.0", + "fileVersion": "3.4.0.0" + } + } + }, + "Common.Logging.Core/3.4.1": { + "dependencies": { + "Microsoft.CSharp": "4.0.1" + }, + "runtime": { + "lib/netstandard1.0/Common.Logging.Core.dll": { + "assemblyVersion": "3.4.1.0", + "fileVersion": "3.4.0.0" + } + } + }, + "itext7/7.1.15": { + "dependencies": { + "Common.Logging": "3.4.1", + "Microsoft.Extensions.DependencyModel": "1.1.0", + "Portable.BouncyCastle": "1.8.9", + "System.Collections.NonGeneric": "4.3.0", + "System.Diagnostics.Process": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.Runtime.Loader": "4.3.0", + "System.Runtime.Serialization.Formatters": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Text.Encoding.CodePages": "4.3.0", + "System.Threading.Thread": "4.3.0", + "System.Threading.ThreadPool": "4.3.0", + "System.Xml.XmlDocument": "4.3.0" + }, + "runtime": { + "lib/netstandard2.0/itext.barcodes.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + }, + "lib/netstandard2.0/itext.forms.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + }, + "lib/netstandard2.0/itext.io.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + }, + "lib/netstandard2.0/itext.kernel.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + }, + "lib/netstandard2.0/itext.layout.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + }, + "lib/netstandard2.0/itext.pdfa.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + }, + "lib/netstandard2.0/itext.sign.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + }, + "lib/netstandard2.0/itext.styledxmlparser.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + }, + "lib/netstandard2.0/itext.svg.dll": { + "assemblyVersion": "7.1.15.0", + "fileVersion": "7.1.15.0" + } + } + }, + "Microsoft.CSharp/4.0.1": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.0.11", + "System.Globalization": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.0.1", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "Microsoft.DotNet.PlatformAbstractions/1.1.0": { + "dependencies": { + "System.AppContext": "4.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.InteropServices.RuntimeInformation": "4.0.0" + }, + "runtime": { + "lib/netstandard1.3/Microsoft.DotNet.PlatformAbstractions.dll": { + "assemblyVersion": "1.1.0.0", + "fileVersion": "1.1.0.0" + } + } + }, + "Microsoft.Extensions.DependencyModel/1.1.0": { + "dependencies": { + "Microsoft.DotNet.PlatformAbstractions": "1.1.0", + "Newtonsoft.Json": "9.0.1", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.0.11", + "System.Linq": "4.3.0" + }, + "runtime": { + "lib/netstandard1.6/Microsoft.Extensions.DependencyModel.dll": { + "assemblyVersion": "1.1.0.0", + "fileVersion": "1.1.0.0" + } + } + }, + "Microsoft.NETCore.Platforms/1.1.0": {}, + "Microsoft.NETCore.Targets/1.1.0": {}, + "Microsoft.Win32.Primitives/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "Microsoft.Win32.Registry/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "Newtonsoft.Json/9.0.1": { + "dependencies": { + "Microsoft.CSharp": "4.0.1", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.0.11", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.0.1", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Serialization.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0", + "System.Xml.XDocument": "4.0.11" + }, + "runtime": { + "lib/netstandard1.0/Newtonsoft.Json.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.1.19813" + } + } + }, + "Portable.BouncyCastle/1.8.9": { + "runtime": { + "lib/netstandard2.0/BouncyCastle.Crypto.dll": { + "assemblyVersion": "1.8.9.0", + "fileVersion": "1.8.9.1" + } + } + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.native.System/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Security.Cryptography.Apple/4.3.0": { + "dependencies": { + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" + } + }, + "runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "dependencies": { + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple/4.3.0": {}, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, + "System.AppContext/4.1.0": { + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Collections/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Collections.Concurrent/4.3.0": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Collections.NonGeneric/4.3.0": { + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Diagnostics.Debug/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.Process/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Thread": "4.3.0", + "System.Threading.ThreadPool": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Diagnostics.Tools/4.0.1": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.Tracing/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Dynamic.Runtime/4.0.11": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.0.1", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Globalization/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Extensions/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.IO/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem.Primitives/4.3.0": { + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Linq/4.3.0": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Linq.Expressions/4.1.0": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Linq": "4.3.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.0.1", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Emit.Lightweight": "4.0.1", + "System.Reflection.Extensions": "4.0.1", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.ObjectModel/4.0.12": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Reflection/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit/4.0.1": { + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.ILGeneration/4.0.1": { + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.Lightweight/4.0.1": { + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Extensions/4.0.1": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Primitives/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.TypeExtensions/4.1.0": { + "dependencies": { + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.ResourceManager/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.Extensions/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Runtime.Loader/4.3.0": { + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Numerics/4.3.0": { + "dependencies": { + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Runtime.Serialization.Formatters/4.3.0": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Serialization.Primitives": "4.3.0" + } + }, + "System.Runtime.Serialization.Primitives/4.3.0": { + "dependencies": { + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Csp/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Primitives/4.3.0": { + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Text.Encoding/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Encoding.CodePages/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Text.Encoding.Extensions/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Text.RegularExpressions/4.3.0": { + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading/4.3.0": { + "dependencies": { + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Tasks/4.3.0": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Threading.Tasks.Extensions/4.3.0": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Thread/4.3.0": { + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading.ThreadPool/4.3.0": { + "dependencies": { + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Xml.ReaderWriter/4.3.0": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Tasks.Extensions": "4.3.0" + } + }, + "System.Xml.XDocument/4.0.11": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tools": "4.0.1", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0" + } + }, + "System.Xml.XmlDocument/4.3.0": { + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0" + } + } + } + }, + "libraries": { + "AsbSaubReport/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Common.Logging/3.4.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-5eZ/vgEOqzLg4PypZqnJ+wMhhgHyckicbZY4iDxqQ4FtOz0CpdYZ0xQ78aszMzeAJZiLLb5VdR9tPfunVQLz6g==", + "path": "common.logging/3.4.1", + "hashPath": "common.logging.3.4.1.nupkg.sha512" + }, + "Common.Logging.Core/3.4.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-wLHldZHvxsSD6Ahonfj00/SkfHfKqO+YT6jsUwVm8Rch1REL9IArHAcSLXxYxYfu5/4ydGtmXvOtaH3AkVPu0A==", + "path": "common.logging.core/3.4.1", + "hashPath": "common.logging.core.3.4.1.nupkg.sha512" + }, + "itext7/7.1.15": { + "type": "package", + "serviceable": true, + "sha512": "sha512-BJKdScf6C7LlHB5pV5fr0qHGbrPLX1yl+1R1qHroRZxtyTVFMeZ9gPV6IOsmgTRLr2ee9hUXHbb8/ZqKB4pqiA==", + "path": "itext7/7.1.15", + "hashPath": "itext7.7.1.15.nupkg.sha512" + }, + "Microsoft.CSharp/4.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-17h8b5mXa87XYKrrVqdgZ38JefSUqLChUQpXgSnpzsM0nDOhE40FTeNWOJ/YmySGV6tG6T8+hjz6vxbknHJr6A==", + "path": "microsoft.csharp/4.0.1", + "hashPath": "microsoft.csharp.4.0.1.nupkg.sha512" + }, + "Microsoft.DotNet.PlatformAbstractions/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Bl6KYfbFSIW3QIRHAp931iR5h01qHjKghdpAtncwbzNUs0+IUZ+XfwkIU0sQsR33ufGvi3u4dZMIYYFysjpHAA==", + "path": "microsoft.dotnet.platformabstractions/1.1.0", + "hashPath": "microsoft.dotnet.platformabstractions.1.1.0.nupkg.sha512" + }, + "Microsoft.Extensions.DependencyModel/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-TG7dJ8GY1Myz9lZ8DJL4i6D05ncJQBi5CjBMXMdJ4edKxaW+vP2DndDd1jJabdMdmVRdGrvybzqkB+A6Df7eDw==", + "path": "microsoft.extensions.dependencymodel/1.1.0", + "hashPath": "microsoft.extensions.dependencymodel.1.1.0.nupkg.sha512" + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "path": "microsoft.netcore.platforms/1.1.0", + "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", + "path": "microsoft.netcore.targets/1.1.0", + "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512" + }, + "Microsoft.Win32.Primitives/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "path": "microsoft.win32.primitives/4.3.0", + "hashPath": "microsoft.win32.primitives.4.3.0.nupkg.sha512" + }, + "Microsoft.Win32.Registry/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Lw1/VwLH1yxz6SfFEjVRCN0pnflLEsWgnV4qsdJ512/HhTwnKXUG+zDQ4yTO3K/EJQemGoNaBHX5InISNKTzUQ==", + "path": "microsoft.win32.registry/4.3.0", + "hashPath": "microsoft.win32.registry.4.3.0.nupkg.sha512" + }, + "Newtonsoft.Json/9.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-U82mHQSKaIk+lpSVCbWYKNavmNH1i5xrExDEquU1i6I5pV6UMOqRnJRSlKO3cMPfcpp0RgDY+8jUXHdQ4IfXvw==", + "path": "newtonsoft.json/9.0.1", + "hashPath": "newtonsoft.json.9.0.1.nupkg.sha512" + }, + "Portable.BouncyCastle/1.8.9": { + "type": "package", + "serviceable": true, + "sha512": "sha512-wlJo8aFoeyl+W93iFXTK5ShzDYk5WBqoUPjTNEM0Xv9kn1H+4hmuCjF0/n8HLm9Nnp1aY6KNndWqQTNk+NGgRQ==", + "path": "portable.bouncycastle/1.8.9", + "hashPath": "portable.bouncycastle.1.8.9.nupkg.sha512" + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==", + "path": "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==", + "path": "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==", + "path": "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.native.System/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "path": "runtime.native.system/4.3.0", + "hashPath": "runtime.native.system.4.3.0.nupkg.sha512" + }, + "runtime.native.System.Security.Cryptography.Apple/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", + "path": "runtime.native.system.security.cryptography.apple/4.3.0", + "hashPath": "runtime.native.system.security.cryptography.apple.4.3.0.nupkg.sha512" + }, + "runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", + "path": "runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==", + "path": "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==", + "path": "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==", + "path": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple/4.3.0", + "hashPath": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple.4.3.0.nupkg.sha512" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==", + "path": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==", + "path": "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==", + "path": "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==", + "path": "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==", + "path": "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0", + "hashPath": "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" + }, + "System.AppContext/4.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3QjO4jNV7PdKkmQAVp9atA+usVnKRwI3Kx1nMwJ93T0LcQfx7pKAYk0nKz5wn1oP5iqlhZuy6RXOFdhr7rDwow==", + "path": "system.appcontext/4.1.0", + "hashPath": "system.appcontext.4.1.0.nupkg.sha512" + }, + "System.Collections/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "path": "system.collections/4.3.0", + "hashPath": "system.collections.4.3.0.nupkg.sha512" + }, + "System.Collections.Concurrent/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", + "path": "system.collections.concurrent/4.3.0", + "hashPath": "system.collections.concurrent.4.3.0.nupkg.sha512" + }, + "System.Collections.NonGeneric/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-prtjIEMhGUnQq6RnPEYLpFt8AtLbp9yq2zxOSrY7KJJZrw25Fi97IzBqY7iqssbM61Ek5b8f3MG/sG1N2sN5KA==", + "path": "system.collections.nongeneric/4.3.0", + "hashPath": "system.collections.nongeneric.4.3.0.nupkg.sha512" + }, + "System.Diagnostics.Debug/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "path": "system.diagnostics.debug/4.3.0", + "hashPath": "system.diagnostics.debug.4.3.0.nupkg.sha512" + }, + "System.Diagnostics.Process/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-J0wOX07+QASQblsfxmIMFc9Iq7KTXYL3zs2G/Xc704Ylv3NpuVdo6gij6V3PGiptTxqsK0K7CdXenRvKUnkA2g==", + "path": "system.diagnostics.process/4.3.0", + "hashPath": "system.diagnostics.process.4.3.0.nupkg.sha512" + }, + "System.Diagnostics.Tools/4.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-xBfJ8pnd4C17dWaC9FM6aShzbJcRNMChUMD42I6772KGGrqaFdumwhn9OdM68erj1ueNo3xdQ1EwiFjK5k8p0g==", + "path": "system.diagnostics.tools/4.0.1", + "hashPath": "system.diagnostics.tools.4.0.1.nupkg.sha512" + }, + "System.Diagnostics.Tracing/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "path": "system.diagnostics.tracing/4.3.0", + "hashPath": "system.diagnostics.tracing.4.3.0.nupkg.sha512" + }, + "System.Dynamic.Runtime/4.0.11": { + "type": "package", + "serviceable": true, + "sha512": "sha512-db34f6LHYM0U0JpE+sOmjar27BnqTVkbLJhgfwMpTdgTigG/Hna3m2MYVwnFzGGKnEJk2UXFuoVTr8WUbU91/A==", + "path": "system.dynamic.runtime/4.0.11", + "hashPath": "system.dynamic.runtime.4.0.11.nupkg.sha512" + }, + "System.Globalization/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "path": "system.globalization/4.3.0", + "hashPath": "system.globalization.4.3.0.nupkg.sha512" + }, + "System.Globalization.Extensions/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "path": "system.globalization.extensions/4.3.0", + "hashPath": "system.globalization.extensions.4.3.0.nupkg.sha512" + }, + "System.IO/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "path": "system.io/4.3.0", + "hashPath": "system.io.4.3.0.nupkg.sha512" + }, + "System.IO.FileSystem/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "path": "system.io.filesystem/4.3.0", + "hashPath": "system.io.filesystem.4.3.0.nupkg.sha512" + }, + "System.IO.FileSystem.Primitives/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", + "path": "system.io.filesystem.primitives/4.3.0", + "hashPath": "system.io.filesystem.primitives.4.3.0.nupkg.sha512" + }, + "System.Linq/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", + "path": "system.linq/4.3.0", + "hashPath": "system.linq.4.3.0.nupkg.sha512" + }, + "System.Linq.Expressions/4.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-I+y02iqkgmCAyfbqOmSDOgqdZQ5tTj80Akm5BPSS8EeB0VGWdy6X1KCoYe8Pk6pwDoAKZUOdLVxnTJcExiv5zw==", + "path": "system.linq.expressions/4.1.0", + "hashPath": "system.linq.expressions.4.1.0.nupkg.sha512" + }, + "System.ObjectModel/4.0.12": { + "type": "package", + "serviceable": true, + "sha512": "sha512-tAgJM1xt3ytyMoW4qn4wIqgJYm7L7TShRZG4+Q4Qsi2PCcj96pXN7nRywS9KkB3p/xDUjc2HSwP9SROyPYDYKQ==", + "path": "system.objectmodel/4.0.12", + "hashPath": "system.objectmodel.4.0.12.nupkg.sha512" + }, + "System.Reflection/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "path": "system.reflection/4.3.0", + "hashPath": "system.reflection.4.3.0.nupkg.sha512" + }, + "System.Reflection.Emit/4.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-P2wqAj72fFjpP6wb9nSfDqNBMab+2ovzSDzUZK7MVIm54tBJEPr9jWfSjjoTpPwj1LeKcmX3vr0ttyjSSFM47g==", + "path": "system.reflection.emit/4.0.1", + "hashPath": "system.reflection.emit.4.0.1.nupkg.sha512" + }, + "System.Reflection.Emit.ILGeneration/4.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Ov6dU8Bu15Bc7zuqttgHF12J5lwSWyTf1S+FJouUXVMSqImLZzYaQ+vRr1rQ0OZ0HqsrwWl4dsKHELckQkVpgA==", + "path": "system.reflection.emit.ilgeneration/4.0.1", + "hashPath": "system.reflection.emit.ilgeneration.4.0.1.nupkg.sha512" + }, + "System.Reflection.Emit.Lightweight/4.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-sSzHHXueZ5Uh0OLpUQprhr+ZYJrLPA2Cmr4gn0wj9+FftNKXx8RIMKvO9qnjk2ebPYUjZ+F2ulGdPOsvj+MEjA==", + "path": "system.reflection.emit.lightweight/4.0.1", + "hashPath": "system.reflection.emit.lightweight.4.0.1.nupkg.sha512" + }, + "System.Reflection.Extensions/4.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-GYrtRsZcMuHF3sbmRHfMYpvxZoIN2bQGrYGerUiWLEkqdEUQZhH3TRSaC/oI4wO0II1RKBPlpIa1TOMxIcOOzQ==", + "path": "system.reflection.extensions/4.0.1", + "hashPath": "system.reflection.extensions.4.0.1.nupkg.sha512" + }, + "System.Reflection.Primitives/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "path": "system.reflection.primitives/4.3.0", + "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512" + }, + "System.Reflection.TypeExtensions/4.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-tsQ/ptQ3H5FYfON8lL4MxRk/8kFyE0A+tGPXmVP967cT/gzLHYxIejIYSxp4JmIeFHVP78g/F2FE1mUUTbDtrg==", + "path": "system.reflection.typeextensions/4.1.0", + "hashPath": "system.reflection.typeextensions.4.1.0.nupkg.sha512" + }, + "System.Resources.ResourceManager/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "path": "system.resources.resourcemanager/4.3.0", + "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512" + }, + "System.Runtime/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "path": "system.runtime/4.3.0", + "hashPath": "system.runtime.4.3.0.nupkg.sha512" + }, + "System.Runtime.Extensions/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "path": "system.runtime.extensions/4.3.0", + "hashPath": "system.runtime.extensions.4.3.0.nupkg.sha512" + }, + "System.Runtime.Handles/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "path": "system.runtime.handles/4.3.0", + "hashPath": "system.runtime.handles.4.3.0.nupkg.sha512" + }, + "System.Runtime.InteropServices/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "path": "system.runtime.interopservices/4.3.0", + "hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512" + }, + "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-hWPhJxc453RCa8Z29O91EmfGeZIHX1ZH2A8L6lYQVSaKzku2DfArSfMEb1/MYYzPQRJZeu0c9dmYeJKxW5Fgng==", + "path": "system.runtime.interopservices.runtimeinformation/4.0.0", + "hashPath": "system.runtime.interopservices.runtimeinformation.4.0.0.nupkg.sha512" + }, + "System.Runtime.Loader/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-DHMaRn8D8YCK2GG2pw+UzNxn/OHVfaWx7OTLBD/hPegHZZgcZh3H6seWegrC4BYwsfuGrywIuT+MQs+rPqRLTQ==", + "path": "system.runtime.loader/4.3.0", + "hashPath": "system.runtime.loader.4.3.0.nupkg.sha512" + }, + "System.Runtime.Numerics/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", + "path": "system.runtime.numerics/4.3.0", + "hashPath": "system.runtime.numerics.4.3.0.nupkg.sha512" + }, + "System.Runtime.Serialization.Formatters/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-KT591AkTNFOTbhZlaeMVvfax3RqhH1EJlcwF50Wm7sfnBLuHiOeZRRKrr1ns3NESkM20KPZ5Ol/ueMq5vg4QoQ==", + "path": "system.runtime.serialization.formatters/4.3.0", + "hashPath": "system.runtime.serialization.formatters.4.3.0.nupkg.sha512" + }, + "System.Runtime.Serialization.Primitives/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Wz+0KOukJGAlXjtKr+5Xpuxf8+c8739RI1C+A2BoQZT+wMCCoMDDdO8/4IRHfaVINqL78GO8dW8G2lW/e45Mcw==", + "path": "system.runtime.serialization.primitives/4.3.0", + "hashPath": "system.runtime.serialization.primitives.4.3.0.nupkg.sha512" + }, + "System.Security.Cryptography.Algorithms/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "path": "system.security.cryptography.algorithms/4.3.0", + "hashPath": "system.security.cryptography.algorithms.4.3.0.nupkg.sha512" + }, + "System.Security.Cryptography.Csp/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "path": "system.security.cryptography.csp/4.3.0", + "hashPath": "system.security.cryptography.csp.4.3.0.nupkg.sha512" + }, + "System.Security.Cryptography.Encoding/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "path": "system.security.cryptography.encoding/4.3.0", + "hashPath": "system.security.cryptography.encoding.4.3.0.nupkg.sha512" + }, + "System.Security.Cryptography.Primitives/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", + "path": "system.security.cryptography.primitives/4.3.0", + "hashPath": "system.security.cryptography.primitives.4.3.0.nupkg.sha512" + }, + "System.Text.Encoding/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "path": "system.text.encoding/4.3.0", + "hashPath": "system.text.encoding.4.3.0.nupkg.sha512" + }, + "System.Text.Encoding.CodePages/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-IRiEFUa5b/Gs5Egg8oqBVoywhtOeaO2KOx3j0RfcYY/raxqBuEK7NXRDgOwtYM8qbi+7S4RPXUbNt+ZxyY0/NQ==", + "path": "system.text.encoding.codepages/4.3.0", + "hashPath": "system.text.encoding.codepages.4.3.0.nupkg.sha512" + }, + "System.Text.Encoding.Extensions/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "path": "system.text.encoding.extensions/4.3.0", + "hashPath": "system.text.encoding.extensions.4.3.0.nupkg.sha512" + }, + "System.Text.RegularExpressions/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", + "path": "system.text.regularexpressions/4.3.0", + "hashPath": "system.text.regularexpressions.4.3.0.nupkg.sha512" + }, + "System.Threading/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", + "path": "system.threading/4.3.0", + "hashPath": "system.threading.4.3.0.nupkg.sha512" + }, + "System.Threading.Tasks/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "path": "system.threading.tasks/4.3.0", + "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512" + }, + "System.Threading.Tasks.Extensions/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", + "path": "system.threading.tasks.extensions/4.3.0", + "hashPath": "system.threading.tasks.extensions.4.3.0.nupkg.sha512" + }, + "System.Threading.Thread/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-OHmbT+Zz065NKII/ZHcH9XO1dEuLGI1L2k7uYss+9C1jLxTC9kTZZuzUOyXHayRk+dft9CiDf3I/QZ0t8JKyBQ==", + "path": "system.threading.thread/4.3.0", + "hashPath": "system.threading.thread.4.3.0.nupkg.sha512" + }, + "System.Threading.ThreadPool/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-k/+g4b7vjdd4aix83sTgC9VG6oXYKAktSfNIJUNGxPEj7ryEOfzHHhfnmsZvjxawwcD9HyWXKCXmPjX8U4zeSw==", + "path": "system.threading.threadpool/4.3.0", + "hashPath": "system.threading.threadpool.4.3.0.nupkg.sha512" + }, + "System.Xml.ReaderWriter/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", + "path": "system.xml.readerwriter/4.3.0", + "hashPath": "system.xml.readerwriter.4.3.0.nupkg.sha512" + }, + "System.Xml.XDocument/4.0.11": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Mk2mKmPi0nWaoiYeotq1dgeNK1fqWh61+EK+w4Wu8SWuTYLzpUnschb59bJtGywaPq7SmTuPf44wrXRwbIrukg==", + "path": "system.xml.xdocument/4.0.11", + "hashPath": "system.xml.xdocument.4.0.11.nupkg.sha512" + }, + "System.Xml.XmlDocument/4.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-lJ8AxvkX7GQxpC6GFCeBj8ThYVyQczx2+f/cWHJU8tjS7YfI6Cv6bon70jVEgs2CiFbmmM8b9j1oZVx0dSI2Ww==", + "path": "system.xml.xmldocument/4.3.0", + "hashPath": "system.xml.xmldocument.4.3.0.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/AsbSaubReport.dll b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/AsbSaubReport.dll new file mode 100644 index 00000000..a9cc0fbf Binary files /dev/null and b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/AsbSaubReport.dll differ diff --git a/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Bold.ttf b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Bold.ttf new file mode 100644 index 00000000..aaf374d2 Binary files /dev/null and b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Bold.ttf differ diff --git a/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Light.ttf b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Light.ttf new file mode 100644 index 00000000..664e1b2f Binary files /dev/null and b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Light.ttf differ diff --git a/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Thin.ttf b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Thin.ttf new file mode 100644 index 00000000..d262d144 Binary files /dev/null and b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/Roboto-Thin.ttf differ diff --git a/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/logo.jpg b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/logo.jpg new file mode 100644 index 00000000..46f36bdb Binary files /dev/null and b/AsbCloudInfrastructure/CommonLibs/AsbSaubReport/Resources/logo.jpg differ diff --git a/AsbCloudInfrastructure/DependencyInjection.cs b/AsbCloudInfrastructure/DependencyInjection.cs index 81aa7aae..a7a1fd65 100644 --- a/AsbCloudInfrastructure/DependencyInjection.cs +++ b/AsbCloudInfrastructure/DependencyInjection.cs @@ -30,6 +30,7 @@ namespace AsbCloudInfrastructure services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); return services; } diff --git a/AsbCloudInfrastructure/ReportDataSourcePgCloud.cs b/AsbCloudInfrastructure/ReportDataSourcePgCloud.cs new file mode 100644 index 00000000..ffdde63d --- /dev/null +++ b/AsbCloudInfrastructure/ReportDataSourcePgCloud.cs @@ -0,0 +1,107 @@ +using AsbSaubReport.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using AsbCloudDb.Model; +using Microsoft.EntityFrameworkCore; + +namespace AsbSaubReport +{ + public class ReportDataSourcePgCloud : IReportDataSource + { + private readonly AsbCloudDbContext context; + + private readonly int? idTelemetry; + private readonly WellInfoReport info; + + private readonly Dictionary events; + private readonly Dictionary users; + private readonly Dictionary categories = new Dictionary + { + {1, "Авария"}, + {2, "Предупреждение"}, + {3, "Информация"}, + }; + + public ReportDataSourcePgCloud(AsbCloudDbContext context, int wellId) + { + this.context = context; + var well = context.Wells + .Include(w=>w.Cluster) + .ThenInclude(c=>c.Deposit) + .Include(w=>w.Customer) + .Include(w => w.Telemetry) + .FirstOrDefault(w => w.Id == wellId); + + idTelemetry = well?.IdTelemetry; + if (idTelemetry is null) + throw new ArgumentException($"Well {wellId} doesn't contain telemetry", nameof(wellId)); + + events = context.Events + .Where(e => e.IdTelemetry == idTelemetry) + .ToDictionary(e => e.IdEvent, e => e); + + users = context.TelemetryUsers + .Where(u => u.IdTelemetry == idTelemetry) + .ToDictionary(u => u.IdUser, u => u); + + info = new WellInfoReport + { + Deposit = well.Cluster.Deposit.Caption, + Cluster = well.Cluster.Caption, + Well = well.Caption, + Customer = well.Customer.Caption, + DrillingStartDate = well.Telemetry?.Info?.DrillingStartDate??default, + TimeZoneId = well.Telemetry?.Info?.TimeZoneId??default, + }; + } + + public IQueryable GetDataSaubItems(DateTime begin, DateTime end) + => from item in context.DataSaubBases + where item.IdTelemetry == idTelemetry + && item.Date >= begin + && item.Date <= end + select new DataSaubReport + { + Id = item.Id, + Date = item.Date, + Mode = item.Mode, + WellDepth = item.WellDepth, + BitDepth = item.BitDepth, + BlockPosition = item.BlockPosition, + BlockSpeed = item.BlockSpeed, + BlockSpeedSp = item.BlockSpeedSp, + BlockSpeedSpDevelop = item.BlockSpeedSpDevelop, + Pressure = item.Pressure, + PressureSp = item.PressureSp, + AxialLoad = item.AxialLoad, + AxialLoadSp = item.AxialLoadSp, + AxialLoadLimitMax = item.AxialLoadLimitMax, + HookWeight = item.HookWeight, + RotorTorque = item.RotorTorque, + RotorTorqueSp = item.RotorTorqueSp, + RotorSpeed = item.RotorSpeed, + Flow = item.Flow, + PressureSpDevelop = item.PressureSpDevelop, + }; + + public IQueryable GetMessages(DateTime begin, DateTime end) + => from item in context.Messages + where item.IdTelemetry == idTelemetry + && item.Date >= begin + && item.Date <= end + select new MessageReport + { + Id = item.Id, + Date = item.Date, + Category = categories[events[item.IdEvent].IdCategory], + User = item.IdTelemetryUser == null + ? "" + : users[(int)item.IdTelemetryUser].MakeDisplayName(), + Text = events[item.IdEvent].MakeMessageText(item) + }; + + public WellInfoReport GetWellInfo() + => info; + } +} diff --git a/AsbCloudInfrastructure/Services/ReportService.cs b/AsbCloudInfrastructure/Services/ReportService.cs new file mode 100644 index 00000000..c0e26168 --- /dev/null +++ b/AsbCloudInfrastructure/Services/ReportService.cs @@ -0,0 +1,67 @@ +using AsbCloudApp.Services; +using AsbCloudApp.Data; +using AsbCloudDb.Model; +using System; +using System.IO; +using AsbSaubReport; + +namespace AsbCloudInfrastructure.Services +{ + public class ReportService : IReportService + { + private readonly IAsbCloudDbContext db; + private readonly ITelemetryService telemetryService; + + public ReportService(IAsbCloudDbContext db, ITelemetryService telemetryService) + { + this.db = db; + this.telemetryService = telemetryService; + } + + public int GetReportPagesCount(int wellId, DateTime begin, DateTime end, int stepSeconds, int format) + { + var generator = GetReportGenerator(wellId, begin, end, stepSeconds, format); + + return generator.GetPagesCount(); + } + + public ReportPropertiesDto GetReportFileProperties(string reportName, string rootPath) + { + string path = Path.Combine(rootPath, reportName); + FileStream fs = new FileStream(path, FileMode.Open); + string contentType = Path.GetExtension(path); + string fileName = Path.GetFileName(path); + + return new ReportPropertiesDto { + Filestream = fs, + ContentType = contentType, + FileName = fileName + }; + } + + public DatesRangeDto GetReportsDatesRange(int wellId) + { + var telemetry = telemetryService.GetTelemetryByWellId(wellId); + + if (telemetry is null) + return null; + + var result = db.GetDatesRange(telemetry.Id); + + return new DatesRangeDto { From = result.From, To = result.To }; + } + + private IReportGenerator GetReportGenerator(int wellId,DateTime begin, DateTime end, int stepSeconds, int format) + { + var dataSource = new ReportDataSourcePgCloud((AsbCloudDbContext)db, wellId); + var generator = new PdfGenerator(dataSource); + + generator.Begin = begin; + generator.End = end; + generator.Step = TimeSpan.FromSeconds(stepSeconds); + generator.WithCharts = true; + generator.WithEvents = true; + return generator; + } + } +} diff --git a/AsbCloudWebApi/Controllers/ReportController.cs b/AsbCloudWebApi/Controllers/ReportController.cs new file mode 100644 index 00000000..4f24c98e --- /dev/null +++ b/AsbCloudWebApi/Controllers/ReportController.cs @@ -0,0 +1,150 @@ +using System; +using System.Threading.Tasks; +using System.IO; +using Microsoft.AspNetCore.Mvc; +using AsbCloudApp.Data; +using AsbCloudApp.Services; +using AsbCloudDb.Model; +using Microsoft.AspNetCore.Hosting; + +namespace AsbCloudWebApi.Controllers +{ + /// + /// Контроллер отчетов по буровым скважинам + /// + [Route("api/well")] + [ApiController] + public class ReportController : ControllerBase + { + private readonly IAsbCloudDbContext db; + private readonly IReportService reportService; + private readonly IWellService wellService; + private readonly IWebHostEnvironment appEnvironment; + + public ReportController(IAsbCloudDbContext db, IReportService reportService, IWellService wellService, IWebHostEnvironment appEnvironment) + { + this.db = db; + this.reportService = reportService; + this.wellService = wellService; + this.appEnvironment = appEnvironment; + } + + /// + /// Создает отчет по скважине с указанными параметрами + /// + /// id скважины + /// дата начала интервала + /// дата окончания интервала + /// шаг интервала + /// формат отчета (0-PDF, 1-LASS) + /// id фоновой задачи формирования отчета + [HttpPost] + [Route("{wellId}/report")] + [ProducesResponseType(typeof(string), (int)System.Net.HttpStatusCode.OK)] + + // ЭТОТ МЕТОД ПОКА НЕ РЕАЛИЗОВАН + public async Task CreateReportAsync(int wellId, int stepSeconds, int format, DateTime begin = default, DateTime end = default) + { + int? idCustomer = User.GetCustomerId(); + + if (idCustomer is null) + return BadRequest(); + + if (!wellService.CheckWellOwnership((int)idCustomer, wellId)) + return Forbid(); + + return await Task.Run(() => + { + // создаем отчет. Это заготовка, пока еще не перенесена в сервис. + + var taskId = Task.CurrentId; + + if (taskId is null) + throw new NullReferenceException("Не удалось получить id задачи"); + + return Ok(taskId.ToString()); + }); + } + + /// + /// Возвращает файл-отчет с диска на сервере + /// + /// id скважины + /// имя запрашиваемого файла (отчета) + /// файловый поток с отчетом + [HttpGet] + [Route("{wellId}/report")] + [ProducesResponseType(typeof(FileStreamResult), (int)System.Net.HttpStatusCode.OK)] + public IActionResult GetReport([FromRoute] int wellId, [FromQuery] string reportName) + { + try + { + int? idCustomer = User.GetCustomerId(); + + if (idCustomer is null) + return BadRequest(); + + if (!wellService.CheckWellOwnership((int)idCustomer, wellId)) + return Forbid(); + + var options = reportService.GetReportFileProperties(reportName, appEnvironment.ContentRootPath); + + return File(options.Filestream, options.ContentType, options.FileName); + } + catch (FileNotFoundException ex) + { + return NotFound("Файл не найден"); + } + } + + /// + /// Возвращает прогнозируемое количество страниц будущего отчета + /// + /// id скважины + /// дата начала интервала + /// дата окончания интервала + /// шаг интервала + /// формат отчета (0-PDF, 1-LASS) + /// прогнозируемое кол-во страниц отчета + [HttpGet] + [Route("{wellId}/reportSize")] + [ProducesResponseType(typeof(string), (int)System.Net.HttpStatusCode.OK)] + public IActionResult GetReportSize(int wellId, int stepSeconds, int format, DateTime begin = default, DateTime end = default) + { + int? idCustomer = User.GetCustomerId(); + + if (idCustomer is null) + return BadRequest(); + + if (!wellService.CheckWellOwnership((int)idCustomer, wellId)) + return Forbid(); + + int reportSize = reportService.GetReportPagesCount(wellId, begin, end, stepSeconds, format); + + return Ok(reportSize); + } + + /// + /// Возвращает даты самого старого и самого свежего отчетов в БД + /// + /// id скважины + /// Даты самого старого и самого свежего отчетов в БД + [HttpGet] + [Route("{wellId}/reportsDatesRange")] + [ProducesResponseType(typeof(DatesRangeDto), (int)System.Net.HttpStatusCode.OK)] + public IActionResult GetReportsDateRange(int wellId) + { + int? idCustomer = User.GetCustomerId(); + + if (idCustomer is null) + return BadRequest(); + + if (!wellService.CheckWellOwnership((int)idCustomer, wellId)) + return Forbid(); + + DatesRangeDto wellReportsDatesRange = reportService.GetReportsDatesRange(wellId); + + return Ok(wellReportsDatesRange); + } + } +}