using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace IStation.DataDockingApi
|
{
|
/// <summary>
|
/// 调试辅助类
|
/// </summary>
|
internal class DebugHelper
|
{
|
private const string _logName = "API_JTMeter";
|
|
/// <summary>
|
/// 调试
|
/// </summary>
|
public static void Debug(List<Model.MonitorDataDockingSrcRecord> record_list)
|
{
|
if (record_list == null || record_list.Count < 1)
|
return;
|
var debug_list = record_list.Select(x => new Model.MonitorDataDockingDebugRecord() {
|
SignId = x.SignId,
|
RecordType = x.RecordType,
|
SrcTime = x.SrcTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
SrcValue=x.SrcValue
|
}).ToList();
|
|
if (debug_list != null && debug_list.Count > 0)
|
{
|
var json = JsonHelper.Object2Json(debug_list);
|
LogHelper.Custom(_logName, json);
|
}
|
|
}
|
}
|
}
|