ningshuxia
2022-12-12 4f1314cb69a47c22e52f1efdc4b4be6c1d55143d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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);
            }
 
        }
    }
}