[성현모] DataModel분리, TestResult 페이지/기능 추가

This commit is contained in:
SHM
2025-09-16 09:11:54 +09:00
parent 29c34abcb6
commit a57734308f
20 changed files with 329 additions and 123 deletions

View File

@ -1,4 +1,7 @@
using Web.Tra.Model;
using Newtonsoft.Json;
using SystemX.Core.DB;
using Web.Tra.Model;
using SystemX.Core.Utils;
public static class ObjectExtend
{
@ -83,4 +86,22 @@ public static class ObjectExtend
TestListReqID = data.Summary.TestListCntID
};
}
public static List<DecompressTestResult> ToTestResult(this HIST_TestResult histTestResult)
{
var decompStr = histTestResult?.LogData.GzipDecompress();
var logData = JsonConvert.DeserializeObject<List<DecompressTestResult>>(decompStr);
foreach (var log in logData)
{
if (string.IsNullOrEmpty(log.Message) == false)
log.MesauredValue = log.Message;
else if (string.IsNullOrEmpty(log.MeasValStr) == false)
log.MesauredValue = log.MeasValStr;
else
log.MesauredValue = log.MeasVal.ToString();
}
return logData;
}
}