Put
OpenInsightCommonGatewayInterfaceReactorStatesStatus
This commit is contained in:
@ -35,40 +35,31 @@ public class ProcessData
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string logisticsSequenceMemoryDirectory, List<jpeg.Description> descriptions, string matchDirectory)
|
||||
internal static async void PutOpenInsightCommonGatewayInterfaceReactorStatesStatus(IFileRead fileRead, Logistics logistics, HttpClient httpClient, List<jpeg.Description> descriptions)
|
||||
{
|
||||
if (fileRead is null)
|
||||
{ }
|
||||
if (logistics is null)
|
||||
{ }
|
||||
if (openInsightMetrologyViewerAPI is null)
|
||||
{ }
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
if (logisticsSequenceMemoryDirectory is null)
|
||||
{ }
|
||||
if (descriptions is null)
|
||||
{ }
|
||||
if (matchDirectory is null)
|
||||
{ }
|
||||
//Not used
|
||||
}
|
||||
|
||||
internal static void PostOpenInsightCommonGatewayInterfaceContacts(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string logisticsSequenceMemoryDirectory, List<jpeg.Description> descriptions)
|
||||
{
|
||||
if (fileRead is null)
|
||||
{ }
|
||||
if (logistics is null)
|
||||
{ }
|
||||
if (openInsightMetrologyViewerAPI is null)
|
||||
{ }
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
if (logisticsSequenceMemoryDirectory is null)
|
||||
{ }
|
||||
if (descriptions is null)
|
||||
{ }
|
||||
//Not used
|
||||
HttpContent httpContent = null;
|
||||
string status = descriptions[0].MID;
|
||||
string reactorNumber = logistics.MesEntity.Substring(1);
|
||||
string statusDateTime = logistics.DateTimeFromSequence.ToString("MM-dd-yyyy HH:mm:ss");
|
||||
Uri uri = new($"{httpClient.BaseAddress.OriginalString}reactno={reactorNumber}&status={status}&statusdtm={statusDateTime}");
|
||||
try
|
||||
{
|
||||
HttpResponseMessage httpResponseMessage = await httpClient.PutAsync(uri, httpContent);
|
||||
if (httpResponseMessage.StatusCode is System.Net.HttpStatusCode.OK)
|
||||
{
|
||||
string content = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{ }
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
status = ex.Message;
|
||||
if (string.IsNullOrEmpty(status))
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user