Merged PR 85934: MPR Distribution...
5f72aee7
Tobias Lutz
committed
succeeded
4 changed files
IProductionServices.cs
/Client/HomagGroup.DigitalFactory.ApiGateway.Client/Interfaces/IProductionServices.cs+13
/Client/HomagGroup.DigitalFactory.ApiGateway.Client/Interfaces/IProductionServices.cs
Add comment 1 Plus  using System.Collections.Generic;
Add comment 1 2 using System.IO;
Add comment 2 3 using System.Threading.Tasks;
Add comment 3 4
Add comment 50 51 /// <param name="feedbackRequest">define a feedback request</param>
Add comment 51 52 /// <returns></returns>
Add comment 52 53 Task<FeedbackResult> PMWorkplaceFeedback(string workplaceId, FeedbackRequest feedbackRequest);
Add comment 54 Plus  
Add comment 55 Plus   /// <summary>
Add comment 56 Plus   /// Gets the mpr distribution info
Add comment 57 Plus   /// </summary>
Add comment 58 Plus   /// <returns></returns>
Add comment 59 Plus   Task<IEnumerable<MprDistributionInfo>> GetMprDistributionInfos();
Add comment 60 Plus  
Add comment 61 Plus   /// <summary>
Add comment 62 Plus   /// Gets the machine info
Add comment 63 Plus   /// </summary>
Add comment 64 Plus   /// <returns></returns>
Add comment 65 Plus   Task<IEnumerable<MachineInfo>> GetMachineInfos();
Add comment 53 66 }
Add comment 54 67 }
Add comment 55 68
ProductionServices.cs
/Client/HomagGroup.DigitalFactory.ApiGateway.Client/Services/ProductionServices.cs+33
/Client/HomagGroup.DigitalFactory.ApiGateway.Client/Services/ProductionServices.cs
Add comment 1 using HomagGroup.DigitalFactory.ApiGateway.Client.Interfaces;
Add comment 2 using Newtonsoft.Json;
Add comment 3 using System;
Add comment 4 Plus  using System.Collections;
Add comment 5 Plus  using System.Collections.Generic;
Add comment 4 6 using System.Globalization;
Add comment 5 7 using System.IO;
Add comment 6 8 using System.Net.Http;
Add comment 157 159 var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
Add comment 158 160 return JsonConvert.DeserializeObject<FeedbackResult>(content, SerializerSettings.Default);
Add comment 159 161 }
Add comment 162 Plus  
Add comment 163 Plus   /// <inheritdoc />
Add comment 164 Plus   public async Task<IEnumerable<MprDistributionInfo>> GetMprDistributionInfos()
Add comment 165 Plus   {
Add comment 166 Plus   var request = new HttpRequestMessage { Method = HttpMethod.Get };
Add comment 167 Plus   var uri = $"{Prefix}productions/mprinfos";
Add comment 168 Plus   request.RequestUri = new Uri(uri, UriKind.Relative);
Add comment 169 Plus   request.Headers.AcceptLanguage.Clear();
Add comment 170 Plus   request.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(CultureInfo.CurrentUICulture.Name));
Add comment 171 Plus   var response = await Client.SendAsync(request).ConfigureAwait(false);
Add comment 172 Plus   response.HandleDeprecatedMessages(request, ApiVersion, ThrowExceptionOnDeprecatedCalls, OnDeprecatedAction);
Add comment 173 Plus   response.EnsureSuccessStatusCodeWithDetails(request);
Add comment 174 Plus   var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
Add comment 175 Plus   return JsonConvert.DeserializeObject<IEnumerable<MprDistributionInfo>>(content, SerializerSettings.Default);
Add comment 176 Plus   }
Add comment 177 Plus  
Add comment 178 Plus  
Add comment 179 Plus   /// <inheritdoc />
Add comment 180 Plus   public async Task<IEnumerable<MachineInfo>> GetMachineInfos()
Add comment 181 Plus   {
Add comment 182 Plus   var request = new HttpRequestMessage { Method = HttpMethod.Get };
Add comment 183 Plus   var uri = $"{Prefix}productions/machineinfos";
Add comment 184 Plus   request.RequestUri = new Uri(uri, UriKind.Relative);
Add comment 185 Plus   request.Headers.AcceptLanguage.Clear();
Add comment 186 Plus   request.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(CultureInfo.CurrentUICulture.Name));
Add comment 187 Plus   var response = await Client.SendAsync(request).ConfigureAwait(false);
Add comment 188 Plus   response.HandleDeprecatedMessages(request, ApiVersion, ThrowExceptionOnDeprecatedCalls, OnDeprecatedAction);
Add comment 189 Plus   response.EnsureSuccessStatusCodeWithDetails(request);
Add comment 190 Plus   var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
Add comment 191 Plus   return JsonConvert.DeserializeObject<IEnumerable<MachineInfo>>(content, SerializerSettings.Default);
Add comment 192 Plus   }
Add comment 160 193 }
Add comment 161 194 }
Add comment 162 195
MachineInfo.cs
/Client/HomagGroup.DigitalFactory.ApiGateway.Client/MachineInfo.cs+24
/Client/HomagGroup.DigitalFactory.ApiGateway.Client/MachineInfo.cs
Add comment 1 Plus  namespace HomagGroup.DigitalFactory.ApiGateway.Client
Add comment 2 Plus  {
Add comment 3 Plus   /// <summary>
Add comment 4 Plus   /// MPR Distribution Info
Add comment 5 Plus   /// </summary>
Add comment 6 Plus   public class MachineInfo
Add comment 7 Plus   {
Add comment 8 Plus   /// <summary>
Add comment 9 Plus   /// Tapio Id
Add comment 10 Plus   /// </summary>
Add comment 11 Plus   public string TapioId { get; set; }
Add comment 12 Plus  
Add comment 13 Plus   /// <summary>
Add comment 14 Plus   /// Display Name
Add comment 15 Plus   /// </summary>
Add comment 16 Plus   public string DisplayName { get; set; }
Add comment 17 Plus  
Add comment 18 Plus   /// <summary>
Add comment 19 Plus   /// Type
Add comment 20 Plus   /// </summary>
Add comment 21 Plus   public string Type { get; set; }
Add comment 22 Plus   }
Add comment 23 Plus  }
Add comment 24 Plus  
MprDistributionInfo.cs
/Client/HomagGroup.DigitalFactory.ApiGateway.Client/MprDistributionInfo.cs+42
/Client/HomagGroup.DigitalFactory.ApiGateway.Client/MprDistributionInfo.cs
Add comment 1 Plus  using System;
Add comment 2 Plus  
Add comment 3 Plus  namespace HomagGroup.DigitalFactory.ApiGateway.Client
Add comment 4 Plus  {
Add comment 5 Plus   /// <summary>
Add comment 6 Plus   /// MPR Distribution Info
Add comment 7 Plus   /// </summary>
Add comment 8 Plus   public class MprDistributionInfo
Add comment 9 Plus   {
Add comment 10 Plus   /// <summary>
Add comment 11 Plus   /// Part Id
Add comment 12 Plus   /// </summary>
Add comment 13 Plus   public string PartId { get; set; }
Add comment 14 Plus  
Add comment 15 Plus   /// <summary>
Add comment 16 Plus   /// CNC Programm Name 1
Add comment 17 Plus   /// </summary>
Add comment 18 Plus   public string CncProgram1 { get; set; }
Add comment 19 Plus  
Add comment 20 Plus   /// <summary>
Add comment 21 Plus   /// CNC Programm Name 2
Add comment 22 Plus   /// </summary>
Add comment 23 Plus   public string CncProgram2 { get; set; }
Add comment 24 Plus  
Add comment 25 Plus   /// <summary>
Add comment 26 Plus   /// Released At
Add comment 27 Plus   /// </summary>
Add comment 28 Plus   public DateTimeOffset ReleasedAt { get; set; }
Add comment 29 Plus  
Add comment 30 Plus   /// <summary>
Add comment 31 Plus   /// MPR Link
Add comment 32 Plus   /// </summary>
Add comment 33 Plus   public string MprLink { get; set; }
Add comment 34 Plus  
Add comment 35 Plus   /// <summary>
Add comment 36 Plus   /// MPR Link
Add comment 37 Plus   /// </summary>
Add comment 38 Plus   public string MprName { get; set; }
Add comment 39 Plus  
Add comment 40 Plus   }
Add comment 41 Plus  }
Add comment 42 Plus