杨张扬
2 天以前 6f89acbf74c6838db518a9f2b6c83f0ab0d97e7f
device/TcpServer.cs
@@ -147,13 +147,18 @@
                            saoMa[remote_ip] = 3;//未扫到码
                        }
                        if (messageBytes.Length >= 21 && isCheck[remote_ip])
                        if (messageBytes.Length >= 21
                            && isCheck[remote_ip]
                            && messageBytes[0] == 0xCC
                            && messageBytes[1] == 0xFF
                            && messageBytes[2] == 0xFF)
                        {
                            byte[] rfid = new byte[12];
                            Array.Copy(messageBytes, 9, rfid, 0, 12);
                            string rfids16 = BitConverter.ToString(rfid);
                            string rfids = Encoding.ASCII.GetString(rfid);
                            string rfids16 = BitConverter.ToString(messageBytes);
                            string rfids = Encoding.ASCII.GetString(rfid);//截取字符串
                            LogHelper.Info($"读卡器校验对应容器号:{rfids},其16进制形式:{rfids16}");
                            if (ScanCodeHelper.Analysis(remote_ip, rfids))//校验RFID
                            {