Prductionsdate now from RadioTest

This commit is contained in:
Roland Drabesch
2023-02-27 10:53:10 +01:00
parent 204377fb30
commit 050fd97aaa
15 changed files with 498 additions and 72 deletions
@@ -383,7 +383,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
sb.AppendLine($" ,[ID_PCB] ");
sb.AppendLine($" ,[ID_TEST] ");
sb.AppendLine($" ,[JSON] ");
sb.AppendLine($" FROM [MyOraDB]..[DELTACHEF].[GENESIS_PCBMETROLOGYTEST_PD] ");
sb.AppendLine($" FROM [MyOraDB]..[DELTACHEF].[GENESIS_PCBRADIOTEST_PD] ");
sb.AppendLine($" where[ID_PCB] = '{CheckPcbId}' ");
sb.AppendLine($" order by cast(ID_TEST as int) desc");
@@ -396,11 +396,23 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
{
var jsonString = item["JSON"].ToString();
JObject o = JObject.Parse(jsonString);
if (o.ContainsKey("StartDT") && DateTimeOffset.TryParse(o["StartDT"].ToString(), out ret))
{
return ret;
}
var jResults = JsonConvert.DeserializeObject<JToken>(jsonString);
//foreach (var o in jResults["JsonObject"])
//{
// //o.ToString().Contains("StartDT")
// if (o["StartDT"] != null && DateTimeOffset.TryParse(o["StartDT"].ToString(), out ret))
// {
// return ret;
// }
//}
}
catch (Exception)