Ready to Test

This commit is contained in:
2022-07-26 09:34:09 -07:00
commit 2afec95704
1004 changed files with 164796 additions and 0 deletions

View File

@ -0,0 +1,18 @@
namespace OI.Metrology.Shared.DataModels;
public class AwaitingDispo
{
public string? PK { get; set; }
public string? Title { get; set; }
public int ID { get; set; }
public int ToolTypeID { get; set; }
public string? ToolType { get; set; }
public string? Tool { get; set; }
public string? Reactor { get; set; }
public string? RDS { get; set; }
public string? PSN { get; set; }
public string? Layer { get; set; }
public string? Zone { get; set; }
public DateTime InsertDate { get; set; }
public DateTime Expiration { get; set; }
}

View File

@ -0,0 +1,11 @@
namespace OI.Metrology.Shared.DataModels;
public class HeaderCommon
{
public long ID { get; set; }
public DateTime InsertDate { get; set; }
public Guid AttachmentID { get; set; }
public string? Title { get; set; }
public string? Recipe { get; set; }
public DateTime Date { get; set; }
}

View File

@ -0,0 +1,12 @@
namespace OI.Metrology.Shared.Models;
public class SelectListGroup
{
public bool Disabled { get; set; }
public string? Name { get; set; }
public SelectListGroup()
{ }
}

View File

@ -0,0 +1,36 @@
namespace OI.Metrology.Shared.Models;
public class SelectListItem
{
public bool Disabled { get; set; }
public SelectListGroup? Group { get; set; }
public bool Selected { get; set; }
public string? Text { get; set; }
public string? Value { get; set; }
public SelectListItem()
{ }
public SelectListItem(string text, string value)
{
Text = text;
Value = value;
}
public SelectListItem(string text, string value, bool selected)
{
Text = text;
Value = value;
Selected = selected;
}
public SelectListItem(string text, string value, bool selected, bool disabled)
{
Text = text;
Value = value;
Selected = selected;
Disabled = disabled;
}
}

View File

@ -0,0 +1,28 @@
namespace OI.Metrology.Shared.DataModels;
public class ToolType
{
public int ID { get; set; }
public string? ToolTypeName { get; set; }
public bool HasHeaderAttachments { get; set; }
public bool HasDataAttachments { get; set; }
public string? HeaderTableName { get; set; }
public string? DataTableName { get; set; }
public string? ExportSPName { get; set; }
public string? HeaderGridAttributes { get; set; }
public string? DataGridAttributes { get; set; }
public string? DataGridSortBy { get; set; }
public string? DataGridStatsColumn { get; set; }
public string? DataGridStatsStdDevType { get; set; }
public string? DisplayHeaderAttachment { get; set; }
public string? DisplayDataAttachment { get; set; }
public string? OIExportSPName { get; set; }
}

View File

@ -0,0 +1,13 @@
namespace OI.Metrology.Shared.DataModels;
public class ToolTypeMetadata
{
public int ToolTypeID { get; set; }
public bool Header { get; set; }
public string? ApiName { get; set; }
public string? ColumnName { get; set; }
public string? DisplayTitle { get; set; }
public int GridDisplayOrder { get; set; }
public string? GridAttributes { get; set; }
public int TableDisplayOrder { get; set; }
}

View File

@ -0,0 +1,5 @@
namespace OI.Metrology.Shared.Models;
public class TencorRunHeaders
{
}

View File

@ -0,0 +1,8 @@
using System.Data.Common;
namespace OI.Metrology.Shared.Repositories;
public interface IDbConnectionFactory
{
DbConnection GetDbConnection(String connStringName);
}

View File

@ -0,0 +1,46 @@
using Newtonsoft.Json.Linq;
using System.Data;
using System.Transactions;
namespace OI.Metrology.Shared.Repositories;
using DataModels;
public interface IMetrologyRepo
{
bool IsTestDatabase();
IEnumerable<ToolType> GetToolTypes();
ToolType GetToolTypeByName(string name);
ToolType GetToolTypeByID(int id);
IEnumerable<ToolTypeMetadata> GetToolTypeMetadataByToolTypeID(int id);
TransactionScope StartTransaction();
void PurgeExistingData(int toolTypeId, string title);
long InsertToolDataJSON(JToken jsonbody, long headerId, List<ToolTypeMetadata> metaData, string tableName);
DataTable ExportData(String spName, DateTime startTime, DateTime endTime);
DataTable GetHeaders(int toolTypeId, DateTime? startTime, DateTime? endTime, int? pageNo, int? pageSize, long? headerid, out long totalRecords, bool isArchive);
DataTable GetData(int toolTypeId, long headerId, bool isArchive);
DataTable GetDataSharePoint(int toolTypeId, string headerId);
IEnumerable<HeaderCommon> GetHeaderTitles(int toolTypeId, int? pageNo, int? pageSize, out long totalRecords, bool isArchive);
Guid GetHeaderAttachmentIDByTitle(int toolTypeId, string title);
Guid GetDataAttachmentIDByTitle(int toolTypeId, string title);
Guid GetHeaderAttachmentID(int toolTypeId, long headerId);
string GetAttachmentInsertDateByGUID(string tableName, Guid attachmentId);
Guid GetDataAttachmentID(int toolTypeId, long headerId, string title);
DataSet GetOIExportData(int toolTypeId, long headerid);
IEnumerable<KeyValuePair<string, string>> GetHeaderFields(int toolTypeId, long headerid, bool isArchive);
IEnumerable<AwaitingDispo> GetAwaitingDispo();
int UpdateReviewDate(int toolTypeId, long headerId, bool clearDate);
}

View File

@ -0,0 +1,13 @@
namespace OI.Metrology.Shared.Services;
using DataModels;
public interface IAttachmentsService
{
Stream GetAttachmentStreamByTitle(ToolType toolType, bool header, string title, string filename);
Stream GetAttachmentStreamByAttachmentId(ToolType toolType, bool header, Guid attachmentId, string filename);
//System.IO.Stream GetAttachmentStreamByAttachmentId(ToolType toolType, bool header, Guid attachmentId, string filename);
// void SaveAttachment(ToolType toolType, long headerId, string dataUniqueId, string filename, Microsoft.AspNetCore.Http.IFormFile uploadedFile);
void SaveAttachment(ToolType toolType, long headerId, string dataUniqueId, string filename, object uploadedFile);
}

View File

@ -0,0 +1,10 @@
using Newtonsoft.Json.Linq;
namespace OI.Metrology.Shared.Services;
public interface IInboundDataService
{
long DoSQLInsert(JToken jsonbody, DataModels.ToolType toolType, List<DataModels.ToolTypeMetadata> metaData);
void ValidateJSONFields(JToken jsonbody, int detailIndex, List<DataModels.ToolTypeMetadata> metaData, List<string> Errors, List<string> Warnings);
}

40
Shared/Shared.csproj Normal file
View File

@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<PackageId>OI.Metrology.Shared</PackageId>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>6.0.202.9999</Version>
<Authors>Mike Phares</Authors>
<Company>Infineon Technologies Americas Corp.</Company>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'=='true'">
<DefineConstants>Windows</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsOSX)'=='true'">
<DefineConstants>OSX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'">
<DefineConstants>Linux</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="System.Text.Json" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,24 @@
using OI.Metrology.Shared.Models;
using System.ComponentModel.DataAnnotations;
namespace OI.Metrology.Shared.ViewModels;
public class Export
{
public IEnumerable<SelectListItem>? ToolTypes { get; set; }
[Required]
public string? ToolType { get; set; }
[Required]
public DateTime StartDate { get; set; }
[Required]
public DateTime StartTime { get; set; }
[Required]
public DateTime EndDate { get; set; }
[Required]
public DateTime EndTime { get; set; }
}

View File

@ -0,0 +1,8 @@
namespace OI.Metrology.Shared.ViewModels;
public class RunInfo
{
public int ToolTypeID { get; set; }
public int HeaderID { get; set; }
public Guid HeaderAttachmentID { get; set; }
}