private static void OutputError(resultData result, object devId, emsData emsData, EmsdataStatus status, DeviceInfomation device) { if (status == EmsdataStatus.NotFound) { _dataProvider.AddNewData(emsData, int.Parse(device.StatId), int.Parse(device.StatId), device.Country, device.StatUpCode); } else if (status == EmsdataStatus.Exceeded) { _dataProvider.UpdateNewData(emsData, int.Parse(device.StatId), int.Parse(device.StatId), device.Country, device.StatUpCode); } if (result.result.Length > 0) { foreach (var dataEntry in result.result) { Console.WriteLine($"Result Error=> devId:{devId} key:{dataEntry.key},value:{dataEntry.value}"); } } else { Console.WriteLine($"发送数据成功,时间:{DateTime.Now:yyyy-MM-dd hh:mm:ss},设备Id:{devId},TP值:{emsData.dust}"); AddToHistoryData(emsData); } }