diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9491a2f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,363 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Oo]ut/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
\ No newline at end of file
diff --git a/.vs/HighWayIot/FileContentIndex/385c3240-71ac-4406-af34-68c5bb662f46.vsidx b/.vs/HighWayIot/FileContentIndex/385c3240-71ac-4406-af34-68c5bb662f46.vsidx
deleted file mode 100644
index b055a04..0000000
Binary files a/.vs/HighWayIot/FileContentIndex/385c3240-71ac-4406-af34-68c5bb662f46.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/3972acf2-f5e7-47b5-804b-5415f0061637.vsidx b/.vs/HighWayIot/FileContentIndex/3972acf2-f5e7-47b5-804b-5415f0061637.vsidx
deleted file mode 100644
index 5ac28fe..0000000
Binary files a/.vs/HighWayIot/FileContentIndex/3972acf2-f5e7-47b5-804b-5415f0061637.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/d806920b-18e9-4611-be65-a910d9e25af5.vsidx b/.vs/HighWayIot/FileContentIndex/d806920b-18e9-4611-be65-a910d9e25af5.vsidx
deleted file mode 100644
index ef40496..0000000
Binary files a/.vs/HighWayIot/FileContentIndex/d806920b-18e9-4611-be65-a910d9e25af5.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/d84a5793-3d28-457b-8232-8a0733edd408.vsidx b/.vs/HighWayIot/FileContentIndex/d84a5793-3d28-457b-8232-8a0733edd408.vsidx
deleted file mode 100644
index 20a5a59..0000000
Binary files a/.vs/HighWayIot/FileContentIndex/d84a5793-3d28-457b-8232-8a0733edd408.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/read.lock b/.vs/HighWayIot/FileContentIndex/read.lock
deleted file mode 100644
index e69de29..0000000
diff --git a/.vs/HighWayIot/v17/.suo b/.vs/HighWayIot/v17/.suo
index 8a5c1ab..0cea95a 100644
Binary files a/.vs/HighWayIot/v17/.suo and b/.vs/HighWayIot/v17/.suo differ
diff --git a/HighWayIot.Common/bin/Debug/HighWayIot.Common.dll b/HighWayIot.Common/bin/Debug/HighWayIot.Common.dll
index dead5ea..fabf17b 100644
Binary files a/HighWayIot.Common/bin/Debug/HighWayIot.Common.dll and b/HighWayIot.Common/bin/Debug/HighWayIot.Common.dll differ
diff --git a/HighWayIot.Common/bin/Debug/HighWayIot.Common.pdb b/HighWayIot.Common/bin/Debug/HighWayIot.Common.pdb
index 46d305e..b053868 100644
Binary files a/HighWayIot.Common/bin/Debug/HighWayIot.Common.pdb and b/HighWayIot.Common/bin/Debug/HighWayIot.Common.pdb differ
diff --git a/HighWayIot.Common/bin/Debug/HighWayIot.Log4net.dll b/HighWayIot.Common/bin/Debug/HighWayIot.Log4net.dll
index 30bae7e..328334f 100644
Binary files a/HighWayIot.Common/bin/Debug/HighWayIot.Log4net.dll and b/HighWayIot.Common/bin/Debug/HighWayIot.Log4net.dll differ
diff --git a/HighWayIot.Common/bin/Debug/HighWayIot.Log4net.pdb b/HighWayIot.Common/bin/Debug/HighWayIot.Log4net.pdb
index a3ec7c8..a3d99cb 100644
Binary files a/HighWayIot.Common/bin/Debug/HighWayIot.Log4net.pdb and b/HighWayIot.Common/bin/Debug/HighWayIot.Log4net.pdb differ
diff --git a/HighWayIot.Common/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/HighWayIot.Common/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 6da11dd..995b85b 100644
Binary files a/HighWayIot.Common/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/HighWayIot.Common/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache
index 6f15ce9..1e7775a 100644
Binary files a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache and b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.CoreCompileInputs.cache b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.CoreCompileInputs.cache
index 8c7aab6..aa1c6e9 100644
--- a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.CoreCompileInputs.cache
+++ b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-ac0a11ee7fe82dce7ae2872df4df8f2250e5b258
+324ba96749d19733ffc34cda2dc3ceb694edc3e0
diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.FileListAbsolute.txt b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.FileListAbsolute.txt
index e1d4c72..2c672d6 100644
--- a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.FileListAbsolute.txt
+++ b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.FileListAbsolute.txt
@@ -34,3 +34,16 @@ C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Common\obj\Debug\HighWa
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Common\obj\Debug\HighWayIot.Common.csproj.CopyComplete
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Common\obj\Debug\HighWayIot.Common.dll
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Common\obj\Debug\HighWayIot.Common.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Common\bin\Debug\HighWayIot.Common.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Common\bin\Debug\HighWayIot.Common.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Common\bin\Debug\HighWayIot.Log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Common\bin\Debug\Newtonsoft.Json.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Common\bin\Debug\log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Common\bin\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Common\bin\Debug\Newtonsoft.Json.xml
+D:\Code\Work\RFIDAccess\HighWayIot.Common\obj\Debug\HighWayIot.Common.csproj.AssemblyReference.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Common\obj\Debug\HighWayIot.Common.csproj.CoreCompileInputs.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Common\obj\Debug\HighWayIot.Common.csproj.CopyComplete
+D:\Code\Work\RFIDAccess\HighWayIot.Common\obj\Debug\HighWayIot.Common.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Common\obj\Debug\HighWayIot.Common.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Common\bin\Debug\config\log4net.config
diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.dll b/HighWayIot.Common/obj/Debug/HighWayIot.Common.dll
index dead5ea..fabf17b 100644
Binary files a/HighWayIot.Common/obj/Debug/HighWayIot.Common.dll and b/HighWayIot.Common/obj/Debug/HighWayIot.Common.dll differ
diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.pdb b/HighWayIot.Common/obj/Debug/HighWayIot.Common.pdb
index 46d305e..b053868 100644
Binary files a/HighWayIot.Common/obj/Debug/HighWayIot.Common.pdb and b/HighWayIot.Common/obj/Debug/HighWayIot.Common.pdb differ
diff --git a/HighWayIot.Log4net/HighWayIot.Log4net.csproj b/HighWayIot.Log4net/HighWayIot.Log4net.csproj
index 9a4f9a5..c93efb5 100644
--- a/HighWayIot.Log4net/HighWayIot.Log4net.csproj
+++ b/HighWayIot.Log4net/HighWayIot.Log4net.csproj
@@ -49,7 +49,9 @@
-
+
+ Always
+
\ No newline at end of file
diff --git a/HighWayIot.Log4net/LogHelper.cs b/HighWayIot.Log4net/LogHelper.cs
index 971f5f2..efb5e3b 100644
--- a/HighWayIot.Log4net/LogHelper.cs
+++ b/HighWayIot.Log4net/LogHelper.cs
@@ -32,7 +32,7 @@ namespace HighWayIot.Log4net
*
*/
//private readonly string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log4net.config");
- private readonly string fileName = "Z:\\Desktop\\日常代码\\HighWayIot\\HighWayIot.Log4net\\config\\log4net.config";
+ private readonly string fileName = "D:\\Code\\Work\\RFIDAccess\\HighWayIot.Log4net\\config\\log4net.config";
private LogHelper()
{
diff --git a/HighWayIot.Log4net/Properties/AssemblyInfo.cs b/HighWayIot.Log4net/Properties/AssemblyInfo.cs
index 1f83578..2683727 100644
--- a/HighWayIot.Log4net/Properties/AssemblyInfo.cs
+++ b/HighWayIot.Log4net/Properties/AssemblyInfo.cs
@@ -34,3 +34,5 @@ using System.Runtime.InteropServices;
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+
+[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", ConfigFileExtension = "config", Watch = true)]
\ No newline at end of file
diff --git a/HighWayIot.Log4net/bin/Debug/HighWayIot.Log4net.dll b/HighWayIot.Log4net/bin/Debug/HighWayIot.Log4net.dll
index 30bae7e..328334f 100644
Binary files a/HighWayIot.Log4net/bin/Debug/HighWayIot.Log4net.dll and b/HighWayIot.Log4net/bin/Debug/HighWayIot.Log4net.dll differ
diff --git a/HighWayIot.Log4net/bin/Debug/HighWayIot.Log4net.pdb b/HighWayIot.Log4net/bin/Debug/HighWayIot.Log4net.pdb
index a3ec7c8..a3d99cb 100644
Binary files a/HighWayIot.Log4net/bin/Debug/HighWayIot.Log4net.pdb and b/HighWayIot.Log4net/bin/Debug/HighWayIot.Log4net.pdb differ
diff --git a/HighWayIot.Log4net/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/HighWayIot.Log4net/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index ccf231d..f76b11e 100644
Binary files a/HighWayIot.Log4net/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/HighWayIot.Log4net/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.AssemblyReference.cache b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.AssemblyReference.cache
index 11724aa..cb76084 100644
Binary files a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.AssemblyReference.cache and b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.CoreCompileInputs.cache b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.CoreCompileInputs.cache
index fb1a9ea..83c82f4 100644
--- a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.CoreCompileInputs.cache
+++ b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-59081c031c66312c4725da63a7bc5bcf0307991e
+eacb03d164c2b5c921167e0c310a2f06da514a19
diff --git a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.FileListAbsolute.txt b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.FileListAbsolute.txt
index f9dab68..3543e59 100644
--- a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.FileListAbsolute.txt
+++ b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.FileListAbsolute.txt
@@ -21,3 +21,12 @@ C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Log4net\obj\Debug\HighW
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Log4net\obj\Debug\HighWayIot.Log4net.csproj.CopyComplete
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Log4net\obj\Debug\HighWayIot.Log4net.dll
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Log4net\obj\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\bin\Debug\HighWayIot.Log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\bin\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\bin\Debug\log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\obj\Debug\HighWayIot.Log4net.csproj.AssemblyReference.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\obj\Debug\HighWayIot.Log4net.csproj.CoreCompileInputs.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\obj\Debug\HighWayIot.Log4net.csproj.CopyComplete
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\obj\Debug\HighWayIot.Log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\obj\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Log4net\bin\Debug\config\log4net.config
diff --git a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.dll b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.dll
index 30bae7e..328334f 100644
Binary files a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.dll and b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.dll differ
diff --git a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.pdb b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.pdb
index a3ec7c8..a3d99cb 100644
Binary files a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.pdb and b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.pdb differ
diff --git a/HighWayIot.Mqtt/bin/Debug/HighWayIot.Mqtt.dll b/HighWayIot.Mqtt/bin/Debug/HighWayIot.Mqtt.dll
index 4c8ddd1..c181d6c 100644
Binary files a/HighWayIot.Mqtt/bin/Debug/HighWayIot.Mqtt.dll and b/HighWayIot.Mqtt/bin/Debug/HighWayIot.Mqtt.dll differ
diff --git a/HighWayIot.Mqtt/bin/Debug/HighWayIot.Mqtt.pdb b/HighWayIot.Mqtt/bin/Debug/HighWayIot.Mqtt.pdb
index ea7823b..394becf 100644
Binary files a/HighWayIot.Mqtt/bin/Debug/HighWayIot.Mqtt.pdb and b/HighWayIot.Mqtt/bin/Debug/HighWayIot.Mqtt.pdb differ
diff --git a/HighWayIot.Mqtt/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/HighWayIot.Mqtt/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 7409024..2c9f168 100644
Binary files a/HighWayIot.Mqtt/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/HighWayIot.Mqtt/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.AssemblyReference.cache b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.AssemblyReference.cache
index e769893..333742b 100644
Binary files a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.AssemblyReference.cache and b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.CoreCompileInputs.cache b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.CoreCompileInputs.cache
index 8d7d550..f92ef0b 100644
--- a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.CoreCompileInputs.cache
+++ b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-e061e4de927ddb3fdef27ae1bced63ffbea99d10
+a71698509dfd9b099ad063a7a5322ca0a030e142
diff --git a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.FileListAbsolute.txt b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.FileListAbsolute.txt
index 4520c8f..794803c 100644
--- a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.FileListAbsolute.txt
+++ b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.FileListAbsolute.txt
@@ -25,3 +25,12 @@ C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Mqtt\obj\Debug\HighWayI
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Mqtt\obj\Debug\HighWayIot.Mqtt.csproj.CopyComplete
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Mqtt\obj\Debug\HighWayIot.Mqtt.dll
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Mqtt\obj\Debug\HighWayIot.Mqtt.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\bin\Debug\HighWayIot.Mqtt.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\bin\Debug\HighWayIot.Mqtt.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\bin\Debug\log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\bin\Debug\MQTTnet.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\obj\Debug\HighWayIot.Mqtt.csproj.AssemblyReference.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\obj\Debug\HighWayIot.Mqtt.csproj.CoreCompileInputs.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\obj\Debug\HighWayIot.Mqtt.csproj.CopyComplete
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\obj\Debug\HighWayIot.Mqtt.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Mqtt\obj\Debug\HighWayIot.Mqtt.pdb
diff --git a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.dll b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.dll
index 4c8ddd1..c181d6c 100644
Binary files a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.dll and b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.dll differ
diff --git a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.pdb b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.pdb
index ea7823b..394becf 100644
Binary files a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.pdb and b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.pdb differ
diff --git a/HighWayIot.Plc/bin/Debug/HighWayIot.Common.dll b/HighWayIot.Plc/bin/Debug/HighWayIot.Common.dll
index dead5ea..fabf17b 100644
Binary files a/HighWayIot.Plc/bin/Debug/HighWayIot.Common.dll and b/HighWayIot.Plc/bin/Debug/HighWayIot.Common.dll differ
diff --git a/HighWayIot.Plc/bin/Debug/HighWayIot.Common.pdb b/HighWayIot.Plc/bin/Debug/HighWayIot.Common.pdb
index 46d305e..b053868 100644
Binary files a/HighWayIot.Plc/bin/Debug/HighWayIot.Common.pdb and b/HighWayIot.Plc/bin/Debug/HighWayIot.Common.pdb differ
diff --git a/HighWayIot.Plc/bin/Debug/HighWayIot.Log4net.dll b/HighWayIot.Plc/bin/Debug/HighWayIot.Log4net.dll
index 30bae7e..738d19e 100644
Binary files a/HighWayIot.Plc/bin/Debug/HighWayIot.Log4net.dll and b/HighWayIot.Plc/bin/Debug/HighWayIot.Log4net.dll differ
diff --git a/HighWayIot.Plc/bin/Debug/HighWayIot.Log4net.pdb b/HighWayIot.Plc/bin/Debug/HighWayIot.Log4net.pdb
index a3ec7c8..6820428 100644
Binary files a/HighWayIot.Plc/bin/Debug/HighWayIot.Log4net.pdb and b/HighWayIot.Plc/bin/Debug/HighWayIot.Log4net.pdb differ
diff --git a/HighWayIot.Plc/bin/Debug/HighWayIot.Plc.dll b/HighWayIot.Plc/bin/Debug/HighWayIot.Plc.dll
index 7c4f0d2..93f4c4a 100644
Binary files a/HighWayIot.Plc/bin/Debug/HighWayIot.Plc.dll and b/HighWayIot.Plc/bin/Debug/HighWayIot.Plc.dll differ
diff --git a/HighWayIot.Plc/bin/Debug/HighWayIot.Plc.pdb b/HighWayIot.Plc/bin/Debug/HighWayIot.Plc.pdb
index 14192d9..4087380 100644
Binary files a/HighWayIot.Plc/bin/Debug/HighWayIot.Plc.pdb and b/HighWayIot.Plc/bin/Debug/HighWayIot.Plc.pdb differ
diff --git a/HighWayIot.Plc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/HighWayIot.Plc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 2be310f..54288a0 100644
Binary files a/HighWayIot.Plc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/HighWayIot.Plc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache
index d9459a0..05c0609 100644
Binary files a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache and b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.CoreCompileInputs.cache b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.CoreCompileInputs.cache
index 4aa2ac6..89fc38f 100644
--- a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.CoreCompileInputs.cache
+++ b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-d3a2b36425c9fe84169998718143e6c3666a447c
+07c2be28b052d8f09a26905b6fecbd5f367329c9
diff --git a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.FileListAbsolute.txt b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.FileListAbsolute.txt
index b7b8933..0162954 100644
--- a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.FileListAbsolute.txt
+++ b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.FileListAbsolute.txt
@@ -43,3 +43,18 @@ C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Plc\obj\Debug\HighWayIo
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Plc\obj\Debug\HighWayIot.Plc.csproj.CopyComplete
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Plc\obj\Debug\HighWayIot.Plc.dll
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Plc\obj\Debug\HighWayIot.Plc.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\HighWayIot.Plc.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\HighWayIot.Plc.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\HighWayIot.Common.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\HighWayIot.Log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\HslCommunication.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\Newtonsoft.Json.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\HighWayIot.Common.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\bin\Debug\Newtonsoft.Json.xml
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\obj\Debug\HighWayIot.Plc.csproj.AssemblyReference.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\obj\Debug\HighWayIot.Plc.csproj.CoreCompileInputs.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\obj\Debug\HighWayIot.Plc.csproj.CopyComplete
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\obj\Debug\HighWayIot.Plc.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Plc\obj\Debug\HighWayIot.Plc.pdb
diff --git a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.dll b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.dll
index 7c4f0d2..93f4c4a 100644
Binary files a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.dll and b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.dll differ
diff --git a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.pdb b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.pdb
index 14192d9..4087380 100644
Binary files a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.pdb and b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.pdb differ
diff --git a/HighWayIot.Repository/HighWayIot.Repository.csproj b/HighWayIot.Repository/HighWayIot.Repository.csproj
index 8943229..6a6bc5a 100644
--- a/HighWayIot.Repository/HighWayIot.Repository.csproj
+++ b/HighWayIot.Repository/HighWayIot.Repository.csproj
@@ -39,8 +39,8 @@
..\HighWayIot.Library\Oracle.ManagedDataAccess.dll
-
- Z:\Desktop\日常代码\HighWayIot\HighWayIot.Library\SqlSugar.dll
+
+ ..\packages\SqlSugar.5.1.4.130\lib\SqlSugar.dll
@@ -59,17 +59,17 @@
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -84,6 +84,7 @@
+
\ No newline at end of file
diff --git a/HighWayIot.Repository/SqlSugarHelper.cs b/HighWayIot.Repository/SqlSugarHelper.cs
index 498c7de..899f7da 100644
--- a/HighWayIot.Repository/SqlSugarHelper.cs
+++ b/HighWayIot.Repository/SqlSugarHelper.cs
@@ -21,30 +21,31 @@ namespace HighWayIot.Repository
* Sqlite:获取debug路径下的数据库文件,不建议直接写死路径
* private static string sqliteConnStr = $"Data Source={Path.GetFullPath("data\\data.db")};Version=3";
*/
- private static string sqliteConnStr = "Data Source=Z:\\Desktop\\日常代码\\HighWayIot\\HighWayIot\\bin\\Debug\\data\\data.db;Version=3";
+ //private static string sqliteConnStr = "Data Source=Z:\\Desktop\\日常代码\\HighWayIot\\HighWayIot\\bin\\Debug\\data\\data.db;Version=3";
/**
* Mysql
*/
- private static string mysqlConnStr = "Data Source=124.70.63.37;Port=6000;Initial Catalog=ry-cloud;uid=root;pwd=haiwei@123;Charset=utf8mb4;SslMode=none";
+ private static string mysqlConnStr = "Data Source=127.0.0.1;Port=3306;Initial Catalog=rfid;uid=root;pwd=123456;Charset=utf8mb4;SslMode=none";
- private static string oracleConnStr = "Data Source=175.27.215.92/helowin;User ID=aucma_mes;Password=aucma";
+ //private static string oracleConnStr = "Data Source=175.27.215.92/helowin;User ID=aucma_mes;Password=aucma";
#endregion
//如果是固定多库可以传 new SqlSugarScope(List,db=>{}) 文档:多租户
//如果是不固定多库 可以看文档Saas分库
//用单例模式
- public static SqlSugarScope Db = new SqlSugarScope(new List()
- {
- new ConnectionConfig()
- {
- ConfigId = "sqlite",
- ConnectionString = sqliteConnStr,
- DbType = DbType.Sqlite,
- InitKeyType = InitKeyType.Attribute,
- IsAutoCloseConnection = true
- },
+ public static SqlSugarScope Db = new SqlSugarScope(
+ // new List()
+ //{
+ //new ConnectionConfig()
+ //{
+ // ConfigId = "sqlite",
+ // ConnectionString = sqliteConnStr,
+ // DbType = DbType.Sqlite,
+ // InitKeyType = InitKeyType.Attribute,
+ // IsAutoCloseConnection = true
+ //},
new ConnectionConfig()
{
ConfigId = "mysql",
@@ -53,15 +54,16 @@ namespace HighWayIot.Repository
InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true
},
- new ConnectionConfig()
- {
- ConfigId = "aucma_mes",
- ConnectionString = oracleConnStr,
- DbType = DbType.Oracle,
- InitKeyType = InitKeyType.Attribute,
- IsAutoCloseConnection = true
- }
- },
+ //},
+ //new ConnectionConfig()
+ //{
+ // ConfigId = "aucma_mes",
+ // ConnectionString = oracleConnStr,
+ // DbType = DbType.Oracle,
+ // InitKeyType = InitKeyType.Attribute,
+ // IsAutoCloseConnection = true
+ //}
+ //},
db =>
{
//(A)全局生效配置点
diff --git a/HighWayIot.Repository/app.config b/HighWayIot.Repository/app.config
index c00df4d..cd04901 100644
--- a/HighWayIot.Repository/app.config
+++ b/HighWayIot.Repository/app.config
@@ -22,6 +22,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Common.dll b/HighWayIot.Repository/bin/Debug/HighWayIot.Common.dll
index dead5ea..fabf17b 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Common.dll and b/HighWayIot.Repository/bin/Debug/HighWayIot.Common.dll differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Common.pdb b/HighWayIot.Repository/bin/Debug/HighWayIot.Common.pdb
index 46d305e..b053868 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Common.pdb and b/HighWayIot.Repository/bin/Debug/HighWayIot.Common.pdb differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Log4net.dll b/HighWayIot.Repository/bin/Debug/HighWayIot.Log4net.dll
index 30bae7e..328334f 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Log4net.dll and b/HighWayIot.Repository/bin/Debug/HighWayIot.Log4net.dll differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Log4net.pdb b/HighWayIot.Repository/bin/Debug/HighWayIot.Log4net.pdb
index a3ec7c8..a3d99cb 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Log4net.pdb and b/HighWayIot.Repository/bin/Debug/HighWayIot.Log4net.pdb differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll
index b8d3895..0d7bdb0 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll and b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll.config b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll.config
index c00df4d..cd04901 100644
--- a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll.config
+++ b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll.config
@@ -22,6 +22,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb
index ea79a83..cab746a 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb and b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot.Repository/bin/Debug/SqlSugar.dll b/HighWayIot.Repository/bin/Debug/SqlSugar.dll
index fcb0e21..ddfe241 100644
Binary files a/HighWayIot.Repository/bin/Debug/SqlSugar.dll and b/HighWayIot.Repository/bin/Debug/SqlSugar.dll differ
diff --git a/HighWayIot.Repository/domain/BaseBomInfo.cs b/HighWayIot.Repository/domain/BaseBomInfo.cs
deleted file mode 100644
index da881fb..0000000
--- a/HighWayIot.Repository/domain/BaseBomInfo.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HighWayIot.Repository.domain
-{
- [SugarTable("BASE_BOMINFO")]
- public class BaseBomInfo
- {
- ///
- /// 主键标识
- ///
- [SugarColumn(ColumnName = "OBJID", IsPrimaryKey = true, IsIdentity = true)]
- public int ObjId { get; set; }
-
- [SugarColumn(ColumnName = "BOM_CODE")]
- public string bomCode { get; set; }
- }
-}
diff --git a/HighWayIot.Repository/domain/BaseDeviceinfo.cs b/HighWayIot.Repository/domain/BaseDeviceinfo.cs
deleted file mode 100644
index 168d352..0000000
--- a/HighWayIot.Repository/domain/BaseDeviceinfo.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using SqlSugar;
-namespace HighWayIot.Repository.domain
-{
- ///
- /// 设备信息
- ///
- [SugarTable("base_deviceInfo")]
- public class BaseDeviceinfo
- {
- ///
- /// 主键标识
- ///
- [SugarColumn(ColumnName="objId" ,IsPrimaryKey = true ,IsIdentity = true )]
- public int ObjId { get; set; }
- ///
- /// 机台编号
- ///
- [SugarColumn(ColumnName="process_Id" )]
- public int? ProcessId { get; set; }
- ///
- /// 位置编号
- ///
- [SugarColumn(ColumnName="position_Id" )]
- public int? PositionId { get; set; }
- ///
- /// 设备编号
- ///
- [SugarColumn(ColumnName="device_Id" )]
- public int? DeviceId { get; set; }
- ///
- /// 设备名称
- ///
- [SugarColumn(ColumnName="device_Name" )]
- public string DeviceName { get; set; }
- ///
- /// 设备 IP
- ///
- [SugarColumn(ColumnName="device_Ip" )]
- public string DeviceIp { get; set; }
- ///
- /// 设备端口
- ///
- [SugarColumn(ColumnName="device_Port" )]
- public int? DevicePort { get; set; }
- ///
- /// 设备天线
- ///
- [SugarColumn(ColumnName="device_Ant" )]
- public int? DeviceAnt { get; set; }
- ///
- /// 设备类型
- ///
- [SugarColumn(ColumnName="device_Type" )]
- public string DeviceType { get; set; }
- }
-}
diff --git a/HighWayIot.Repository/domain/RFIDContent.cs b/HighWayIot.Repository/domain/RFIDContent.cs
new file mode 100644
index 0000000..9e7ee05
--- /dev/null
+++ b/HighWayIot.Repository/domain/RFIDContent.cs
@@ -0,0 +1,28 @@
+using SqlSugar;
+using System;
+
+namespace HighWayIot.Repository.domain
+{
+
+ [SugarTable("rfid_content")]
+ public class RFIDContent
+ {
+
+ [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
+ public int ID { get; set; }
+
+ [SugarColumn(ColumnName = "content")]
+ public string Content { get; set; }
+
+ [SugarColumn(ColumnName = "deviceno")]
+ public int DeviceNo { get; set; }
+
+ [SugarColumn(ColumnName = "readkind")]
+ public string ReadKind { get; set; }
+
+ [SugarColumn(ColumnName = "logtime")]
+ public DateTime LogTime { get; set; }
+
+ }
+
+}
\ No newline at end of file
diff --git a/HighWayIot.Repository/domain/RFIDHeartbeat.cs b/HighWayIot.Repository/domain/RFIDHeartbeat.cs
new file mode 100644
index 0000000..fe28a6f
--- /dev/null
+++ b/HighWayIot.Repository/domain/RFIDHeartbeat.cs
@@ -0,0 +1,25 @@
+using SqlSugar;
+using System;
+
+namespace HighWayIot.Repository.domain
+{
+
+ [SugarTable("rfid_heartbeat")]
+ public class RFIDHeartbeat
+ {
+
+ [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
+ public int ID { get; set; }
+
+ [SugarColumn(ColumnName = "deviceno")]
+ public int DeviceNo { get; set; }
+
+ [SugarColumn(ColumnName = "beattime")]
+ public DateTime BeatTime { get; set; }
+
+ [SugarColumn(ColumnName = "timespan")]
+ public string TimeSpan { get; set; }
+
+ }
+
+}
\ No newline at end of file
diff --git a/HighWayIot.Repository/domain/RFIDState.cs b/HighWayIot.Repository/domain/RFIDState.cs
new file mode 100644
index 0000000..33c5326
--- /dev/null
+++ b/HighWayIot.Repository/domain/RFIDState.cs
@@ -0,0 +1,24 @@
+using SqlSugar;
+using System;
+
+namespace HighWayIot.Repository.domain
+{
+
+ [SugarTable("rfid_state")]
+ public class RFIDState
+ {
+
+ [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
+ public int ID { get; set; }
+
+ [SugarColumn(ColumnName = "deviceno")]
+ public int DeviceNo { get; set; }
+
+ [SugarColumn(ColumnName = "devicestate")]
+ public bool DeviceState { get; set; }
+
+ [SugarColumn(ColumnName = "logtime")]
+ public DateTime LogTime { get; set; }
+ }
+
+}
\ No newline at end of file
diff --git a/HighWayIot.Repository/domain/SysUserInfo.cs b/HighWayIot.Repository/domain/SysUserInfo.cs
deleted file mode 100644
index 9421e5d..0000000
--- a/HighWayIot.Repository/domain/SysUserInfo.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Principal;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HighWayIot.Repository.domain
-{
- ///
- /// 用户信息
- ///
- [SugarTable("sys_user")]
- public class SysUserInfo
- {
- ///
- /// 用户Id,自增主键
- ///
- [SugarColumn(ColumnName = "user_id", IsPrimaryKey = true, IsIdentity = true)]
- public int userId { get; set; }
-
- ///
- /// 用户名称
- ///
- [SugarColumn(ColumnName = "user_name")]
- public string userName { get; set; }
-
- ///
- /// 用户密码
- ///
- [SugarColumn(ColumnName = "password")]
- public string password { get; set; }
-
- }
-}
-
diff --git a/HighWayIot.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/HighWayIot.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index bd052bf..d141608 100644
Binary files a/HighWayIot.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/HighWayIot.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache
index 41d2057..6917be0 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.CoreCompileInputs.cache b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.CoreCompileInputs.cache
index 3ff4e22..d4b0f26 100644
--- a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.CoreCompileInputs.cache
+++ b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-895f3c69f89b5588bcc6d1c266768b015c1ec5d0
+7777ddc0dc77b42c0c95cd534f3fd3ac82b4377a
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.FileListAbsolute.txt b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.FileListAbsolute.txt
index 78bf186..f30ac4a 100644
--- a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.FileListAbsolute.txt
+++ b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.FileListAbsolute.txt
@@ -42,3 +42,26 @@ C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Repository\obj\Debug\Hi
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Repository\obj\Debug\HighWayIot.Repository.csproj.CopyComplete
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Repository\obj\Debug\HighWayIot.Repository.dll
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Repository\obj\Debug\HighWayIot.Repository.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\HighWayIot.Repository.dll.config
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\HighWayIot.Repository.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\HighWayIot.Repository.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\HighWayIot.Common.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\HighWayIot.Log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\Oracle.ManagedDataAccess.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\Newtonsoft.Json.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\System.Memory.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\System.Threading.Tasks.Extensions.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\System.Numerics.Vectors.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\System.Buffers.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\HighWayIot.Common.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\Newtonsoft.Json.xml
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\obj\Debug\HighWayIot.Repository.csproj.AssemblyReference.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\obj\Debug\HighWayIot.Repository.csproj.CoreCompileInputs.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\obj\Debug\HighWayIot.Repository.csproj.CopyComplete
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\obj\Debug\HighWayIot.Repository.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\obj\Debug\HighWayIot.Repository.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\SqlSugar.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Repository\bin\Debug\config\log4net.config
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll
index b8d3895..0d7bdb0 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb
index ea79a83..cab746a 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot.Repository/packages.config b/HighWayIot.Repository/packages.config
new file mode 100644
index 0000000..dfa0de5
--- /dev/null
+++ b/HighWayIot.Repository/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/HighWayIot.Repository/service/IBaseBomInfoService.cs b/HighWayIot.Repository/service/IBaseBomInfoService.cs
deleted file mode 100644
index bb83271..0000000
--- a/HighWayIot.Repository/service/IBaseBomInfoService.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using HighWayIot.Repository.domain;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HighWayIot.Repository.service
-{
- public interface IBaseBomInfoService
- {
- List GetBomInfos();
- }
-}
diff --git a/HighWayIot.Repository/service/IBaseDeviceinfoService.cs b/HighWayIot.Repository/service/IContentService.cs
similarity index 50%
rename from HighWayIot.Repository/service/IBaseDeviceinfoService.cs
rename to HighWayIot.Repository/service/IContentService.cs
index 5d410e9..730fbb8 100644
--- a/HighWayIot.Repository/service/IBaseDeviceinfoService.cs
+++ b/HighWayIot.Repository/service/IContentService.cs
@@ -7,14 +7,19 @@ using System.Threading.Tasks;
namespace HighWayIot.Repository.service
{
- public interface IBaseDeviceinfoService
+ public interface IContentService
{
+
///
- /// 根据工序编号获取设备集合
+ /// 获取RFID信息列表
///
- ///
///
- List GetDeviceInfoListByProcessId(int ProcessId);
+ List GetContentInfos( );
+ ///
+ /// 新增一条信息
+ ///
+ ///
+ void AddContentInfo(RFIDContent content);
}
}
diff --git a/HighWayIot.Repository/service/IHeartbeatService.cs b/HighWayIot.Repository/service/IHeartbeatService.cs
new file mode 100644
index 0000000..ae56aef
--- /dev/null
+++ b/HighWayIot.Repository/service/IHeartbeatService.cs
@@ -0,0 +1,33 @@
+using HighWayIot.Repository.domain;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HighWayIot.Repository.service
+{
+ public interface IHeartbeatService
+ {
+
+ ///
+ /// 获取RFID心跳状态列表
+ ///
+ ///
+ List GetHeartbeatInfos();
+
+ ///
+ /// 新增一条心跳
+ ///
+ ///
+ void AddHeartbeatInfo(RFIDHeartbeat heartbeat);
+
+ ///
+ /// 更新对应ID的心跳
+ ///
+ ///
+ /// 影响的行数
+ int UpdateHeartbeatInfo(int deviceno);
+
+ }
+}
diff --git a/HighWayIot.Repository/service/ISysUserInfoService.cs b/HighWayIot.Repository/service/IStateService.cs
similarity index 51%
rename from HighWayIot.Repository/service/ISysUserInfoService.cs
rename to HighWayIot.Repository/service/IStateService.cs
index 0540e05..1b1c6e1 100644
--- a/HighWayIot.Repository/service/ISysUserInfoService.cs
+++ b/HighWayIot.Repository/service/IStateService.cs
@@ -7,13 +7,19 @@ using System.Threading.Tasks;
namespace HighWayIot.Repository.service
{
- public interface ISysUserInfoService
+ public interface IStateService
{
///
- /// 获取用户列表
+ /// 获取RFID状态列表
///
///
- List GetUserInfos( );
+ ListGetStateInfos();
+
+ ///
+ /// 新增一条状态
+ ///
+ ///
+ void AddStateInfo(RFIDState state);
}
}
diff --git a/HighWayIot.Repository/service/Impl/BaseBomInfoServiceImpl.cs b/HighWayIot.Repository/service/Impl/BaseBomInfoServiceImpl.cs
deleted file mode 100644
index 8764b80..0000000
--- a/HighWayIot.Repository/service/Impl/BaseBomInfoServiceImpl.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using HighWayIot.Log4net;
-using HighWayIot.Repository.domain;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HighWayIot.Repository.service.Impl
-{
- public class BaseBomInfoServiceImpl:IBaseBomInfoService
- {
- Repository _bomInfoRepository => new Repository("aucma_mes");
-
- private LogHelper logHelper = LogHelper.Instance;
-
- public List GetBomInfos()
- {
- try
- {
- var info = _bomInfoRepository.GetList();
- return info;
- }catch(Exception ex)
- {
- logHelper.Error("获取BOM集合异常", ex);
- return null;
- }
- }
- }
-}
diff --git a/HighWayIot.Repository/service/Impl/BaseContentServiceImpl.cs b/HighWayIot.Repository/service/Impl/BaseContentServiceImpl.cs
new file mode 100644
index 0000000..3ce5168
--- /dev/null
+++ b/HighWayIot.Repository/service/Impl/BaseContentServiceImpl.cs
@@ -0,0 +1,42 @@
+using HighWayIot.Log4net;
+using HighWayIot.Repository.domain;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HighWayIot.Repository.service.Impl
+{
+ public class BaseContentServiceImpl : IContentService
+ {
+ private LogHelper log = LogHelper.Instance;
+ Repository _repository => new Repository("mysql");
+
+ public List GetContentInfos()
+ {
+ try
+ {
+ List deviceInfo = _repository.GetList();
+ return deviceInfo;
+ }catch (Exception ex)
+ {
+ log.Error("RFID内容信息获取异常", ex);
+ return null;
+ }
+ }
+
+ public void AddContentInfo(RFIDContent content)
+ {
+ try
+ {
+ _repository.Insert(content);
+ }
+ catch (Exception ex)
+ {
+ log.Error("RFID内容信息插入异常", ex);
+ }
+ }
+ }
+}
diff --git a/HighWayIot.Repository/service/Impl/BaseDeviceinfoServiceImpl.cs b/HighWayIot.Repository/service/Impl/BaseDeviceinfoServiceImpl.cs
deleted file mode 100644
index 4f9dfde..0000000
--- a/HighWayIot.Repository/service/Impl/BaseDeviceinfoServiceImpl.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using HighWayIot.Repository.domain;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HighWayIot.Repository.service.Impl
-{
- public class BaseDeviceinfoServiceImpl : IBaseDeviceinfoService
- {
- Repository _deviceInfoRepository => new Repository("sqlite");
-
-
- public List GetDeviceInfoListByProcessId(int ProcessId)
- {
- Expression> exp = s1 => s1.ProcessId == ProcessId;
- List deviceinfos = _deviceInfoRepository.GetList(exp);
- return deviceinfos;
- }
- }
-}
diff --git a/HighWayIot.Repository/service/Impl/BaseHeartbeatServiceImpl.cs b/HighWayIot.Repository/service/Impl/BaseHeartbeatServiceImpl.cs
new file mode 100644
index 0000000..4da17a9
--- /dev/null
+++ b/HighWayIot.Repository/service/Impl/BaseHeartbeatServiceImpl.cs
@@ -0,0 +1,55 @@
+using HighWayIot.Log4net;
+using HighWayIot.Repository.domain;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HighWayIot.Repository.service.Impl
+{
+ public class BaseHeartbeatServiceImpl : IHeartbeatService
+ {
+ private LogHelper log = LogHelper.Instance;
+ Repository _repository => new Repository("mysql");
+
+ public List GetHeartbeatInfos()
+ {
+ try
+ {
+ List deviceInfo = _repository.GetList();
+ return deviceInfo;
+ }catch (Exception ex)
+ {
+ log.Error("RFID心跳信息获取异常", ex);
+ return null;
+ }
+ }
+
+ public void AddHeartbeatInfo(RFIDHeartbeat heartbeat)
+ {
+ try
+ {
+ _repository.Insert(heartbeat);
+ }
+ catch (Exception ex)
+ {
+ log.Error("RFID心跳信息插入异常", ex);
+ }
+ }
+
+ public int UpdateHeartbeatInfo(int deviceno)
+ {
+ try
+ {
+ return _repository.AsUpdateable().SetColumns(x => x.BeatTime == DateTime.Now).Where(x => x.DeviceNo == deviceno).ExecuteCommand();
+ }
+ catch(Exception ex)
+ {
+ log.Error("RFID心跳信息更新异常", ex);
+ return -1;
+ }
+ }
+ }
+}
diff --git a/HighWayIot.Repository/service/Impl/BaseStateServiceImpl.cs b/HighWayIot.Repository/service/Impl/BaseStateServiceImpl.cs
new file mode 100644
index 0000000..cbaf529
--- /dev/null
+++ b/HighWayIot.Repository/service/Impl/BaseStateServiceImpl.cs
@@ -0,0 +1,42 @@
+using HighWayIot.Log4net;
+using HighWayIot.Repository.domain;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HighWayIot.Repository.service.Impl
+{
+ public class BaseStateServiceImpl : IStateService
+ {
+ private LogHelper log = LogHelper.Instance;
+ Repository _repository => new Repository("mysql");
+
+ public List GetStateInfos()
+ {
+ try
+ {
+ List deviceInfo = _repository.GetList();
+ return deviceInfo;
+ }catch (Exception ex)
+ {
+ log.Error("RFID状态信息获取异常", ex);
+ return null;
+ }
+ }
+
+ public void AddStateInfo(RFIDState state)
+ {
+ try
+ {
+ _repository.Insert(state);
+ }
+ catch (Exception ex)
+ {
+ log.Error("RFID状态信息插入异常", ex);
+ }
+ }
+ }
+}
diff --git a/HighWayIot.Repository/service/Impl/BaseSysUserInfoServiceImpl.cs b/HighWayIot.Repository/service/Impl/BaseSysUserInfoServiceImpl.cs
deleted file mode 100644
index f0c84d5..0000000
--- a/HighWayIot.Repository/service/Impl/BaseSysUserInfoServiceImpl.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using HighWayIot.Log4net;
-using HighWayIot.Repository.domain;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HighWayIot.Repository.service.Impl
-{
- public class BaseSysUserInfoServiceImpl : ISysUserInfoService
- {
- private LogHelper log = LogHelper.Instance;
- Repository _repository => new Repository("mysql");
-
- public List GetUserInfos()
- {
- try
- {
- List deviceInfo = _repository.GetList();
- return deviceInfo;
- }catch (Exception ex)
- {
- log.Error("用户信息获取异常", ex);
- return null;
- }
- }
- }
-}
diff --git a/HighWayIot.Rfid/bin/Debug/HighWayIot.Common.dll b/HighWayIot.Rfid/bin/Debug/HighWayIot.Common.dll
index dead5ea..fabf17b 100644
Binary files a/HighWayIot.Rfid/bin/Debug/HighWayIot.Common.dll and b/HighWayIot.Rfid/bin/Debug/HighWayIot.Common.dll differ
diff --git a/HighWayIot.Rfid/bin/Debug/HighWayIot.Common.pdb b/HighWayIot.Rfid/bin/Debug/HighWayIot.Common.pdb
index 46d305e..b053868 100644
Binary files a/HighWayIot.Rfid/bin/Debug/HighWayIot.Common.pdb and b/HighWayIot.Rfid/bin/Debug/HighWayIot.Common.pdb differ
diff --git a/HighWayIot.Rfid/bin/Debug/HighWayIot.Log4net.dll b/HighWayIot.Rfid/bin/Debug/HighWayIot.Log4net.dll
index 30bae7e..738d19e 100644
Binary files a/HighWayIot.Rfid/bin/Debug/HighWayIot.Log4net.dll and b/HighWayIot.Rfid/bin/Debug/HighWayIot.Log4net.dll differ
diff --git a/HighWayIot.Rfid/bin/Debug/HighWayIot.Log4net.pdb b/HighWayIot.Rfid/bin/Debug/HighWayIot.Log4net.pdb
index a3ec7c8..6820428 100644
Binary files a/HighWayIot.Rfid/bin/Debug/HighWayIot.Log4net.pdb and b/HighWayIot.Rfid/bin/Debug/HighWayIot.Log4net.pdb differ
diff --git a/HighWayIot.Rfid/bin/Debug/HighWayIot.Rfid.dll b/HighWayIot.Rfid/bin/Debug/HighWayIot.Rfid.dll
index 83bd13e..745be62 100644
Binary files a/HighWayIot.Rfid/bin/Debug/HighWayIot.Rfid.dll and b/HighWayIot.Rfid/bin/Debug/HighWayIot.Rfid.dll differ
diff --git a/HighWayIot.Rfid/bin/Debug/HighWayIot.Rfid.pdb b/HighWayIot.Rfid/bin/Debug/HighWayIot.Rfid.pdb
index 986afe2..e4630a7 100644
Binary files a/HighWayIot.Rfid/bin/Debug/HighWayIot.Rfid.pdb and b/HighWayIot.Rfid/bin/Debug/HighWayIot.Rfid.pdb differ
diff --git a/HighWayIot.Rfid/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/HighWayIot.Rfid/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index ca74b68..c6ad054 100644
Binary files a/HighWayIot.Rfid/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/HighWayIot.Rfid/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache
index 56fbdf9..eccec4b 100644
Binary files a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache and b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.CoreCompileInputs.cache b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.CoreCompileInputs.cache
index 937c3f6..fa2afc0 100644
--- a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.CoreCompileInputs.cache
+++ b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-4513ba02cf63dbc13668b2fa4a8e815c58d65ebd
+0f8d688630de9b926f42827bc262d48170ef65d9
diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.FileListAbsolute.txt b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.FileListAbsolute.txt
index 5e084ef..e7affc9 100644
--- a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.FileListAbsolute.txt
+++ b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.FileListAbsolute.txt
@@ -43,3 +43,18 @@ C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Rfid\obj\Debug\HighWayI
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Rfid\obj\Debug\HighWayIot.Rfid.csproj.CopyComplete
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Rfid\obj\Debug\HighWayIot.Rfid.dll
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.Rfid\obj\Debug\HighWayIot.Rfid.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\HighWayIot.Rfid.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\HighWayIot.Rfid.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\GRreader.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\HighWayIot.Common.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\HighWayIot.Log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\Newtonsoft.Json.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\HighWayIot.Common.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\bin\Debug\Newtonsoft.Json.xml
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\obj\Debug\HighWayIot.Rfid.csproj.AssemblyReference.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\obj\Debug\HighWayIot.Rfid.csproj.CoreCompileInputs.cache
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\obj\Debug\HighWayIot.Rfid.csproj.CopyComplete
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\obj\Debug\HighWayIot.Rfid.dll
+D:\Code\Work\RFIDAccess\HighWayIot.Rfid\obj\Debug\HighWayIot.Rfid.pdb
diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.dll b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.dll
index 83bd13e..745be62 100644
Binary files a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.dll and b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.dll differ
diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.pdb b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.pdb
index 986afe2..e4630a7 100644
Binary files a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.pdb and b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.pdb differ
diff --git a/HighWayIot.TouchSocket/BufferAnalysis.cs b/HighWayIot.TouchSocket/BufferAnalysis.cs
new file mode 100644
index 0000000..8e607e2
--- /dev/null
+++ b/HighWayIot.TouchSocket/BufferAnalysis.cs
@@ -0,0 +1,114 @@
+using HighWayIot.Log4net;
+using HighWayIot.Repository.domain;
+using HighWayIot.Repository.service.Impl;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HighWayIot.TouchSocket
+{
+ public class BufferAnalysis
+ {
+ private static LogHelper logHelper = LogHelper.Instance;
+
+ ///
+ /// 心跳报文分析
+ ///
+ ///
+ public static void HeartbeatSocket(byte[] bytes)
+ {
+ if (int.TryParse(Encoding.ASCII.GetString(bytes, 4, 4), out int deviceno))
+ {
+ BaseHeartbeatServiceImpl sql = new BaseHeartbeatServiceImpl();
+ if (sql.UpdateHeartbeatInfo(deviceno) == 0)
+ {
+ RFIDHeartbeat heartbeat = new RFIDHeartbeat()
+ {
+ DeviceNo = deviceno,
+ BeatTime = DateTime.Now,
+ };
+ sql.AddHeartbeatInfo(heartbeat);
+ }
+ }
+ else
+ {
+ logHelper.Error("心跳报文编号数值转换出现错误!");
+ }
+ }
+
+ ///
+ /// RFID发送设备状态
+ ///
+ ///
+ public static void RFIDStatusSocket(byte[] bytes)
+ {
+ if (int.TryParse(Encoding.ASCII.GetString(bytes, 4, 4), out int deviceno) &&
+ int.TryParse(Encoding.ASCII.GetString(bytes, 9, 1), out int state))
+ {
+ BaseStateServiceImpl sql = new BaseStateServiceImpl();
+ RFIDState rFIDState = new RFIDState()
+ {
+ DeviceNo = deviceno,
+ DeviceState = state == 1 ? true : false,
+ LogTime = DateTime.Now,
+ };
+ sql.AddStateInfo(rFIDState);
+ }
+ else
+ {
+ logHelper.Error("设备状态报文编号数值转换出现错误!");
+ }
+ }
+
+ ///
+ /// RFID发送条码
+ ///
+ ///
+ public static void RFIDCodeSocket(byte[] bytes)
+ {
+ string readKind = Encoding.ASCII.GetString(bytes, 4, 2);
+ if (int.TryParse(Encoding.ASCII.GetString(bytes, 7, 4), out int deviceno))
+ {
+ RFIDContent rFIDContent = new RFIDContent()
+ {
+ DeviceNo = deviceno,
+ ReadKind = readKind,
+ LogTime = DateTime.Now,
+ };
+ string content = "";
+ if (readKind == "NB" || readKind == "GR")
+ {
+ content = Encoding.ASCII.GetString(bytes, 12, 16);
+ }
+ else if (readKind == "MR")
+ {
+ content = Encoding.ASCII.GetString(bytes, 12, bytes.Length - 12 - 2); // 减去条码内容之前和之后内容的长度
+ }
+ rFIDContent.Content = content;
+ BaseContentServiceImpl sql = new BaseContentServiceImpl();
+ sql.AddContentInfo(rFIDContent);
+ }
+ else
+ {
+ logHelper.Error("条码发送报文编号数值转换出现错误!");
+ }
+ }
+
+ ///
+ /// 将一个数组拆成另外一个数组
+ ///
+ /// 原始数组,被拆分的数组
+ /// 从原始数组第几个元素开始
+ /// 目标数组的长度
+ /// 目标数组开始的元素序号,默认为0
+ ///
+ public static byte[] SplitByteArray(byte[] originbyte, int oringinstartindex, int destbytelength, int destbytestartindex = 0)
+ {
+ byte[] result = new byte[destbytelength];
+ System.Array.Copy(originbyte, oringinstartindex, result, destbytestartindex, destbytelength);
+ return result;
+ }
+ }
+}
diff --git a/HighWayIot.TouchSocket/Class1.cs b/HighWayIot.TouchSocket/Class1.cs
deleted file mode 100644
index 87303d7..0000000
--- a/HighWayIot.TouchSocket/Class1.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HighWayIot.TouchSocket
-{
- public class Class1
- {
- }
-}
diff --git a/HighWayIot.TouchSocket/HighWayIot.TouchSocket.csproj b/HighWayIot.TouchSocket/HighWayIot.TouchSocket.csproj
index 48c9bbc..0f47b99 100644
--- a/HighWayIot.TouchSocket/HighWayIot.TouchSocket.csproj
+++ b/HighWayIot.TouchSocket/HighWayIot.TouchSocket.csproj
@@ -32,21 +32,47 @@
4
+
+ ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll
+
+
+
-
- Z:\Desktop\日常代码\HighWayIot\HighWayIot.Library\TouchSocket.dll
+
+ ..\packages\TouchSocket.2.0.0-beta.253\lib\net45\TouchSocket.dll
+
+
+ ..\packages\TouchSocket.Core.2.0.0-beta.253\lib\net45\TouchSocket.Core.dll
-
+
+
+
+
+
+
+
+
+
+
+
+ {DEABC30C-EC6F-472E-BD67-D65702FDAF74}
+ HighWayIot.Log4net
+
+
+ {d0dc3cfb-6748-4d5e-b56a-76fdc72ab4b3}
+ HighWayIot.Repository
+
+
\ No newline at end of file
diff --git a/HighWayIot.TouchSocket/TcpServer.cs b/HighWayIot.TouchSocket/TcpServer.cs
new file mode 100644
index 0000000..27cd413
--- /dev/null
+++ b/HighWayIot.TouchSocket/TcpServer.cs
@@ -0,0 +1,142 @@
+using HighWayIot.Log4net;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using TouchSocket.Core;
+using TouchSocket.Sockets;
+
+namespace HighWayIot.TouchSocket
+{
+ public class TcpServer
+ {
+ private static readonly Lazy lazy = new Lazy(() => new TcpServer());
+
+ public static TcpServer Instance => lazy.Value;
+
+ private static LogHelper logHelper = LogHelper.Instance;
+
+ public ServerState State
+ {
+ get => service.ServerState;
+ private set => State = value;
+ }
+
+ TcpService service = new TcpService();
+
+ public bool ServerStart(string ip, string port)
+ {
+ try
+ {
+ service.Connecting = (client, e) =>
+ {
+ logHelper.Info($"客户端{client.IP}正在连接");
+ return EasyTask.CompletedTask;
+ };//有客户端正在连接
+ service.Connected = (client, e) =>
+ {
+ logHelper.Info($"客户端{client.IP}成功连接");
+ return EasyTask.CompletedTask;
+ };//有客户端成功连接
+ service.Disconnecting = (client, e) =>
+ {
+ logHelper.Info($"客户端{client.IP}正在断开连接");
+ return EasyTask.CompletedTask;
+ };//有客户端正在断开连接,只有当主动断开时才有效。
+ service.Disconnected = (client, e) =>
+ {
+ logHelper.Info($"客户端{client.IP}断开连接");
+ return EasyTask.CompletedTask;
+ };//有客户端断开连接
+ service.Received = (client, e) =>
+ {
+ ////从客户端收到信息
+ //var mes = Encoding.ASCII.GetString(e.ByteBlock.Buffer, 0, e.ByteBlock.Len);//注意:数据长度是byteBlock.Len
+ //logHelper.Info($"已从{client.IP}:{client.Port}接收到信息:{mes}");
+
+ BufferMemory(BufferAnalysis.SplitByteArray(e.ByteBlock.Buffer, 0, e.ByteBlock.Len));
+
+ return EasyTask.CompletedTask;
+ };
+
+ service.Setup(new TouchSocketConfig()//载入配置
+ .SetListenOptions(option =>
+ {
+ option.Add(new TcpListenOption()
+ {
+ IpHost = ip + ":" + port,
+ Name = "Server",//名称用于区分监听
+ ServiceSslOption = null,//可以针对当前监听,单独启用ssl加密
+ Adapter = () => new NormalDataHandlingAdapter(),//可以单独对当前地址监听,配置适配器
+ //还有其他可配置项,都是单独对当前地址有效。
+ });
+ })
+ .ConfigureContainer(a =>//容器的配置顺序应该在最前面
+ {
+ a.AddConsoleLogger();//添加一个控制台日志注入(注意:在maui中控制台日志不可用)
+ })
+ .ConfigurePlugins(a =>
+ {
+ //a.Add();//此处可以添加插件
+ }));
+ service.Start();//启动
+ logHelper.Info("监听服务启动成功");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ logHelper.Error("监听服务启动失败! 错误代码" + ex.ToString());
+ return false;
+ }
+ }
+
+ public bool ServerStop()
+ {
+ try
+ {
+ service.Stop();
+ logHelper.Info("监听服务关闭成功!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ logHelper.Error("监听服务关闭失败! 错误代码" + ex.ToString());
+ return false;
+ }
+ }
+
+ public bool ServerDispose()
+ {
+ try
+ {
+ service.Dispose();
+ logHelper.Info("监听服务释放成功!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ logHelper.Error("监听服务释放失败! 错误代码" + ex.ToString());
+ return false;
+ }
+ }
+
+ private void BufferMemory(byte[] bytes)
+ {
+ byte[] identify = new byte[2] { bytes[1], bytes[2] };
+ if (identify[0] == 0x30 && identify[1] == 0x31)
+ {
+ BufferAnalysis.HeartbeatSocket(bytes);
+ }
+ else if (identify[0] == 0x30 && identify[1] == 0x34)
+ {
+ BufferAnalysis.RFIDStatusSocket(bytes);
+ }
+ else if (identify[0] == 0x35 && identify[1] == 0x33)
+ {
+ BufferAnalysis.RFIDCodeSocket(bytes);
+ }
+ }
+
+ }
+}
diff --git a/HighWayIot/obj/Debug/HighWayIot.exe.config b/HighWayIot.TouchSocket/app.config
similarity index 59%
rename from HighWayIot/obj/Debug/HighWayIot.exe.config
rename to HighWayIot.TouchSocket/app.config
index a9565c4..bdef95f 100644
--- a/HighWayIot/obj/Debug/HighWayIot.exe.config
+++ b/HighWayIot.TouchSocket/app.config
@@ -1,8 +1,5 @@
-
+
-
-
-
@@ -17,16 +14,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/HighWayIot.TouchSocket/bin/Debug/HighWayIot.TouchSocket.dll b/HighWayIot.TouchSocket/bin/Debug/HighWayIot.TouchSocket.dll
index 3b532e7..ddc738e 100644
Binary files a/HighWayIot.TouchSocket/bin/Debug/HighWayIot.TouchSocket.dll and b/HighWayIot.TouchSocket/bin/Debug/HighWayIot.TouchSocket.dll differ
diff --git a/HighWayIot.TouchSocket/bin/Debug/HighWayIot.TouchSocket.pdb b/HighWayIot.TouchSocket/bin/Debug/HighWayIot.TouchSocket.pdb
index f10c47a..e6af700 100644
Binary files a/HighWayIot.TouchSocket/bin/Debug/HighWayIot.TouchSocket.pdb and b/HighWayIot.TouchSocket/bin/Debug/HighWayIot.TouchSocket.pdb differ
diff --git a/HighWayIot.TouchSocket/bin/Debug/TouchSocket.dll b/HighWayIot.TouchSocket/bin/Debug/TouchSocket.dll
index d28fbdd..e05b85a 100644
Binary files a/HighWayIot.TouchSocket/bin/Debug/TouchSocket.dll and b/HighWayIot.TouchSocket/bin/Debug/TouchSocket.dll differ
diff --git a/HighWayIot.TouchSocket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/HighWayIot.TouchSocket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 06f5bd7..ff07d9f 100644
Binary files a/HighWayIot.TouchSocket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/HighWayIot.TouchSocket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache
index deaa92c..88de602 100644
Binary files a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache and b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.CoreCompileInputs.cache b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.CoreCompileInputs.cache
index 309193e..72acf8d 100644
--- a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.CoreCompileInputs.cache
+++ b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-3c066706016bba5a85c3cc1f61b39bc08161104c
+6d773f4061c051dff6002bbcaebffaf3a87bf289
diff --git a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.FileListAbsolute.txt b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.FileListAbsolute.txt
index 4fbb9a0..29fc27b 100644
--- a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.FileListAbsolute.txt
+++ b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.FileListAbsolute.txt
@@ -22,3 +22,34 @@ C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.TouchSocket\obj\Debug\H
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.TouchSocket\obj\Debug\HighWayIot.TouchSocket.csproj.CopyComplete
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.TouchSocket\obj\Debug\HighWayIot.TouchSocket.dll
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot.TouchSocket\obj\Debug\HighWayIot.TouchSocket.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.TouchSocket.dll.config
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.TouchSocket.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.TouchSocket.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.Log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\Newtonsoft.Json.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\TouchSocket.Core.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\TouchSocket.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\Newtonsoft.Json.xml
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\TouchSocket.xml
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\TouchSocket.Core.xml
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\obj\Debug\HighWayIot.TouchSocket.csproj.AssemblyReference.cache
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\obj\Debug\HighWayIot.TouchSocket.csproj.CoreCompileInputs.cache
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\obj\Debug\HighWayIot.TouchSocket.csproj.CopyComplete
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\obj\Debug\HighWayIot.TouchSocket.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\obj\Debug\HighWayIot.TouchSocket.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.Repository.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\SqlSugar.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.Common.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.Repository.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.Repository.dll.config
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\HighWayIot.Common.pdb
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\MySql.Data.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\System.Data.SQLite.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\Oracle.ManagedDataAccess.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\System.Memory.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\System.Threading.Tasks.Extensions.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\System.Numerics.Vectors.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\System.Buffers.dll
+D:\Code\Work\RFIDAccess\HighWayIot.TouchSocket\bin\Debug\config\log4net.config
diff --git a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.dll b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.dll
index 3b532e7..ddc738e 100644
Binary files a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.dll and b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.dll differ
diff --git a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.pdb b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.pdb
index f10c47a..e6af700 100644
Binary files a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.pdb and b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.pdb differ
diff --git a/HighWayIot.TouchSocket/packages.config b/HighWayIot.TouchSocket/packages.config
new file mode 100644
index 0000000..de7e94c
--- /dev/null
+++ b/HighWayIot.TouchSocket/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HighWayIot.sln b/HighWayIot.sln
index 70352f6..51b17d3 100644
--- a/HighWayIot.sln
+++ b/HighWayIot.sln
@@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.TouchSocket", "H
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.Mqtt", "HighWayIot.Mqtt\HighWayIot.Mqtt.csproj", "{CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFIDSocket", "RFIDSocket\RFIDSocket.csproj", "{B632CAA9-47D5-47DC-A49F-2106166096BA}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -57,6 +59,10 @@ Global
{CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B632CAA9-47D5-47DC-A49F-2106166096BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B632CAA9-47D5-47DC-A49F-2106166096BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B632CAA9-47D5-47DC-A49F-2106166096BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B632CAA9-47D5-47DC-A49F-2106166096BA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/HighWayIot/App.config b/HighWayIot/App.config
index d91651e..bee5618 100644
--- a/HighWayIot/App.config
+++ b/HighWayIot/App.config
@@ -25,6 +25,10 @@
+
+
+
+
diff --git a/HighWayIot/HighWayIot.csproj b/HighWayIot/HighWayIot.csproj
index 11bd875..7701d8a 100644
--- a/HighWayIot/HighWayIot.csproj
+++ b/HighWayIot/HighWayIot.csproj
@@ -46,6 +46,8 @@
Z:\Desktop\日常代码\HighWayIot\HighWayIot.Library\System.Data.SQLite.dll
+
+
diff --git a/HighWayIot/Program.cs b/HighWayIot/Program.cs
index 0caf863..7eb57ca 100644
--- a/HighWayIot/Program.cs
+++ b/HighWayIot/Program.cs
@@ -13,21 +13,22 @@ namespace HighWayIot
{
private static LogHelper logger = LogHelper.Instance;
- private static IBaseDeviceinfoService sqliteTest = new BaseDeviceinfoServiceImpl();
+ //private static IBaseDeviceinfoService sqliteTest = new BaseDeviceinfoServiceImpl();
- private static ISysUserInfoService mysqlTest = new BaseSysUserInfoServiceImpl();
+ //private static ISysUserInfoService mysqlTest = new BaseSysUserInfoServiceImpl();
- private static IBaseBomInfoService oracleTest = new BaseBomInfoServiceImpl();
+ //private static IBaseBomInfoService oracleTest = new BaseBomInfoServiceImpl();
static void Main(string[] args)
{
logger.Info("初始化启动");
- var info = sqliteTest.GetDeviceInfoListByProcessId(3);
+
+ //var info = sqliteTest.GetDeviceInfoListByProcessId(3);
- var info2 = mysqlTest.GetUserInfos();
+ //var info2 = mysqlTest.GetUserInfos();
- var info3 = oracleTest.GetBomInfos();
+ //var info3 = oracleTest.GetBomInfos();
}
}
}
diff --git a/HighWayIot/bin/Debug/HighWayIot.Common.dll b/HighWayIot/bin/Debug/HighWayIot.Common.dll
index dead5ea..fabf17b 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Common.dll and b/HighWayIot/bin/Debug/HighWayIot.Common.dll differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Common.pdb b/HighWayIot/bin/Debug/HighWayIot.Common.pdb
index 46d305e..b053868 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Common.pdb and b/HighWayIot/bin/Debug/HighWayIot.Common.pdb differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Log4net.dll b/HighWayIot/bin/Debug/HighWayIot.Log4net.dll
index 30bae7e..738d19e 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Log4net.dll and b/HighWayIot/bin/Debug/HighWayIot.Log4net.dll differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Log4net.pdb b/HighWayIot/bin/Debug/HighWayIot.Log4net.pdb
index a3ec7c8..6820428 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Log4net.pdb and b/HighWayIot/bin/Debug/HighWayIot.Log4net.pdb differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.dll b/HighWayIot/bin/Debug/HighWayIot.Repository.dll
index b8d3895..0d7bdb0 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Repository.dll and b/HighWayIot/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.dll.config b/HighWayIot/bin/Debug/HighWayIot.Repository.dll.config
index c00df4d..cd04901 100644
--- a/HighWayIot/bin/Debug/HighWayIot.Repository.dll.config
+++ b/HighWayIot/bin/Debug/HighWayIot.Repository.dll.config
@@ -22,6 +22,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.pdb b/HighWayIot/bin/Debug/HighWayIot.Repository.pdb
index ea79a83..cab746a 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Repository.pdb and b/HighWayIot/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.exe b/HighWayIot/bin/Debug/HighWayIot.exe
index 5827824..1cb4a21 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.exe and b/HighWayIot/bin/Debug/HighWayIot.exe differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.exe.config b/HighWayIot/bin/Debug/HighWayIot.exe.config
index a9565c4..bee5618 100644
--- a/HighWayIot/bin/Debug/HighWayIot.exe.config
+++ b/HighWayIot/bin/Debug/HighWayIot.exe.config
@@ -1,8 +1,8 @@
-
+
-
-
-
+
+
+
@@ -25,12 +25,10 @@
-
-
-
\ No newline at end of file
+
diff --git a/HighWayIot/bin/Debug/HighWayIot.pdb b/HighWayIot/bin/Debug/HighWayIot.pdb
index 1a234a9..915fd07 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.pdb and b/HighWayIot/bin/Debug/HighWayIot.pdb differ
diff --git a/HighWayIot/bin/Debug/SqlSugar.dll b/HighWayIot/bin/Debug/SqlSugar.dll
index fcb0e21..ddfe241 100644
Binary files a/HighWayIot/bin/Debug/SqlSugar.dll and b/HighWayIot/bin/Debug/SqlSugar.dll differ
diff --git a/HighWayIot/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/HighWayIot/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index c89176e..e21ce80 100644
Binary files a/HighWayIot/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/HighWayIot/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/HighWayIot/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/HighWayIot/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index c14520b..b5cc8f6 100644
Binary files a/HighWayIot/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/HighWayIot/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache
index 434375b..5944430 100644
Binary files a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache and b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot/obj/Debug/HighWayIot.csproj.CoreCompileInputs.cache b/HighWayIot/obj/Debug/HighWayIot.csproj.CoreCompileInputs.cache
index 68becc0..d59d0a7 100644
--- a/HighWayIot/obj/Debug/HighWayIot.csproj.CoreCompileInputs.cache
+++ b/HighWayIot/obj/Debug/HighWayIot.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-0ad03e0798a1cb33c569face6b117fbfd6fd6609
+96984ffc471b6449d644a40d41d23463165377ac
diff --git a/HighWayIot/obj/Debug/HighWayIot.csproj.FileListAbsolute.txt b/HighWayIot/obj/Debug/HighWayIot.csproj.FileListAbsolute.txt
index b84ecba..e717ab9 100644
--- a/HighWayIot/obj/Debug/HighWayIot.csproj.FileListAbsolute.txt
+++ b/HighWayIot/obj/Debug/HighWayIot.csproj.FileListAbsolute.txt
@@ -56,3 +56,28 @@ C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot\obj\Debug\HighWayIot.cs
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot\obj\Debug\HighWayIot.csproj.CopyComplete
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot\obj\Debug\HighWayIot.exe
C:\项目代码\澳柯玛MES项目\HighWayIot\HighWayIot\obj\Debug\HighWayIot.pdb
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.exe.config
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.exe
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.pdb
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.Log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.Repository.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\Oracle.ManagedDataAccess.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\log4net.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\SqlSugar.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.Common.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\System.Memory.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\System.Threading.Tasks.Extensions.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\Newtonsoft.Json.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\System.Numerics.Vectors.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\System.Buffers.dll
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.Log4net.pdb
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.Repository.pdb
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.Repository.dll.config
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\HighWayIot.Common.pdb
+D:\Code\Work\RFIDAccess\HighWayIot\bin\Debug\Newtonsoft.Json.xml
+D:\Code\Work\RFIDAccess\HighWayIot\obj\Debug\HighWayIot.csproj.AssemblyReference.cache
+D:\Code\Work\RFIDAccess\HighWayIot\obj\Debug\HighWayIot.csproj.CoreCompileInputs.cache
+D:\Code\Work\RFIDAccess\HighWayIot\obj\Debug\HighWayIot.csproj.CopyComplete
+D:\Code\Work\RFIDAccess\HighWayIot\obj\Debug\HighWayIot.exe
+D:\Code\Work\RFIDAccess\HighWayIot\obj\Debug\HighWayIot.pdb
diff --git a/HighWayIot/obj/Debug/HighWayIot.exe b/HighWayIot/obj/Debug/HighWayIot.exe
index 5827824..1cb4a21 100644
Binary files a/HighWayIot/obj/Debug/HighWayIot.exe and b/HighWayIot/obj/Debug/HighWayIot.exe differ
diff --git a/HighWayIot/obj/Debug/HighWayIot.pdb b/HighWayIot/obj/Debug/HighWayIot.pdb
index 1a234a9..915fd07 100644
Binary files a/HighWayIot/obj/Debug/HighWayIot.pdb and b/HighWayIot/obj/Debug/HighWayIot.pdb differ
diff --git a/RFIDSocket/App.config b/RFIDSocket/App.config
new file mode 100644
index 0000000..5147b5e
--- /dev/null
+++ b/RFIDSocket/App.config
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/RFIDSocket/DataAnalysis.cs b/RFIDSocket/DataAnalysis.cs
new file mode 100644
index 0000000..381b31c
--- /dev/null
+++ b/RFIDSocket/DataAnalysis.cs
@@ -0,0 +1,76 @@
+using HighWayIot.Repository.domain;
+using HighWayIot.Repository.service.Impl;
+using HighWayIot.TouchSocket;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+
+namespace RFIDSocket
+{
+ public class DataAnalysis
+ {
+ private static readonly Lazy lazy = new Lazy(() => new DataAnalysis());
+
+ public static DataAnalysis Instance => lazy.Value;
+
+ public List rFIDContents = new List();
+ public List rFIDHeartbeats = new List();
+ public List HeartbeatsState = new List();
+ public List rFIDStates = new List();
+ public List AlarmState = new List();
+
+ public void GetData()
+ {
+ BaseContentServiceImpl baseContentServiceImpl = new BaseContentServiceImpl();
+ BaseHeartbeatServiceImpl baseHeartbeatServiceImpl = new BaseHeartbeatServiceImpl();
+ BaseStateServiceImpl baseStateServiceImpl = new BaseStateServiceImpl();
+
+ rFIDContents = baseContentServiceImpl.GetContentInfos().Reverse().Take(200).ToList();
+
+ rFIDStates = baseStateServiceImpl.GetStateInfos();
+
+ var StateGroup = rFIDStates.GroupBy(x => x.DeviceNo);
+
+ AlarmState.Clear();
+
+ foreach(var a in StateGroup)
+ {
+ var b = a.LastOrDefault();
+ if (b.DeviceState)
+ {
+ AlarmState.Add(b);
+ }
+ }
+
+ rFIDHeartbeats = baseHeartbeatServiceImpl.GetHeartbeatInfos();
+
+ var HeartBeatGroup = rFIDHeartbeats.GroupBy(x => x.DeviceNo);
+
+ HeartbeatsState.Clear();
+
+ foreach (var a in HeartBeatGroup)
+ {
+ var b = a.LastOrDefault();
+ if (DateTime.Now - b.BeatTime > TimeSpan.FromSeconds(10))
+ {
+ b.TimeSpan = SecondToTime(Convert.ToInt32((DateTime.Now - b.BeatTime).TotalSeconds));
+ HeartbeatsState.Add(b);
+ }
+ }
+ }
+
+ private string SecondToTime(int t)
+ {
+ int m = t / 60;
+ int s = t % 60;
+ if (m == 0)
+ {
+ return "00 分 " + s.ToString("00") + " 秒";
+ }
+ return m.ToString("00") + " 分 " + s.ToString("00") + " 秒";
+ }
+ }
+}
diff --git a/RFIDSocket/LogControl.cs b/RFIDSocket/LogControl.cs
new file mode 100644
index 0000000..368cd72
--- /dev/null
+++ b/RFIDSocket/LogControl.cs
@@ -0,0 +1,33 @@
+using HighWayIot.Repository.domain;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace RFIDSocket
+{
+ public class LogControl
+ {
+ public static List LogContentSelect(List lists, string content)
+ {
+ return lists.Where(x => x.Content.Contains(content)).ToList();
+ }
+
+ public static List LogReadKindSelect(List lists, string readKind)
+ {
+ return lists.Where(x => x.ReadKind == readKind).ToList();
+ }
+
+ public static List LogDeviceNoSelect(List lists, int deviceNo)
+ {
+ return lists.Where(x => x.DeviceNo == deviceNo).ToList();
+ }
+
+ public static List LogTimeSelect(List lists, DateTime start, DateTime end)
+ {
+ return lists.Where(x => x.LogTime >= start && x.LogTime <= end).ToList();
+ }
+ }
+}
diff --git a/RFIDSocket/Program.cs b/RFIDSocket/Program.cs
new file mode 100644
index 0000000..abd71dc
--- /dev/null
+++ b/RFIDSocket/Program.cs
@@ -0,0 +1,26 @@
+using HighWayIot.Log4net;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace RFIDSocket
+{
+ internal static class Program
+ {
+ private static LogHelper logger = LogHelper.Instance;
+
+ ///
+ /// 应用程序的主入口点。
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ logger.Info("初始化启动");
+ Application.Run(new RFIDSocket());
+ }
+ }
+}
diff --git a/RFIDSocket/Properties/AssemblyInfo.cs b/RFIDSocket/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..64546d8
--- /dev/null
+++ b/RFIDSocket/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("RFIDSocket")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("RFIDSocket")]
+[assembly: AssemblyCopyright("Copyright © 2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("b632caa9-47d5-47dc-a49f-2106166096ba")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff --git a/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDContent.datasource b/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDContent.datasource
new file mode 100644
index 0000000..6aeca0b
--- /dev/null
+++ b/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDContent.datasource
@@ -0,0 +1,10 @@
+
+
+
+ HighWayIot.Repository.domain.RFIDContent, HighWayIot.Repository, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDHeartbeat.datasource b/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDHeartbeat.datasource
new file mode 100644
index 0000000..a4c36aa
--- /dev/null
+++ b/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDHeartbeat.datasource
@@ -0,0 +1,10 @@
+
+
+
+ HighWayIot.Repository.domain.RFIDHeartbeat, HighWayIot.Repository, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDState.datasource b/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDState.datasource
new file mode 100644
index 0000000..46c7262
--- /dev/null
+++ b/RFIDSocket/Properties/DataSources/HighWayIot.Repository.domain.RFIDState.datasource
@@ -0,0 +1,10 @@
+
+
+
+ HighWayIot.Repository.domain.RFIDState, HighWayIot.Repository, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/RFIDSocket/Properties/Resources.Designer.cs b/RFIDSocket/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..10c3172
--- /dev/null
+++ b/RFIDSocket/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace RFIDSocket.Properties
+{
+
+
+ ///
+ /// 强类型资源类,用于查找本地化字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// 返回此类使用的缓存 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RFIDSocket.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 重写当前线程的 CurrentUICulture 属性,对
+ /// 使用此强类型资源类的所有资源查找执行重写。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/RFIDSocket/Properties/Resources.resx b/RFIDSocket/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/RFIDSocket/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RFIDSocket/Properties/Settings.Designer.cs b/RFIDSocket/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..b4da644
--- /dev/null
+++ b/RFIDSocket/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace RFIDSocket.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/RFIDSocket/Properties/Settings.settings b/RFIDSocket/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/RFIDSocket/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/RFIDSocket/RFIDLog.Designer.cs b/RFIDSocket/RFIDLog.Designer.cs
new file mode 100644
index 0000000..3d4b776
--- /dev/null
+++ b/RFIDSocket/RFIDLog.Designer.cs
@@ -0,0 +1,293 @@
+namespace RFIDSocket
+{
+ partial class RFIDLog
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.TimeSelect = new System.Windows.Forms.Button();
+ this.StartTime = new System.Windows.Forms.DateTimePicker();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.EndTime = new System.Windows.Forms.DateTimePicker();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.ReadKind = new System.Windows.Forms.ComboBox();
+ this.ReadKindSelect = new System.Windows.Forms.Button();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.DeviceNo = new System.Windows.Forms.TextBox();
+ this.DeviceNoSelect = new System.Windows.Forms.Button();
+ this.LogContent = new System.Windows.Forms.DataGridView();
+ this.deviceNoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.readKindDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.contentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.logTimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.rFIDContentBindingSource = new System.Windows.Forms.BindingSource(this.components);
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.Content = new System.Windows.Forms.TextBox();
+ this.ContentSelect = new System.Windows.Forms.Button();
+ this.SelectAll = new System.Windows.Forms.Button();
+ this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.groupBox3.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.LogContent)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).BeginInit();
+ this.groupBox4.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // TimeSelect
+ //
+ this.TimeSelect.Location = new System.Drawing.Point(42, 76);
+ this.TimeSelect.Name = "TimeSelect";
+ this.TimeSelect.Size = new System.Drawing.Size(122, 48);
+ this.TimeSelect.TabIndex = 0;
+ this.TimeSelect.Text = "时间范围查询";
+ this.TimeSelect.UseVisualStyleBackColor = true;
+ this.TimeSelect.Click += new System.EventHandler(this.TimeSelect_Click);
+ //
+ // StartTime
+ //
+ this.StartTime.CustomFormat = "yyyy-MM-dd hh:mm:ss";
+ this.StartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.StartTime.Location = new System.Drawing.Point(25, 20);
+ this.StartTime.Name = "StartTime";
+ this.StartTime.Size = new System.Drawing.Size(158, 21);
+ this.StartTime.TabIndex = 1;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.EndTime);
+ this.groupBox1.Controls.Add(this.StartTime);
+ this.groupBox1.Controls.Add(this.TimeSelect);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(208, 131);
+ this.groupBox1.TabIndex = 2;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "按日期时间查询";
+ //
+ // EndTime
+ //
+ this.EndTime.CustomFormat = "yyyy-MM-dd hh:mm:ss";
+ this.EndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+ this.EndTime.Location = new System.Drawing.Point(25, 49);
+ this.EndTime.Name = "EndTime";
+ this.EndTime.Size = new System.Drawing.Size(158, 21);
+ this.EndTime.TabIndex = 2;
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.ReadKind);
+ this.groupBox2.Controls.Add(this.ReadKindSelect);
+ this.groupBox2.Location = new System.Drawing.Point(12, 149);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(208, 131);
+ this.groupBox2.TabIndex = 5;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "读码结果查询";
+ //
+ // ReadKind
+ //
+ this.ReadKind.FormattingEnabled = true;
+ this.ReadKind.Location = new System.Drawing.Point(42, 30);
+ this.ReadKind.Name = "ReadKind";
+ this.ReadKind.Size = new System.Drawing.Size(122, 20);
+ this.ReadKind.TabIndex = 1;
+ this.ReadKind.Text = " ";
+ //
+ // ReadKindSelect
+ //
+ this.ReadKindSelect.Location = new System.Drawing.Point(42, 65);
+ this.ReadKindSelect.Name = "ReadKindSelect";
+ this.ReadKindSelect.Size = new System.Drawing.Size(122, 48);
+ this.ReadKindSelect.TabIndex = 0;
+ this.ReadKindSelect.Text = "读码结果查询";
+ this.ReadKindSelect.UseVisualStyleBackColor = true;
+ this.ReadKindSelect.Click += new System.EventHandler(this.ReadKindSelect_Click);
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.DeviceNo);
+ this.groupBox3.Controls.Add(this.DeviceNoSelect);
+ this.groupBox3.Location = new System.Drawing.Point(12, 286);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(208, 131);
+ this.groupBox3.TabIndex = 6;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "设备编号查询";
+ //
+ // DeviceNo
+ //
+ this.DeviceNo.Location = new System.Drawing.Point(42, 29);
+ this.DeviceNo.Name = "DeviceNo";
+ this.DeviceNo.Size = new System.Drawing.Size(122, 21);
+ this.DeviceNo.TabIndex = 1;
+ //
+ // DeviceNoSelect
+ //
+ this.DeviceNoSelect.Location = new System.Drawing.Point(42, 65);
+ this.DeviceNoSelect.Name = "DeviceNoSelect";
+ this.DeviceNoSelect.Size = new System.Drawing.Size(122, 48);
+ this.DeviceNoSelect.TabIndex = 0;
+ this.DeviceNoSelect.Text = "设备编号查询";
+ this.DeviceNoSelect.UseVisualStyleBackColor = true;
+ this.DeviceNoSelect.Click += new System.EventHandler(this.DeviceNoSelect_Click);
+ //
+ // LogContent
+ //
+ this.LogContent.AutoGenerateColumns = false;
+ this.LogContent.ColumnHeadersHeight = 20;
+ this.LogContent.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.deviceNoDataGridViewTextBoxColumn,
+ this.readKindDataGridViewTextBoxColumn,
+ this.contentDataGridViewTextBoxColumn,
+ this.logTimeDataGridViewTextBoxColumn});
+ this.LogContent.DataSource = this.rFIDContentBindingSource;
+ this.LogContent.Location = new System.Drawing.Point(226, 12);
+ this.LogContent.Name = "LogContent";
+ this.LogContent.RowHeadersVisible = false;
+ this.LogContent.RowTemplate.Height = 18;
+ this.LogContent.Size = new System.Drawing.Size(500, 899);
+ this.LogContent.TabIndex = 7;
+ //
+ // deviceNoDataGridViewTextBoxColumn
+ //
+ this.deviceNoDataGridViewTextBoxColumn.DataPropertyName = "DeviceNo";
+ this.deviceNoDataGridViewTextBoxColumn.HeaderText = "编号";
+ this.deviceNoDataGridViewTextBoxColumn.Name = "deviceNoDataGridViewTextBoxColumn";
+ this.deviceNoDataGridViewTextBoxColumn.Width = 40;
+ //
+ // readKindDataGridViewTextBoxColumn
+ //
+ this.readKindDataGridViewTextBoxColumn.DataPropertyName = "ReadKind";
+ this.readKindDataGridViewTextBoxColumn.HeaderText = "读码结果";
+ this.readKindDataGridViewTextBoxColumn.Name = "readKindDataGridViewTextBoxColumn";
+ this.readKindDataGridViewTextBoxColumn.Width = 60;
+ //
+ // contentDataGridViewTextBoxColumn
+ //
+ this.contentDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.contentDataGridViewTextBoxColumn.DataPropertyName = "Content";
+ this.contentDataGridViewTextBoxColumn.HeaderText = "条码内容";
+ this.contentDataGridViewTextBoxColumn.Name = "contentDataGridViewTextBoxColumn";
+ //
+ // logTimeDataGridViewTextBoxColumn
+ //
+ this.logTimeDataGridViewTextBoxColumn.DataPropertyName = "LogTime";
+ this.logTimeDataGridViewTextBoxColumn.HeaderText = "日志时间";
+ this.logTimeDataGridViewTextBoxColumn.Name = "logTimeDataGridViewTextBoxColumn";
+ this.logTimeDataGridViewTextBoxColumn.Width = 105;
+ //
+ // rFIDContentBindingSource
+ //
+ this.rFIDContentBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDContent);
+ //
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.Content);
+ this.groupBox4.Controls.Add(this.ContentSelect);
+ this.groupBox4.Location = new System.Drawing.Point(12, 423);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(208, 131);
+ this.groupBox4.TabIndex = 7;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "条码内容查询";
+ //
+ // Content
+ //
+ this.Content.Location = new System.Drawing.Point(42, 29);
+ this.Content.Name = "Content";
+ this.Content.Size = new System.Drawing.Size(122, 21);
+ this.Content.TabIndex = 1;
+ //
+ // ContentSelect
+ //
+ this.ContentSelect.Location = new System.Drawing.Point(42, 65);
+ this.ContentSelect.Name = "ContentSelect";
+ this.ContentSelect.Size = new System.Drawing.Size(122, 48);
+ this.ContentSelect.TabIndex = 0;
+ this.ContentSelect.Text = "条码内容查询";
+ this.ContentSelect.UseVisualStyleBackColor = true;
+ this.ContentSelect.Click += new System.EventHandler(this.ContentSelect_Click);
+ //
+ // SelectAll
+ //
+ this.SelectAll.Location = new System.Drawing.Point(12, 560);
+ this.SelectAll.Name = "SelectAll";
+ this.SelectAll.Size = new System.Drawing.Size(208, 48);
+ this.SelectAll.TabIndex = 2;
+ this.SelectAll.Text = "综合条件查询";
+ this.SelectAll.UseVisualStyleBackColor = true;
+ this.SelectAll.Click += new System.EventHandler(this.SelectAll_Click);
+ //
+ // RFIDLog
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(738, 923);
+ this.Controls.Add(this.SelectAll);
+ this.Controls.Add(this.groupBox4);
+ this.Controls.Add(this.LogContent);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.Name = "RFIDLog";
+ this.Text = "日志查询";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.LogContent)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).EndInit();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button TimeSelect;
+ private System.Windows.Forms.DateTimePicker StartTime;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.DateTimePicker EndTime;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.ComboBox ReadKind;
+ private System.Windows.Forms.Button ReadKindSelect;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.TextBox DeviceNo;
+ private System.Windows.Forms.Button DeviceNoSelect;
+ private System.Windows.Forms.DataGridView LogContent;
+ private System.Windows.Forms.BindingSource rFIDContentBindingSource;
+ private System.Windows.Forms.DataGridViewTextBoxColumn deviceNoDataGridViewTextBoxColumn;
+ private System.Windows.Forms.DataGridViewTextBoxColumn readKindDataGridViewTextBoxColumn;
+ private System.Windows.Forms.DataGridViewTextBoxColumn contentDataGridViewTextBoxColumn;
+ private System.Windows.Forms.DataGridViewTextBoxColumn logTimeDataGridViewTextBoxColumn;
+ private System.Windows.Forms.GroupBox groupBox4;
+ private System.Windows.Forms.TextBox Content;
+ private System.Windows.Forms.Button ContentSelect;
+ private System.Windows.Forms.Button SelectAll;
+ }
+}
\ No newline at end of file
diff --git a/RFIDSocket/RFIDLog.cs b/RFIDSocket/RFIDLog.cs
new file mode 100644
index 0000000..c80f6bb
--- /dev/null
+++ b/RFIDSocket/RFIDLog.cs
@@ -0,0 +1,104 @@
+using HighWayIot.Repository.domain;
+using HighWayIot.Repository.service.Impl;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace RFIDSocket
+{
+ public partial class RFIDLog : Form
+ {
+
+ List rFIDContents = new List();
+ BaseContentServiceImpl sql = new BaseContentServiceImpl();
+ public RFIDLog()
+ {
+ InitializeComponent();
+ StartTime.Value = DateTime.Now.AddDays(-3);
+ List list = new List
+ {
+ "",
+ "NB",
+ "GR",
+ "MR"
+ };
+ ReadKind.DataSource = list;
+ Init();
+ }
+
+ private void Init()
+ {
+ rFIDContents = sql.GetContentInfos();
+ }
+
+ private void TimeSelect_Click(object sender, EventArgs e)
+ {
+ if (LogContent != null)
+ {
+ LogContent.DataSource = null;
+ LogContent.DataSource = LogControl.LogTimeSelect(rFIDContents, StartTime.Value, EndTime.Value);
+ }
+ }
+
+ private void ReadKindSelect_Click(object sender, EventArgs e)
+ {
+ if (LogContent != null)
+ {
+ LogContent.DataSource = null;
+ LogContent.DataSource = LogControl.LogReadKindSelect(rFIDContents, ReadKind.Text);
+ }
+ }
+
+ private void DeviceNoSelect_Click(object sender, EventArgs e)
+ {
+ if(!int.TryParse(DeviceNo.Text, out int no))
+ {
+ MessageBox.Show("设备编号格式不正确");
+ return;
+ }
+ if (LogContent != null)
+ {
+ LogContent.DataSource = null;
+ LogContent.DataSource = LogControl.LogDeviceNoSelect(rFIDContents, no);
+ }
+ }
+
+ private void ContentSelect_Click(object sender, EventArgs e)
+ {
+ if (LogContent != null)
+ {
+ LogContent.DataSource = null;
+ LogContent.DataSource = LogControl.LogContentSelect(rFIDContents, Content.Text);
+ }
+ }
+
+ private void SelectAll_Click(object sender, EventArgs e)
+ {
+ if (!int.TryParse(DeviceNo.Text, out int no))
+ {
+ MessageBox.Show("设备编号格式不正确");
+ return;
+ }
+ if (LogContent != null)
+ {
+ LogContent.DataSource = null;
+ LogContent.DataSource = LogControl.LogTimeSelect(
+ LogControl.LogReadKindSelect(
+ LogControl.LogDeviceNoSelect(
+ LogControl.LogContentSelect(rFIDContents,
+ Content.Text),
+ no),
+ ReadKind.Text),
+ StartTime.Value, EndTime.Value);
+ }
+ }
+ }
+
+
+}
diff --git a/RFIDSocket/RFIDLog.resx b/RFIDSocket/RFIDLog.resx
new file mode 100644
index 0000000..3e42c4d
--- /dev/null
+++ b/RFIDSocket/RFIDLog.resx
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/RFIDSocket/RFIDSocket.Designer.cs b/RFIDSocket/RFIDSocket.Designer.cs
new file mode 100644
index 0000000..6375169
--- /dev/null
+++ b/RFIDSocket/RFIDSocket.Designer.cs
@@ -0,0 +1,430 @@
+namespace RFIDSocket
+{
+ partial class RFIDSocket
+ {
+ ///
+ /// 必需的设计器变量。
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ /// 如果应释放托管资源,为 true;否则为 false。
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows 窗体设计器生成的代码
+
+ ///
+ /// 设计器支持所需的方法 - 不要修改
+ /// 使用代码编辑器修改此方法的内容。
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.CotentData = new System.Windows.Forms.DataGridView();
+ this.IPText = new System.Windows.Forms.TextBox();
+ this.SetAddress = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.PortText = new System.Windows.Forms.TextBox();
+ this.MonitorOnOff = new System.Windows.Forms.Button();
+ this.label4 = new System.Windows.Forms.Label();
+ this.MonitorState = new System.Windows.Forms.Label();
+ this.TableTimer = new System.Windows.Forms.Timer(this.components);
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.StateData = new System.Windows.Forms.DataGridView();
+ this.LogTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.HeartbeatData = new System.Windows.Forms.DataGridView();
+ this.PgUp = new System.Windows.Forms.Button();
+ this.PgDn = new System.Windows.Forms.Button();
+ this.PageRange = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.LogStart = new System.Windows.Forms.Button();
+ this.deviceNoDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.timeSpanDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.rFIDHeartbeatBindingSource = new System.Windows.Forms.BindingSource(this.components);
+ this.deviceNoDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.rFIDStateBindingSource = new System.Windows.Forms.BindingSource(this.components);
+ this.rFIDContentBindingSource = new System.Windows.Forms.BindingSource(this.components);
+ this.deviceNoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.readKindDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.contentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.logTimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ ((System.ComponentModel.ISupportInitialize)(this.CotentData)).BeginInit();
+ this.groupBox2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.StateData)).BeginInit();
+ this.groupBox3.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.HeartbeatData)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rFIDHeartbeatBindingSource)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rFIDStateBindingSource)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).BeginInit();
+ this.SuspendLayout();
+ //
+ // CotentData
+ //
+ this.CotentData.AutoGenerateColumns = false;
+ this.CotentData.ColumnHeadersHeight = 20;
+ this.CotentData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.deviceNoDataGridViewTextBoxColumn,
+ this.readKindDataGridViewTextBoxColumn,
+ this.contentDataGridViewTextBoxColumn,
+ this.logTimeDataGridViewTextBoxColumn});
+ this.CotentData.DataSource = this.rFIDContentBindingSource;
+ this.CotentData.Location = new System.Drawing.Point(9, 103);
+ this.CotentData.Margin = new System.Windows.Forms.Padding(2);
+ this.CotentData.Name = "CotentData";
+ this.CotentData.RowHeadersVisible = false;
+ this.CotentData.RowHeadersWidth = 51;
+ this.CotentData.RowTemplate.Height = 17;
+ this.CotentData.ScrollBars = System.Windows.Forms.ScrollBars.None;
+ this.CotentData.Size = new System.Drawing.Size(486, 870);
+ this.CotentData.TabIndex = 0;
+ //
+ // IPText
+ //
+ this.IPText.Location = new System.Drawing.Point(116, 23);
+ this.IPText.Margin = new System.Windows.Forms.Padding(2);
+ this.IPText.MaxLength = 6;
+ this.IPText.Name = "IPText";
+ this.IPText.Size = new System.Drawing.Size(98, 21);
+ this.IPText.TabIndex = 7;
+ this.IPText.Text = "127.0.0.1";
+ //
+ // SetAddress
+ //
+ this.SetAddress.Location = new System.Drawing.Point(267, 10);
+ this.SetAddress.Margin = new System.Windows.Forms.Padding(2);
+ this.SetAddress.Name = "SetAddress";
+ this.SetAddress.Size = new System.Drawing.Size(120, 45);
+ this.SetAddress.TabIndex = 6;
+ this.SetAddress.Text = "确认服务端地址";
+ this.SetAddress.UseVisualStyleBackColor = true;
+ this.SetAddress.Click += new System.EventHandler(this.SetPort_Click);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(11, 27);
+ this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(101, 12);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "服务端IP:端口号";
+ //
+ // PortText
+ //
+ this.PortText.Location = new System.Drawing.Point(218, 23);
+ this.PortText.Margin = new System.Windows.Forms.Padding(2);
+ this.PortText.MaxLength = 6;
+ this.PortText.Name = "PortText";
+ this.PortText.Size = new System.Drawing.Size(45, 21);
+ this.PortText.TabIndex = 0;
+ this.PortText.Text = "1234";
+ //
+ // MonitorOnOff
+ //
+ this.MonitorOnOff.Location = new System.Drawing.Point(391, 11);
+ this.MonitorOnOff.Margin = new System.Windows.Forms.Padding(2);
+ this.MonitorOnOff.Name = "MonitorOnOff";
+ this.MonitorOnOff.Size = new System.Drawing.Size(110, 45);
+ this.MonitorOnOff.TabIndex = 7;
+ this.MonitorOnOff.Text = "启动监听";
+ this.MonitorOnOff.UseVisualStyleBackColor = true;
+ this.MonitorOnOff.Click += new System.EventHandler(this.MonitorOnOff_Click);
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(505, 27);
+ this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(65, 12);
+ this.label4.TabIndex = 8;
+ this.label4.Text = "监听状态:";
+ //
+ // MonitorState
+ //
+ this.MonitorState.AutoSize = true;
+ this.MonitorState.BackColor = System.Drawing.Color.Transparent;
+ this.MonitorState.Location = new System.Drawing.Point(574, 27);
+ this.MonitorState.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.MonitorState.Name = "MonitorState";
+ this.MonitorState.Size = new System.Drawing.Size(17, 12);
+ this.MonitorState.TabIndex = 9;
+ this.MonitorState.Text = "关";
+ //
+ // TableTimer
+ //
+ this.TableTimer.Interval = 1000;
+ this.TableTimer.Tick += new System.EventHandler(this.TableTimer_Tick);
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.StateData);
+ this.groupBox2.Location = new System.Drawing.Point(499, 59);
+ this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
+ this.groupBox2.Size = new System.Drawing.Size(186, 449);
+ this.groupBox2.TabIndex = 11;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "工作状态故障";
+ //
+ // StateData
+ //
+ this.StateData.AutoGenerateColumns = false;
+ this.StateData.ColumnHeadersHeight = 20;
+ this.StateData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.deviceNoDataGridViewTextBoxColumn1,
+ this.LogTime});
+ this.StateData.DataSource = this.rFIDStateBindingSource;
+ this.StateData.Location = new System.Drawing.Point(4, 19);
+ this.StateData.Margin = new System.Windows.Forms.Padding(2);
+ this.StateData.Name = "StateData";
+ this.StateData.RowHeadersVisible = false;
+ this.StateData.RowHeadersWidth = 51;
+ this.StateData.RowTemplate.Height = 20;
+ this.StateData.Size = new System.Drawing.Size(177, 425);
+ this.StateData.TabIndex = 0;
+ //
+ // LogTime
+ //
+ this.LogTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.LogTime.DataPropertyName = "LogTime";
+ this.LogTime.HeaderText = "报警时间";
+ this.LogTime.MinimumWidth = 6;
+ this.LogTime.Name = "LogTime";
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.HeartbeatData);
+ this.groupBox3.Location = new System.Drawing.Point(499, 512);
+ this.groupBox3.Margin = new System.Windows.Forms.Padding(2);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Padding = new System.Windows.Forms.Padding(2);
+ this.groupBox3.Size = new System.Drawing.Size(186, 461);
+ this.groupBox3.TabIndex = 12;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "连接故障";
+ //
+ // HeartbeatData
+ //
+ this.HeartbeatData.AutoGenerateColumns = false;
+ this.HeartbeatData.ColumnHeadersHeight = 20;
+ this.HeartbeatData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.deviceNoDataGridViewTextBoxColumn2,
+ this.timeSpanDataGridViewTextBoxColumn});
+ this.HeartbeatData.DataSource = this.rFIDHeartbeatBindingSource;
+ this.HeartbeatData.Location = new System.Drawing.Point(4, 19);
+ this.HeartbeatData.Margin = new System.Windows.Forms.Padding(2);
+ this.HeartbeatData.Name = "HeartbeatData";
+ this.HeartbeatData.RowHeadersVisible = false;
+ this.HeartbeatData.RowHeadersWidth = 51;
+ this.HeartbeatData.RowTemplate.Height = 20;
+ this.HeartbeatData.ScrollBars = System.Windows.Forms.ScrollBars.None;
+ this.HeartbeatData.Size = new System.Drawing.Size(177, 437);
+ this.HeartbeatData.TabIndex = 0;
+ //
+ // PgUp
+ //
+ this.PgUp.Location = new System.Drawing.Point(9, 59);
+ this.PgUp.Margin = new System.Windows.Forms.Padding(2);
+ this.PgUp.Name = "PgUp";
+ this.PgUp.Size = new System.Drawing.Size(101, 40);
+ this.PgUp.TabIndex = 8;
+ this.PgUp.Text = "上一页";
+ this.PgUp.UseVisualStyleBackColor = true;
+ this.PgUp.Click += new System.EventHandler(this.PgUp_Click);
+ //
+ // PgDn
+ //
+ this.PgDn.Location = new System.Drawing.Point(394, 59);
+ this.PgDn.Margin = new System.Windows.Forms.Padding(2);
+ this.PgDn.Name = "PgDn";
+ this.PgDn.Size = new System.Drawing.Size(101, 40);
+ this.PgDn.TabIndex = 13;
+ this.PgDn.Text = "下一页";
+ this.PgDn.UseVisualStyleBackColor = true;
+ this.PgDn.Click += new System.EventHandler(this.PgDn_Click);
+ //
+ // PageRange
+ //
+ this.PageRange.AutoSize = true;
+ this.PageRange.BackColor = System.Drawing.Color.Transparent;
+ this.PageRange.Font = new System.Drawing.Font("宋体", 12F);
+ this.PageRange.Location = new System.Drawing.Point(255, 69);
+ this.PageRange.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.PageRange.Name = "PageRange";
+ this.PageRange.Size = new System.Drawing.Size(55, 16);
+ this.PageRange.TabIndex = 15;
+ this.PageRange.Text = "1 - 50";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("宋体", 12F);
+ this.label3.Location = new System.Drawing.Point(186, 69);
+ this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(87, 16);
+ this.label3.TabIndex = 14;
+ this.label3.Text = "显示条数:";
+ //
+ // LogStart
+ //
+ this.LogStart.Location = new System.Drawing.Point(595, 11);
+ this.LogStart.Margin = new System.Windows.Forms.Padding(2);
+ this.LogStart.Name = "LogStart";
+ this.LogStart.Size = new System.Drawing.Size(85, 45);
+ this.LogStart.TabIndex = 16;
+ this.LogStart.Text = "日志查询";
+ this.LogStart.UseVisualStyleBackColor = true;
+ this.LogStart.Click += new System.EventHandler(this.LogStart_Click);
+ //
+ // deviceNoDataGridViewTextBoxColumn2
+ //
+ this.deviceNoDataGridViewTextBoxColumn2.DataPropertyName = "DeviceNo";
+ this.deviceNoDataGridViewTextBoxColumn2.HeaderText = "编号";
+ this.deviceNoDataGridViewTextBoxColumn2.MinimumWidth = 6;
+ this.deviceNoDataGridViewTextBoxColumn2.Name = "deviceNoDataGridViewTextBoxColumn2";
+ this.deviceNoDataGridViewTextBoxColumn2.Width = 60;
+ //
+ // timeSpanDataGridViewTextBoxColumn
+ //
+ this.timeSpanDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.timeSpanDataGridViewTextBoxColumn.DataPropertyName = "TimeSpan";
+ this.timeSpanDataGridViewTextBoxColumn.HeaderText = "距上一次心跳时间";
+ this.timeSpanDataGridViewTextBoxColumn.MinimumWidth = 6;
+ this.timeSpanDataGridViewTextBoxColumn.Name = "timeSpanDataGridViewTextBoxColumn";
+ //
+ // rFIDHeartbeatBindingSource
+ //
+ this.rFIDHeartbeatBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDHeartbeat);
+ //
+ // deviceNoDataGridViewTextBoxColumn1
+ //
+ this.deviceNoDataGridViewTextBoxColumn1.DataPropertyName = "DeviceNo";
+ this.deviceNoDataGridViewTextBoxColumn1.HeaderText = "编号";
+ this.deviceNoDataGridViewTextBoxColumn1.MinimumWidth = 6;
+ this.deviceNoDataGridViewTextBoxColumn1.Name = "deviceNoDataGridViewTextBoxColumn1";
+ this.deviceNoDataGridViewTextBoxColumn1.Width = 60;
+ //
+ // rFIDStateBindingSource
+ //
+ this.rFIDStateBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDState);
+ //
+ // rFIDContentBindingSource
+ //
+ this.rFIDContentBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDContent);
+ //
+ // deviceNoDataGridViewTextBoxColumn
+ //
+ this.deviceNoDataGridViewTextBoxColumn.DataPropertyName = "DeviceNo";
+ this.deviceNoDataGridViewTextBoxColumn.HeaderText = "编号";
+ this.deviceNoDataGridViewTextBoxColumn.MinimumWidth = 6;
+ this.deviceNoDataGridViewTextBoxColumn.Name = "deviceNoDataGridViewTextBoxColumn";
+ this.deviceNoDataGridViewTextBoxColumn.Width = 40;
+ //
+ // readKindDataGridViewTextBoxColumn
+ //
+ this.readKindDataGridViewTextBoxColumn.DataPropertyName = "ReadKind";
+ this.readKindDataGridViewTextBoxColumn.HeaderText = "读码结果";
+ this.readKindDataGridViewTextBoxColumn.MinimumWidth = 6;
+ this.readKindDataGridViewTextBoxColumn.Name = "readKindDataGridViewTextBoxColumn";
+ this.readKindDataGridViewTextBoxColumn.Width = 60;
+ //
+ // contentDataGridViewTextBoxColumn
+ //
+ this.contentDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.contentDataGridViewTextBoxColumn.DataPropertyName = "Content";
+ this.contentDataGridViewTextBoxColumn.HeaderText = "条码内容";
+ this.contentDataGridViewTextBoxColumn.MinimumWidth = 6;
+ this.contentDataGridViewTextBoxColumn.Name = "contentDataGridViewTextBoxColumn";
+ //
+ // logTimeDataGridViewTextBoxColumn
+ //
+ this.logTimeDataGridViewTextBoxColumn.DataPropertyName = "LogTime";
+ this.logTimeDataGridViewTextBoxColumn.HeaderText = "读取时间";
+ this.logTimeDataGridViewTextBoxColumn.MinimumWidth = 6;
+ this.logTimeDataGridViewTextBoxColumn.Name = "logTimeDataGridViewTextBoxColumn";
+ this.logTimeDataGridViewTextBoxColumn.Width = 105;
+ //
+ // RFIDSocket
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(695, 983);
+ this.Controls.Add(this.LogStart);
+ this.Controls.Add(this.PageRange);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.IPText);
+ this.Controls.Add(this.PgDn);
+ this.Controls.Add(this.SetAddress);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.PgUp);
+ this.Controls.Add(this.PortText);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.MonitorState);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.MonitorOnOff);
+ this.Controls.Add(this.CotentData);
+ this.Margin = new System.Windows.Forms.Padding(2);
+ this.Name = "RFIDSocket";
+ this.Text = " 小件监听";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.RFIDSocket_FormClosing);
+ ((System.ComponentModel.ISupportInitialize)(this.CotentData)).EndInit();
+ this.groupBox2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.StateData)).EndInit();
+ this.groupBox3.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.HeartbeatData)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rFIDHeartbeatBindingSource)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rFIDStateBindingSource)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.DataGridView CotentData;
+ private System.Windows.Forms.Button SetAddress;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox PortText;
+ private System.Windows.Forms.Button MonitorOnOff;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label MonitorState;
+ private System.Windows.Forms.Timer TableTimer;
+ private System.Windows.Forms.TextBox IPText;
+ private System.Windows.Forms.BindingSource rFIDContentBindingSource;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.BindingSource rFIDStateBindingSource;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.DataGridView HeartbeatData;
+ private System.Windows.Forms.DataGridView StateData;
+ private System.Windows.Forms.DataGridViewTextBoxColumn deviceNoDataGridViewTextBoxColumn1;
+ private System.Windows.Forms.DataGridViewTextBoxColumn LogTime;
+ private System.Windows.Forms.DataGridViewTextBoxColumn deviceNoDataGridViewTextBoxColumn2;
+ private System.Windows.Forms.DataGridViewTextBoxColumn timeSpanDataGridViewTextBoxColumn;
+ private System.Windows.Forms.BindingSource rFIDHeartbeatBindingSource;
+ private System.Windows.Forms.Button PgUp;
+ private System.Windows.Forms.Button PgDn;
+ private System.Windows.Forms.Label PageRange;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Button LogStart;
+ private System.Windows.Forms.DataGridViewTextBoxColumn deviceNoDataGridViewTextBoxColumn;
+ private System.Windows.Forms.DataGridViewTextBoxColumn readKindDataGridViewTextBoxColumn;
+ private System.Windows.Forms.DataGridViewTextBoxColumn contentDataGridViewTextBoxColumn;
+ private System.Windows.Forms.DataGridViewTextBoxColumn logTimeDataGridViewTextBoxColumn;
+ }
+}
+
diff --git a/RFIDSocket/RFIDSocket.cs b/RFIDSocket/RFIDSocket.cs
new file mode 100644
index 0000000..6f2ec5e
--- /dev/null
+++ b/RFIDSocket/RFIDSocket.cs
@@ -0,0 +1,170 @@
+using HighWayIot.Repository.domain;
+using HighWayIot.TouchSocket;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Runtime.Remoting.Channels;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using TouchSocket.Sockets;
+
+namespace RFIDSocket
+{
+ public partial class RFIDSocket : Form
+ {
+ private static TcpServer Server = TcpServer.Instance;
+
+ private static DataAnalysis RFIDData = DataAnalysis.Instance;
+
+
+ string Port = "1234";
+ string IP = "127.0.0.1";
+
+ int PageNo = 1;
+
+ public RFIDSocket()
+ {
+ InitializeComponent();
+ InitAction();
+ }
+
+ private void InitAction()
+ {
+ if (Server.State != ServerState.Running)
+ {
+ MonitorState.Text = "关";
+ MonitorState.BackColor = Color.Yellow;
+ }
+ else if (Server.State == ServerState.Running)
+ {
+ MonitorState.Text = "开";
+ MonitorState.BackColor = Color.LightGreen;
+ }
+
+ Port = PortText.Text;
+ IP = IPText.Text;
+
+
+ }
+
+ private void MonitorOnOff_Click(object sender, EventArgs e)
+ {
+ if (Server.State != ServerState.Running)
+ {
+ if (Server.ServerStart(IP, Port))
+ {
+ MessageBox.Show("监听服务启动成功!");
+ TableTimer.Enabled = true;
+ }
+ else
+ {
+ MessageBox.Show("监听服务启动失败!");
+ }
+ }
+ else if (Server.State == ServerState.Running)
+ {
+ if (Server.ServerStop())
+ {
+ MessageBox.Show("监听服务关闭成功!");
+ TableTimer.Enabled = false;
+ }
+ else
+ {
+ MessageBox.Show("监听服务关闭失败!");
+ }
+ }
+ }
+
+ private void SetPort_Click(object sender, EventArgs e)
+ {
+ Port = PortText.Text;
+ IP = IPText.Text;
+ }
+
+ private void TableTimer_Tick(object sender, EventArgs e)
+ {
+ if (Server.State != ServerState.Running)
+ {
+ MonitorOnOff.Text = "启动监听";
+ MonitorState.Text = "关";
+ MonitorState.BackColor = Color.Yellow;
+ }
+ else if (Server.State == ServerState.Running)
+ {
+ MonitorOnOff.Text = "关闭监听";
+ MonitorState.Text = "开";
+ MonitorState.BackColor = Color.LightGreen;
+ }
+
+ RFIDData.GetData();
+
+ CotentData.DataSource = null;
+ StateData.DataSource = null;
+ HeartbeatData.DataSource = null;
+
+ switch (PageNo)
+ {
+ case 1: ContentPages(0); PageRange.Text = "0 - 50"; break;
+ case 2: ContentPages(50); PageRange.Text = "51 - 100"; break;
+ case 3: ContentPages(100); PageRange.Text = "101 - 150"; break;
+ case 4: ContentPages(150); PageRange.Text = "151 - 200"; break;
+ default: ContentPages(0); PageRange.Text = "0 - 50"; break;
+ }
+
+ StateData.DataSource = RFIDData.AlarmState;
+ HeartbeatData.DataSource = RFIDData.HeartbeatsState;
+ }
+
+ private void RFIDSocket_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (Server.State == ServerState.Running)
+ {
+ if (!Server.ServerStop())
+ {
+ MessageBox.Show("监听服务关闭失败! 请成功关闭后再退出");
+ e.Cancel = true;
+ }
+ if (!Server.ServerDispose())
+ {
+ MessageBox.Show("监听服务释放失败! 请再次尝试退出");
+ e.Cancel = true;
+ }
+ }
+ }
+
+ private void ContentPages(int skip)
+ {
+ CotentData.DataSource = RFIDData.rFIDContents.Skip(skip).Take(50).ToList();
+ }
+
+ private void PgUp_Click(object sender, EventArgs e)
+ {
+ if(PageNo == 1)
+ {
+ MessageBox.Show("已经是首页!");
+ return;
+ }
+ PageNo--;
+ }
+
+ private void PgDn_Click(object sender, EventArgs e)
+ {
+ if (PageNo == 4)
+ {
+ MessageBox.Show("已经是尾页!");
+ return;
+ }
+ PageNo++;
+ }
+
+ private void LogStart_Click(object sender, EventArgs e)
+ {
+ RFIDLog rFIDLog = new RFIDLog();
+ rFIDLog.Show();
+ }
+ }
+}
diff --git a/RFIDSocket/RFIDSocket.csproj b/RFIDSocket/RFIDSocket.csproj
new file mode 100644
index 0000000..f2c678d
--- /dev/null
+++ b/RFIDSocket/RFIDSocket.csproj
@@ -0,0 +1,124 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {B632CAA9-47D5-47DC-A49F-2106166096BA}
+ WinExe
+ RFIDSocket
+ RFIDSocket
+ v4.8
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\packages\TouchSocket.2.0.0-beta.253\lib\net45\TouchSocket.dll
+
+
+ ..\packages\TouchSocket.Core.2.0.0-beta.253\lib\net45\TouchSocket.Core.dll
+
+
+
+
+
+
+ Form
+
+
+ RFIDLog.cs
+
+
+ Form
+
+
+ RFIDSocket.cs
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ RFIDLog.cs
+
+
+ RFIDSocket.cs
+
+
+
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+ {DEABC30C-EC6F-472E-BD67-D65702FDAF74}
+ HighWayIot.Log4net
+
+
+ {d0dc3cfb-6748-4d5e-b56a-76fdc72ab4b3}
+ HighWayIot.Repository
+
+
+ {DD18A634-1F9C-409A-8C32-C3C81B1B55B5}
+ HighWayIot.TouchSocket
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/RFIDSocket/RFIDSocket.resx b/RFIDSocket/RFIDSocket.resx
new file mode 100644
index 0000000..452205c
--- /dev/null
+++ b/RFIDSocket/RFIDSocket.resx
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 159, 17
+
+
+ 17, 17
+
+
+ True
+
+
+ 413, 17
+
+
+ True
+
+
+ 646, 17
+
+
+ 646, 17
+
+
+ 413, 17
+
+
\ No newline at end of file
diff --git a/RFIDSocket/packages.config b/RFIDSocket/packages.config
new file mode 100644
index 0000000..daf2c12
--- /dev/null
+++ b/RFIDSocket/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file