From f205fd10c93a3533aa60966ee0ae2dc7ca6069aa Mon Sep 17 00:00:00 2001 From: DESKTOP-G1UHLH2 Date: Tue, 8 Oct 2024 10:15:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=9A=82=E5=AD=98=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.Business/TagScanBusiness.cs | 15 +++++++++------ SlnMesnac.TouchSocket/ApiServer.cs | 8 ++++++-- SlnMesnac.WPF/Page/IndexControl.xaml | 2 +- SlnMesnac.WPF/appsettings.json | 2 +- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/SlnMesnac.Business/TagScanBusiness.cs b/SlnMesnac.Business/TagScanBusiness.cs index cee5b2f..b0c1c05 100644 --- a/SlnMesnac.Business/TagScanBusiness.cs +++ b/SlnMesnac.Business/TagScanBusiness.cs @@ -85,14 +85,17 @@ namespace SlnMesnac.Business { if (str.Length == 2) { - int number; - bool isNumber = int.TryParse(str, out number); - if (isNumber && str[0] == '1') + if(str != "00") { - camList.Add(str); - continue; + int number; + bool isNumber = int.TryParse(str, out number); + if (isNumber && str[0] == '1') + { + camList.Add(str); + continue; + } + rfidList.Add(str); } - rfidList.Add(str); } } diff --git a/SlnMesnac.TouchSocket/ApiServer.cs b/SlnMesnac.TouchSocket/ApiServer.cs index f7657c2..9bd4fde 100644 --- a/SlnMesnac.TouchSocket/ApiServer.cs +++ b/SlnMesnac.TouchSocket/ApiServer.cs @@ -77,8 +77,12 @@ namespace SlnMesnac.TouchSocket else { string rfidStr = hk.rfid; - AnasysBuffer(ref rfidStr); - hk.rfid = rfidStr; + if (!string.IsNullOrEmpty(hk.rfid)) + { + AnasysBuffer(ref rfidStr); + hk.rfid = rfidStr; + } + } ScanLogSocket scan = new ScanLogSocket() diff --git a/SlnMesnac.WPF/Page/IndexControl.xaml b/SlnMesnac.WPF/Page/IndexControl.xaml index 0242341..e4a9708 100644 --- a/SlnMesnac.WPF/Page/IndexControl.xaml +++ b/SlnMesnac.WPF/Page/IndexControl.xaml @@ -149,7 +149,7 @@ Foreground="#31446E" x:Name="dataGrid" Margin="10,0,10,0"> - + diff --git a/SlnMesnac.WPF/appsettings.json b/SlnMesnac.WPF/appsettings.json index 8d4a2ad..b10cf44 100644 --- a/SlnMesnac.WPF/appsettings.json +++ b/SlnMesnac.WPF/appsettings.json @@ -13,7 +13,7 @@ { "configId": "mes", "dbType": 4, - "connStr": "PORT=5432;DATABASE=daxing;HOST=192.168.0.101;PASSWORD=123456;USER ID=postgres" + "connStr": "PORT=5432;DATABASE=daxing;HOST=127.0.0.1;PASSWORD=123456;USER ID=postgres" } ] }