diff --git a/NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs b/NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs index 2fbda38..c6ee315 100644 --- a/NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs +++ b/NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs @@ -58,10 +58,10 @@ namespace NearCardAttendance.Service.TcpServer.Handler //var parser = buffer.ToString(Encoding.ASCII); ProtocolParser parser = new(buffer.ToString(Encoding.ASCII)); context.FireChannelRead(parser); - Console.WriteLine($"发送正常:{parser}"); + //Console.WriteLine($"发送正常:{parser}"); //ProtocolWrapper wrapper = new ProtocolWrapper("82", parser.SeqNo, DateTime.Now.ToString("yyyyMMddHHmmss")); //Console.WriteLine(wrapper.GenerateProtocolString()); - Console.WriteLine($"length:{parser.MessageLength},func_no:{parser.FuncNo},seq_no:{parser.SeqNo},data:{parser.Data}"); + //Console.WriteLine($"length:{parser.MessageLength},func_no:{parser.FuncNo},seq_no:{parser.SeqNo},data:{parser.Data}"); ReleaseBuffer(); } else if (buffer.ToString(Encoding.ASCII).Length > messageLength) diff --git a/NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs b/NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs index a941416..54d52ab 100644 --- a/NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs +++ b/NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.Logging; using NearCardAttendance.Common.helper; using NearCardAttendance.Service.TcpServer.Mapper; using NearCardAttendance.Service.TcpServer.Protocol; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -235,7 +236,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler imei = deviceId }; var res=await _httpHelper.HttpToPostAsync(url, data); - _logger.LogInformation($"{nameof(HandleSignRecsAsync)} 推送结果,{res}"); + _logger.LogInformation($"{nameof(HandleSignRecsAsync)} 推送 {JsonConvert.SerializeObject(data)} 结果,{res}"); } /// @@ -265,7 +266,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler imei = deviceId }; var res = await _httpHelper.HttpToPostAsync(url, data); - _logger.LogInformation($"{nameof(HandleStdtSchoolRecsAsync)} 推送结果,{res}"); + _logger.LogInformation($"{nameof(HandleStdtSchoolRecsAsync)} 推送 {JsonConvert.SerializeObject(data)} 结果,{res}"); } } }