diff --git a/protocols/JiShe.CollectBus.Protocol.T37612012/Protocol3761Extensions.cs b/protocols/JiShe.CollectBus.Protocol.T37612012/Protocol3761Extensions.cs index f9f3801..caa6793 100644 --- a/protocols/JiShe.CollectBus.Protocol.T37612012/Protocol3761Extensions.cs +++ b/protocols/JiShe.CollectBus.Protocol.T37612012/Protocol3761Extensions.cs @@ -257,7 +257,7 @@ namespace JiShe.CollectBus.Protocol.T37612012 else decimal.TryParse(data[i], out value); meter.DataValue = value; - meter.DataType = dataType; + meter.DataType = dataType.ToUpper(); meter.FiledDesc = filedDesc; meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty; if (DateTime.TryParse(CalculateTimeSpan(i - 3, data[0], density), out DateTime readingDate)) diff --git a/services/JiShe.CollectBus.Application/Samples/SampleAppService.cs b/services/JiShe.CollectBus.Application/Samples/SampleAppService.cs index 4cb325c..56e895a 100644 --- a/services/JiShe.CollectBus.Application/Samples/SampleAppService.cs +++ b/services/JiShe.CollectBus.Application/Samples/SampleAppService.cs @@ -25,6 +25,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; +using TouchSocket.Core; using TouchSocket.Sockets; namespace JiShe.CollectBus.Samples; @@ -434,7 +435,7 @@ public class SampleAppService : CollectBusAppService, ISampleAppService, IKafkaS if (_tcpService.ClientExists(dto.Address)) { // 发送给设备 - await _tcpService.SendAsync(dto.Address, dto.Frame); + await _tcpService.SendAsync(dto.Address, Convert.FromHexString(dto.Frame)); _logger.LogWarning($"{dto.Address}下发消息报文:{dto.Frame}"); } else diff --git a/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml b/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml index a58ded5..30e91e8 100644 --- a/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml +++ b/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml @@ -16,6 +16,7 @@