quickfixes for FAI DN 50
This commit is contained in:
parent
0cfb2df9c9
commit
87bf6713ab
@ -155,7 +155,7 @@
|
||||
</site>
|
||||
<site name="MeterProcessState" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="D:\Projekte\SENSUS_GitLab\laa_production\Common\Service\MeterProcessState" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\drabesch_ro\Repo\lab\la_operations\laa_production\Common\Service\MeterProcessState" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:56011:localhost" />
|
||||
|
||||
@ -601,7 +601,7 @@ namespace CordonelAssemblyLine.Model
|
||||
sbMSG.AppendLine($"Remaining life time in years {genesisStatus.RemainingLifeTimeYears:F2}");
|
||||
sbMSG.AppendLine($"Totally drained battery load in % {genesisStatus.DrainedBatteryLoadPercent:F2}");
|
||||
|
||||
if (genesisStatus.RemainingLifeTimeYears >= 21)
|
||||
if (genesisStatus.RemainingLifeTimeYears >= 21 || genesisStatus.DrainedBatteryLoadPercent <= 1)
|
||||
{
|
||||
lblS08Text = $"{genesisStatus.RemainingLifeTimeYears} Jahre";
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ namespace CordonelPreadjustmentUi
|
||||
Double upperTempLimit = 35,
|
||||
Double lowerTempLimit = 15,
|
||||
Double tempDeviationLimit = 1,
|
||||
Int32 ampTestTofRecordingTime = 2,
|
||||
Int32 ampTestTofRecordingTime = 6,
|
||||
Double ampTestTriggerValue = 0.5,
|
||||
bool ampTestGenerateLogfiles = true,
|
||||
bool ampTestGenerateMeanValuesFile = true,
|
||||
|
||||
@ -1 +1 @@
|
||||
1a3d4919c9c702245832d925951f2b7cb72fc333
|
||||
5ed75d99ee45ff67821090f1b3dbb001dd9e4fe3
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Threading;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||
using ProductionUiCordonel.UserControls.FinalTest;
|
||||
using System;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Threading;
|
||||
using Xylem.Common.CommonCore.Configuration;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisStatus;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
@ -113,7 +113,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
// this calculates all life time values
|
||||
if (!GenesisStatusHandler.BuildLifeTimeInformation(Meter, genesisStatus))
|
||||
{
|
||||
|
||||
|
||||
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
|
||||
new Action(() =>
|
||||
{
|
||||
@ -123,7 +123,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
Meter.WriteLog("Batterie nicht lesbar");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//lastFrame
|
||||
Meter.WriteLog($"totalUsed at EOL {genesisStatus.DrainedBatteryLoadPercent:F2}");
|
||||
if (res[1] == "3212095")
|
||||
@ -131,13 +131,20 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
currentProcessState = ProductionProcessState.Done;
|
||||
return;
|
||||
}
|
||||
if (genesisStatus.RemainingLifeTimeYears < 20)
|
||||
|
||||
|
||||
if (genesisStatus.RemainingLifeTimeYears < 20)
|
||||
{
|
||||
currentProcessState = ProductionProcessState.Error;
|
||||
UserControl.lblText.Content = "Batterie über 10% entladen";
|
||||
Meter.WriteLog("Batterie über 10% entladen");
|
||||
if (genesisStatus.DrainedBatteryLoadPercent > 1.5)
|
||||
{
|
||||
currentProcessState = ProductionProcessState.Error;
|
||||
UserControl.lblText.Content = "Batterie über 10% entladen";
|
||||
Meter.WriteLog("Batterie über 10% entladen");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (currentProcessState != ProductionProcessState.Error)
|
||||
{
|
||||
currentProcessState = ProductionProcessState.Done;
|
||||
|
||||
@ -176,13 +176,15 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
query.AppendLine(" apsn.PositionNr, ");
|
||||
query.AppendLine(" apsn.SerienNr, ");
|
||||
query.AppendLine(" pg.PruefgangNr, ");
|
||||
query.AppendLine(" pg.PruefstationNr, ");
|
||||
query.AppendLine(" pg.Datum, ");
|
||||
|
||||
query.AppendLine(" pg.Pruefzeit, ");
|
||||
|
||||
query.AppendLine(" apsn.Wiederholungen, ");
|
||||
query.AppendLine(" apsn.Einbauplatz, ");
|
||||
query.AppendLine(" pg.Nennweite, ");
|
||||
|
||||
query.AppendLine(" idt.Baulaenge, ");
|
||||
|
||||
|
||||
|
||||
query.AppendLine(" PP1_Soll,PP1_Ist,PP1_Ist_V, ");
|
||||
@ -206,6 +208,16 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
query.AppendLine(" PP10_Soll,PP10_Ist,PP10_Ist_V, ");
|
||||
query.AppendLine(" pf.PP10_Fehler ");
|
||||
|
||||
|
||||
for (int p = 1; p <= 3; p++)
|
||||
{
|
||||
for (int f = 1; f <= 10 ; f++)
|
||||
{
|
||||
query.AppendLine($",pf{p}.PP{f}_Fehler");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
query.AppendLine(" from [Auftrag].[dbo].[AuftragPositionSerienNr] apsn ");
|
||||
query.AppendLine(" inner join [Auftrag].[dbo].[AuftragPosition_Gesamt] apg on apg.AuftragNr = apsn.AuftragNr and apg.PositionNr = apsn.PositionNr and apg.Ort = 'L2' ");
|
||||
|
||||
@ -213,6 +225,13 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
query.AppendLine(" inner join [Auftrag].[dbo].Prueffehler pf on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = apsn.SerienNr ");
|
||||
|
||||
query.AppendLine(" left join [Auftrag].[dbo].PrueffehlerGenesisPfade pf1 on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = apsn.SerienNr and pf1.[Pfad] = 1 ");
|
||||
|
||||
query.AppendLine(" left join [Auftrag].[dbo].PrueffehlerGenesisPfade pf2 on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = apsn.SerienNr and pf2.[Pfad] = 2 ");
|
||||
|
||||
query.AppendLine(" left join [Auftrag].[dbo].PrueffehlerGenesisPfade pf3 on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = apsn.SerienNr and pf3.[Pfad] = 3 ");
|
||||
|
||||
query.AppendLine(" left outer join Identnr idt on idt.IdentNr = apg.Identnr ");
|
||||
|
||||
query.AppendLine(" where apsn.SerienNr in ( ");
|
||||
query.AppendLine(" SELECT ");
|
||||
@ -227,7 +246,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
query.AppendLine(" group by [MapPcbIdToSerialNumber_SerialNumber] ");
|
||||
query.AppendLine(" having Count(*) < 5) ");
|
||||
query.AppendLine(" ");
|
||||
query.AppendLine(" and PP3_Fehler is not null ");
|
||||
query.AppendLine(" and pf.PP3_Fehler is not null ");
|
||||
query.AppendLine(" ");
|
||||
query.AppendLine(" order by apsn.SerienNr desc, apsn.Wiederholungen asc ");
|
||||
|
||||
@ -238,7 +257,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
var sb = new StringBuilder();
|
||||
|
||||
|
||||
sb.Append("AuftragNr;PositionNr;SerienNr;PruefgangNr;Datum;Wiederholungen;Einbauplatz;Nennweite;");
|
||||
sb.Append("AuftragNr;PositionNr;SerienNr;PruefgangNr;PruefstationNr;Datum;Pruefzeit;Wiederholungen;Einbauplatz;Nennweite;Baulaenge");
|
||||
|
||||
|
||||
|
||||
@ -246,6 +265,17 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
{
|
||||
sb.Append($"PP{i}_Soll [m3/h];PP{i}_Ist[m3/h];PP{i}_Ist_V[l];PP{i}_Fehler[%];");
|
||||
}
|
||||
|
||||
|
||||
for (int p = 1; p <= 3; p++)
|
||||
{
|
||||
for (int f = 1; f <= 10; f++)
|
||||
{
|
||||
query.AppendLine($",PP{f}_Fehler");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sb.AppendLine();
|
||||
foreach (var item in dt.Select())
|
||||
{
|
||||
|
||||
@ -853,7 +853,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
|
||||
dt = dataAccess.ExecuteQuery(sb.ToString());
|
||||
|
||||
if (dt.Rows.Count == 1 )
|
||||
if (dt.Rows.Count == 0 )
|
||||
{
|
||||
var stat = new GenesisStatus
|
||||
{
|
||||
@ -882,10 +882,10 @@ namespace Service.MeterProcessState.Controllers
|
||||
ret.SkipRadioParametersCheck = (Boolean)item["SkipRadioParametersCheck"];
|
||||
ret.OverrideFwCheck = (int)item["OverrideFwCheck"];
|
||||
ret.OverrideLutCheck = (int)item["OverrideLutCheck"];
|
||||
ret.RequiredLifeTimeYearsAssembly = (Double)item["RequiredLifeTimeYearsAssembly"];
|
||||
ret.RequiredLifeTimeYearsShipping = (Double)item["RequiredLifeTimeYearsShipping"];
|
||||
ret.MaxDrainedBatteryLoadPercent = (Double)item["MaxDrainedBatteryLoadPercent"];
|
||||
ret.KitronProductionDate = (DateTime)item["KitronProductionDate"];
|
||||
//ret.RequiredLifeTimeYearsAssembly = (Double)item["RequiredLifeTimeYearsAssembly"];
|
||||
//ret.RequiredLifeTimeYearsShipping = (Double)item["RequiredLifeTimeYearsShipping"];
|
||||
//ret.MaxDrainedBatteryLoadPercent = (Double)item["MaxDrainedBatteryLoadPercent"];
|
||||
//ret.KitronProductionDate = (DateTime)item["KitronProductionDate"];
|
||||
var maxStorageMonths = (Int32)item["MaxStorageMonths"];
|
||||
ret.ProductionDueDate = ret.KitronProductionDate + TimeSpan.FromDays(30.0 * maxStorageMonths);
|
||||
ret.ApprovalDate = (DateTime)item["ApprovalDate"];
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using Xylem.Common.Logic.ServiceCore;
|
||||
|
||||
|
||||
namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
{
|
||||
[RoutePrefix("api/PushData")]
|
||||
public class PushDataController : ApiController
|
||||
{
|
||||
public static class GlobalConfig
|
||||
{
|
||||
public static Lazy<String> connectionString = new Lazy<String>(()
|
||||
=>
|
||||
System.Configuration.ConfigurationManager.ConnectionStrings["default"].ConnectionString
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Route("SetOrderisFinish")]
|
||||
public async Task<HttpResponseMessage> SetOrderisFinish(int Auftrag, int Pos)
|
||||
{
|
||||
try
|
||||
{
|
||||
throw new NotImplementedException("TODO Roland");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.InternalServerError, ex.ToString() + "<br >" + ex.InnerException.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -221,6 +221,7 @@
|
||||
<Compile Include="Areas\HelpPage\SampleGeneration\SampleDirection.cs" />
|
||||
<Compile Include="Areas\HelpPage\SampleGeneration\TextSample.cs" />
|
||||
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
|
||||
<Compile Include="Controllers\PushControler.cs" />
|
||||
<Compile Include="Controllers\FinalCheckController.cs" />
|
||||
<Compile Include="Controllers\FileUpToDateController.cs" />
|
||||
<Compile Include="Controllers\LUTController.cs" />
|
||||
|
||||
@ -1 +1 @@
|
||||
f64d563def603c89cafafa61a3219ba97e1e344c
|
||||
0d85a5b3a7561b41163c20e5dc7713bcd0d65555
|
||||
|
||||
@ -228,7 +228,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
case BatchState.StartMesurement:
|
||||
var tStartMesurement = Task<Boolean>.Factory.StartNew(() => { return StartMeasurement_Internal(); });
|
||||
tStartMesurement.ContinueWith(r => { _currentState = r.Result ? BatchState.MeasurementActive : BatchState.Error; });
|
||||
|
||||
|
||||
break;
|
||||
case BatchState.MeasurementActive:
|
||||
// wait for signal that the measurement can be stopped
|
||||
@ -1205,7 +1205,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
//this will be used for intermediate tolerance calculation.
|
||||
//ReSharper disable once CompareOfFloatsByEqualityOperator as the rounding will take place in the
|
||||
//Cordonel and only an unequally value needs to be detected
|
||||
//when Start and Stop Record have diffrent Volumes the meter is ready for test
|
||||
//when Start and Stop Record have diffrent Volumes the meter is ready for test
|
||||
if (r.DutStartRecord.GetVolumeCm() != r.DutStopRecord.GetVolumeCm())
|
||||
{
|
||||
_logger.Info($" Meter {meter.Slot} Meter has progress {r.DutVolumeCm}");
|
||||
@ -1403,14 +1403,18 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
}
|
||||
}
|
||||
|
||||
if (item is GenesisMeter gm)
|
||||
{
|
||||
gm.CurrentActionText = "FlowTest";
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
listOfTasks.ForEach(t => t.Start());
|
||||
Task.WaitAll(listOfTasks.ToArray());
|
||||
foreach (var item in batch.ListOfMeters)
|
||||
{
|
||||
if (!IsAdjustment && item is GenesisMeter gm)
|
||||
{
|
||||
gm.CurrentActionText = "FlowTest";
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user