master
Wen JY 1 year ago
commit 79c1e5990a

Binary file not shown.

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IOT.Show.Common</RootNamespace>
<AssemblyName>IOT.Show.Common</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="LogHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TypeCast.cs" />
</ItemGroup>
<ItemGroup>
<None Include="log4net.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IOT.Show.Common
{
/// <summary>
/// 日志类
/// </summary>
public class LogHelper
{
//GetLogger表示log4net配置文件中logger标签中name属性此处要一致 不然无log输出
public static readonly log4net.ILog loginfo = log4net.LogManager.GetLogger("loginfo");
public static readonly log4net.ILog logerror = log4net.LogManager.GetLogger("logerror");
/// <summary>
/// 记录Info日志
/// </summary>
/// <param name="msg"></param>
/// <param name="ex"></param>
public static void Info(string msg)
{
if (loginfo.IsInfoEnabled)
{
loginfo.Info(msg);
}
}
/// <summary>
/// 记录Error日志
/// </summary>
/// <param name="errorMsg"></param>
/// <param name="ex"></param>
public static void Error(string info, Exception ex = null)
{
if (!string.IsNullOrEmpty(info) && ex == null)
{
logerror.ErrorFormat("【附加信息】 : {0}<br>", new object[] { info });
}
else if (!string.IsNullOrEmpty(info) && ex != null)
{
string errorMsg = BeautyErrorMsg(ex);
logerror.ErrorFormat("【附加信息】 : {0}<br>{1}", new object[] { info, errorMsg });
}
else if (string.IsNullOrEmpty(info) && ex != null)
{
string errorMsg = BeautyErrorMsg(ex);
logerror.Error(errorMsg);
}
}
/// <summary>
/// 美化错误信息
/// </summary>
/// <param name="ex">异常</param>
/// <returns>错误信息</returns>
private static string BeautyErrorMsg(Exception ex)
{
string errorMsg = string.Format("【异常类型】:{0} <br>【异常信息】:{1} <br>【堆栈调用】:{2}", new object[] { ex.GetType().Name, ex.Message, ex.StackTrace });
errorMsg = errorMsg.Replace("\r\n", "<br>");
errorMsg = errorMsg.Replace("位置", "<strong style=\"color:red\">位置</strong>");
return errorMsg;
}
}
}

@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("IOT.Show.Common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("IOT.Show.Common")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", ConfigFileExtension = "config", Watch = true)]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("0f25a8d9-3818-47b6-86be-18b53abd51a1")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace IOT.Show.Common
{
public class TypeCast
{
public static IntPtr BytesToIntptr(byte[] bytes)
{
int size = bytes.Length;
IntPtr buffer = Marshal.AllocHGlobal(size);
try
{
Marshal.Copy(bytes, 0, buffer, size);
return buffer;
}
finally
{
}
}
}
}

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
</configSections>
<appSettings>
</appSettings>
<log4net>
<!--错误日志类-->
<logger name="logerror">
<!--日志类的名字-->
<level value="ALL" />
<!--定义记录的日志级别-->
<appender-ref ref="ErrorAppender" />
<!--记录到哪个介质中去-->
</logger>
<!--信息日志类-->
<logger name="loginfo">
<level value="ALL" />
<appender-ref ref="InfoAppender" />
</logger>
<!--错误日志附加介质-->
<appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
<!-- name属性指定其名称,type则是log4net.Appender命名空间的一个类的名称,意思是,指定使用哪种介质-->
<param name="File" value="Log\\LogError\\" />
<!--日志输出到exe程序这个相对目录下-->
<param name="AppendToFile" value="true" />
<!--输出的日志不会覆盖以前的信息-->
<param name="MaxSizeRollBackups" value="100" />
<!--备份文件的个数-->
<param name="MaxFileSize" value="10240" />
<!--当个日志文件的最大大小-->
<param name="StaticLogFileName" value="false" />
<!--是否使用静态文件名-->
<param name="DatePattern" value="yyyyMMdd&quot;.htm&quot;" />
<!--日志文件名-->
<param name="RollingStyle" value="Date" />
<!--文件创建的方式这里是以Date方式创建-->
<!--错误日志布局-->
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="&lt;HR COLOR=red&gt;%n异常时间%d [%t] &lt;BR&gt;%n异常级别%-5p &lt;BR&gt;%n异 常 类:%c [%x] &lt;BR&gt;%n%m &lt;BR&gt;%n &lt;HR Size=1&gt;" />
</layout>
</appender>
<!--信息日志附加介质-->
<appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="Log\\LogInfo\\" />
<param name="AppendToFile" value="true" />
<param name="MaxFileSize" value="10240" />
<param name="MaxSizeRollBackups" value="100" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyyMMdd&quot;.htm&quot;" />
<param name="RollingStyle" value="Date" />
<!--信息日志布局-->
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="&lt;HR COLOR=blue&gt;%n日志时间%d [%t] &lt;BR&gt;%n日志级别%-5p &lt;BR&gt;%n日 志 类:%c [%x] &lt;BR&gt;%n%m &lt;BR&gt;%n &lt;HR Size=1&gt;" />
</layout>
</appender>
</log4net>
</configuration>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
</configSections>
<appSettings>
</appSettings>
<log4net>
<!--错误日志类-->
<logger name="logerror">
<!--日志类的名字-->
<level value="ALL" />
<!--定义记录的日志级别-->
<appender-ref ref="ErrorAppender" />
<!--记录到哪个介质中去-->
</logger>
<!--信息日志类-->
<logger name="loginfo">
<level value="ALL" />
<appender-ref ref="InfoAppender" />
</logger>
<!--错误日志附加介质-->
<appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
<!-- name属性指定其名称,type则是log4net.Appender命名空间的一个类的名称,意思是,指定使用哪种介质-->
<param name="File" value="Log\\LogError\\" />
<!--日志输出到exe程序这个相对目录下-->
<param name="AppendToFile" value="true" />
<!--输出的日志不会覆盖以前的信息-->
<param name="MaxSizeRollBackups" value="100" />
<!--备份文件的个数-->
<param name="MaxFileSize" value="10240" />
<!--当个日志文件的最大大小-->
<param name="StaticLogFileName" value="false" />
<!--是否使用静态文件名-->
<param name="DatePattern" value="yyyyMMdd&quot;.htm&quot;" />
<!--日志文件名-->
<param name="RollingStyle" value="Date" />
<!--文件创建的方式这里是以Date方式创建-->
<!--错误日志布局-->
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="&lt;HR COLOR=red&gt;%n异常时间%d [%t] &lt;BR&gt;%n异常级别%-5p &lt;BR&gt;%n异 常 类:%c [%x] &lt;BR&gt;%n%m &lt;BR&gt;%n &lt;HR Size=1&gt;" />
</layout>
</appender>
<!--信息日志附加介质-->
<appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="Log\\LogInfo\\" />
<param name="AppendToFile" value="true" />
<param name="MaxFileSize" value="10240" />
<param name="MaxSizeRollBackups" value="100" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyyMMdd&quot;.htm&quot;" />
<param name="RollingStyle" value="Date" />
<!--信息日志布局-->
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="&lt;HR COLOR=blue&gt;%n日志时间%d [%t] &lt;BR&gt;%n日志级别%-5p &lt;BR&gt;%n日 志 类:%c [%x] &lt;BR&gt;%n%m &lt;BR&gt;%n &lt;HR Size=1&gt;" />
</layout>
</appender>
</log4net>
</configuration>

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")]

@ -0,0 +1,49 @@
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\log4net.config
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\IOT.Show.Common.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\IOT.Show.Common.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\log4net.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\log4net.xml
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CoreCompileInputs.cache
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CopyComplete
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\log4net.config
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\IOT.Show.Common.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\IOT.Show.Common.pdb
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\log4net.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\bin\Debug\log4net.xml
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.AssemblyReference.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CoreCompileInputs.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CopyComplete
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Common\obj\Debug\IOT.Show.Common.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\bin\Debug\log4net.config
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\bin\Debug\IOT.Show.Common.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\bin\Debug\IOT.Show.Common.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\bin\Debug\log4net.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\bin\Debug\log4net.xml
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.AssemblyReference.cache
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CoreCompileInputs.cache
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CopyComplete
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\obj\Debug\IOT.Show.Common.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Common\obj\Debug\IOT.Show.Common.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\bin\Debug\log4net.config
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\bin\Debug\IOT.Show.Common.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\bin\Debug\IOT.Show.Common.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\bin\Debug\log4net.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\bin\Debug\log4net.xml
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.AssemblyReference.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CoreCompileInputs.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CopyComplete
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\obj\Debug\IOT.Show.Common.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Common\obj\Debug\IOT.Show.Common.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\bin\Debug\log4net.config
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\bin\Debug\IOT.Show.Common.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\bin\Debug\IOT.Show.Common.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\bin\Debug\log4net.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\bin\Debug\log4net.xml
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.AssemblyReference.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CoreCompileInputs.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\obj\Debug\IOT.Show.Common.csproj.CopyComplete
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\obj\Debug\IOT.Show.Common.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Common\obj\Debug\IOT.Show.Common.pdb

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net452" />
</packages>

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A7771759-B42D-492E-9D83-9C84850B00FB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IOT.Show.Model</RootNamespace>
<AssemblyName>IOT.Show.Model</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="T_Led_Data.cs" />
<Compile Include="T_Led_Info.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("IOT.Show.Model")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("IOT.Show.Model")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("a7771759-b42d-492e-9d83-9c84850b00fb")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IOT.Show.Model
{
public class T_Led_Data
{
/// <summary>
/// 测控点名称
/// </summary>
public string monitorName { get; set; }
/// <summary>
/// 显示标题
/// </summary>
public string title { get; set; }
/// <summary>
/// Ip地址
/// </summary>
public string ip { get; set; }
/// <summary>
/// 温度
/// </summary>
public string tempreture { get; set; }
/// <summary>
/// 湿度
/// </summary>
public string humidity { get; set; }
/// <summary>
/// 照度
/// </summary>
public string illuminance { get; set; }
/// <summary>
/// 采集时间
/// </summary>
public string collectTime { get; set; }
}
}

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IOT.Show.Model
{
public class T_Led_Info
{
/// <summary>
/// 标题
/// </summary>
public string title { get; set; }
/// <summary>
/// 集中器编号
/// </summary>
public string collectDeviceId { get; set; }
/// <summary>
/// ip地址
/// </summary>
public string ip { get; set; }
/// <summary>
/// 字体
/// </summary>
public string font { get; set; }
/// <summary>
/// 集中器标识
/// </summary>
public int collectFlag { get; set; }
}
}

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")]

@ -0,0 +1,29 @@
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Model\bin\Debug\IOT.Show.Model.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Model\bin\Debug\IOT.Show.Model.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Model\obj\Debug\IOT.Show.Model.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Model\obj\Debug\IOT.Show.Model.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.CoreCompileInputs.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Model\bin\Debug\IOT.Show.Model.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Model\bin\Debug\IOT.Show.Model.pdb
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.AssemblyReference.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.CoreCompileInputs.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Model\obj\Debug\IOT.Show.Model.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Model\obj\Debug\IOT.Show.Model.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Model\bin\Debug\IOT.Show.Model.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Model\bin\Debug\IOT.Show.Model.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.AssemblyReference.cache
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.CoreCompileInputs.cache
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Model\obj\Debug\IOT.Show.Model.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Model\obj\Debug\IOT.Show.Model.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Model\bin\Debug\IOT.Show.Model.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Model\bin\Debug\IOT.Show.Model.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.AssemblyReference.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.CoreCompileInputs.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Model\obj\Debug\IOT.Show.Model.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Model\obj\Debug\IOT.Show.Model.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Model\bin\Debug\IOT.Show.Model.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Model\bin\Debug\IOT.Show.Model.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.AssemblyReference.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Model\obj\Debug\IOT.Show.Model.csproj.CoreCompileInputs.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Model\obj\Debug\IOT.Show.Model.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Model\obj\Debug\IOT.Show.Model.pdb

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IOT.Show.Service
{
public class Class1
{
}
}

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>477af2f0-1168-4041-92c7-093279a8c9a5</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IOT.Show.Service</RootNamespace>
<AssemblyName>IOT.Show.Service</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="System.Xml.Linq"/>
<Reference Include="System.Data.DataSetExtensions"/>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="System.Data"/>
<Reference Include="System.Net.Http"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("IOT.Show.Service")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("IOT.Show.Service")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("477af2f0-1168-4041-92c7-093279a8c9a5")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")]

@ -0,0 +1,29 @@
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Service\bin\Debug\IOT.Show.Service.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Service\bin\Debug\IOT.Show.Service.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Service\obj\Debug\IOT.Show.Service.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Service\obj\Debug\IOT.Show.Service.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.CoreCompileInputs.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Service\bin\Debug\IOT.Show.Service.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Service\bin\Debug\IOT.Show.Service.pdb
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.AssemblyReference.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.CoreCompileInputs.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Service\obj\Debug\IOT.Show.Service.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.Service\obj\Debug\IOT.Show.Service.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Service\bin\Debug\IOT.Show.Service.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Service\bin\Debug\IOT.Show.Service.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.AssemblyReference.cache
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.CoreCompileInputs.cache
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Service\obj\Debug\IOT.Show.Service.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.Service\obj\Debug\IOT.Show.Service.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Service\bin\Debug\IOT.Show.Service.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Service\bin\Debug\IOT.Show.Service.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.AssemblyReference.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.CoreCompileInputs.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Service\obj\Debug\IOT.Show.Service.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.Service\obj\Debug\IOT.Show.Service.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Service\bin\Debug\IOT.Show.Service.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Service\bin\Debug\IOT.Show.Service.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.AssemblyReference.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Service\obj\Debug\IOT.Show.Service.csproj.CoreCompileInputs.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Service\obj\Debug\IOT.Show.Service.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.Service\obj\Debug\IOT.Show.Service.pdb

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{842508E0-3B86-4FD0-8B81-062A4F4E30E1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IOT.Show.SqlBase</RootNamespace>
<AssemblyName>IOT.Show.SqlBase</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="SqlSugar, Version=5.0.1.3, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\sqlSugar.5.0.1.3\lib\SqlSugar.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="SqlSugarBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IOT.Show.Common\IOT.Show.Common.csproj">
<Project>{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}</Project>
<Name>IOT.Show.Common</Name>
</ProjectReference>
<ProjectReference Include="..\IOT.Show.Model\IOT.Show.Model.csproj">
<Project>{A7771759-B42D-492E-9D83-9C84850B00FB}</Project>
<Name>IOT.Show.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("IOT.Show.SqlBase")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("IOT.Show.SqlBase")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("842508e0-3b86-4fd0-8b81-062a4f4e30e1")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,125 @@
using IOT.Show.Common;
using IOT.Show.Model;
using SqlSugar;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
namespace IOT.Show.SqlBase
{
public class SqlSugarBase
{
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
{
ConnectionString = "server=10.113.254.16;uid=sa;pwd=klltdb@3391123;database=XJEMSRefactor",
DbType = SqlSugar.DbType.SqlServer,
IsAutoCloseConnection = true,
InitKeyType = InitKeyType.Attribute
});
public List<T_Led_Info> getLedInfo(string titleName)
{
try
{
var sqlStr = "select * from T_Led_Info where ledId = @titleName";
var info = db.Ado.SqlQuery<T_Led_Info>(sqlStr,
new List<SugarParameter>(){
new SugarParameter("@titleName",titleName), //执行sql语句
});
return info;
}
catch (Exception ex)
{
LogHelper.Error("获取Led信息失败",ex);
return null;
}
}
public DataTable getLedData(string titleName)
{
try
{
var sqlStr = "select monitorName,\r\n ip,\r\n title,\r\n max(t.进水温度) as tempreture,\r\n MAX(t.出水温度) as humidity,\r\n (MAX(t.出水温度) - MAX(t.进水温度)) illuminance\r\nfrom (select Left(a.monitorName, len(a.monitorName) - 4) as monitorName,\r\n Right(a.monitorName, 4) as monitorType,\r\n a.ip,\r\n a.title,\r\n b.tempreture,\r\n a.monitorOrder\r\n from (\r\n select t1.title,\r\n t2.ledId,\r\n t1.ip,\r\n t2.monitorId,\r\n t2.monitorOrder,\r\n t3.monitorName,\r\n MAX(t4.collectTime) as collectTime\r\n from T_Led_Info t1\r\n left join T_Led_MonitorUnit t2 on t1.ledId = t2.ledId\r\n left join T_Monitor t3 on t2.monitorId = t3.monitorId\r\n left join T_W_TempertureData t4 on t4.monitorId = t3.monitorId\r\n where t1.title = @titleName \r\n group by t1.title, t2.ledId, t1.ip, t2.monitorId, t3.monitorName, t2.monitorOrder\r\n ) as a\r\n left join T_W_TempertureData b on b.collectTime = a.collectTime and a.monitorId = b.monitorId) as s1\r\n pivot (max(tempreture) for monitorType in (进水温度,出水温度)) t\r\ngroup by monitorName, ip, title, monitorOrder\r\norder by monitorOrder";
//LogHelper.Info("语句:"+sqlStr);
var info = db.Ado.SqlQuery<T_Led_Data>(sqlStr,
new List<SugarParameter>(){
new SugarParameter("@titleName",titleName), //执行sql语句
});
var result = ListToTable(info);
return result;
}
catch (Exception ex)
{
LogHelper.Error("获取Led数据失败",ex);
return null;
}
}
public DataTable ListToTable(IList info)
{
try
{
DataTable dt = new DataTable();
if (info.Count > 0)
{
PropertyInfo[] propertys = info[0].GetType().GetProperties();
foreach (PropertyInfo pi in propertys)
{
dt.Columns.Add(pi.Name);
}
foreach (object t in info)
{
ArrayList tempList = new ArrayList();
foreach (PropertyInfo pi in propertys)
{
object obj = pi.GetValue(t, null);
tempList.Add(obj);
}
object[] array = tempList.ToArray();
dt.LoadDataRow(array, true);
}
}
return dt;
}
catch (Exception ex)
{
Console.WriteLine($"list转为DataTable异常{ex.Message}");
return null;
}
}
public List<T> ConvertDataTableToList<T>(DataTable dataTable) where T : new()
{
List<T> list = new List<T>();
foreach (DataRow row in dataTable.Rows)
{
T obj = new T();
foreach (PropertyInfo propertyInfo in obj.GetType().GetProperties())
{
if (dataTable.Columns.Contains(propertyInfo.Name))
{
if (row[propertyInfo.Name] != DBNull.Value)
{
propertyInfo.SetValue(obj, row[propertyInfo.Name], null);
}
}
}
list.Add(obj);
}
return list;
}
}
}

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
</configSections>
<appSettings>
</appSettings>
<log4net>
<!--错误日志类-->
<logger name="logerror">
<!--日志类的名字-->
<level value="ALL" />
<!--定义记录的日志级别-->
<appender-ref ref="ErrorAppender" />
<!--记录到哪个介质中去-->
</logger>
<!--信息日志类-->
<logger name="loginfo">
<level value="ALL" />
<appender-ref ref="InfoAppender" />
</logger>
<!--错误日志附加介质-->
<appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
<!-- name属性指定其名称,type则是log4net.Appender命名空间的一个类的名称,意思是,指定使用哪种介质-->
<param name="File" value="Log\\LogError\\" />
<!--日志输出到exe程序这个相对目录下-->
<param name="AppendToFile" value="true" />
<!--输出的日志不会覆盖以前的信息-->
<param name="MaxSizeRollBackups" value="100" />
<!--备份文件的个数-->
<param name="MaxFileSize" value="10240" />
<!--当个日志文件的最大大小-->
<param name="StaticLogFileName" value="false" />
<!--是否使用静态文件名-->
<param name="DatePattern" value="yyyyMMdd&quot;.htm&quot;" />
<!--日志文件名-->
<param name="RollingStyle" value="Date" />
<!--文件创建的方式这里是以Date方式创建-->
<!--错误日志布局-->
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="&lt;HR COLOR=red&gt;%n异常时间%d [%t] &lt;BR&gt;%n异常级别%-5p &lt;BR&gt;%n异 常 类:%c [%x] &lt;BR&gt;%n%m &lt;BR&gt;%n &lt;HR Size=1&gt;" />
</layout>
</appender>
<!--信息日志附加介质-->
<appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="Log\\LogInfo\\" />
<param name="AppendToFile" value="true" />
<param name="MaxFileSize" value="10240" />
<param name="MaxSizeRollBackups" value="100" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyyMMdd&quot;.htm&quot;" />
<param name="RollingStyle" value="Date" />
<!--信息日志布局-->
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="&lt;HR COLOR=blue&gt;%n日志时间%d [%t] &lt;BR&gt;%n日志级别%-5p &lt;BR&gt;%n日 志 类:%c [%x] &lt;BR&gt;%n%m &lt;BR&gt;%n &lt;HR Size=1&gt;" />
</layout>
</appender>
</log4net>
</configuration>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")]

@ -0,0 +1,77 @@
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\log4net.config
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\SqlSugar.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\log4net.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\Newtonsoft.Json.dll
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.pdb
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\log4net.xml
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csprojAssemblyReference.cache
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CoreCompileInputs.cache
E:\桌面\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CopyComplete
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\log4net.config
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.pdb
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\SqlSugar.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\log4net.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\Newtonsoft.Json.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.pdb
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.pdb
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\bin\Debug\log4net.xml
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.AssemblyReference.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CoreCompileInputs.cache
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CopyComplete
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.dll
E:\项目源码\新昆能源管理项目\MES数据抽取服务\LED物联网展示平台\IOT.Show\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\log4net.config
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\SqlSugar.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\log4net.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.pdb
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\bin\Debug\log4net.xml
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.AssemblyReference.cache
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CoreCompileInputs.cache
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CopyComplete
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.dll
\\Mac\Home\Desktop\项目文件\LED物联网展示平台\IOT.Show.Old\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\log4net.config
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\SqlSugar.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\log4net.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\bin\Debug\log4net.xml
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.AssemblyReference.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CoreCompileInputs.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CopyComplete
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\物联网LED - 副本\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\log4net.config
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\IOT.Show.SqlBase.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\SqlSugar.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\log4net.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\IOT.Show.Common.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\IOT.Show.Model.pdb
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\bin\Debug\log4net.xml
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.AssemblyReference.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CoreCompileInputs.cache
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.csproj.CopyComplete
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.dll
\\Mac\iCloud\项目资料\LED物联网展示平台\密炼LED\IOT.Show.SqlBase\obj\Debug\IOT.Show.SqlBase.pdb

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="sqlSugar" version="5.0.1.3" targetFramework="net452" />
</packages>

@ -0,0 +1,71 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOT.Show", "IOT.Show\IOT.Show.csproj", "{EEFC6297-60B6-4DA8-A55D-5254DE97A201}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOT.Show.Model", "IOT.Show.Model\IOT.Show.Model.csproj", "{A7771759-B42D-492E-9D83-9C84850B00FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOT.Show.SqlBase", "IOT.Show.SqlBase\IOT.Show.SqlBase.csproj", "{842508E0-3B86-4FD0-8B81-062A4F4E30E1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOT.Show.Service", "IOT.Show.Service\IOT.Show.Service.csproj", "{477AF2F0-1168-4041-92C7-093279A8C9A5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOT.Show.Common", "IOT.Show.Common\IOT.Show.Common.csproj", "{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EEFC6297-60B6-4DA8-A55D-5254DE97A201}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEFC6297-60B6-4DA8-A55D-5254DE97A201}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEFC6297-60B6-4DA8-A55D-5254DE97A201}.Debug|x86.ActiveCfg = Debug|x86
{EEFC6297-60B6-4DA8-A55D-5254DE97A201}.Debug|x86.Build.0 = Debug|x86
{EEFC6297-60B6-4DA8-A55D-5254DE97A201}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEFC6297-60B6-4DA8-A55D-5254DE97A201}.Release|Any CPU.Build.0 = Release|Any CPU
{EEFC6297-60B6-4DA8-A55D-5254DE97A201}.Release|x86.ActiveCfg = Release|x86
{EEFC6297-60B6-4DA8-A55D-5254DE97A201}.Release|x86.Build.0 = Release|x86
{A7771759-B42D-492E-9D83-9C84850B00FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7771759-B42D-492E-9D83-9C84850B00FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7771759-B42D-492E-9D83-9C84850B00FB}.Debug|x86.ActiveCfg = Debug|Any CPU
{A7771759-B42D-492E-9D83-9C84850B00FB}.Debug|x86.Build.0 = Debug|Any CPU
{A7771759-B42D-492E-9D83-9C84850B00FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7771759-B42D-492E-9D83-9C84850B00FB}.Release|Any CPU.Build.0 = Release|Any CPU
{A7771759-B42D-492E-9D83-9C84850B00FB}.Release|x86.ActiveCfg = Release|Any CPU
{A7771759-B42D-492E-9D83-9C84850B00FB}.Release|x86.Build.0 = Release|Any CPU
{842508E0-3B86-4FD0-8B81-062A4F4E30E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{842508E0-3B86-4FD0-8B81-062A4F4E30E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{842508E0-3B86-4FD0-8B81-062A4F4E30E1}.Debug|x86.ActiveCfg = Debug|Any CPU
{842508E0-3B86-4FD0-8B81-062A4F4E30E1}.Debug|x86.Build.0 = Debug|Any CPU
{842508E0-3B86-4FD0-8B81-062A4F4E30E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{842508E0-3B86-4FD0-8B81-062A4F4E30E1}.Release|Any CPU.Build.0 = Release|Any CPU
{842508E0-3B86-4FD0-8B81-062A4F4E30E1}.Release|x86.ActiveCfg = Release|Any CPU
{842508E0-3B86-4FD0-8B81-062A4F4E30E1}.Release|x86.Build.0 = Release|Any CPU
{477AF2F0-1168-4041-92C7-093279A8C9A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{477AF2F0-1168-4041-92C7-093279A8C9A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{477AF2F0-1168-4041-92C7-093279A8C9A5}.Debug|x86.ActiveCfg = Debug|Any CPU
{477AF2F0-1168-4041-92C7-093279A8C9A5}.Debug|x86.Build.0 = Debug|Any CPU
{477AF2F0-1168-4041-92C7-093279A8C9A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{477AF2F0-1168-4041-92C7-093279A8C9A5}.Release|Any CPU.Build.0 = Release|Any CPU
{477AF2F0-1168-4041-92C7-093279A8C9A5}.Release|x86.ActiveCfg = Release|Any CPU
{477AF2F0-1168-4041-92C7-093279A8C9A5}.Release|x86.Build.0 = Release|Any CPU
{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}.Debug|x86.ActiveCfg = Debug|Any CPU
{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}.Debug|x86.Build.0 = Debug|Any CPU
{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}.Release|Any CPU.Build.0 = Release|Any CPU
{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}.Release|x86.ActiveCfg = Release|Any CPU
{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BFBDE088-5FAB-4C0A-A580-CA87971FB1EA}
EndGlobalSection
EndGlobal

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EEFC6297-60B6-4DA8-A55D-5254DE97A201}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>IOT.Show</RootNamespace>
<AssemblyName>IOT.Show</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="LedEQSdk.cs" />
<Compile Include="LedServer.cs" />
<Compile Include="ProjectInstaller.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ProjectInstaller.Designer.cs">
<DependentUpon>ProjectInstaller.cs</DependentUpon>
</Compile>
<Compile Include="Service1.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Service1.Designer.cs">
<DependentUpon>Service1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IOT.Show.Common\IOT.Show.Common.csproj">
<Project>{0F25A8D9-3818-47B6-86BE-18B53ABD51A1}</Project>
<Name>IOT.Show.Common</Name>
</ProjectReference>
<ProjectReference Include="..\IOT.Show.Model\IOT.Show.Model.csproj">
<Project>{A7771759-B42D-492E-9D83-9C84850B00FB}</Project>
<Name>IOT.Show.Model</Name>
</ProjectReference>
<ProjectReference Include="..\IOT.Show.SqlBase\IOT.Show.SqlBase.csproj">
<Project>{842508E0-3B86-4FD0-8B81-062A4F4E30E1}</Project>
<Name>IOT.Show.SqlBase</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Library\bx_sdk_dual.dll" />
<Content Include="Library\cairo-1.14.6.dll" />
<Content Include="Library\freetype265.dll" />
<Content Include="Library\libpng16.dll" />
<Content Include="Library\pixman-0.34.0.dll" />
<Content Include="Library\zlibwapi.dll" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ProjectInstaller.resx">
<DependentUpon>ProjectInstaller.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,234 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using LedSDKDemo_CSharp;
using System.Threading;
using IOT.Show.SqlBase;
using IOT.Show.Common;
using IOT.Show.Model;
namespace IOT.Show
{
/// <summary>
/// led服务操作
/// </summary>
public class LedServer
{
private static SqlSugarBase dbSql = new SqlSugarBase();
public static void init(string title)
{
while (true)
{
try
{
List<T_Led_Info> ledInfo = dbSql.getLedInfo(title);
DataTable dt = dbSql.getLedData(title);
List<T_Led_Data> _Datas = dbSql.ConvertDataTableToList<T_Led_Data>(dt);
DataTable dataTable = dbSql.ListToTable(_Datas);
if (dataTable != null)
{
T_Led_Info item = ledInfo.Where(x => x.title == title).FirstOrDefault();
if (item != null)
{
LogHelper.Info($"{title}冷却循环水温度");
byte[] ip = Encoding.GetEncoding("GBK").GetBytes(item.ip);
bx_sdk_dual2.InitSdk();//初始化
bool result = dynamicArea_6(ip, item.title, item.font, item.ip, dataTable);
if (result)
{
LogHelper.Info(item.title + "Led刷新成功,地址为:" + item.ip);
}
bx_sdk_dual2.ReleaseSdk();
}
else
{
Console.WriteLine("item == null");
}
}
else
{
Console.WriteLine("DataTable为空");
}
System.Threading.Thread.Sleep(1000 * 1);
}
catch (Exception ex)
{
LogHelper.Error("init异常", ex);
}
}
}
/// <summary>
/// 动态区域更新
/// </summary>
/// <param name="ip"></param>
/// <param name="title"></param>
/// <returns></returns>
public static bool dynamicArea_6(byte[] ip, string title, string fonts, string ipStr, DataTable dataTable)
{
bool result = false;
if (dataTable == null)
{
return false;
}
try
{
StringBuilder text = new StringBuilder();
int intPadRight = 1;
int fontSize = 10;
byte[] font = Encoding.Default.GetBytes(fonts);
//DataTable dataTable = dbSql.getLedData(title);
int rows = dataTable.Rows.Count;
text.Append(" " + title + "冷却循环水温度 \n");
text.Append("位置 " + " 进水温度 " + " 出水温度 " + " 温差 \n");
for (int i = 0; i < rows; i++)
{
if (dataTable.Rows[i]["monitorName"].ToString().Contains("-"))
{
dataTable.Rows[i]["monitorName"] = dataTable.Rows[i]["monitorName"].ToString().Substring(4, dataTable.Rows[i]["monitorName"].ToString().Length - 4);
}
else
{
dataTable.Rows[i]["monitorName"] = dataTable.Rows[i]["monitorName"].ToString().Substring(3, dataTable.Rows[i]["monitorName"].ToString().Length - 3);
}
if (dataTable.Rows[i]["monitorName"].ToString().Length == 3)
{
dataTable.Rows[i]["monitorName"] = dataTable.Rows[i]["monitorName"].ToString() + " ";
}
if (Convert.ToDecimal(dataTable.Rows[i]["tempreture"]) < 1)
{
text.Append((dataTable.Rows[i]["monitorName"].ToString().PadRight(dataTable.Rows[0]["monitorName"].ToString().Length, ' ') + " " + "00.00").PadRight(intPadRight + 3, ' ') + "℃ ");
}
else
{
text.Append((dataTable.Rows[i]["monitorName"].ToString().PadRight(dataTable.Rows[0]["monitorName"].ToString().Length, ' ') + " " + dataTable.Rows[i]["tempreture"]).PadRight(intPadRight + 3, ' ') + "℃ ");
}
if (Convert.ToDecimal(dataTable.Rows[i]["humidity"].ToString()) < 1)
{
text.Append(("00.00").PadRight(intPadRight + 3, ' ') + "℃");
}
else
{
text.Append((dataTable.Rows[i]["humidity"].ToString()).PadRight(intPadRight + 3, ' ') + "℃");
}
text.Append(" ");
if (dataTable.Rows[i]["illuminance"].ToString() == "")
{
text.Append(("00.00").PadRight(intPadRight + 3, ' ') + "℃");
}
else
{
text.Append((dataTable.Rows[i]["illuminance"].ToString()).PadRight(intPadRight + 3, ' ') + "℃");
}
text.Append("\n");
if (i + 1 == 5 || i + 1 == 10 || i + 1 == 15 || i + 1 == 20)
{
test(text, ip, font, fontSize);
Thread.Sleep(1000 * 6);
text = new StringBuilder();
text.Append(" " + title + "冷却循环水温度 \n");
text.Append("位置 " + " 进水温度 " + " 出水温度 " + " 温差 \n");
}
else if (i == rows - 1)
{
test(text, ip, font, fontSize);
Thread.Sleep(1000 * 6);
text = new StringBuilder();
text.Append(" " + title + "冷却循环水温度 \n");
text.Append("位置 " + "进水温度 " + " 出水温度 " + " 温差 \n");
}
}
return true;
}
catch (Exception ex)
{
LogHelper.Error("dynamicArea_6程序异常" + ex.Message);
return result;
}
}
private static void test(StringBuilder text, byte[] ip, byte[] font, int fontSize)
{
string textT = text.ToString().Substring(0, text.ToString().Length - 1) + '\0';
Console.WriteLine(textT);
bx_sdk_dual2.EQareaHeader_G6 aheader;
aheader.AreaType = 0x10;
aheader.AreaX = 0;
aheader.AreaY = 0;
aheader.AreaWidth = 256;
aheader.AreaHeight = 96;
aheader.BackGroundFlag = 0x00;
aheader.Transparency = 101;
aheader.AreaEqual = 0x00;
bx_sdk_dual2.EQSound_6G stSoundData = new bx_sdk_dual2.EQSound_6G();
byte[] strSoundTxt = Encoding.GetEncoding("GB2312").GetBytes("插入ab34测试语音");
stSoundData.SoundFlag = 0x00;
stSoundData.SoundPerson = 0x01;
stSoundData.SoundVolum = 6;
stSoundData.SoundSpeed = 0x2;
stSoundData.SoundDataMode = 0x00;
stSoundData.SoundReplayTimes = 0x01;
stSoundData.SoundReplayDelay = 200;
stSoundData.SoundReservedParaLen = 0x03;
stSoundData.Soundnumdeal = 0x00;
stSoundData.Soundlanguages = 0x00;
stSoundData.Soundwordstyle = 0x00;
stSoundData.SoundDataLen = strSoundTxt.Length;
stSoundData.SoundData = TypeCast.BytesToIntptr(strSoundTxt);
aheader.stSoundData = stSoundData;
bx_sdk_dual2.EQpageHeader_G6 pheader;
pheader.PageStyle = 0x00;
pheader.DisplayMode = 1;
pheader.ClearMode = 0x00;
pheader.Speed = 15;
pheader.StayTime = 500;
pheader.RepeatTime = 1;
pheader.ValidLen = 0;
pheader.CartoonFrameRate = 0x00;
pheader.BackNotValidFlag = 0x00;
pheader.arrMode = bx_sdk_dual2.E_arrMode.eMULTILINE;
pheader.fontSize = Convert.ToUInt16(fontSize);
pheader.color = (uint)0x01;
pheader.fontBold = 0;
pheader.fontItalic = 0;
pheader.tdirection = bx_sdk_dual2.E_txtDirection.pNORMAL;
pheader.txtSpace = 0;
pheader.Valign = 1;
pheader.Halign = 2;
IntPtr aa1 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(bx_sdk_dual2.EQareaHeader_G6)));
Marshal.StructureToPtr(aheader, aa1, false);
IntPtr bb1 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(bx_sdk_dual2.EQpageHeader_G6)));
Marshal.StructureToPtr(pheader, bb1, false);
//LogHelper.Info("LED数据上传地址" + System.Text.Encoding.UTF8.GetString(ip)+ ":5005");
//更新动态区,可设置属性 zc
int info = bx_sdk_dual2.dynamicArea_AddAreaTxtDetails_6G(ip, 5005, bx_sdk_dual2.E_ScreenColor_G56.eSCREEN_COLOR_SINGLE, 0,
ref aheader, ref pheader, font, Encoding.Default.GetBytes(textT));
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,42 @@
using IOT.Show.Common;
using IOT.Show.SqlBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace IOT.Show
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
static void Main()
{
try
{
//调试
Thread thread1 = new Thread(() => LedServer.init("ML5"));
thread1.Start();
Thread thread2 = new Thread(() => LedServer.init("ML6"));
thread2.Start();
Thread thread3 = new Thread(() => LedServer.init("ML7"));
thread3.Start();
Thread thread4 = new Thread(() => LedServer.init("ML8"));
thread4.Start();
Console.ReadLine();
}catch (Exception ex)
{
LogHelper.Error("初始化异常", ex);
}
}
}
}

@ -0,0 +1,57 @@
namespace IOT.Show
{
partial class ProjectInstaller
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
//
// serviceProcessInstaller1
//
this.serviceProcessInstaller1.Password = null;
this.serviceProcessInstaller1.Username = null;
//
// serviceInstaller1
//
this.serviceInstaller1.Description = "LED展示服务";
this.serviceInstaller1.ServiceName = "LedService";
//
// ProjectInstaller
//
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.serviceProcessInstaller1,
this.serviceInstaller1});
}
#endregion
private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
private System.ServiceProcess.ServiceInstaller serviceInstaller1;
}
}

@ -0,0 +1,19 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.Threading.Tasks;
namespace IOT.Show
{
[RunInstaller(true)]
public partial class ProjectInstaller : System.Configuration.Install.Installer
{
public ProjectInstaller()
{
InitializeComponent();
}
}
}

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="serviceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="serviceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>351, 17</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save