Completed prodInfo initial integration, beta test

This commit is contained in:
Samuele Locatelli
2020-06-17 14:48:53 +02:00
parent cc68908084
commit 12dc55ef8c
3 changed files with 44 additions and 1 deletions
@@ -127,6 +127,10 @@
<Compile Include="Migrations\202004241109233_Thermo-Start.Designer.cs">
<DependentUpon>202004241109233_Thermo-Start.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\202006170558519_AddedProdInfoModel.cs" />
<Compile Include="Migrations\202006170558519_AddedProdInfoModel.Designer.cs">
<DependentUpon>202006170558519_AddedProdInfoModel.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Redis\redUtil.cs" />
@@ -166,6 +170,9 @@
<EmbeddedResource Include="Migrations\202004241109233_Thermo-Start.resx">
<DependentUpon>202004241109233_Thermo-Start.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\202006170558519_AddedProdInfoModel.resx">
<DependentUpon>202006170558519_AddedProdInfoModel.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+36
View File
@@ -1267,6 +1267,42 @@ namespace Thermo.Active.NC
return cmsError;
}
/// <summary>
/// Get historical prodinfo data from DB
/// </summary>
/// <param name="prodInfoDataList"></param>
/// <param name="numStart"></param>
/// <param name="numRec"></param>
/// <returns></returns>
public CmsError GetHistProdInfoData(out List<ThermoModels.ProdInfoModel> prodInfoDataList, int numStart, int numRec)
{
CmsError cmsError = NO_ERROR;
prodInfoDataList = new List<ThermoModels.ProdInfoModel>();
using (ProdInfoController prodInfoController = new ProdInfoController())
{
List<ProdInfoModel> results = prodInfoController.GetPaginated(numStart, numRec);
// converto!
prodInfoDataList = results.Select(x => new ThermoModels.ProdInfoModel()
{
NumTarget = x.NumTarget,
NumDone= x.NumDone,
TimeWarm = x.TimeWarm,
TimeVent = x.TimeVent,
TimeVacuum = x.TimeVacuum,
TimeCycleGross = x.TimeCycleGross,
TimeCycleNet = x.TimeCycleNet,
MaterialTempEndWarm = x.MaterialTempEndWarm,
MaterialTempEndVent = x.MaterialTempEndVent,
MoldTemp = x.MoldTemp,
VacuumReadVal = x.VacuumReadVal,
MouldEnergyOUT = x.MouldEnergyOUT,
MouldEnergyIN = x.MouldEnergyIN
}).ToList();
}
return cmsError;
}
public CmsError ReadProdCycleData(out ThermoModels.ProdCycleModel prodCycleData)
{
prodCycleData = new ThermoModels.ProdCycleModel();
+1 -1
View File
@@ -31,4 +31,4 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.8.2")]
[assembly: AssemblyVersion("0.8.9")]