.net3.1
This commit is contained in:
parent
b801c12012
commit
87595e7feb
@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Abp;
|
||||
using Abp.Modules;
|
||||
using Castle.Core;
|
||||
|
||||
@ -6,14 +6,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>bin\Release\net8.0\publish\win-x64\</PublishDir>
|
||||
<PublishDir>D:\SOMS\运维调度通信网关</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -8,10 +8,11 @@ using System.Diagnostics;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Channels;
|
||||
using System.Threading.Tasks;
|
||||
using Yunda.SOMS.OperationsMainSiteGatewayServer.TcpSocket.Models;
|
||||
using Yunda.SOMS.OperationsMainSiteGatewayServer.TcpSocket.TestData;
|
||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
//using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace Yunda.SOMS.OperationsMainSiteGatewayServer.TcpSocket.Server
|
||||
{
|
||||
|
||||
@ -5,8 +5,11 @@ using DotNetty.Transport.Bootstrapping;
|
||||
using DotNetty.Transport.Channels;
|
||||
using DotNetty.Transport.Channels.Sockets;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime;
|
||||
using System.Threading.Tasks;
|
||||
using Yunda.SOMS.OperationsMainSiteGatewayServer.TcpSocket.TestData;
|
||||
|
||||
namespace Yunda.SOMS.OperationsMainSiteGatewayServer.TcpSocket.Server
|
||||
@ -15,7 +18,7 @@ namespace Yunda.SOMS.OperationsMainSiteGatewayServer.TcpSocket.Server
|
||||
{
|
||||
// 定义 MessageReceived 事件
|
||||
public event Action< byte, byte[], byte> MessageReceived; // 装置地址,功能码,消息
|
||||
public Dictionary<string,DotNettyServerHandler> dotNettyServerHandlers = new ();
|
||||
public Dictionary<string,DotNettyServerHandler> dotNettyServerHandlers = new Dictionary<string, DotNettyServerHandler>();
|
||||
public DotNettyTcpServer()
|
||||
{
|
||||
//_dotNettyServerHandler = dotNettyServerHandler;
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyName>运维调度通信网关</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -17,18 +18,22 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Abp" Version="9.4.2" />
|
||||
<PackageReference Include="Abp.AspNetCore" Version="9.4.2" />
|
||||
<PackageReference Include="DotNetty.Codecs" Version="0.7.6" />
|
||||
<PackageReference Include="DotNetty.Transport" Version="0.7.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
|
||||
<PackageReference Include="Serilog" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.4" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Seq" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- ABP Framework (compatible with .NET Core 3.1) -->
|
||||
|
||||
<!-- DotNetty (compatible with .NET Core 3.1) -->
|
||||
<PackageReference Include="DotNetty.Codecs" Version="0.7.6" />
|
||||
<PackageReference Include="DotNetty.Transport" Version="0.7.6" />
|
||||
|
||||
<!-- Microsoft.Extensions.Configuration.Json (updated to match dependencies) -->
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
|
||||
|
||||
<!-- Serilog (compatible with .NET Core 3.1) -->
|
||||
<PackageReference Include="Serilog" Version="2.10.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="2.2.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\YunDa.Application\YunDa.ISAS.Application.Core\YunDa.SOMS.Application.Core.csproj" />
|
||||
|
||||
@ -2,4 +2,9 @@ dotnet add package Microsoft.EntityFrameworkCore
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
|
||||
|
||||
|
||||
|
||||
|
||||
dotnet ef dbcontext scaffold "Data Source=protdb.sql3" Microsoft.EntityFrameworkCore.Sqlite -o Models
|
||||
dotnet ef dbcontext scaffold "Data Source=iodb_tp7.sql3" Microsoft.EntityFrameworkCore.Sqlite -o Models
|
||||
dotnet ef dbcontext scaffold "Data Source=commdb.sql3" Microsoft.EntityFrameworkCore.Sqlite -o Models
|
||||
@ -94,8 +94,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeFirstExistingDatabaseSa
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YunDa.SOMS.BASE.Entities", "src\YunDa.Domain\YunDa.ISMS.BASE.Entities\YunDa.SOMS.BASE.Entities.csproj", "{D9EF792E-4C2F-4DC3-B388-23B02D6C7B88}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yunda.SOMS.DataMonitoringServer.Service", "Yunda.SOMS.DataMonitoringServer.Service\Yunda.SOMS.DataMonitoringServer.Service.csproj", "{E54EC623-9758-40C0-8E2D-183AD9BE7944}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YunDa.SOMS.Web.MVC", "src\YunDa.Web\YunDa.SOMS.Web.MVC\YunDa.SOMS.Web.MVC.csproj", "{CEF0DE60-3E66-40B5-B6AB-06B1719FFCDF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yunda.SOMS.DataMonitoringServer", "src\YunDa.Server\Yunda.ISAS.DataMonitoringServer\Yunda.SOMS.DataMonitoringServer.csproj", "{B09351A1-4673-4981-9337-495EAD4647E1}"
|
||||
@ -674,24 +672,6 @@ Global
|
||||
{D9EF792E-4C2F-4DC3-B388-23B02D6C7B88}.Template|x64.Build.0 = Debug|Any CPU
|
||||
{D9EF792E-4C2F-4DC3-B388-23B02D6C7B88}.Template|x86.ActiveCfg = Debug|Any CPU
|
||||
{D9EF792E-4C2F-4DC3-B388-23B02D6C7B88}.Template|x86.Build.0 = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Template|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Template|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Template|x64.ActiveCfg = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Template|x64.Build.0 = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Template|x86.ActiveCfg = Debug|Any CPU
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944}.Template|x86.Build.0 = Debug|Any CPU
|
||||
{CEF0DE60-3E66-40B5-B6AB-06B1719FFCDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CEF0DE60-3E66-40B5-B6AB-06B1719FFCDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CEF0DE60-3E66-40B5-B6AB-06B1719FFCDF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
@ -913,7 +893,6 @@ Global
|
||||
{887F826D-F117-4DB2-849F-0A1EE02334C5} = {A49CD7CD-52BA-48F3-83D5-D6CA072F8849}
|
||||
{B4324CC6-A8EF-49FF-A3AF-BFFE71ACF587} = {A6E85FAA-7553-412F-852A-2CB0C51D1A7F}
|
||||
{D9EF792E-4C2F-4DC3-B388-23B02D6C7B88} = {93CB9A86-F838-4498-B5EB-AB0A5EE42106}
|
||||
{E54EC623-9758-40C0-8E2D-183AD9BE7944} = {A49CD7CD-52BA-48F3-83D5-D6CA072F8849}
|
||||
{CEF0DE60-3E66-40B5-B6AB-06B1719FFCDF} = {A6E85FAA-7553-412F-852A-2CB0C51D1A7F}
|
||||
{B09351A1-4673-4981-9337-495EAD4647E1} = {A49CD7CD-52BA-48F3-83D5-D6CA072F8849}
|
||||
{6F188128-F359-492A-99CF-BF219B886FFA} = {F10AA149-2626-486E-85BB-9CD5365F3016}
|
||||
@ -927,7 +906,7 @@ Global
|
||||
{1C7AC379-5A1C-4266-B469-83F529979EFE} = {9D1CDEF4-094D-4906-8D8B-7A9109CD84BE}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B516B1E8-1CEC-4BCC-BA92-93CB32845E37}
|
||||
VisualSVNWorkingCopyRoot = .
|
||||
SolutionGuid = {B516B1E8-1CEC-4BCC-BA92-93CB32845E37}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@ -1,17 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Abp" Version="9.4.2" />
|
||||
<PackageReference Include="Jint" Version="4.1.0" />
|
||||
<PackageReference Include="Quartz" Version="3.13.1" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.9" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- ABP Framework (compatible with .NET Core 3.1) -->
|
||||
<PackageReference Include="Abp" Version="9.4.2" />
|
||||
|
||||
<!-- Jint (compatible with .NET Core 3.1) -->
|
||||
<PackageReference Include="Jint" Version="3.0.0" />
|
||||
|
||||
<!-- Quartz (compatible with .NET Core 3.1) -->
|
||||
<PackageReference Include="Quartz" Version="3.13.1" />
|
||||
|
||||
<!-- SkiaSharp (compatible with .NET Core 3.1) -->
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.9" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\YunDa.Application\YunDa.ISAS.DataTransferObject\YunDa.SOMS.DataTransferObject.csproj" />
|
||||
|
||||
@ -1,149 +1,151 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using iText.Kernel.Pdf;
|
||||
using iText.Layout;
|
||||
using iText.Layout.Element;
|
||||
using iText.Layout.Properties;
|
||||
using iText.IO.Font.Constants;
|
||||
using iText.IO.Font;
|
||||
using iText.Kernel.Font;
|
||||
using iText.Kernel.Pdf.Canvas.Draw;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.IO;
|
||||
//using iText.Kernel.Pdf;
|
||||
//using iText.Layout;
|
||||
//using iText.Layout.Element;
|
||||
//using iText.Layout.Properties;
|
||||
//using iText.IO.Font.Constants;
|
||||
//using iText.IO.Font;
|
||||
//using iText.Kernel.Font;
|
||||
//using iText.Kernel.Pdf.Canvas.Draw;
|
||||
//using iTextSharp.text;
|
||||
//using iTextSharp.text.pdf;
|
||||
|
||||
namespace YunDa.ISAS.Application.Core.Helper.PDFHelper
|
||||
{
|
||||
//namespace YunDa.ISAS.Application.Core.Helper.PDFHelper
|
||||
//{
|
||||
|
||||
|
||||
public class PdfDoc : Doc
|
||||
{
|
||||
private static readonly string TTF_Path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TplFile\\pdf\\msyh.ttf");
|
||||
// public class PdfDoc : Doc
|
||||
// {
|
||||
// private static readonly string TTF_Path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TplFile\\pdf\\msyh.ttf");
|
||||
|
||||
public PdfDoc(DBDto dto, string filter = "html files (.pdf)|*.pdf") : base(dto, filter)
|
||||
{
|
||||
}
|
||||
// public PdfDoc(DBDto dto, string filter = "html files (.pdf)|*.pdf") : base(dto, filter)
|
||||
// {
|
||||
// }
|
||||
|
||||
public override bool Build(string filePath)
|
||||
{
|
||||
return BuildDoc(filePath);
|
||||
}
|
||||
// public override bool Build(string filePath)
|
||||
// {
|
||||
// return BuildDoc(filePath);
|
||||
// }
|
||||
|
||||
private bool BuildDoc(string filePath)
|
||||
{
|
||||
var pdfPath = Path.Combine(TplPath, "pdf");
|
||||
if (!Directory.Exists(pdfPath))
|
||||
{
|
||||
Directory.CreateDirectory(pdfPath);
|
||||
}
|
||||
// private bool BuildDoc(string filePath)
|
||||
// {
|
||||
// var pdfPath = Path.Combine(TplPath, "pdf");
|
||||
// if (!Directory.Exists(pdfPath))
|
||||
// {
|
||||
// Directory.CreateDirectory(pdfPath);
|
||||
// }
|
||||
|
||||
var pdf = "D:\\资料\\字体\\Source_Han_Serif_CN_VF_Regular.ttf";
|
||||
ExportPdfByIText7(filePath, pdf, this.Dto);
|
||||
return true;
|
||||
}
|
||||
// var pdf = "D:\\资料\\字体\\Source_Han_Serif_CN_VF_Regular.ttf";
|
||||
// ExportPdfByIText7(filePath, pdf, this.Dto);
|
||||
// return true;
|
||||
// }
|
||||
|
||||
private void ExportPdfByIText7(string fileName, string fontPath, DBDto dto)
|
||||
{
|
||||
var pdfWriter = new PdfWriter(new FileStream(fileName, FileMode.Create));
|
||||
var pdfDocument = new PdfDocument(pdfWriter);
|
||||
var document = new Document(pdfDocument);
|
||||
// private void ExportPdfByIText7(string fileName, string fontPath, DBDto dto)
|
||||
// {
|
||||
// var pdfWriter = new PdfWriter(new FileStream(fileName, FileMode.Create));
|
||||
// var pdfDocument = new PdfDocument(pdfWriter);
|
||||
// var document = new Document(pdfDocument);
|
||||
|
||||
// 设置中文字体
|
||||
var font = PdfFontFactory.CreateFont(fontPath, PdfEncodings.IDENTITY_H);
|
||||
// // 设置中文字体
|
||||
// var font = PdfFontFactory.CreateFont(fontPath, PdfEncodings.IDENTITY_H);
|
||||
|
||||
// 标题
|
||||
var title = new Paragraph($"{dto.DocTitle}\n\n")
|
||||
.SetFont(font)
|
||||
.SetFontSize(30)
|
||||
.SetTextAlignment(TextAlignment.CENTER);
|
||||
document.Add(title);
|
||||
// // 标题
|
||||
// var title = new Paragraph($"{dto.DocTitle}\n\n")
|
||||
// .SetFont(font)
|
||||
// .SetFontSize(30)
|
||||
// .SetTextAlignment(TextAlignment.CENTER);
|
||||
// document.Add(title);
|
||||
|
||||
var subTitle = new Paragraph($"—— {dto.DBName}")
|
||||
.SetFont(font)
|
||||
.SetFontSize(20)
|
||||
.SetTextAlignment(TextAlignment.CENTER);
|
||||
document.Add(subTitle);
|
||||
// var subTitle = new Paragraph($"—— {dto.DBName}")
|
||||
// .SetFont(font)
|
||||
// .SetFontSize(20)
|
||||
// .SetTextAlignment(TextAlignment.CENTER);
|
||||
// document.Add(subTitle);
|
||||
|
||||
// 添加章节内容
|
||||
document.Add(new AreaBreak(AreaBreakType.NEXT_PAGE));
|
||||
AddChapter(document, "test1", font, dto.Tables);
|
||||
document.Add(new AreaBreak(AreaBreakType.NEXT_PAGE));
|
||||
AddOverviewTable(document, font, dto.Tables);
|
||||
document.Add(new AreaBreak(AreaBreakType.NEXT_PAGE));
|
||||
// // 添加章节内容
|
||||
// document.Add(new AreaBreak(AreaBreakType.NEXT_PAGE));
|
||||
// AddChapter(document, "test1", font, dto.Tables);
|
||||
// document.Add(new AreaBreak(AreaBreakType.NEXT_PAGE));
|
||||
// AddOverviewTable(document, font, dto.Tables);
|
||||
// document.Add(new AreaBreak(AreaBreakType.NEXT_PAGE));
|
||||
|
||||
document.Close();
|
||||
}
|
||||
// document.Close();
|
||||
// }
|
||||
|
||||
private void AddChapter(Document document, string chapterTitle, PdfFont font, List<string> tables)
|
||||
{
|
||||
var chapter = new Paragraph(chapterTitle)
|
||||
.SetFont(font)
|
||||
.SetFontSize(16)
|
||||
.SetTextAlignment(TextAlignment.LEFT);
|
||||
document.Add(chapter);
|
||||
// private void AddChapter(Document document, string chapterTitle, PdfFont font, List<string> tables)
|
||||
// {
|
||||
// var chapter = new Paragraph(chapterTitle)
|
||||
// .SetFont(font)
|
||||
// .SetFontSize(16)
|
||||
// .SetTextAlignment(TextAlignment.LEFT);
|
||||
// document.Add(chapter);
|
||||
|
||||
foreach (var table in tables)
|
||||
{
|
||||
var tableTitle = new Paragraph($"Table: {table}")
|
||||
.SetFont(font)
|
||||
.SetFontSize(12)
|
||||
.SetTextAlignment(TextAlignment.LEFT);
|
||||
document.Add(tableTitle);
|
||||
// foreach (var table in tables)
|
||||
// {
|
||||
// var tableTitle = new Paragraph($"Table: {table}")
|
||||
// .SetFont(font)
|
||||
// .SetFontSize(12)
|
||||
// .SetTextAlignment(TextAlignment.LEFT);
|
||||
// document.Add(tableTitle);
|
||||
|
||||
var pdfTable = new Table(UnitValue.CreatePercentArray(new float[] { 1, 3, 3, 2, 1, 1, 1, 2 }))
|
||||
.UseAllAvailableWidth()
|
||||
.SetMarginTop(10)
|
||||
.SetMarginBottom(10);
|
||||
// var pdfTable = new Table(UnitValue.CreatePercentArray(new float[] { 1, 3, 3, 2, 1, 1, 1, 2 }))
|
||||
// .UseAllAvailableWidth()
|
||||
// .SetMarginTop(10)
|
||||
// .SetMarginBottom(10);
|
||||
|
||||
pdfTable.AddHeaderCell(CreateCell("序号", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("列名", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("数据类型", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("长度", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("主键", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("自增", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("允许空", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("默认值", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("序号", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("列名", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("数据类型", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("长度", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("主键", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("自增", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("允许空", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("默认值", font));
|
||||
|
||||
for (int i = 0; i < 5; i++) // 模拟数据
|
||||
{
|
||||
pdfTable.AddCell(CreateCell((i + 1).ToString(), font));
|
||||
pdfTable.AddCell(CreateCell("列名" + (i + 1), font));
|
||||
pdfTable.AddCell(CreateCell("数据类型" + (i + 1), font));
|
||||
pdfTable.AddCell(CreateCell("100", font));
|
||||
pdfTable.AddCell(CreateCell("是", font));
|
||||
pdfTable.AddCell(CreateCell("否", font));
|
||||
pdfTable.AddCell(CreateCell("否", font));
|
||||
pdfTable.AddCell(CreateCell("默认值" + (i + 1), font));
|
||||
}
|
||||
// for (int i = 0; i < 5; i++) // 模拟数据
|
||||
// {
|
||||
// pdfTable.AddCell(CreateCell((i + 1).ToString(), font));
|
||||
// pdfTable.AddCell(CreateCell("列名" + (i + 1), font));
|
||||
// pdfTable.AddCell(CreateCell("数据类型" + (i + 1), font));
|
||||
// pdfTable.AddCell(CreateCell("100", font));
|
||||
// pdfTable.AddCell(CreateCell("是", font));
|
||||
// pdfTable.AddCell(CreateCell("否", font));
|
||||
// pdfTable.AddCell(CreateCell("否", font));
|
||||
// pdfTable.AddCell(CreateCell("默认值" + (i + 1), font));
|
||||
// }
|
||||
|
||||
document.Add(pdfTable);
|
||||
}
|
||||
}
|
||||
// document.Add(pdfTable);
|
||||
// }
|
||||
// }
|
||||
|
||||
private void AddOverviewTable(Document document, PdfFont font, List<string> tables)
|
||||
{
|
||||
var pdfTable = new Table(UnitValue.CreatePercentArray(new float[] { 1, 4, 4 }))
|
||||
.UseAllAvailableWidth();
|
||||
// private void AddOverviewTable(Document document, PdfFont font, List<string> tables)
|
||||
// {
|
||||
// var pdfTable = new Table(UnitValue.CreatePercentArray(new float[] { 1, 4, 4 }))
|
||||
// .UseAllAvailableWidth();
|
||||
|
||||
pdfTable.AddHeaderCell(CreateCell("序号", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("表名", font));
|
||||
pdfTable.AddHeaderCell(CreateCell("说明", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("序号", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("表名", font));
|
||||
// pdfTable.AddHeaderCell(CreateCell("说明", font));
|
||||
|
||||
for (int i = 0; i < tables.Count; i++)
|
||||
{
|
||||
pdfTable.AddCell(CreateCell((i + 1).ToString(), font));
|
||||
pdfTable.AddCell(CreateCell(tables[i], font));
|
||||
pdfTable.AddCell(CreateCell("说明" + (i + 1), font));
|
||||
}
|
||||
// for (int i = 0; i < tables.Count; i++)
|
||||
// {
|
||||
// pdfTable.AddCell(CreateCell((i + 1).ToString(), font));
|
||||
// pdfTable.AddCell(CreateCell(tables[i], font));
|
||||
// pdfTable.AddCell(CreateCell("说明" + (i + 1), font));
|
||||
// }
|
||||
|
||||
document.Add(pdfTable);
|
||||
}
|
||||
// document.Add(pdfTable);
|
||||
// }
|
||||
|
||||
private Cell CreateCell(string content, PdfFont font)
|
||||
{
|
||||
return new Cell()
|
||||
.Add(new Paragraph(content).SetFont(font).SetFontSize(10))
|
||||
.SetTextAlignment(TextAlignment.CENTER)
|
||||
.SetVerticalAlignment(VerticalAlignment.MIDDLE);
|
||||
}
|
||||
}
|
||||
// private Cell CreateCell(string content, PdfFont font)
|
||||
// {
|
||||
// return new Cell()
|
||||
// .Add(new Paragraph(content).SetFont(font).SetFontSize(10))
|
||||
// .SetTextAlignment(TextAlignment.CENTER)
|
||||
// .SetVerticalAlignment(VerticalAlignment.MIDDLE);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
@ -1,127 +1,129 @@
|
||||
|
||||
using iText.Barcodes;
|
||||
using iText.IO.Font;
|
||||
using iText.IO.Image;
|
||||
using iText.Kernel.Font;
|
||||
using iText.Kernel.Geom;
|
||||
using iText.Kernel.Pdf;
|
||||
using iText.Layout;
|
||||
using iText.Layout.Borders;
|
||||
using iText.Layout.Element;
|
||||
using iText.Layout.Properties;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
//加入參考
|
||||
namespace YunDa.ISAS.Application.Core.Helper.PDFHelper
|
||||
{
|
||||
//using iText.Barcodes;
|
||||
//using iText.IO.Font;
|
||||
//using iText.IO.Image;
|
||||
//using iText.Kernel.Font;
|
||||
//using iText.Kernel.Geom;
|
||||
//using iText.Kernel.Pdf;
|
||||
//using iText.Layout;
|
||||
//using iText.Layout.Borders;
|
||||
//using iText.Layout.Element;
|
||||
//using iText.Layout.Properties;
|
||||
//using iTextSharp.text;
|
||||
//using iTextSharp.text.pdf;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.IO;
|
||||
////加入參考
|
||||
//namespace YunDa.ISAS.Application.Core.Helper.PDFHelper
|
||||
//{
|
||||
|
||||
|
||||
public class QrCodePDF
|
||||
{
|
||||
private PdfFont _font;
|
||||
private Document _document;
|
||||
private string _filepath;
|
||||
// public class QrCodePDF
|
||||
// {
|
||||
// private PdfFont _font;
|
||||
// private Document _document;
|
||||
// private string _filepath;
|
||||
|
||||
public QrCodePDF(string filepath)
|
||||
{
|
||||
_filepath = filepath;
|
||||
// public QrCodePDF(string filepath)
|
||||
// {
|
||||
// _filepath = filepath;
|
||||
|
||||
if (!Directory.Exists(System.IO.Path.GetDirectoryName(filepath)))
|
||||
{
|
||||
Directory.CreateDirectory(System.IO.Path.GetDirectoryName(filepath));
|
||||
}
|
||||
// if (!Directory.Exists(System.IO.Path.GetDirectoryName(filepath)))
|
||||
// {
|
||||
// Directory.CreateDirectory(System.IO.Path.GetDirectoryName(filepath));
|
||||
// }
|
||||
|
||||
if (File.Exists(filepath))
|
||||
{
|
||||
File.Delete(filepath);
|
||||
}
|
||||
// if (File.Exists(filepath))
|
||||
// {
|
||||
// File.Delete(filepath);
|
||||
// }
|
||||
|
||||
var pdfWriter = new PdfWriter(new FileStream(filepath, FileMode.CreateNew));
|
||||
var pdfDocument = new PdfDocument(pdfWriter);
|
||||
_document = new Document(pdfDocument, PageSize.A4);
|
||||
// var pdfWriter = new PdfWriter(new FileStream(filepath, FileMode.CreateNew));
|
||||
// var pdfDocument = new PdfDocument(pdfWriter);
|
||||
// _document = new Document(pdfDocument, PageSize.A4);
|
||||
|
||||
// 初始化字体
|
||||
string fontPath = System.IO.Path.GetFullPath(".\\wwwroot\\fonts\\Source_Han_Serif_CN_VF_Regular.ttf");
|
||||
_font = PdfFontFactory.CreateFont(fontPath, PdfEncodings.IDENTITY_H);
|
||||
}
|
||||
// // 初始化字体
|
||||
// string fontPath = System.IO.Path.GetFullPath(".\\wwwroot\\fonts\\Source_Han_Serif_CN_VF_Regular.ttf");
|
||||
// _font = PdfFontFactory.CreateFont(fontPath, PdfEncodings.IDENTITY_H);
|
||||
// }
|
||||
|
||||
private List<string> PreCheck(List<string> contents)
|
||||
{
|
||||
if (contents == null || contents.Count == 0)
|
||||
{
|
||||
return new List<string> { "空", "空", "空", "空" };
|
||||
}
|
||||
// private List<string> PreCheck(List<string> contents)
|
||||
// {
|
||||
// if (contents == null || contents.Count == 0)
|
||||
// {
|
||||
// return new List<string> { "空", "空", "空", "空" };
|
||||
// }
|
||||
|
||||
int remainder = contents.Count % 4;
|
||||
if (remainder != 0)
|
||||
{
|
||||
int patch = 4 - remainder;
|
||||
for (int i = 0; i < patch; i++)
|
||||
{
|
||||
contents.Add("空");
|
||||
}
|
||||
}
|
||||
// int remainder = contents.Count % 4;
|
||||
// if (remainder != 0)
|
||||
// {
|
||||
// int patch = 4 - remainder;
|
||||
// for (int i = 0; i < patch; i++)
|
||||
// {
|
||||
// contents.Add("空");
|
||||
// }
|
||||
// }
|
||||
|
||||
return contents;
|
||||
}
|
||||
// return contents;
|
||||
// }
|
||||
|
||||
public bool SpawnEquipmentQrCodePDF(List<string> contents)
|
||||
{
|
||||
contents = PreCheck(contents);
|
||||
try
|
||||
{
|
||||
Table table = new Table(UnitValue.CreatePercentArray(4)).UseAllAvailableWidth();
|
||||
// public bool SpawnEquipmentQrCodePDF(List<string> contents)
|
||||
// {
|
||||
// contents = PreCheck(contents);
|
||||
// try
|
||||
// {
|
||||
// Table table = new Table(UnitValue.CreatePercentArray(4)).UseAllAvailableWidth();
|
||||
|
||||
foreach (var content in contents)
|
||||
{
|
||||
Cell cell = new Cell().SetPadding(10).SetBorder(Border.NO_BORDER);
|
||||
// foreach (var content in contents)
|
||||
// {
|
||||
// Cell cell = new Cell().SetPadding(10).SetBorder(Border.NO_BORDER);
|
||||
|
||||
var qrCode = new BarcodeQRCode(content);
|
||||
var qrImage = qrCode.CreateFormXObject(_document.GetPdfDocument());
|
||||
Image img = new Image(qrImage).ScaleToFit(100, 100).SetHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
cell.Add(img);
|
||||
// var qrCode = new BarcodeQRCode(content);
|
||||
// var qrImage = qrCode.CreateFormXObject(_document.GetPdfDocument());
|
||||
// Image img = new Image(qrImage).ScaleToFit(100, 100).SetHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
// cell.Add(img);
|
||||
|
||||
Paragraph para = new Paragraph(content).SetFont(_font).SetFontSize(10).SetTextAlignment(TextAlignment.CENTER);
|
||||
cell.Add(para);
|
||||
// Paragraph para = new Paragraph(content).SetFont(_font).SetFontSize(10).SetTextAlignment(TextAlignment.CENTER);
|
||||
// cell.Add(para);
|
||||
|
||||
table.AddCell(cell);
|
||||
}
|
||||
// table.AddCell(cell);
|
||||
// }
|
||||
|
||||
_document.Add(table);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_document.Close();
|
||||
}
|
||||
// _document.Add(table);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// Console.WriteLine(ex);
|
||||
// return false;
|
||||
// }
|
||||
// finally
|
||||
// {
|
||||
// _document.Close();
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
// return true;
|
||||
// }
|
||||
|
||||
public void AddParagraph(string content, float fontsize, int alignment = 0, float spacingAfter = 0, float spacingBefore = 0)
|
||||
{
|
||||
var para = new Paragraph(content)
|
||||
.SetFont(_font)
|
||||
.SetFontSize(fontsize)
|
||||
.SetTextAlignment((TextAlignment)alignment);
|
||||
// public void AddParagraph(string content, float fontsize, int alignment = 0, float spacingAfter = 0, float spacingBefore = 0)
|
||||
// {
|
||||
// var para = new Paragraph(content)
|
||||
// .SetFont(_font)
|
||||
// .SetFontSize(fontsize)
|
||||
// .SetTextAlignment((TextAlignment)alignment);
|
||||
|
||||
if (spacingAfter > 0) para.SetMarginBottom(spacingAfter);
|
||||
if (spacingBefore > 0) para.SetMarginTop(spacingBefore);
|
||||
// if (spacingAfter > 0) para.SetMarginBottom(spacingAfter);
|
||||
// if (spacingBefore > 0) para.SetMarginTop(spacingBefore);
|
||||
|
||||
_document.Add(para);
|
||||
}
|
||||
// _document.Add(para);
|
||||
// }
|
||||
|
||||
public Image GetImage(byte[] imgb, float newWidth, float newHeight)
|
||||
{
|
||||
Image img = new Image(ImageDataFactory.Create(imgb));
|
||||
img.ScaleToFit(newWidth, newHeight);
|
||||
return img;
|
||||
}
|
||||
}
|
||||
// public Image GetImage(byte[] imgb, float newWidth, float newHeight)
|
||||
// {
|
||||
// Image img = new Image(ImageDataFactory.Create(imgb));
|
||||
// img.ScaleToFit(newWidth, newHeight);
|
||||
// return img;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@ -11,14 +12,10 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Abp.AspNetCore" Version="9.1.0" />
|
||||
<PackageReference Include="itext7" Version="8.0.5" />
|
||||
<PackageReference Include="Net.Codecrete.QrCodeGenerator" Version="2.0.5" />
|
||||
<PackageReference Include="NetMQ" Version="4.0.1.13" />
|
||||
<PackageReference Include="NPOI" Version="2.7.2" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.9" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.0.0" />
|
||||
<PackageReference Include="Abp.AspNetCore" Version="5.14.0" />
|
||||
<PackageReference Include="iTextSharp" Version="5.5.13.3" />
|
||||
<PackageReference Include="NPOI" Version="2.5.6" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.6.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -38,4 +35,32 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- ABP SignalR 适用于 .NET Core 3.1 -->
|
||||
<PackageReference Include="Abp.AspNetCore.SignalR" Version="4.4.3" />
|
||||
|
||||
<!-- iTextSharp: 5.5.13.3 应与 .NET Core 3.1 兼容 -->
|
||||
<PackageReference Include="iTextSharp" Version="5.5.13.3" />
|
||||
|
||||
<!-- Microsoft.AspNetCore.Mvc 适用于 .NET Core 3.1,使用 2.2.0 版本 -->
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||
|
||||
<!-- Net.Codecrete.QrCodeGenerator -->
|
||||
<PackageReference Include="Net.Codecrete.QrCodeGenerator" Version="2.0.4" />
|
||||
|
||||
<!-- NetMQ: 适用于 .NET Core 3.1 -->
|
||||
<PackageReference Include="NetMQ" Version="4.0.1.6" />
|
||||
|
||||
<!-- NPOI: 适用于 .NET Core 3.1 -->
|
||||
<PackageReference Include="NPOI" Version="2.5.4" />
|
||||
|
||||
<!-- SharpZipLib: 适用于 .NET Core 3.1 -->
|
||||
|
||||
<!-- SkiaSharp: 适用于 .NET Core 3.1 -->
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.6" />
|
||||
|
||||
<!-- Swashbuckle.AspNetCore: 适用于 .NET Core 3.1 -->
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -109,7 +109,7 @@ namespace YunDa.ISAS.Application.ClientConfigruation.ThreeDimension
|
||||
[AbpAllowAnonymous]
|
||||
public RequestPageResult<HomePageSettingOutput> FindDatas(PageSearchCondition<HomePageSettingSearchInput> searchCondition)
|
||||
{
|
||||
RequestPageResult<HomePageSettingOutput> rst = new();
|
||||
RequestPageResult<HomePageSettingOutput> rst = new RequestPageResult<HomePageSettingOutput>();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@ -941,7 +941,7 @@ namespace YunDa.ISAS.Application.DataMonitoring
|
||||
[Description("删除所有联动策略")]
|
||||
public RequestEasyResult DeleteAll(Guid transformerSubstationId)
|
||||
{
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
try
|
||||
{
|
||||
var datas = _linkageStrategyRepository.GetAll().Where(t => t.TransformerSubstationId == transformerSubstationId);
|
||||
|
||||
@ -411,7 +411,7 @@ namespace YunDa.ISAS.Application.DataMonitoring
|
||||
[AllowAnonymous]
|
||||
public RequestResult<List<AreaTeleCommandPorperty>> FindAreaTeleCommandDatas(Guid stationId)
|
||||
{
|
||||
RequestResult<List<AreaTeleCommandPorperty>> rst = new();
|
||||
RequestResult<List<AreaTeleCommandPorperty>> rst = new RequestResult<List<AreaTeleCommandPorperty>>();
|
||||
try
|
||||
{
|
||||
if (stationId == default)
|
||||
|
||||
@ -19,7 +19,7 @@ using YunDa.ISAS.Application.Core.SwaggerHelper;
|
||||
using YunDa.ISAS.DataTransferObject.GeneralInformation.EquipmentTypeDto;
|
||||
using YunDa.ISAS.DataTransferObject.DataMonitoring.TeleDataCommon;
|
||||
using YunDa.ISAS.Entities.DataMonitoring;
|
||||
using System.Linq.Dynamic.Core;
|
||||
//using System.Linq.Dynamic.Core;
|
||||
using Abp.Collections.Extensions;
|
||||
using Abp.Timing;
|
||||
using Abp.Linq.Extensions;
|
||||
@ -113,9 +113,9 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
try
|
||||
{
|
||||
// 并行化 Redis 和数据库查询
|
||||
var equipmentTypeRepo = (await _equipmentTypeRepository.GetAllAsync()).ToList();
|
||||
var equipmentRepo =(await _equipmentInfoRepository.GetAllIncludingAsync()).ToList();
|
||||
var sysFunctionRepo = await _sysFunctionRepository.GetAllAsync();
|
||||
var equipmentTypeRepo = _equipmentTypeRepository.GetAll().ToList();
|
||||
var equipmentRepo = _equipmentInfoRepository.GetAllIncluding().ToList();
|
||||
var sysFunctionRepo = _sysFunctionRepository.GetAll();
|
||||
var matchingEquipmentTypes = equipmentTypeRepo.Where(t => t.Name.Contains("一次") && !t.EquipmentTypeId.HasValue).AsEnumerable();
|
||||
var equipmentRecod1=await GetEquipmentCategoryData(matchingEquipmentTypes, equipmentTypeRepo, equipmentRepo, "柜",true, EquipmentInfoSearchRecordEnum.Equipment);
|
||||
var equipmentRecod2 = await GetEquipmentCategoryData(matchingEquipmentTypes, equipmentTypeRepo, equipmentRepo, "柜", false, EquipmentInfoSearchRecordEnum.Equipment);
|
||||
|
||||
@ -296,9 +296,21 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
using (var unitOfWork = _unitOfWorkManager.Begin())
|
||||
{
|
||||
if (telemeteringConfigurations.Any())
|
||||
await _telemeteringConfigurationRepository.InsertRangeAsync(telemeteringConfigurations);
|
||||
{
|
||||
foreach (var item in telemeteringConfigurations)
|
||||
{
|
||||
_telemeteringConfigurationRepository.Insert(item);
|
||||
}
|
||||
}
|
||||
//await _telemeteringConfigurationRepository.InsertRange(telemeteringConfigurations);
|
||||
if (telesignalisationConfigurations.Any())
|
||||
await _telesignalisationConfigurationRepository.InsertRangeAsync(telesignalisationConfigurations);
|
||||
{
|
||||
foreach (var item in telesignalisationConfigurations)
|
||||
{
|
||||
_telesignalisationConfigurationRepository.Insert(item);
|
||||
}
|
||||
}
|
||||
//await _telesignalisationConfigurationRepository.InsertRange(telesignalisationConfigurations);
|
||||
|
||||
// 完成数据库操作
|
||||
await unitOfWork.CompleteAsync();
|
||||
@ -342,7 +354,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[ShowApi]
|
||||
public RequestResult<List<ProtectDeviceOutput>> FindDevicesData(string devName)
|
||||
{
|
||||
RequestResult<List<ProtectDeviceOutput>> rst = new();
|
||||
RequestResult<List<ProtectDeviceOutput>> rst = new RequestResult<List<ProtectDeviceOutput>>();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@ -231,7 +231,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[ShowApi]
|
||||
public async Task<RequestResult<List<EquimentOverviewOutput>>> GetEquipmentOverviewAsync(Guid stationId)
|
||||
{
|
||||
RequestResult<List<EquimentOverviewOutput>> rst = new();
|
||||
RequestResult<List<EquimentOverviewOutput>> rst = new RequestResult<List<EquimentOverviewOutput>>();
|
||||
try
|
||||
{
|
||||
if (stationId == default)
|
||||
@ -362,7 +362,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[ShowApi]
|
||||
public async Task<RequestResult<List<TelemeteringModel>>> GetEquipmentTelemeteringByEquipmentId(Guid equipmentId,int dataSourceCategory)
|
||||
{
|
||||
RequestResult<List<TelemeteringModel>> rst = new ();
|
||||
RequestResult<List<TelemeteringModel>> rst = new RequestResult<List<TelemeteringModel>> ();
|
||||
if (equipmentId == default)
|
||||
{
|
||||
rst.Message = "设备id为空";
|
||||
@ -413,7 +413,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[ShowApi]
|
||||
public async Task<RequestResult<List<TelesignalisationModel>>> GetEquipmentTelesignalisationByEquipmentId(Guid equipmentId, int dataSourceCategory)
|
||||
{
|
||||
RequestResult<List<TelesignalisationModel>> rst = new();
|
||||
RequestResult<List<TelesignalisationModel>> rst = new RequestResult<List<TelesignalisationModel>>();
|
||||
if (equipmentId == default)
|
||||
{
|
||||
rst.Message = "设备id为空";
|
||||
|
||||
@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Org.BouncyCastle.Crypto.Tls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -595,7 +596,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[ShowApi]
|
||||
public RequestResult<List<EquipmentTypesForChecksProperty>> EquipmentTypesForChecks()
|
||||
{
|
||||
RequestResult<List<EquipmentTypesForChecksProperty>> rst = new();
|
||||
RequestResult<List<EquipmentTypesForChecksProperty>> rst = new RequestResult<List<EquipmentTypesForChecksProperty>>();
|
||||
try
|
||||
{
|
||||
var types = _equipmentTypeRepository.GetAll().Where(t => t.EquipmentTypeLevel == EquipmentTypeLevelEnum.Type);
|
||||
@ -717,6 +718,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
foreach (var item in telesignalRepo)
|
||||
{
|
||||
if (item.EquipmentType != null)
|
||||
//int? alarmLevel = item.DMAlarmCategory == null ? null : item.DMAlarmCategory.Level;
|
||||
telesignalisationTemplateExcels.Add(new TelesignalisationTemplateExcel()
|
||||
{
|
||||
NoContent = item.NoContent,
|
||||
@ -730,7 +732,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
IsVisible = item.IsVisible,
|
||||
Name = item.Name,
|
||||
SeqNo = item.SeqNo,
|
||||
AlarmLevel = item.DMAlarmCategory==null?null: item.DMAlarmCategory.Level
|
||||
AlarmLevel = item.DMAlarmCategory?.Level
|
||||
});
|
||||
}
|
||||
if (telesignalisationTemplateExcels.Count > 0)
|
||||
|
||||
@ -548,7 +548,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[HttpGet]
|
||||
public RequestResult<List<BoardCardSolftVersionOutput>> FindHistorySoftVersionByEquipmentInfoId(Guid? equipmentInfoId)
|
||||
{
|
||||
RequestResult<List<BoardCardSolftVersionOutput>> rst = new();
|
||||
RequestResult<List<BoardCardSolftVersionOutput>> rst = new RequestResult<List<BoardCardSolftVersionOutput>>();
|
||||
try
|
||||
{
|
||||
List<BoardCardSolftVersionOutput> historys = new List<BoardCardSolftVersionOutput>();
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
using System;
|
||||
using Abp.Auditing;
|
||||
using Abp.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using YunDa.ISAS.Application.Core;
|
||||
using YunDa.ISAS.Application.Core.SwaggerHelper;
|
||||
using YunDa.ISAS.DataTransferObject;
|
||||
using YunDa.ISAS.DataTransferObject.CommonDto;
|
||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto;
|
||||
@ -43,5 +48,6 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
/// <param name="eventCode"></param>
|
||||
/// <returns></returns>
|
||||
RequestResult<EquipmentInfoAbnormalComponent> GetDeviceEventType(int deviceAddr, int eventCode);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
private readonly IRepository<BoardCardHistory, Guid> _boardCardHistoryRepository;
|
||||
private readonly IRepository<ImProtectDevice,string> _imProtectDeviceRepository;
|
||||
private readonly IRepository<ImGateWay, string> _imGateWayRepository;
|
||||
private readonly IRepository<ImPuCtgy, string> _imPuCtgyRepository;
|
||||
private readonly IRepository<ImPuCtgy, int> _imPuCtgyRepository;
|
||||
private readonly IRepository<ImEventType, int> _imEventTypeRepository;
|
||||
private readonly IRepository<TelemeteringConfiguration, Guid> _telemeteringConfigurationRepository;
|
||||
private readonly IRepository<TelesignalisationConfiguration, Guid> _telesignalisationConfigurationRepository;
|
||||
@ -73,7 +73,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
IRepository<TelemeteringConfiguration, Guid> telemeteringConfigurationRepository,
|
||||
IRepository<TelesignalisationConfiguration, Guid> telesignalisationConfigurationRepository,
|
||||
IRepository<ProtectionDeviceType, Guid> protectionDeviceTypeyRepository,
|
||||
IRepository<ImPuCtgy, string> imPuCtgyRepository,
|
||||
IRepository<ImPuCtgy, int> imPuCtgyRepository,
|
||||
IRepository<ProtectionDeviceGateway, Guid> protectionDeviceGatewayRepository,
|
||||
IRepository<ImGateWay, string> imGateWayRepository,
|
||||
IRepository<BoardCardInfo, Guid> boardCardInfoRepository,
|
||||
@ -100,6 +100,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
_imGateWayRepository = imGateWayRepository;
|
||||
_protectionDeviceGatewayRepository = protectionDeviceGatewayRepository;
|
||||
_imPuCtgyRepository = imPuCtgyRepository;
|
||||
//_imPuCtgyRepository
|
||||
_protectionDeviceTypeyRepository = protectionDeviceTypeyRepository;
|
||||
_equipmentTypeRepository = equipmentTypeRepository;
|
||||
_manufacturerInfoRepository = manufacturerInfoRepository;
|
||||
@ -608,7 +609,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[HttpGet]
|
||||
public RequestResult<List<ProtectionDeviceSolfVersionOutput>> FindHistorySoftVersionDataByEquipmentInfoId(Guid? equipmentInfoId)
|
||||
{
|
||||
RequestResult<List<ProtectionDeviceSolfVersionOutput>> rst = new();
|
||||
RequestResult<List<ProtectionDeviceSolfVersionOutput>> rst = new RequestResult<List<ProtectionDeviceSolfVersionOutput>>();
|
||||
try
|
||||
{
|
||||
List<ProtectionDeviceSolfVersionOutput> historys = new List<ProtectionDeviceSolfVersionOutput>();
|
||||
@ -622,7 +623,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
;
|
||||
foreach ( var entity in entitys )
|
||||
{
|
||||
ProtectionDeviceSolfVersionOutput protectionDeviceSolfVersionOutput = new();
|
||||
ProtectionDeviceSolfVersionOutput protectionDeviceSolfVersionOutput = new ProtectionDeviceSolfVersionOutput();
|
||||
if (string.IsNullOrWhiteSpace(entity.ContentNewJson))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(entity.ContentJson))
|
||||
@ -862,15 +863,15 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
using (var unitOfWork = _unitOfWorkManager.Begin())
|
||||
{
|
||||
transformerSubstation = _transformerSubstationRepository.GetAll().First();
|
||||
equipments = _equipmentInfoRepository.GetAllIncluding().ToDictionary(t => t.Name);
|
||||
equipments = _equipmentInfoRepository.GetAll().ToDictionary(t => t.Name);
|
||||
equipmentType = _equipmentTypeRepository.GetAll().FirstOrDefault(t => t.Name.Contains("保护装置"));
|
||||
manufacturerInfo = _manufacturerInfoRepository.GetAll().FirstOrDefault(t => t.ManufacturerName.Contains("运达"));
|
||||
porotectionDeviceInfos = _protectionDeviceInfoRepository.GetAllIncluding().ToDictionary(t=>t.Name);
|
||||
porotectionDeviceInfos = _protectionDeviceInfoRepository.GetAll().ToDictionary(t=>t.Name);
|
||||
unitOfWork.Complete();
|
||||
}
|
||||
using (var unitOfWork = _unitOfWorkManager.Begin())
|
||||
{
|
||||
imProtectDevices = _imProtectDeviceRepository.GetAllIncluding().ToDictionary(t => t.DeviceName);
|
||||
imProtectDevices = _imProtectDeviceRepository.GetAll().ToDictionary(t => t.DeviceName);
|
||||
unitOfWork.Complete();
|
||||
|
||||
}
|
||||
@ -918,16 +919,20 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
ProtectionDeviceGatewayId = null,
|
||||
ProtectionDeviceTypeId = null,
|
||||
TransformerSubstationId = transformerSubstation.Id,
|
||||
|
||||
};
|
||||
_protectionDeviceInfoRepository.Insert(protectionDeviceInfo);
|
||||
var entity = _protectionDeviceInfoRepository.Insert(protectionDeviceInfo);
|
||||
//entity.EquipmentInfo = null;
|
||||
var saveEntity =ObjectMapper.Map<ProtectionDeviceInfoOutput>(entity);
|
||||
// 记录历史数据
|
||||
var protectionDeviceHistory = new ProtectionDeviceHistory
|
||||
{
|
||||
CreationTime = DateTime.Now,
|
||||
Name = item,
|
||||
ProtectionDeviceInfoId = protectionDeviceInfo.Id,
|
||||
RecodeDate = DateTime.Now,
|
||||
ContentJson = "", // 原始数据
|
||||
ContentNewJson = JsonConvert.SerializeObject(protectionDeviceInfo), // 新数据
|
||||
ContentNewJson = JsonConvert.SerializeObject(saveEntity), // 新数据
|
||||
EventDescription = "设备台账建立",
|
||||
EventRecordType = EventRecordTypeEnum.Device,
|
||||
IsSend = false // 默认未发送
|
||||
@ -1026,7 +1031,11 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
// 批量插入新记录
|
||||
if (protectionDeviceTypesToInsert.Any())
|
||||
{
|
||||
_protectionDeviceTypeyRepository.InsertRange(protectionDeviceTypesToInsert);
|
||||
foreach (var item in protectionDeviceTypesToInsert)
|
||||
{
|
||||
_protectionDeviceTypeyRepository.Insert(item);
|
||||
}
|
||||
//_protectionDeviceTypeyRepository.InsertRange(protectionDeviceTypesToInsert);
|
||||
}
|
||||
|
||||
// 提交事务
|
||||
@ -1260,13 +1269,13 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[DisableAuditing]
|
||||
public async Task<RequestResult<List<TelemeteringConfigurationProperty>>> GetTelemeteringByKeywordAsync(Guid equipmentInfoId,string keyword)
|
||||
{
|
||||
RequestResult<List<TelemeteringConfigurationProperty>> rst = new();
|
||||
RequestResult<List<TelemeteringConfigurationProperty>> rst = new RequestResult<List<TelemeteringConfigurationProperty>>();
|
||||
|
||||
try
|
||||
{
|
||||
if (equipmentInfoId!=default&&!string.IsNullOrWhiteSpace(keyword))
|
||||
{
|
||||
var repo =(await _telemeteringConfigurationRepository.GetAllIncludingAsync())
|
||||
var repo = _telemeteringConfigurationRepository.GetAllIncluding()
|
||||
.Where(t => t.EquipmentInfoId == equipmentInfoId).ToList();
|
||||
var data = repo.Where(t => t.Name.ToLower().Contains(keyword.ToLower()));
|
||||
rst.ResultData = ObjectMapper.Map<List<TelemeteringConfigurationProperty>>(data);
|
||||
@ -1290,15 +1299,15 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[DisableAuditing]
|
||||
public async Task<RequestResult<DeviceCPUMonitoring>> GetDeviceCPUMonitoring(Guid equipmentInfoId)
|
||||
{
|
||||
RequestResult<DeviceCPUMonitoring> rst = new();
|
||||
RequestResult<DeviceCPUMonitoring> rst = new RequestResult<DeviceCPUMonitoring>();
|
||||
try
|
||||
{
|
||||
rst.ResultData = new DeviceCPUMonitoring
|
||||
{
|
||||
EquipmentInfoId = equipmentInfoId,
|
||||
CPU5V1 = 5f,
|
||||
CPU5V2 = 5f,
|
||||
CPU5V3 = 5f,
|
||||
//CPU5V2 = 5f,
|
||||
//CPU5V3 = 5f,
|
||||
CPUTemperature = 0,
|
||||
SurfaceTemperature = 0,
|
||||
Time = DateTime.Now,
|
||||
@ -1318,7 +1327,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[DisableAuditing]
|
||||
public async Task<RequestResult<BCodeAndNTP>> GetDeviceBCondeAndNTP(Guid equipmentInfoId)
|
||||
{
|
||||
RequestResult<BCodeAndNTP> rst = new();
|
||||
RequestResult<BCodeAndNTP> rst = new RequestResult<BCodeAndNTP>();
|
||||
try
|
||||
{
|
||||
var device = _protectionDeviceInfoRepository.GetAll().FirstOrDefault(t => t.EquipmentInfoId == equipmentInfoId);
|
||||
@ -1439,7 +1448,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
[HttpGet]
|
||||
public RequestEasyResult SpawnDeviceinfoHistory()
|
||||
{
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
|
||||
var protectionDevices = _protectionDeviceInfoRepository.GetAllIncluding(t => t.EquipmentInfo).ToList();
|
||||
foreach (var protectionDevice in protectionDevices)
|
||||
|
||||
@ -3,7 +3,7 @@ using Abp.Authorization;
|
||||
using Abp.Collections.Extensions;
|
||||
using Abp.Domain.Repositories;
|
||||
using Abp.Domain.Uow;
|
||||
using iText.Layout.Element;
|
||||
//using iText.Layout.Element;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MongoDB.Driver.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
@ -159,7 +159,7 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
||||
[HttpGet]
|
||||
public async Task<RequestResult<List<ImDeviceDzOutput>>> FindDZDataByEquipmentInfoId(Guid? equipmentInfoId, string dzType)
|
||||
{
|
||||
RequestResult<List<ImDeviceDzOutput>> rst = new();
|
||||
RequestResult<List<ImDeviceDzOutput>> rst = new RequestResult<List<ImDeviceDzOutput>>();
|
||||
|
||||
try
|
||||
{
|
||||
@ -358,7 +358,7 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
||||
try
|
||||
{
|
||||
//_imDeviceDzRedis.HashSetUpdateManyAsync($"DZ_{address.ToString("X2")}_System", userDzs.Select(t => t.Id).ToList(), userDzs);
|
||||
var dzs = await _imDeviceDzRepository.GetAllIncludingAsync(t=>t.DzTypeNavigation,t=>t.Device);
|
||||
var dzs = _imDeviceDzRepository.GetAllIncluding(t=>t.DzTypeNavigation,t=>t.Device);
|
||||
var addrDzs = dzs.GroupBy(t => t.Device.DeviceAddr);
|
||||
foreach (var dz in addrDzs)
|
||||
{
|
||||
@ -431,10 +431,10 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
||||
[HttpGet]
|
||||
public async Task<RequestResult< List<ImDeviceDzenumPu>>> GetDeviceSettingEnumPu()
|
||||
{
|
||||
RequestResult<List<ImDeviceDzenumPu>> rst = new();
|
||||
RequestResult<List<ImDeviceDzenumPu>> rst = new RequestResult<List<ImDeviceDzenumPu>>();
|
||||
try
|
||||
{
|
||||
var repo =await _imDeviceDzenumPuitory.GetAllAsync();
|
||||
var repo = _imDeviceDzenumPuitory.GetAll();
|
||||
rst.ResultData = repo.ToList();
|
||||
rst.Flag = true;
|
||||
}
|
||||
@ -454,10 +454,10 @@ namespace YunDa.ISAS.Application.GeneralInformation.ProtectionSettingInfo
|
||||
[HttpGet]
|
||||
public async Task<RequestResult<List<ImDztype>>> GetDeviceSettingType()
|
||||
{
|
||||
RequestResult<List<ImDztype>> rst = new();
|
||||
RequestResult<List<ImDztype>> rst = new RequestResult<List<ImDztype>>();
|
||||
try
|
||||
{
|
||||
var repo = await _imDztypeRepository.GetAllAsync();
|
||||
var repo = _imDztypeRepository.GetAll();
|
||||
rst.ResultData = repo.ToList();
|
||||
rst.Flag = true;
|
||||
}
|
||||
|
||||
@ -400,7 +400,11 @@ namespace YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo
|
||||
}
|
||||
|
||||
// 插入数据到数据库
|
||||
await _secondaryCircuitRepository.InsertRangeAsync(testData);
|
||||
foreach (var item in testData)
|
||||
{
|
||||
_secondaryCircuitRepository.Insert(item);
|
||||
}
|
||||
//await _secondaryCircuitRepository.InsertRangeAsync(testData);
|
||||
Console.WriteLine("二次回路测试数据生成完毕!");
|
||||
}
|
||||
[HttpGet]
|
||||
@ -442,7 +446,11 @@ namespace YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo
|
||||
}
|
||||
|
||||
// 将生成的关联数据保存到数据库
|
||||
await _secondaryCircuitProtectionDeviceRepository.InsertRangeAsync(associations);
|
||||
foreach (var item in associations)
|
||||
{
|
||||
_secondaryCircuitProtectionDeviceRepository.Insert(item);
|
||||
}
|
||||
//await _secondaryCircuitProtectionDeviceRepository.InsertRangeAsync(associations);
|
||||
Console.WriteLine("随机关联数据生成完毕!");
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ using YunDa.ISAS.Entities.DataMonitoring;
|
||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.SearchCondition;
|
||||
using YunDa.SOMS.DataTransferObject.GeneralInformation.SecondaryCircuitDto;
|
||||
using YunDa.SOMS.Entities.GeneralInformation;
|
||||
using static iText.StyledXmlParser.Jsoup.Select.Evaluator;
|
||||
//using static iText.StyledXmlParser.Jsoup.Select.Evaluator;
|
||||
using static NetMQ.NetMQSelector;
|
||||
|
||||
namespace YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo
|
||||
|
||||
@ -101,15 +101,15 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
//MemoryStream memoryStream = new MemoryStream();
|
||||
string filepath = Path.Combine("D:\\ISAS\\Data\\SysAttachment\\InspectionItemResult", "设备实物ID清单.pdf"); ;
|
||||
|
||||
QrCodePDF qrCodePDF = new QrCodePDF(filepath);
|
||||
var flag = qrCodePDF.SpawnEquipmentQrCodePDF(lists);
|
||||
if (flag)
|
||||
{
|
||||
FileStream stream = new FileStream(filepath, FileMode.Open);
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
FileStreamResult fileStreamResult = new FileStreamResult(stream, "application/octet-stream");
|
||||
return fileStreamResult;
|
||||
}
|
||||
//QrCodePDF qrCodePDF = new QrCodePDF(filepath);
|
||||
//var flag = qrCodePDF.SpawnEquipmentQrCodePDF(lists);
|
||||
//if (flag)
|
||||
//{
|
||||
// FileStream stream = new FileStream(filepath, FileMode.Open);
|
||||
// stream.Seek(0, SeekOrigin.Begin);
|
||||
// FileStreamResult fileStreamResult = new FileStreamResult(stream, "application/octet-stream");
|
||||
// return fileStreamResult;
|
||||
//}
|
||||
//stream.Seek(0, SeekOrigin.Begin);
|
||||
return default;
|
||||
|
||||
|
||||
@ -1047,40 +1047,27 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
// 批量更新和插入
|
||||
if (entitiesToUpdate.Any())
|
||||
{
|
||||
await _telemeteringConfigurationResitory.BatchUpdateAsync(
|
||||
t => t.SetProperty(p => p.Name, p => p.Name)
|
||||
.SetProperty(p => p.DispatcherAddress, p => p.DispatcherAddress)
|
||||
.SetProperty(p => p.CPUSector, p => p.CPUSector)
|
||||
.SetProperty(p => p.DeviceAddress, p => p.DeviceAddress)
|
||||
.SetProperty(p => p.InfoAddress, p => p.DeviceAddress)
|
||||
.SetProperty(p => p.EquipmentInfoId, p => p.EquipmentInfoId)
|
||||
.SetProperty(p => p.EquipmentTypeId, p => p.EquipmentTypeId)
|
||||
//.SetProperty(p => p.CommValue, p => p.CommValue)
|
||||
.SetProperty(p => p.DataSourceCategory, p => p.DataSourceCategory)
|
||||
.SetProperty(p => p.IsActive, p => p.IsActive)
|
||||
.SetProperty(p => p.IsVisible, p => p.IsVisible)
|
||||
.SetProperty(p => p.IsSendDispatcher, p => p.IsSendDispatcher)
|
||||
.SetProperty(p => p.IsSave, p => p.IsSave)
|
||||
.SetProperty(p => p.SeqNo, p => p.SeqNo)
|
||||
.SetProperty(p => p.DecimalDigits, p => p.DecimalDigits)
|
||||
.SetProperty(p => p.LowerLimit, p => p.LowerLimit)
|
||||
.SetProperty(p => p.UpperLimit, p => p.DecimalDigits)
|
||||
.SetProperty(p => p.Coefficient, p => p.Coefficient)
|
||||
.SetProperty(p => p.Unit, p => p.Unit)
|
||||
|
||||
|
||||
// 添加需要更新的其他字段
|
||||
, t => entitiesToUpdate.Select(e => e.Id).Contains(t.Id)); // 使用Id进行匹配
|
||||
|
||||
foreach (var item in entitiesToUpdate)
|
||||
{
|
||||
_telemeteringConfigurationResitory.Update(item);
|
||||
}
|
||||
}
|
||||
|
||||
if (entitiesToInsert.Any())
|
||||
{
|
||||
_telemeteringConfigurationResitory.InsertRange(entitiesToInsert); // 批量插入
|
||||
foreach (var item in entitiesToInsert)
|
||||
{
|
||||
_telemeteringConfigurationResitory.Insert(item);
|
||||
}
|
||||
//_telemeteringConfigurationResitory.InsertRange(entitiesToInsert); // 批量插入
|
||||
}
|
||||
if (entitiesToDelete.Any())
|
||||
{
|
||||
await _telemeteringConfigurationResitory.BatchDeleteAsync(t => entitiesToDelete.Contains(t.Id));
|
||||
foreach (var item in entitiesToDelete)
|
||||
{
|
||||
_telemeteringConfigurationResitory.Delete(item);
|
||||
}
|
||||
//await _telemeteringConfigurationResitory.BatchDeleteAsync(t => entitiesToDelete.Contains(t.Id));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1319,33 +1306,27 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
// 批量更新和插入
|
||||
if (entitiesToUpdate.Any())
|
||||
{
|
||||
await _telesignalisationConfigurationResitory.BatchUpdateAsync(
|
||||
t => t.SetProperty(p => p.Name, p => p.Name)
|
||||
.SetProperty(p => p.DispatcherAddress, p => p.DispatcherAddress)
|
||||
.SetProperty(p => p.CPUSector, p => p.CPUSector)
|
||||
.SetProperty(p => p.DeviceAddress, p => p.DeviceAddress)
|
||||
.SetProperty(p => p.InfoAddress, p => p.DeviceAddress)
|
||||
.SetProperty(p => p.EquipmentInfoId, p => p.EquipmentInfoId)
|
||||
.SetProperty(p => p.EquipmentTypeId, p => p.EquipmentTypeId)
|
||||
.SetProperty(p => p.CommValue, p => p.CommValue)
|
||||
.SetProperty(p => p.DataSourceCategory, p => p.DataSourceCategory)
|
||||
.SetProperty(p => p.IsActive, p => p.IsActive)
|
||||
.SetProperty(p => p.IsVisible, p => p.IsVisible)
|
||||
.SetProperty(p => p.IsSendDispatcher, p => p.IsSendDispatcher)
|
||||
.SetProperty(p => p.IsSave, p => p.IsSave)
|
||||
.SetProperty(p => p.SeqNo, p => p.DeviceAddress)
|
||||
// 添加需要更新的其他字段
|
||||
, t => entitiesToUpdate.Select(e => e.Id).Contains(t.Id)); // 使用Id进行匹配
|
||||
|
||||
foreach (var item in entitiesToUpdate)
|
||||
{
|
||||
await _telesignalisationConfigurationResitory.UpdateAsync(item);
|
||||
}
|
||||
}
|
||||
|
||||
if (entitiesToInsert.Any())
|
||||
{
|
||||
_telesignalisationConfigurationResitory.InsertRange(entitiesToInsert); // 批量插入
|
||||
foreach (var item in entitiesToInsert)
|
||||
{
|
||||
_telesignalisationConfigurationResitory.Insert(item); // 批量插入
|
||||
|
||||
}
|
||||
}
|
||||
if (entitiesToDelete.Any())
|
||||
{
|
||||
await _telemeteringConfigurationResitory.BatchDeleteAsync(t => entitiesToDelete.Contains(t.Id));
|
||||
foreach (var item in entitiesToDelete)
|
||||
{
|
||||
_telemeteringConfigurationResitory.Delete(item);
|
||||
}
|
||||
//await _telemeteringConfigurationResitory.BatchDeleteAsync(t => entitiesToDelete.Contains(t.Id));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1492,7 +1473,6 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
|
||||
return requestEasyResult;
|
||||
}
|
||||
|
||||
#endregion 数据配置导入导出
|
||||
|
||||
#region 基础数据文件
|
||||
@ -2407,6 +2387,19 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
||||
}
|
||||
return rst;
|
||||
}
|
||||
public async Task BatchUpdateAsync(IEnumerable<Guid> ids, Action<TelesignalisationConfiguration> updateAction)
|
||||
{
|
||||
// 获取要更新的实体
|
||||
var entitiesToUpdate = await _telesignalisationConfigurationResitory.GetAllListAsync(t => ids.Contains(t.Id));
|
||||
|
||||
// 遍历每个实体,执行更新操作
|
||||
foreach (var entity in entitiesToUpdate)
|
||||
{
|
||||
updateAction(entity); // 执行传入的更新操作
|
||||
await _telesignalisationConfigurationResitory.UpdateAsync(entity); // 更新实体
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改104实时数据地址
|
||||
/// </summary>
|
||||
|
||||
@ -445,7 +445,7 @@ namespace YunDa.ISAS.Application.MobileSurveillance
|
||||
[ShowApi]
|
||||
public RequestResult<RobotTaskOutput> FindT5RobotData([FromQuery]string tempId,string taskId)
|
||||
{
|
||||
RequestResult<RobotTaskOutput> rst = new ();
|
||||
RequestResult<RobotTaskOutput> rst = new RequestResult<RobotTaskOutput>();
|
||||
try
|
||||
{
|
||||
var data = _robotTaskRepository.GetAllIncluding(task => task.RobotInfo)
|
||||
|
||||
@ -454,7 +454,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[ShowApi, AbpAllowAnonymous]
|
||||
public async Task<RequestEasyResult> IssureInspectionPlan()
|
||||
{
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
try
|
||||
{
|
||||
var datas = _inspectionPlanTaskRepository.GetAllIncluding(item => item.InspectionCard,
|
||||
@ -1038,10 +1038,10 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[ShowApi]
|
||||
public RequestResult<List<LiveRecongnizeProperty>> GetLiveRecognizeInfosBySubId(Guid? subId)
|
||||
{
|
||||
RequestResult<List<LiveRecongnizeProperty>> rst = new();
|
||||
RequestResult<List<LiveRecongnizeProperty>> rst = new RequestResult<List<LiveRecongnizeProperty>>();
|
||||
try
|
||||
{
|
||||
List<LiveRecongnizeProperty> inspectionItems = new();
|
||||
List<LiveRecongnizeProperty> inspectionItems = new List<LiveRecongnizeProperty>();
|
||||
//var repo = _inspectionItemRepository.GetAllIncluding(t=>t.PresetPoint)
|
||||
var videoDevs = _videoDevRepository.GetAllIncluding(t => t.PresetPoints,t=>t.Parent,t=>t.ManufacturerInfo).Where(t=>t.TransformerSubstationId == subId&&t.IsActive);
|
||||
foreach (var videoDev in videoDevs)
|
||||
|
||||
@ -59,7 +59,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[ShowApi]
|
||||
public async Task<RequestResult<MultidimensionalCheckOutput>> CreateOrUpdateAsync(EditMultidimensionalCheckInput input)
|
||||
{
|
||||
RequestResult<MultidimensionalCheckOutput> rst = new();
|
||||
RequestResult<MultidimensionalCheckOutput> rst = new RequestResult<MultidimensionalCheckOutput>();
|
||||
try
|
||||
{
|
||||
if (input.Id.HasValue)
|
||||
@ -99,7 +99,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[ShowApi]
|
||||
public async Task<RequestEasyResult> DeleteByIdAsync(Guid id)
|
||||
{
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
try
|
||||
{
|
||||
await _multidimensionalCheckRepository.DeleteAsync(id);
|
||||
@ -116,7 +116,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[ShowApi]
|
||||
public async Task<RequestEasyResult> DeleteByIdsAsync(List<Guid> ids)
|
||||
{
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
|
||||
try
|
||||
{
|
||||
@ -144,7 +144,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[AbpAllowAnonymous]
|
||||
public RequestPageResult<MultidimensionalCheckOutput> FindDatas(PageSearchCondition<MultidimensionalCheckSearchConditionInput> searchCondition)
|
||||
{
|
||||
RequestPageResult<MultidimensionalCheckOutput> rst = new();
|
||||
RequestPageResult<MultidimensionalCheckOutput> rst = new RequestPageResult<MultidimensionalCheckOutput>();
|
||||
try
|
||||
{
|
||||
var repo = _multidimensionalCheckRepository.GetAllIncluding(t => t.PatternRecognitionConfigutration1,
|
||||
@ -194,7 +194,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
public RequestEasyResult SpawCardData()
|
||||
{
|
||||
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
var lastData = _multidimensionalCheckRepository.GetAll().ToList();
|
||||
foreach (var item in lastData)
|
||||
{
|
||||
|
||||
@ -32,7 +32,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
|
||||
public async Task<RequestResult<MultidimensionalCheckScheduleOutput>> CreateOrUpdateAsync(EditMultidimensionalCheckScheduleInput input)
|
||||
{
|
||||
RequestResult<MultidimensionalCheckScheduleOutput> rst = new();
|
||||
RequestResult<MultidimensionalCheckScheduleOutput> rst = new RequestResult<MultidimensionalCheckScheduleOutput>();
|
||||
return rst;
|
||||
|
||||
}
|
||||
@ -56,7 +56,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[AbpAllowAnonymous]
|
||||
public RequestPageResult<MultidimensionalCheckScheduleOutput> FindDatas(PageSearchCondition<MultidimensionalCheckScheduleSearchConditionInput> searchCondition)
|
||||
{
|
||||
RequestPageResult<MultidimensionalCheckScheduleOutput> rst = new();
|
||||
RequestPageResult<MultidimensionalCheckScheduleOutput> rst = new RequestPageResult<MultidimensionalCheckScheduleOutput>();
|
||||
try
|
||||
{
|
||||
var data = _multidimensionalCheckScheduleRepository.GetAll()
|
||||
|
||||
@ -1013,7 +1013,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
{
|
||||
entity.EquipmentTypeId = equipmentType.Id;
|
||||
}
|
||||
entity.EquipmentViewPointId = presetViewpoint == null ? null : presetViewpoint.Id;
|
||||
entity.EquipmentViewPointId = presetViewpoint?.Id;
|
||||
entity.CreationTime = DateTime.Now;
|
||||
entity.CreatorUserId = CurrentUser.Id;
|
||||
entity.Remark = "批量新增";
|
||||
@ -1048,7 +1048,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
presetpoint.EquipmentTypeId = equipmentType.Id;
|
||||
}
|
||||
presetpoint.IsImageRecognition = presetPointObj.IsImageRecognition.Value;
|
||||
presetpoint.EquipmentViewPointId = presetViewpoint == null ? null : presetViewpoint.Id;
|
||||
presetpoint.EquipmentViewPointId = presetViewpoint?.Id;
|
||||
presetpoint.LastModificationTime = DateTime.Now;
|
||||
presetpoint.LastModifierUserId = CurrentUser.Id;
|
||||
presetpoint.Remark = "批量修改";
|
||||
@ -1073,10 +1073,10 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
entity.EquipmentTypeId = equipmentType.Id;
|
||||
}
|
||||
entity.CreationTime = DateTime.Now;
|
||||
entity.EquipmentViewPointId = presetViewpoint == null ? null : presetViewpoint.Id;
|
||||
entity.EquipmentViewPointId = presetViewpoint?.Id;
|
||||
entity.CreatorUserId = CurrentUser.Id;
|
||||
entity.Remark = "批量新增";
|
||||
entity.EquipmentViewPointId = presetViewpoint == null ? null : presetViewpoint.Id;
|
||||
entity.EquipmentViewPointId = presetViewpoint?.Id;
|
||||
_presetPointRepository.Insert(entity);
|
||||
}
|
||||
}
|
||||
@ -1291,7 +1291,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[AllowAnonymous]
|
||||
public async Task<RequestEasyResult> DeleteCameraNoPrePointAndRepeat()
|
||||
{
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
try
|
||||
{
|
||||
var repo = _videoDevRepository.GetAllIncluding(t => t.PresetPoints).ToList();
|
||||
@ -1333,11 +1333,11 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
[AllowAnonymous]
|
||||
public RequestResult<List<InvestigationTrailEventInput>> GetInvestigationTrailEvent(VideoInvestigationTrainEventInput input)
|
||||
{
|
||||
RequestResult<List<InvestigationTrailEventInput>> rst = new();
|
||||
RequestResult<List<InvestigationTrailEventInput>> rst = new RequestResult<List<InvestigationTrailEventInput>>();
|
||||
try
|
||||
{
|
||||
|
||||
List<InvestigationTrailEventInput> investigationTrailEventInputs = new();
|
||||
List<InvestigationTrailEventInput> investigationTrailEventInputs = new List<InvestigationTrailEventInput>();
|
||||
//var videoRepo = _videoDevRepository.GetAllIncluding().Where(t => cameraIds.Contains(t.Id));
|
||||
var videoRepo = _videoDevRepository.GetAllIncluding(t=>t.PresetPoints).Where(t=>t.VideoDevId.HasValue).ToList();
|
||||
var presetRepo = _presetPointRepository.GetAllIncluding(t => t.EquipmentInfo,t=>t.VideoDev).ToList();
|
||||
@ -1377,7 +1377,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
};
|
||||
if (videoExist==null)
|
||||
{
|
||||
InvestigationTrailEventInput investigationTrailEventInput = new()
|
||||
InvestigationTrailEventInput investigationTrailEventInput = new InvestigationTrailEventInput()
|
||||
{
|
||||
Camera = ObjectMapper.Map<VideoDevSimpleProperty>(video),
|
||||
AlarmInspectionMergeBodies = new List<AlarmInspectionMergeBody>(),
|
||||
@ -1405,7 +1405,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
};
|
||||
if (videoExist == null)
|
||||
{
|
||||
InvestigationTrailEventInput investigationTrailEventInput = new()
|
||||
InvestigationTrailEventInput investigationTrailEventInput = new InvestigationTrailEventInput()
|
||||
{
|
||||
Camera = ObjectMapper.Map<VideoDevSimpleProperty>(video),
|
||||
AlarmInspectionMergeBodies = new List<AlarmInspectionMergeBody>(),
|
||||
@ -1442,7 +1442,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
};
|
||||
if (videoExist == null)
|
||||
{
|
||||
InvestigationTrailEventInput investigationTrailEventInput = new()
|
||||
InvestigationTrailEventInput investigationTrailEventInput = new InvestigationTrailEventInput()
|
||||
{
|
||||
Camera = ObjectMapper.Map<VideoDevSimpleProperty>(video),
|
||||
AlarmInspectionMergeBodies = new List<AlarmInspectionMergeBody>(),
|
||||
@ -1483,7 +1483,7 @@ namespace YunDa.ISAS.Application.VideoSurveillance
|
||||
};
|
||||
if (videoExist == null)
|
||||
{
|
||||
InvestigationTrailEventInput investigationTrailEventInput = new()
|
||||
InvestigationTrailEventInput investigationTrailEventInput = new InvestigationTrailEventInput()
|
||||
{
|
||||
Camera = ObjectMapper.Map<VideoDevSimpleProperty>(video),
|
||||
AlarmInspectionMergeBodies = new List<AlarmInspectionMergeBody>(),
|
||||
|
||||
@ -3642,18 +3642,6 @@
|
||||
<param name="equipmentInfoId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionDeviceAppService.UpdateProtetionInfoForTest">
|
||||
<summary>
|
||||
填充出厂编号
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionDeviceAppService.UpdateProtetionInfoForHistoryTest">
|
||||
<summary>
|
||||
填充出厂编号
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YunDa.ISAS.Application.GeneralInformation.ProtectionDeviceAppService.SpawnDeviceinfoHistory">
|
||||
<summary>
|
||||
生成装置的初始历史记录
|
||||
@ -3748,12 +3736,6 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo.SecondaryCircuitAppService.GenerateSecondaryCircuitTestData">
|
||||
<summary>
|
||||
生成10个测试回路信息
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo.SecondaryCircuitLogicExpressionAppService">
|
||||
<summary>
|
||||
二次回路逻辑表达式类
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>YunDa.ISAS.Application</AssemblyName>
|
||||
<PackageId>YunDa.ISAS.Application</PackageId>
|
||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||
@ -24,10 +24,6 @@
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\.editorconfig" Link=".editorconfig" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Abp" Version="9.4.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\YunDa.Domain\YunDa.ISAS.MongoDB\YunDa.SOMS.MongoDB.csproj" />
|
||||
<ProjectReference Include="..\..\YunDa.Domain\YunDa.ISAS.Redis\YunDa.SOMS.Redis.csproj" />
|
||||
|
||||
@ -15,8 +15,8 @@ namespace YunDa.SOMS.DataTransferObject.MainStationMaintenanceInfo.OperationRepo
|
||||
{
|
||||
public virtual Guid? EquipmentInfoId { get; set; }
|
||||
public float CPU5V1 { get; set; }
|
||||
public float CPU5V2 { get; set; }
|
||||
public float CPU5V3 { get; set; }
|
||||
//public float CPU5V2 { get; set; }
|
||||
//public float CPU5V3 { get; set; }
|
||||
public float SurfaceTemperature { get; set; }
|
||||
public float CPUTemperature{ get; set; }
|
||||
[MessagePackFormatter(typeof(DateTimeAsUnixTimeFormatter))] // 使用自定义格式化器
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<NoWarn>1701;1702;1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
@ -21,11 +22,6 @@
|
||||
<ItemGroup>
|
||||
<None Remove="MainStationMaintenanceInfo\OperationReport\RunningStatus.cs~RF6ef2e4.TMP" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Abp" Version="9.4.2" />
|
||||
<PackageReference Include="Abp.AutoMapper" Version="9.4.2" />
|
||||
<PackageReference Include="MessagePack" Version="2.5.192" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\YunDa.Core\YunDa.ISAS.Core\YunDa.ISAS.Core.csproj" />
|
||||
@ -46,4 +42,8 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- MessagePack for .NET Core 3.1 -->
|
||||
<PackageReference Include="MessagePack" Version="2.1.90" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,7 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<NoWarn>1701;1702;1591;0414</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<NoWarn>1701;1702;1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
||||
@ -32,7 +32,7 @@ namespace YunDa.ISAS.MongoDB.Application.DataMonitoring.ImageAnalysisResult
|
||||
[ShowApi]
|
||||
public RequestResult<List<ImageAnalysisDailyResultOutput>> FindWeeklyDatas(Guid stationId)
|
||||
{
|
||||
RequestResult<List<ImageAnalysisDailyResultOutput>> rst = new();
|
||||
RequestResult<List<ImageAnalysisDailyResultOutput>> rst = new RequestResult<List<ImageAnalysisDailyResultOutput>>();
|
||||
try
|
||||
{
|
||||
DateTime start = DateTime.Now.AddDays(-6);
|
||||
|
||||
@ -64,7 +64,7 @@ namespace YunDa.ISAS.MongoDB.Application.DataMonitoring.MultidimensionalCheckRes
|
||||
[ShowApi]
|
||||
public RequestResult<List<MultidimensionalWeeklyResultOutput>> FindWeeklyDatas(Guid stationId)
|
||||
{
|
||||
RequestResult<List<MultidimensionalWeeklyResultOutput>> rst = new();
|
||||
RequestResult<List<MultidimensionalWeeklyResultOutput>> rst = new RequestResult<List<MultidimensionalWeeklyResultOutput>>();
|
||||
try
|
||||
{
|
||||
DateTime start = DateTime.Now.AddDays(-6);
|
||||
|
||||
@ -762,7 +762,7 @@ namespace YunDa.ISAS.MongoDB.Application.DataMonitoring
|
||||
[ShowApi]
|
||||
public async Task<RequestResult<List<AlarmCategoryOutput>>> GetAlarmCategoryOrverview(Guid stationId,string date)
|
||||
{
|
||||
RequestResult<List<AlarmCategoryOutput>> rst = new ();
|
||||
RequestResult<List<AlarmCategoryOutput>> rst = new RequestResult<List<AlarmCategoryOutput>>();
|
||||
try
|
||||
{
|
||||
var equipmentRepo = _equipmentTypeResitory.GetAll().ToList();
|
||||
@ -836,7 +836,7 @@ namespace YunDa.ISAS.MongoDB.Application.DataMonitoring
|
||||
[ShowApi]
|
||||
public async Task<RequestResult<List<AlarmWeeklyOutput>>> GetAlarmWeeklyOrverview(Guid stationId)
|
||||
{
|
||||
RequestResult<List<AlarmWeeklyOutput>> rst = new();
|
||||
RequestResult<List<AlarmWeeklyOutput>> rst = new RequestResult<List<AlarmWeeklyOutput>>();
|
||||
try
|
||||
{
|
||||
List<AlarmWeeklyOutput> datas = new List<AlarmWeeklyOutput>();
|
||||
|
||||
@ -2,15 +2,19 @@
|
||||
using Abp.Authorization;
|
||||
using Abp.Domain.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Driver;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yunda.SOMS.MongoDB.Entities.MainStationMaintenanceInfo;
|
||||
using YunDa.ISAS.Application.Core;
|
||||
using YunDa.ISAS.Application.Core.Session;
|
||||
using YunDa.ISAS.Application.Core.SwaggerHelper;
|
||||
using YunDa.ISAS.DataTransferObject;
|
||||
using YunDa.ISAS.MongoDB.Repositories;
|
||||
using YunDa.SOMS.DataTransferObject.CommonDto;
|
||||
using YunDa.SOMS.Entities.GeneralInformation;
|
||||
|
||||
@ -19,12 +23,17 @@ namespace YunDa.ISAS.MongoDB.Application.DataMonitoring
|
||||
public class ProtectionDeviceYCResultAppService : ISASAppServiceBase, IApplicationService
|
||||
{
|
||||
private readonly IRepository<ProtectionDeviceInfo, Guid> _protectionDeviceInfoRepository;
|
||||
public readonly IMongoDbRepository<BsonDocument, Guid> _bsonDocumentResultRepository;
|
||||
|
||||
|
||||
public ProtectionDeviceYCResultAppService(ISessionAppService sessionAppService,
|
||||
IMongoDbRepository<BsonDocument, Guid> bsonDocumentResultRepository,
|
||||
IRepository<ProtectionDeviceInfo, Guid> protectionDeviceInfoRepository
|
||||
) : base(sessionAppService)
|
||||
{
|
||||
_protectionDeviceInfoRepository = protectionDeviceInfoRepository;
|
||||
_bsonDocumentResultRepository = bsonDocumentResultRepository;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取装置5V电压曲线图
|
||||
@ -33,7 +42,7 @@ namespace YunDa.ISAS.MongoDB.Application.DataMonitoring
|
||||
[AbpAllowAnonymous]
|
||||
[ShowApi]
|
||||
[HttpGet]
|
||||
public RequestResult<List<TimeValue>> Get5VTimeSeries(Guid equipmentInfoId,int index,DateTime startTime,DateTime endTime)
|
||||
public async Task<RequestResult<List<TimeValue>>> Get5VTimeSeriesAsync(Guid equipmentInfoId,DateTime startTime,DateTime endTime)
|
||||
{
|
||||
RequestResult<List<TimeValue>> rst = new RequestResult<List<TimeValue>>();
|
||||
try
|
||||
@ -46,28 +55,49 @@ namespace YunDa.ISAS.MongoDB.Application.DataMonitoring
|
||||
|
||||
// 初始化数据结果集
|
||||
List<TimeValue> timeSeries = new List<TimeValue>();
|
||||
|
||||
Random random = new Random();
|
||||
DateTime currentTime = startTime;
|
||||
|
||||
// 按随机间隔生成数据
|
||||
while (currentTime <= endTime)
|
||||
_bsonDocumentResultRepository.CollectionName = nameof(DeviceCPUMonitoringResult);
|
||||
var builder = Builders<BsonDocument>.Filter;
|
||||
var filterID = builder.Eq("EquipmentInfoId", equipmentInfoId);
|
||||
var filterStart = builder.Gte("Time", startTime);//>=
|
||||
var filterEnd = builder.Lt("Time", endTime);//<
|
||||
var filter = builder.And(filterID, filterStart, filterEnd);
|
||||
var sorter = Builders<BsonDocument>.Sort;
|
||||
var sorterDifine = sorter.Ascending("Time");
|
||||
IFindFluent<BsonDocument, BsonDocument> rstBason = _bsonDocumentResultRepository.GetAllIncludeToFindFluent(filter, sort: sorterDifine);
|
||||
await rstBason.ForEachAsync(t =>
|
||||
{
|
||||
// 生成随机电压值 (假设范围为 4.8V 到 5.2V)
|
||||
double voltage = 4.8 + random.NextDouble() * 0.4;
|
||||
|
||||
// 添加时间点和电压值
|
||||
timeSeries.Add(new TimeValue
|
||||
{
|
||||
Time = currentTime,
|
||||
Value = voltage
|
||||
Time = t["Time"].ToLocalTime(),
|
||||
Value = t["CPU5V1"].ToDouble()
|
||||
});
|
||||
});
|
||||
|
||||
// 随机增加 1-3 秒
|
||||
int randomSeconds = random.Next(1, 4); // [1, 3]
|
||||
currentTime = currentTime.AddSeconds(randomSeconds);
|
||||
if (timeSeries.Count < 1)
|
||||
{
|
||||
Random random = new Random();
|
||||
DateTime currentTime = startTime;
|
||||
|
||||
// 按随机间隔生成数据
|
||||
while (currentTime <= endTime)
|
||||
{
|
||||
// 生成随机电压值 (假设范围为 4.8V 到 5.2V)
|
||||
double voltage = 4.8 + random.NextDouble() * 0.4;
|
||||
|
||||
// 添加时间点和电压值
|
||||
timeSeries.Add(new TimeValue
|
||||
{
|
||||
Time = currentTime,
|
||||
Value = voltage
|
||||
});
|
||||
|
||||
// 随机增加 1-3 秒
|
||||
int randomSeconds = random.Next(1, 4); // [1, 3]
|
||||
currentTime = currentTime.AddSeconds(randomSeconds);
|
||||
}
|
||||
rst.ResultData = timeSeries;
|
||||
}
|
||||
rst.ResultData = timeSeries;
|
||||
|
||||
rst.Flag = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -77,5 +107,7 @@ namespace YunDa.ISAS.MongoDB.Application.DataMonitoring
|
||||
}
|
||||
return rst;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1234,7 +1234,7 @@ namespace YunDa.ISAS.MongoDB.Application.Inspection
|
||||
[ShowApi]
|
||||
public async Task<RequestEasyResult> LiveRecognizeInfoUpload(string analysisResult, Guid videoDevId)
|
||||
{
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
try
|
||||
{
|
||||
if (videoDevId!=default)
|
||||
@ -1608,7 +1608,7 @@ namespace YunDa.ISAS.MongoDB.Application.Inspection
|
||||
|
||||
public async Task<RequestEasyResult> ReUploadItemDataAsync(Guid inspectionItemResultId)
|
||||
{
|
||||
RequestEasyResult rst = new();
|
||||
RequestEasyResult rst = new RequestEasyResult();
|
||||
try
|
||||
{
|
||||
if (inspectionItemResultId != default)
|
||||
|
||||
@ -730,7 +730,7 @@ namespace YunDa.ISAS.MongoDB.Application.Inspection
|
||||
[ShowApi]
|
||||
public RequestResult<List<InspectionItemsWeeklyOutput>> GetInspectionWeeklyOverview(Guid stationId)
|
||||
{
|
||||
RequestResult<List<InspectionItemsWeeklyOutput>> rst = new ();
|
||||
RequestResult<List<InspectionItemsWeeklyOutput>> rst = new RequestResult<List<InspectionItemsWeeklyOutput>>();
|
||||
if (stationId == default)
|
||||
{
|
||||
rst.Message = "所id错误";
|
||||
@ -799,7 +799,7 @@ namespace YunDa.ISAS.MongoDB.Application.Inspection
|
||||
[ShowApi]
|
||||
public async Task<RequestResult<InspectionOverviewOutput>> GetInspectionOverview(Guid stationId)
|
||||
{
|
||||
RequestResult<InspectionOverviewOutput> rst = new();
|
||||
RequestResult<InspectionOverviewOutput> rst = new RequestResult<InspectionOverviewOutput>();
|
||||
if (stationId == default)
|
||||
{
|
||||
rst.Message = "所id错误";
|
||||
|
||||
@ -548,7 +548,7 @@ namespace YunDa.ISAS.MongoDB.Application.MeasuresTemperature
|
||||
[AbpAllowAnonymous]
|
||||
public RequestResult<MeasureTempertureDailyResultOutput> FindMeasureTempertureDailyResults(Guid stationId)
|
||||
{
|
||||
RequestResult<MeasureTempertureDailyResultOutput> rst = new();
|
||||
RequestResult<MeasureTempertureDailyResultOutput> rst = new RequestResult<MeasureTempertureDailyResultOutput>();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@ -85,7 +85,7 @@ namespace YunDa.ISAS.MongoDB.Application.MobileSurveillance
|
||||
_cache = cache;
|
||||
}
|
||||
|
||||
static Dictionary<Guid, UploadItemTempData> _robotTasksDic = new ();
|
||||
static Dictionary<Guid, UploadItemTempData> _robotTasksDic = new Dictionary<Guid, UploadItemTempData>();
|
||||
//static UploadItemTempData _uploadItemTempData;
|
||||
/// <summary>
|
||||
/// 查询是否有任务已经5分钟没有上送巡检结果了
|
||||
|
||||
@ -476,7 +476,7 @@
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YunDa.ISAS.MongoDB.Application.DataMonitoring.ProtectionDeviceYCResultAppService.Get5VTimeSeries(System.Guid,System.Int32,System.DateTime,System.DateTime)">
|
||||
<member name="M:YunDa.ISAS.MongoDB.Application.DataMonitoring.ProtectionDeviceYCResultAppService.Get5VTimeSeriesAsync(System.Guid,System.DateTime,System.DateTime)">
|
||||
<summary>
|
||||
获取装置5V电压曲线图
|
||||
</summary>
|
||||
@ -818,12 +818,6 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YunDa.ISAS.MongoDB.Application.Inspection.InspectionItemResultAppService.TestGetAlarmMessage(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
测试报警api
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YunDa.ISAS.MongoDB.Application.Inspection.InspectionItemResultAppService.GetAlarmMessage(System.Nullable{System.Guid},System.Int32,System.String)">
|
||||
<summary>
|
||||
获取报警信息
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>YunDa.ISAS.MongoDB.Application</AssemblyName>
|
||||
<PackageId>YunDa.ISAS.MongoDB.Application</PackageId>
|
||||
<RootNamespace>YunDa.ISAS.MongoDB.Application</RootNamespace>
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>YunDa.ISAS.Core</AssemblyName>
|
||||
<PackageId>YunDa.ISAS.Core</PackageId>
|
||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||
@ -15,15 +14,14 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Abp" Version="9.1.0" />
|
||||
<PackageReference Include="Abp.AutoMapper" Version="9.1.0" />
|
||||
<PackageReference Include="Castle.Core" Version="5.1.1" />
|
||||
<PackageReference Include="Abp" Version="5.14.0" />
|
||||
<PackageReference Include="Abp.AutoMapper" Version="5.14.0" />
|
||||
<PackageReference Include="Castle.Core" Version="4.4.1" />
|
||||
<PackageReference Include="log4net" Version="3.0.3" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.11" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Actip
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? Devtype { get; set; }
|
||||
|
||||
public int? Bit { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? Remark { get; set; }
|
||||
public partial class Actip
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? Devtype { get; set; }
|
||||
public long? Bit { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,25 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class BhWavedefine
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? ChannelNum { get; set; }
|
||||
|
||||
public string? ChannelType { get; set; }
|
||||
|
||||
public int? DeviceType { get; set; }
|
||||
|
||||
public int? ChannelId { get; set; }
|
||||
|
||||
public string? ChannelName { get; set; }
|
||||
|
||||
public string? Unit1 { get; set; }
|
||||
|
||||
public string? Unit2 { get; set; }
|
||||
|
||||
public double? NullShift { get; set; }
|
||||
public partial class BhWavedefine
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? ChannelNum { get; set; }
|
||||
public string ChannelType { get; set; }
|
||||
public long? DeviceType { get; set; }
|
||||
public long? ChannelId { get; set; }
|
||||
public string ChannelName { get; set; }
|
||||
public string Unit1 { get; set; }
|
||||
public string Unit2 { get; set; }
|
||||
public double? NullShift { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,23 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DescField
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? TbId { get; set; }
|
||||
|
||||
public string? FieldName { get; set; }
|
||||
|
||||
public string? FieldDesc { get; set; }
|
||||
|
||||
public string? DataDesc { get; set; }
|
||||
|
||||
public string? DataType { get; set; }
|
||||
|
||||
public int? IsModify { get; set; }
|
||||
|
||||
public string? DefaultV { get; set; }
|
||||
public partial class DescField
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? TbId { get; set; }
|
||||
public string FieldName { get; set; }
|
||||
public string FieldDesc { get; set; }
|
||||
public string DataDesc { get; set; }
|
||||
public string DataType { get; set; }
|
||||
public long? IsModify { get; set; }
|
||||
public string DefaultV { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DescTable
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? TbName { get; set; }
|
||||
|
||||
public string? TbDesc { get; set; }
|
||||
|
||||
public string? TbType { get; set; }
|
||||
|
||||
public int? RowAd { get; set; }
|
||||
public partial class DescTable
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string TbName { get; set; }
|
||||
public string TbDesc { get; set; }
|
||||
public string TbType { get; set; }
|
||||
public long? RowAd { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,43 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Device
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? DevType { get; set; }
|
||||
|
||||
public int? DevAddr { get; set; }
|
||||
|
||||
public int? YxNum { get; set; }
|
||||
|
||||
public int? YcNum { get; set; }
|
||||
|
||||
public int? DdNum { get; set; }
|
||||
|
||||
public int? MonitorPort { get; set; }
|
||||
|
||||
public int? LbPointMax { get; set; }
|
||||
|
||||
public int? IoTremT { get; set; }
|
||||
|
||||
public int? DigtalStartNum { get; set; }
|
||||
|
||||
public int? KrTimeFlagType { get; set; }
|
||||
|
||||
public string? IedName { get; set; }
|
||||
|
||||
public int? DevelopMode { get; set; }
|
||||
|
||||
public int? SaveYxMaxInf { get; set; }
|
||||
|
||||
public int? LbFileNumMax { get; set; }
|
||||
|
||||
public int? Datastore { get; set; }
|
||||
|
||||
public int? Initjudgcontrol { get; set; }
|
||||
|
||||
public int? YxUp { get; set; }
|
||||
public partial class Device
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? DevType { get; set; }
|
||||
public long? DevAddr { get; set; }
|
||||
public long? YxNum { get; set; }
|
||||
public long? YcNum { get; set; }
|
||||
public long? DdNum { get; set; }
|
||||
public long? MonitorPort { get; set; }
|
||||
public long? LbPointMax { get; set; }
|
||||
public long? IoTremT { get; set; }
|
||||
public long? DigtalStartNum { get; set; }
|
||||
public long? KrTimeFlagType { get; set; }
|
||||
public string IedName { get; set; }
|
||||
public long? DevelopMode { get; set; }
|
||||
public long? SaveYxMaxInf { get; set; }
|
||||
public long? LbFileNumMax { get; set; }
|
||||
public long? Datastore { get; set; }
|
||||
public long? Initjudgcontrol { get; set; }
|
||||
public long? YxUp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,27 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceAtcj
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? IsStart { get; set; }
|
||||
|
||||
public string? LocalIp { get; set; }
|
||||
|
||||
public int? LocalPort { get; set; }
|
||||
|
||||
public int? HasTime { get; set; }
|
||||
|
||||
public int? Monitor { get; set; }
|
||||
|
||||
public string? LocalIpMask { get; set; }
|
||||
|
||||
public string? GateWay { get; set; }
|
||||
|
||||
public string? MacAddress { get; set; }
|
||||
|
||||
public int? UseEth2WithEth2lib { get; set; }
|
||||
public partial class DeviceAtcj
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? IsStart { get; set; }
|
||||
public string LocalIp { get; set; }
|
||||
public long? LocalPort { get; set; }
|
||||
public long? HasTime { get; set; }
|
||||
public long? Monitor { get; set; }
|
||||
public string LocalIpMask { get; set; }
|
||||
public string GateWay { get; set; }
|
||||
public string MacAddress { get; set; }
|
||||
public long? UseEth2WithEth2lib { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceDzkx
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int DzIndex { get; set; }
|
||||
|
||||
public int? DataType { get; set; }
|
||||
public partial class DeviceDzkx
|
||||
{
|
||||
public long DzIndex { get; set; }
|
||||
public long? DataType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceGateway
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? EthName { get; set; }
|
||||
|
||||
public string? GwAddress { get; set; }
|
||||
public partial class DeviceGateway
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string EthName { get; set; }
|
||||
public string GwAddress { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceIoTremDefault
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? Ioboard { get; set; }
|
||||
|
||||
public int? InputIndex { get; set; }
|
||||
|
||||
public string? InputIndexDesc { get; set; }
|
||||
|
||||
public int? TrembleTime { get; set; }
|
||||
|
||||
public int? ShiftPos { get; set; }
|
||||
public partial class DeviceIoTremDefault
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? Ioboard { get; set; }
|
||||
public long? InputIndex { get; set; }
|
||||
public string InputIndexDesc { get; set; }
|
||||
public long? TrembleTime { get; set; }
|
||||
public long? ShiftPos { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceIoTremDefine
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? Iotype { get; set; }
|
||||
|
||||
public string? IotypeDesc { get; set; }
|
||||
|
||||
public int? InputIndex { get; set; }
|
||||
|
||||
public string? InputIndexDesc { get; set; }
|
||||
|
||||
public int? TremblePos { get; set; }
|
||||
public partial class DeviceIoTremDefine
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? Iotype { get; set; }
|
||||
public string IotypeDesc { get; set; }
|
||||
public long? InputIndex { get; set; }
|
||||
public string InputIndexDesc { get; set; }
|
||||
public long? TremblePos { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,27 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceNetwork
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? IpEthA { get; set; }
|
||||
|
||||
public string? MaskEthA { get; set; }
|
||||
|
||||
public string? IpEthB { get; set; }
|
||||
|
||||
public string? MaskEthB { get; set; }
|
||||
|
||||
public string? IpEthC { get; set; }
|
||||
|
||||
public string? MaskEthC { get; set; }
|
||||
|
||||
public string? MacAddrA { get; set; }
|
||||
|
||||
public string? MacAddrB { get; set; }
|
||||
|
||||
public string? MacAddrC { get; set; }
|
||||
public partial class DeviceNetwork
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string IpEthA { get; set; }
|
||||
public string MaskEthA { get; set; }
|
||||
public string IpEthB { get; set; }
|
||||
public string MaskEthB { get; set; }
|
||||
public string IpEthC { get; set; }
|
||||
public string MaskEthC { get; set; }
|
||||
public string MacAddrA { get; set; }
|
||||
public string MacAddrB { get; set; }
|
||||
public string MacAddrC { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceReject
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? Name0 { get; set; }
|
||||
|
||||
public int? Time0 { get; set; }
|
||||
|
||||
public int? MaxCount { get; set; }
|
||||
public partial class DeviceReject
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
public string Name0 { get; set; }
|
||||
public long? Time0 { get; set; }
|
||||
public long? MaxCount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceSntp
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? SntpIp { get; set; }
|
||||
|
||||
public int? CycleSpace { get; set; }
|
||||
|
||||
public int? ProbeCount { get; set; }
|
||||
|
||||
public int? ProbeInterval { get; set; }
|
||||
|
||||
public int? HwClock { get; set; }
|
||||
|
||||
public int? ErrTimes { get; set; }
|
||||
public partial class DeviceSntp
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string SntpIp { get; set; }
|
||||
public long? CycleSpace { get; set; }
|
||||
public long? ProbeCount { get; set; }
|
||||
public long? ProbeInterval { get; set; }
|
||||
public long? HwClock { get; set; }
|
||||
public long? ErrTimes { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,23 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceUart
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? TypeName { get; set; }
|
||||
|
||||
public int? ComIndex { get; set; }
|
||||
|
||||
public int? ComBaud { get; set; }
|
||||
|
||||
public string? ComParity { get; set; }
|
||||
|
||||
public int? MonitorChl { get; set; }
|
||||
|
||||
public int? LinkAddr { get; set; }
|
||||
|
||||
public int? IfStart { get; set; }
|
||||
public partial class DeviceUart
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string TypeName { get; set; }
|
||||
public long? ComIndex { get; set; }
|
||||
public long? ComBaud { get; set; }
|
||||
public string ComParity { get; set; }
|
||||
public long? MonitorChl { get; set; }
|
||||
public long? LinkAddr { get; set; }
|
||||
public long? IfStart { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceYc
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int YcIndex { get; set; }
|
||||
|
||||
public double? YcInterzone { get; set; }
|
||||
|
||||
public int? YcSpace { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public int? DevType { get; set; }
|
||||
|
||||
public double? YcModuli { get; set; }
|
||||
|
||||
public double? YcBase { get; set; }
|
||||
public partial class DeviceYc
|
||||
{
|
||||
public long YcIndex { get; set; }
|
||||
public double? YcInterzone { get; set; }
|
||||
public long? YcSpace { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long? DevType { get; set; }
|
||||
public double? YcModuli { get; set; }
|
||||
public double? YcBase { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DeviceYcharmon
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int YcIndex { get; set; }
|
||||
|
||||
public double? YcInterzone { get; set; }
|
||||
|
||||
public int? YcSpace { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public int? DevType { get; set; }
|
||||
|
||||
public double? YcModuli { get; set; }
|
||||
|
||||
public double? YcBase { get; set; }
|
||||
public partial class DeviceYcharmon
|
||||
{
|
||||
public long YcIndex { get; set; }
|
||||
public double? YcInterzone { get; set; }
|
||||
public long? YcSpace { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long? DevType { get; set; }
|
||||
public double? YcModuli { get; set; }
|
||||
public double? YcBase { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,29 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Iec103Io
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? CanIndex { get; set; }
|
||||
|
||||
public int? CanBaud { get; set; }
|
||||
|
||||
public int? LocalCanId { get; set; }
|
||||
|
||||
public int? LinkAddr { get; set; }
|
||||
|
||||
public int? CanId { get; set; }
|
||||
|
||||
public int? MonitorChl { get; set; }
|
||||
|
||||
public int? T1Normal { get; set; }
|
||||
|
||||
public int? T1L1 { get; set; }
|
||||
|
||||
public int? T1Cmd { get; set; }
|
||||
|
||||
public int? Enable { get; set; }
|
||||
public partial class Iec103Io
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? CanIndex { get; set; }
|
||||
public long? CanBaud { get; set; }
|
||||
public long? LocalCanId { get; set; }
|
||||
public long? LinkAddr { get; set; }
|
||||
public long? CanId { get; set; }
|
||||
public long? MonitorChl { get; set; }
|
||||
public long? T1Normal { get; set; }
|
||||
public long? T1L1 { get; set; }
|
||||
public long? T1Cmd { get; set; }
|
||||
public long? Enable { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,25 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Iec103Prot
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? ConnectIp { get; set; }
|
||||
|
||||
public int? ConnectPort { get; set; }
|
||||
|
||||
public int? Monitor { get; set; }
|
||||
|
||||
public int? LinkAddr { get; set; }
|
||||
|
||||
public int? CommAddr { get; set; }
|
||||
|
||||
public int? T1Normal { get; set; }
|
||||
|
||||
public int? T1L1 { get; set; }
|
||||
|
||||
public int? T1Cmd { get; set; }
|
||||
public partial class Iec103Prot
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string ConnectIp { get; set; }
|
||||
public long? ConnectPort { get; set; }
|
||||
public long? Monitor { get; set; }
|
||||
public long? LinkAddr { get; set; }
|
||||
public long? CommAddr { get; set; }
|
||||
public long? T1Normal { get; set; }
|
||||
public long? T1L1 { get; set; }
|
||||
public long? T1Cmd { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Iec103Tool
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? ListenIp { get; set; }
|
||||
|
||||
public int? ListenPort { get; set; }
|
||||
|
||||
public int? MaxLink { get; set; }
|
||||
|
||||
public int? MonitorL { get; set; }
|
||||
|
||||
public int? MonitorM { get; set; }
|
||||
|
||||
public int? LinkAddr { get; set; }
|
||||
public partial class Iec103Tool
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string ListenIp { get; set; }
|
||||
public long? ListenPort { get; set; }
|
||||
public long? MaxLink { get; set; }
|
||||
public long? MonitorL { get; set; }
|
||||
public long? MonitorM { get; set; }
|
||||
public long? LinkAddr { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Iec104Ta21
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? ListenIp { get; set; }
|
||||
|
||||
public int? ListenPort { get; set; }
|
||||
|
||||
public int? MaxLink { get; set; }
|
||||
|
||||
public int? MonitorL { get; set; }
|
||||
|
||||
public int? MonitorM { get; set; }
|
||||
|
||||
public int? OfflineTime104 { get; set; }
|
||||
public partial class Iec104Ta21
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string ListenIp { get; set; }
|
||||
public long? ListenPort { get; set; }
|
||||
public long? MaxLink { get; set; }
|
||||
public long? MonitorL { get; set; }
|
||||
public long? MonitorM { get; set; }
|
||||
public long? OfflineTime104 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class MeterChz
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int EnumV { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
public partial class MeterChz
|
||||
{
|
||||
public long EnumV { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,23 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Meterchl
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? ChlId { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? Unit { get; set; }
|
||||
|
||||
public string? Unit2 { get; set; }
|
||||
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public string? EngName { get; set; }
|
||||
|
||||
public int? Devtype { get; set; }
|
||||
public partial class Meterchl
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? ChlId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Unit { get; set; }
|
||||
public string Unit2 { get; set; }
|
||||
public string Remark { get; set; }
|
||||
public string EngName { get; set; }
|
||||
public long? Devtype { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,23 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Soecheck
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? Device { get; set; }
|
||||
|
||||
public int? Code { get; set; }
|
||||
|
||||
public string? Desc { get; set; }
|
||||
|
||||
public int? Record0 { get; set; }
|
||||
|
||||
public int? Iec104 { get; set; }
|
||||
|
||||
public int? Yj103 { get; set; }
|
||||
|
||||
public int? Tool103 { get; set; }
|
||||
public partial class Soecheck
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Device { get; set; }
|
||||
public long? Code { get; set; }
|
||||
public string Desc { get; set; }
|
||||
public long? Record0 { get; set; }
|
||||
public long? Iec104 { get; set; }
|
||||
public long? Yj103 { get; set; }
|
||||
public long? Tool103 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbCdIo
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public int? Channel { get; set; }
|
||||
|
||||
public string? ChannelName { get; set; }
|
||||
|
||||
public int? KcIndex { get; set; }
|
||||
|
||||
public int? Board { get; set; }
|
||||
|
||||
public int? Type0 { get; set; }
|
||||
public partial class TbCdIo
|
||||
{
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public long? Channel { get; set; }
|
||||
public string ChannelName { get; set; }
|
||||
public long? KcIndex { get; set; }
|
||||
public long? Board { get; set; }
|
||||
public long? Type0 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,37 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbDeviceType
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public string? DeviceName { get; set; }
|
||||
|
||||
public string? DeviceCategory { get; set; }
|
||||
|
||||
public int? In2 { get; set; }
|
||||
|
||||
public int? Un2 { get; set; }
|
||||
|
||||
public int? DkjlTable { get; set; }
|
||||
|
||||
public int? QlxlTable { get; set; }
|
||||
|
||||
public string? ShortName { get; set; }
|
||||
|
||||
public string? PName { get; set; }
|
||||
|
||||
public string? Io1Type { get; set; }
|
||||
|
||||
public string? Io2Type { get; set; }
|
||||
|
||||
public string? Io3Type { get; set; }
|
||||
|
||||
public int? RefDeviceEvent { get; set; }
|
||||
|
||||
public int? HaveToutui { get; set; }
|
||||
|
||||
public int? ToutuiChl { get; set; }
|
||||
public partial class TbDeviceType
|
||||
{
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public string DeviceName { get; set; }
|
||||
public string DeviceCategory { get; set; }
|
||||
public long? In2 { get; set; }
|
||||
public long? Un2 { get; set; }
|
||||
public long? DkjlTable { get; set; }
|
||||
public long? QlxlTable { get; set; }
|
||||
public string ShortName { get; set; }
|
||||
public string PName { get; set; }
|
||||
public string Io1Type { get; set; }
|
||||
public string Io2Type { get; set; }
|
||||
public string Io3Type { get; set; }
|
||||
public long? RefDeviceEvent { get; set; }
|
||||
public long? HaveToutui { get; set; }
|
||||
public long? ToutuiChl { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,51 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbDzDkjl
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public string? Group0 { get; set; }
|
||||
|
||||
public string? DzName { get; set; }
|
||||
|
||||
public string? ValMin { get; set; }
|
||||
|
||||
public decimal? ValMax { get; set; }
|
||||
|
||||
public string? Unit2 { get; set; }
|
||||
|
||||
public string? Unit1 { get; set; }
|
||||
|
||||
public int? DzTypeCode { get; set; }
|
||||
|
||||
public int? EnumId { get; set; }
|
||||
|
||||
public decimal? DefaultVal { get; set; }
|
||||
|
||||
public double? Scale2 { get; set; }
|
||||
|
||||
public double? Scale1 { get; set; }
|
||||
|
||||
public int? RelCt2 { get; set; }
|
||||
|
||||
public int? RelCt1 { get; set; }
|
||||
|
||||
public int? RelPt2 { get; set; }
|
||||
|
||||
public int? RelPt1 { get; set; }
|
||||
|
||||
public int? Ptctindex { get; set; }
|
||||
|
||||
public int? Visable { get; set; }
|
||||
|
||||
public int? Modify { get; set; }
|
||||
|
||||
public string? Lcdname { get; set; }
|
||||
public partial class TbDzDkjl
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public string Group0 { get; set; }
|
||||
public string DzName { get; set; }
|
||||
public string ValMin { get; set; }
|
||||
public string ValMax { get; set; }
|
||||
public string Unit2 { get; set; }
|
||||
public string Unit1 { get; set; }
|
||||
public long? DzTypeCode { get; set; }
|
||||
public long? EnumId { get; set; }
|
||||
public string DefaultVal { get; set; }
|
||||
public double? Scale2 { get; set; }
|
||||
public double? Scale1 { get; set; }
|
||||
public long? RelCt2 { get; set; }
|
||||
public long? RelCt1 { get; set; }
|
||||
public long? RelPt2 { get; set; }
|
||||
public long? RelPt1 { get; set; }
|
||||
public long? Ptctindex { get; set; }
|
||||
public long? Visable { get; set; }
|
||||
public long? Modify { get; set; }
|
||||
public string Lcdname { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbDzEnum
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DzEnumId { get; set; }
|
||||
|
||||
public string? DzEnumIddesc { get; set; }
|
||||
|
||||
public int? DzEnumValue { get; set; }
|
||||
|
||||
public string? DzEnumName { get; set; }
|
||||
public partial class TbDzEnum
|
||||
{
|
||||
public long? DzEnumId { get; set; }
|
||||
public string DzEnumIddesc { get; set; }
|
||||
public long? DzEnumValue { get; set; }
|
||||
public string DzEnumName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbDzKrtx
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public string? SetStr { get; set; }
|
||||
public partial class TbDzKrtx
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public string SetStr { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
|
||||
public partial class TbDzSy
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public string? Group0 { get; set; }
|
||||
|
||||
public string? DzName { get; set; }
|
||||
|
||||
public decimal? ValMin { get; set; }
|
||||
|
||||
public string? ValMax { get; set; }
|
||||
|
||||
public string? Unit2 { get; set; }
|
||||
|
||||
public string? Unit1 { get; set; }
|
||||
|
||||
public int? DzTypeCode { get; set; }
|
||||
|
||||
public int? EnumId { get; set; }
|
||||
|
||||
public string? DefaultVal { get; set; }
|
||||
|
||||
public double? Scale2 { get; set; }
|
||||
|
||||
public double? Scale1 { get; set; }
|
||||
|
||||
public int? RelCt2 { get; set; }
|
||||
|
||||
public int? RelCt1 { get; set; }
|
||||
|
||||
public int? RelPt2 { get; set; }
|
||||
|
||||
public int? RelPt1 { get; set; }
|
||||
|
||||
public int? Ptctindex { get; set; }
|
||||
|
||||
public int? Visable { get; set; }
|
||||
|
||||
public int? Modify { get; set; }
|
||||
|
||||
public string? Lcdname { get; set; }
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public partial class TbDzSys
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public string Group0 { get; set; }
|
||||
public string DzName { get; set; }
|
||||
public string ValMin { get; set; }
|
||||
public string ValMax { get; set; }
|
||||
public string Unit2 { get; set; }
|
||||
public string Unit1 { get; set; }
|
||||
public long? DzTypeCode { get; set; }
|
||||
public long? EnumId { get; set; }
|
||||
public string DefaultVal { get; set; }
|
||||
public double? Scale2 { get; set; }
|
||||
public double? Scale1 { get; set; }
|
||||
public long? RelCt2 { get; set; }
|
||||
public long? RelCt1 { get; set; }
|
||||
public long? RelPt2 { get; set; }
|
||||
public long? RelPt1 { get; set; }
|
||||
public long? Ptctindex { get; set; }
|
||||
public long? Visable { get; set; }
|
||||
public long? Modify { get; set; }
|
||||
public string Lcdname { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbDzType
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DzTypeCode { get; set; }
|
||||
|
||||
public string? DzTypeName { get; set; }
|
||||
|
||||
public int? DzLength { get; set; }
|
||||
public partial class TbDzType
|
||||
{
|
||||
public long? DzTypeCode { get; set; }
|
||||
public string DzTypeName { get; set; }
|
||||
public long? DzLength { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,51 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbDzUser
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public string? Group0 { get; set; }
|
||||
|
||||
public string? DzName { get; set; }
|
||||
|
||||
public string? ValMin { get; set; }
|
||||
|
||||
public decimal? ValMax { get; set; }
|
||||
|
||||
public string? Unit2 { get; set; }
|
||||
|
||||
public string? Unit1 { get; set; }
|
||||
|
||||
public int? DzTypeCode { get; set; }
|
||||
|
||||
public int? EnumId { get; set; }
|
||||
|
||||
public string? DefaultVal { get; set; }
|
||||
|
||||
public double? Scale2 { get; set; }
|
||||
|
||||
public double? Scale1 { get; set; }
|
||||
|
||||
public int? RelCt2 { get; set; }
|
||||
|
||||
public int? RelCt1 { get; set; }
|
||||
|
||||
public int? RelPt2 { get; set; }
|
||||
|
||||
public int? RelPt1 { get; set; }
|
||||
|
||||
public int? Ptctindex { get; set; }
|
||||
|
||||
public int? Visable { get; set; }
|
||||
|
||||
public int? Modify { get; set; }
|
||||
|
||||
public string? Lcdname { get; set; }
|
||||
public partial class TbDzUser
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public string Group0 { get; set; }
|
||||
public string DzName { get; set; }
|
||||
public string ValMin { get; set; }
|
||||
public string ValMax { get; set; }
|
||||
public string Unit2 { get; set; }
|
||||
public string Unit1 { get; set; }
|
||||
public long? DzTypeCode { get; set; }
|
||||
public long? EnumId { get; set; }
|
||||
public string DefaultVal { get; set; }
|
||||
public double? Scale2 { get; set; }
|
||||
public double? Scale1 { get; set; }
|
||||
public long? RelCt2 { get; set; }
|
||||
public long? RelCt1 { get; set; }
|
||||
public long? RelPt2 { get; set; }
|
||||
public long? RelPt1 { get; set; }
|
||||
public long? Ptctindex { get; set; }
|
||||
public long? Visable { get; set; }
|
||||
public long? Modify { get; set; }
|
||||
public string Lcdname { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbDzYaban
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Group0 { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public string? YabanName { get; set; }
|
||||
public partial class TbDzYaban
|
||||
{
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Group0 { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public string YabanName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbEventBh
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? EventCode { get; set; }
|
||||
|
||||
public string? Event { get; set; }
|
||||
|
||||
public string? Lcdevent { get; set; }
|
||||
public partial class TbEventBh
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? EventCode { get; set; }
|
||||
public string Event { get; set; }
|
||||
public string Lcdevent { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbEventZj
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int EventCode { get; set; }
|
||||
|
||||
public string? Event { get; set; }
|
||||
|
||||
public string? Lcdevent { get; set; }
|
||||
public partial class TbEventZj
|
||||
{
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long EventCode { get; set; }
|
||||
public string Event { get; set; }
|
||||
public string Lcdevent { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbGzbgActflag
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? ActionFlag { get; set; }
|
||||
|
||||
public string? ActionDesc { get; set; }
|
||||
public partial class TbGzbgActflag
|
||||
{
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? ActionFlag { get; set; }
|
||||
public string ActionDesc { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbL2Kc
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public string? KcDuanzi { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public string? KcName { get; set; }
|
||||
|
||||
public string? Board { get; set; }
|
||||
public partial class TbL2Kc
|
||||
{
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public string KcDuanzi { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public string KcName { get; set; }
|
||||
public string Board { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbL2Kr
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public string? KrDuanzi { get; set; }
|
||||
|
||||
public int? CommIndex { get; set; }
|
||||
|
||||
public int? BoardIndex { get; set; }
|
||||
|
||||
public string? KrName { get; set; }
|
||||
|
||||
public int? DisplayIndex { get; set; }
|
||||
public partial class TbL2Kr
|
||||
{
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public string KrDuanzi { get; set; }
|
||||
public long? CommIndex { get; set; }
|
||||
public long? BoardIndex { get; set; }
|
||||
public string KrName { get; set; }
|
||||
public long? DisplayIndex { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
|
||||
public partial class TbLight
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public int? Type0 { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public int? Color { get; set; }
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public partial class TbLights
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public long? Type0 { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,27 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbYaoxin
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public int? Inf { get; set; }
|
||||
|
||||
public string? ObjectName { get; set; }
|
||||
|
||||
public string? CloseText { get; set; }
|
||||
|
||||
public string? OpenText { get; set; }
|
||||
|
||||
public string? InterText { get; set; }
|
||||
|
||||
public int? Type0 { get; set; }
|
||||
|
||||
public int? Visible { get; set; }
|
||||
|
||||
public int? ImageId { get; set; }
|
||||
public partial class TbYaoxin
|
||||
{
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public long? Inf { get; set; }
|
||||
public string ObjectName { get; set; }
|
||||
public string CloseText { get; set; }
|
||||
public string OpenText { get; set; }
|
||||
public string InterText { get; set; }
|
||||
public long? Type0 { get; set; }
|
||||
public long? Visible { get; set; }
|
||||
public long? ImageId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbYc
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public int? DeviceTypeCode { get; set; }
|
||||
|
||||
public int? Index0 { get; set; }
|
||||
|
||||
public int? YcType { get; set; }
|
||||
|
||||
public int? Visible { get; set; }
|
||||
|
||||
public string? Duanzi { get; set; }
|
||||
public partial class TbYc
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
public long? DeviceTypeCode { get; set; }
|
||||
public long? Index0 { get; set; }
|
||||
public long? YcType { get; set; }
|
||||
public long? Visible { get; set; }
|
||||
public string Duanzi { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class TbYctype
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public int? YcType { get; set; }
|
||||
|
||||
public string? YcName { get; set; }
|
||||
|
||||
public string? YcCategor { get; set; }
|
||||
|
||||
public string? Unit1 { get; set; }
|
||||
|
||||
public string? Unit2 { get; set; }
|
||||
|
||||
public int? Coeff1 { get; set; }
|
||||
|
||||
public int? Coeff2 { get; set; }
|
||||
public partial class TbYctype
|
||||
{
|
||||
public long? YcType { get; set; }
|
||||
public string YcName { get; set; }
|
||||
public string YcCategor { get; set; }
|
||||
public string Unit1 { get; set; }
|
||||
public string Unit2 { get; set; }
|
||||
public long? Coeff1 { get; set; }
|
||||
public long? Coeff2 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models;
|
||||
|
||||
public partial class Version
|
||||
{
|
||||
public int VerId { get; set; }
|
||||
|
||||
public decimal? VerName { get; set; }
|
||||
|
||||
public string? Author { get; set; }
|
||||
|
||||
public DateOnly? Date { get; set; }
|
||||
|
||||
public string? Desc { get; set; }
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
namespace YunDa.SOMS.Commdb.Models
|
||||
{
|
||||
public partial class Versions
|
||||
{
|
||||
public long VerId { get; set; }
|
||||
public string VerName { get; set; }
|
||||
public string Author { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Desc { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,23 +1,23 @@
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using YunDa.SOMS.Commdb;
|
||||
using YunDa.SOMS.Commdb.Models;
|
||||
//using YunDa.SOMS.Commdb;
|
||||
//using YunDa.SOMS.Commdb.Models;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
// 创建 DbContext
|
||||
using (var context = new CommdbContext("D:\\Project\\SOMS\\server\\src\\YunDa.Domain\\ProtectionDeviceSqlite\\YunDa.SOMS.Commdb\\commdb.sql3"))
|
||||
{
|
||||
// 查询数据
|
||||
var devices = context.DeviceNetworks.ToList();
|
||||
foreach (var device in devices)
|
||||
{
|
||||
Console.WriteLine($"ID: {device.Id}, IpEth0: {device.IpEthA}");
|
||||
}
|
||||
//using (var context = new CommdbContext("D:\\Project\\SOMS\\server\\src\\YunDa.Domain\\ProtectionDeviceSqlite\\YunDa.SOMS.Commdb\\commdb.sql3"))
|
||||
//{
|
||||
// // 查询数据
|
||||
// var devices = context.DeviceNetworks.ToList();
|
||||
// foreach (var device in devices)
|
||||
// {
|
||||
// Console.WriteLine($"ID: {device.Id}, IpEth0: {device.IpEthA}");
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,14 +2,18 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- EF Core SQLite 提供程序 -->
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.24" />
|
||||
|
||||
<!-- EF Core 设计时工具包 -->
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.24" />
|
||||
|
||||
<!-- 可选:EF Core 工具包 -->
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.24" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="9.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -1,86 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using YunDa.SOMS.IODB.Models;
|
||||
|
||||
namespace YunDa.SOMS.IODB;
|
||||
|
||||
public partial class IodbContext : DbContext
|
||||
{
|
||||
private readonly string _databasePath;
|
||||
|
||||
public IodbContext(string databasePath)
|
||||
{
|
||||
_databasePath = databasePath;
|
||||
}
|
||||
|
||||
public IodbContext(DbContextOptions<IodbContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<Caniopara> Canioparas { get; set; }
|
||||
|
||||
public virtual DbSet<DescField> DescFields { get; set; }
|
||||
|
||||
public virtual DbSet<DescTable> DescTables { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseSqlite($"Data Source={_databasePath}");
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Caniopara>(entity =>
|
||||
{
|
||||
entity.ToTable("caniopara");
|
||||
|
||||
entity.HasIndex(e => e.Id, "IX_caniopara_ID").IsUnique();
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.IsEnum).HasColumnName("isEnum");
|
||||
entity.Property(e => e.ParaGroup).HasColumnName("paraGroup");
|
||||
entity.Property(e => e.ParaIndex).HasColumnName("paraIndex");
|
||||
entity.Property(e => e.ParaName).HasColumnName("paraName");
|
||||
entity.Property(e => e.ParaValue).HasColumnName("paraValue");
|
||||
entity.Property(e => e.StepL1).HasColumnName("stepL1");
|
||||
entity.Property(e => e.StepL2).HasColumnName("stepL2");
|
||||
entity.Property(e => e.Unit).HasColumnName("unit");
|
||||
entity.Property(e => e.ValMax).HasColumnName("valMax");
|
||||
entity.Property(e => e.ValMin).HasColumnName("valMin");
|
||||
entity.Property(e => e.ValType).HasColumnName("valType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<DescField>(entity =>
|
||||
{
|
||||
entity.ToTable("desc_field");
|
||||
entity.HasIndex(e => e.Id, "IX_desc_field_ID").IsUnique();
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.DataDesc).HasColumnName("dataDesc");
|
||||
entity.Property(e => e.DataType).HasColumnName("dataType");
|
||||
entity.Property(e => e.DefaultV).HasColumnName("defaultV");
|
||||
entity.Property(e => e.FieldDesc).HasColumnName("fieldDesc");
|
||||
entity.Property(e => e.FieldName).HasColumnName("fieldName");
|
||||
entity.Property(e => e.IsModify).HasColumnName("isModify");
|
||||
entity.Property(e => e.TbId).HasColumnName("tbID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<DescTable>(entity =>
|
||||
{
|
||||
entity.ToTable("desc_table");
|
||||
|
||||
entity.HasIndex(e => e.Id, "IX_desc_table_ID").IsUnique();
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.RowAd).HasColumnName("rowAD");
|
||||
entity.Property(e => e.TbDesc).HasColumnName("tbDesc");
|
||||
entity.Property(e => e.TbName).HasColumnName("tbName");
|
||||
entity.Property(e => e.TbType).HasColumnName("tbType");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
||||
@ -1,31 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.IODB.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class Caniopara
|
||||
namespace YunDa.SOMS.IODB.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? ParaIndex { get; set; }
|
||||
|
||||
public string? ParaGroup { get; set; }
|
||||
|
||||
public string? ParaName { get; set; }
|
||||
|
||||
public string? ParaValue { get; set; }
|
||||
|
||||
public int? ValMin { get; set; }
|
||||
|
||||
public int? ValMax { get; set; }
|
||||
|
||||
public string? Unit { get; set; }
|
||||
|
||||
public int? ValType { get; set; }
|
||||
|
||||
public int? IsEnum { get; set; }
|
||||
|
||||
public int? StepL2 { get; set; }
|
||||
|
||||
public int? StepL1 { get; set; }
|
||||
public partial class Caniopara
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? ParaIndex { get; set; }
|
||||
public string ParaGroup { get; set; }
|
||||
public string ParaName { get; set; }
|
||||
public string ParaValue { get; set; }
|
||||
public long? ValMin { get; set; }
|
||||
public long? ValMax { get; set; }
|
||||
public string Unit { get; set; }
|
||||
public long? ValType { get; set; }
|
||||
public long? IsEnum { get; set; }
|
||||
public long? StepL2 { get; set; }
|
||||
public long? StepL1 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,23 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.IODB.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DescField
|
||||
namespace YunDa.SOMS.IODB.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int? TbId { get; set; }
|
||||
|
||||
public string? FieldName { get; set; }
|
||||
|
||||
public string? FieldDesc { get; set; }
|
||||
|
||||
public string? DataDesc { get; set; }
|
||||
|
||||
public string? DataType { get; set; }
|
||||
|
||||
public int? IsModify { get; set; }
|
||||
|
||||
public string? DefaultV { get; set; }
|
||||
public partial class DescField
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long? TbId { get; set; }
|
||||
public string FieldName { get; set; }
|
||||
public string FieldDesc { get; set; }
|
||||
public string DataDesc { get; set; }
|
||||
public string DataType { get; set; }
|
||||
public long? IsModify { get; set; }
|
||||
public string DefaultV { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YunDa.SOMS.IODB.Models;
|
||||
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
|
||||
// If you have enabled NRTs for your project, then un-comment the following line:
|
||||
// #nullable disable
|
||||
|
||||
public partial class DescTable
|
||||
namespace YunDa.SOMS.IODB.Models
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string? TbName { get; set; }
|
||||
|
||||
public string? TbDesc { get; set; }
|
||||
|
||||
public string? TbType { get; set; }
|
||||
|
||||
public int? RowAd { get; set; }
|
||||
public partial class DescTable
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string TbName { get; set; }
|
||||
public string TbDesc { get; set; }
|
||||
public string TbType { get; set; }
|
||||
public long? RowAd { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user