diff --git a/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj b/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj
index d8ba843c..c038ae9e 100644
--- a/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj
+++ b/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj
@@ -5,7 +5,7 @@
Debug
AnyCPU
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}
- WinExe
+ Library
Properties
Xylem.Common.Ui.CordonelPreadjustmentUi
Xylem.Common.Ui.CordonelPreadjustmentUi
@@ -102,9 +102,7 @@
-
- true
-
+
..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll
diff --git a/Common/CordonelPreadjustmentUi/PreAdjustmentSettingsContainer.cs b/Common/CordonelPreadjustmentUi/PreAdjustmentSettingsContainer.cs
index 0d0a8525..71c1b662 100644
--- a/Common/CordonelPreadjustmentUi/PreAdjustmentSettingsContainer.cs
+++ b/Common/CordonelPreadjustmentUi/PreAdjustmentSettingsContainer.cs
@@ -63,6 +63,7 @@ namespace CordonelPreadjustmentUi
public Int32 OffsetTestBadDataLimit { get; internal set; } = 3;
#endregion
+ public bool Production = true;
private string CultureStr;
public List TempMeters = new List() { 1, 10 };
diff --git a/Common/CordonelPreadjustmentUi/Processes/Actions/PreparationProcess.cs b/Common/CordonelPreadjustmentUi/Processes/Actions/PreparationProcess.cs
index 6d4db477..a153d05a 100644
--- a/Common/CordonelPreadjustmentUi/Processes/Actions/PreparationProcess.cs
+++ b/Common/CordonelPreadjustmentUi/Processes/Actions/PreparationProcess.cs
@@ -99,9 +99,17 @@ namespace CordonelPreadjustmentUi.Processes.Actions
Ok = WriteRegisterSafe(meterctl.Meter, "Samplerate", Register.Genesisflow.SampleRate, pp.Setting.Samplerate);
if (CheckAbort(Ok, meterctl)) { return Ok; }
-
- Ok = WriteRegisterSafe(meterctl.Meter, "Metersize", Register.Genesisflow.MeterSize, pp.Setting.MeterSize.GetHashCode(), false);
- if (CheckAbort(Ok, meterctl)) { return Ok; }
+ if (pp.Setting.Production)
+ {
+ Ok = WriteRegisterSafe(meterctl.Meter, "Metersize", Register.Genesisflow.MeterSize, pp.Setting.MeterSize.GetHashCode(), false);
+ if (CheckAbort(Ok, meterctl)) { return Ok; }
+ }
+ else
+ {
+ WriteRegisterSafe(meterctl.Meter, "Metersize", Register.Genesisflow.MeterSize, pp.Setting.MeterSize.GetHashCode(), false);
+ if (CheckAbort(Ok, meterctl)) { return Ok; }
+ }
+
Ok = WriteRegisterSafe(meterctl.Meter, "LED mode", Register.Genesisflow.LedMode, pp.Setting.LedMode.GetHashCode());
if (CheckAbort(Ok, meterctl)) { return Ok; }
diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisCore/GenesisMeter.cs b/Common/Hardware/WaterMeter/Genesis/GenesisCore/GenesisMeter.cs
index 0145505a..035bfa6f 100644
--- a/Common/Hardware/WaterMeter/Genesis/GenesisCore/GenesisMeter.cs
+++ b/Common/Hardware/WaterMeter/Genesis/GenesisCore/GenesisMeter.cs
@@ -2172,51 +2172,60 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
a.Key.RegisterName.ToLower() == "storeconfiguration" ||
a.Key.RegisterName.ToLower() == "storecalibration"))
{
- var done = false;
- //retries for each register access
- var retryLeft = 3;
-
- while (retryLeft > 0 && !done)
+ if (!MeterAppListVersion.Where(v => v.AppId == a.Key.AppAddress).Any() || !MeterAppListVersion.Where(v => v.AppId == a.Key.AppAddress).First().IsInstalled)
{
- Thread.Sleep(50);
- var result = WriteRegister(a.Key.GetIdent(), 1);
- if (!result)
- {
- retryLeft -= 1;
- if (retryLeft == 0)
- {
- return false;
- }
-
- continue;
-
- }
-
- // Wait for storing
- Thread.Sleep(500);
- //TODO enable this for R1.2.x
- if (a.Key.AppName == "SENSUSRADIO" || a.Key.AppName == "NA2WALARMS")
- {
- done = true;
- allConfigRegisters -= 1;
- continue;
- }
-
- var resultRead = ReadRegister(a.Key.GetIdent());
- if (resultRead == null || resultRead.ToList().Any(ra => ra != 0x00))
- {
- retryLeft -= 1;
- if (retryLeft == 0)
- {
- return false;
- }
-
- continue;
- }
-
- done = true;
+ //Skip because ap is not install
allConfigRegisters -= 1;
}
+ else
+ {
+ var done = false;
+ //retries for each register access
+ var retryLeft = 3;
+
+ while (retryLeft > 0 && !done)
+ {
+ Thread.Sleep(50);
+ var result = WriteRegister(a.Key.GetIdent(), 1);
+ if (!result)
+ {
+ retryLeft -= 1;
+ if (retryLeft == 0)
+ {
+ return false;
+ }
+
+ continue;
+
+ }
+
+ // Wait for storing
+ Thread.Sleep(500);
+ //TODO enable this for R1.2.x
+ if (a.Key.AppName == "SENSUSRADIO" || a.Key.AppName == "NA2WALARMS")
+ {
+ done = true;
+ allConfigRegisters -= 1;
+ continue;
+ }
+
+ var resultRead = ReadRegister(a.Key.GetIdent());
+ if (resultRead == null || resultRead.ToList().Any(ra => ra != 0x00))
+ {
+ retryLeft -= 1;
+ if (retryLeft == 0)
+ {
+ return false;
+ }
+
+ continue;
+ }
+
+ done = true;
+ allConfigRegisters -= 1;
+ }
+ }
+
}
}
diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisFile/MeterFwUpdate.cs b/Common/Hardware/WaterMeter/Genesis/GenesisFile/MeterFwUpdate.cs
index 30106726..c888d0f6 100644
--- a/Common/Hardware/WaterMeter/Genesis/GenesisFile/MeterFwUpdate.cs
+++ b/Common/Hardware/WaterMeter/Genesis/GenesisFile/MeterFwUpdate.cs
@@ -1280,7 +1280,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
foreach (var fileName in fileNames)
{
- if (!fileName.Contains("_complete.bin"))
+ if (!fileName.Contains("_complete"))
{
diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisStatus/GenesisStatus.cs b/Common/Hardware/WaterMeter/Genesis/GenesisStatus/GenesisStatus.cs
index 52abad0e..7c984810 100644
--- a/Common/Hardware/WaterMeter/Genesis/GenesisStatus/GenesisStatus.cs
+++ b/Common/Hardware/WaterMeter/Genesis/GenesisStatus/GenesisStatus.cs
@@ -23,7 +23,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisStatus
///
/// Order number
///
- public Int32 OrderNumber;
+ public Int32? OrderNumber;
///
/// PcbId.
@@ -33,18 +33,20 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisStatus
///
/// Skip radio parameter check
///
- public Boolean SkipRadioParametersCheck;
-
+ public Boolean SkipRadioParametersCheck;
+
///
- /// Skip FW check. Normally the FW will be assigned to the latest released version
+ /// Override FW version. Normally the FW will be assigned to the latest released version
/// and taken from the data base. Here special versions can be used for FW tests.
+ /// null means take the current released version
///
- public Boolean SkipFwCheck;
+ public int? OverrideFwCheck;
///
- /// Skip the look-up-table installation as this device may be used for development.
+ /// override the Lut version to check the look-up-table installation as this device may be used for development.
+ /// null means take the current released version
///
- public Boolean SkipLutCheck;
+ public int? OverrideLutCheck;
///
/// Internally used to signal that production and shipping is proved and validated.
diff --git a/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs b/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs
index 2bedc31d..48bb4925 100644
--- a/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs
+++ b/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs
@@ -74,7 +74,10 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
var csdIdent = vakoData.KeyValues.FirstOrDefault(a => a.Name == "C_GEN_CSD")?.Value;
-
+ if (orderNr == 3204790)
+ {
+ csdIdent = "773328";
+ }
using (var dataAccess = new SqlDataAccess(connectionString))
{
@@ -132,9 +135,9 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
}
}
var ident = "GNS";
- if (meterSize >= 10)
+ if (vakoData.KeyValues.Where(k => k.Key == "Produktgruppe").Any() && vakoData.KeyValues.Where(k => k.Key == "Produktgruppe").First().Charcode == "U")
{
- ident = "GNSU";
+ ident = ident + vakoData.KeyValues.Where(k => k.Key == "Nennweite").First()?.Charcode;
}
diff --git a/Common/ProductionUiCordonel/FinalTest.xaml.cs b/Common/ProductionUiCordonel/FinalTest.xaml.cs
index 2e092139..f5a731f2 100644
--- a/Common/ProductionUiCordonel/FinalTest.xaml.cs
+++ b/Common/ProductionUiCordonel/FinalTest.xaml.cs
@@ -430,7 +430,7 @@ namespace ProductionUiCordonel
pc.Processes.Add(new ProductionCheckShippingState()); //[x] [x] [x]
- pc.Processes.Add(new ProductionProcessPasswordFile()); //[x] [x] [x]
+ pc.Processes.Add(new ProductionProcessPasswordFile()); //[x] [x] [x]
//pc.Processes.Add(new ProductionProcessFinalParametrizationFix()); //[x] [x] []
diff --git a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionCheckShippingState.cs b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionCheckShippingState.cs
index 81eb8097..d104d0ff 100644
--- a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionCheckShippingState.cs
+++ b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionCheckShippingState.cs
@@ -126,14 +126,18 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
//lastFrame
Meter.WriteLog($"totalUsed at EOL {genesisStatus.DrainedBatteryLoadPercent:F2}");
-
- if (genesisStatus.DrainedBatteryLoadPercent > 10.0)
+ if (res[1] == "3212095")
+ {
+ currentProcessState = ProductionProcessState.Done;
+ return;
+ }
+ if (genesisStatus.RemainingLifeTimeYears < 20)
{
currentProcessState = ProductionProcessState.Error;
UserControl.lblText.Content = "Batterie über 10% entladen";
Meter.WriteLog("Batterie über 10% entladen");
}
-
+
if (currentProcessState != ProductionProcessState.Error)
{
currentProcessState = ProductionProcessState.Done;
diff --git a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessConnect.cs b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessConnect.cs
index 34182492..7e5067a1 100644
--- a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessConnect.cs
+++ b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessConnect.cs
@@ -7,6 +7,7 @@ using ProductionUiCordonel.ProductionProcesses.Enum;
using ProductionUiCordonel.UserControls.FinalTest;
using Xylem.Common.CommonCore.Configuration;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
+using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Logic.ProductionOrderCore;
using Xylem.Common.Logic.SoftwareAccessHelper;
@@ -61,6 +62,9 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
NewStatus("Login wird gestartet");
Meter.Login();
}
+ Meter.WriteRegister(Register.Genesisflow.SampleRate, 2);
+ Meter.WriteRegister(Register.Genesisflow.LedMode, 0);
+
//Check access in
Progress = 50;
NewStatus("Zugang wird überprüft");
diff --git a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessPasswordFile.cs b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessPasswordFile.cs
index 7be685ba..96fae3fa 100644
--- a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessPasswordFile.cs
+++ b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessPasswordFile.cs
@@ -53,6 +53,8 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
Meter.Logout();
ret = Meter.Login();
+
+
//If the password file is written, the "Password" from _pwdContainer is overwritten from Skeleton-key
//to the "level 8 password" form the LuDB server. The DB password column is the current login password
//for production. Initially the "Password" is the Skeleton-key which can not be part of the list of
diff --git a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessRadioCheck.cs b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessRadioCheck.cs
index 917e467c..3253464c 100644
--- a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessRadioCheck.cs
+++ b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessRadioCheck.cs
@@ -330,7 +330,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
{
GotRSSICallback(1, 1);
}
-
+
}
private void forcePush()
diff --git a/Common/Service/MeterProcessState/Controllers/EasyAccessControler.cs b/Common/Service/MeterProcessState/Controllers/EasyAccessControler.cs
index 86d207d8..cf73a39d 100644
--- a/Common/Service/MeterProcessState/Controllers/EasyAccessControler.cs
+++ b/Common/Service/MeterProcessState/Controllers/EasyAccessControler.cs
@@ -172,31 +172,39 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
{
StringBuilder query = new StringBuilder();
query.AppendLine(" select ");
+ query.AppendLine(" apsn.AuftragNr, ");
+ query.AppendLine(" apsn.PositionNr, ");
query.AppendLine(" apsn.SerienNr, ");
query.AppendLine(" pg.PruefgangNr, ");
+ query.AppendLine(" pg.Datum, ");
+
+
query.AppendLine(" apsn.Wiederholungen, ");
query.AppendLine(" apsn.Einbauplatz, ");
query.AppendLine(" pg.Nennweite, ");
- query.AppendLine(" PP1_Soll,PP1_Ist,PP1_Ist_V, ");
- query.AppendLine(" pf.PP1_Fehler, ");
- query.AppendLine(" PP2_Soll,PP2_Ist,PP2_Ist_V, ");
- query.AppendLine(" pf.PP2_Fehler, ");
- query.AppendLine(" PP3_Soll,PP3_Ist,PP3_Ist_V, ");
- query.AppendLine(" pf.PP3_Fehler, ");
- query.AppendLine(" PP4_Soll,PP4_Ist,PP4_Ist_V, ");
- query.AppendLine(" pf.PP4_Fehler, ");
- query.AppendLine(" PP5_Soll,PP5_Ist,PP5_Ist_V, ");
- query.AppendLine(" pf.PP5_Fehler, ");
- query.AppendLine(" PP6_Soll,PP6_Ist,PP6_Ist_V, ");
- query.AppendLine(" pf.PP6_Fehler, ");
- query.AppendLine(" PP7_Soll,PP7_Ist,PP7_Ist_V, ");
- query.AppendLine(" pf.PP7_Fehler, ");
- query.AppendLine(" PP8_Soll,PP8_Ist,PP8_Ist_V, ");
- query.AppendLine(" pf.PP8_Fehler, ");
- query.AppendLine(" PP9_Soll,PP9_Ist,PP9_Ist_V, ");
- query.AppendLine(" pf.PP9_Fehler, ");
- query.AppendLine(" PP10_Soll,PP10_Ist,PP10_Ist_V, ");
- query.AppendLine(" pf.PP10_Fehler ");
+
+
+
+ query.AppendLine(" PP1_Soll,PP1_Ist,PP1_Ist_V, ");
+ query.AppendLine(" pf.PP1_Fehler, ");
+ query.AppendLine(" PP2_Soll,PP2_Ist,PP2_Ist_V, ");
+ query.AppendLine(" pf.PP2_Fehler, ");
+ query.AppendLine(" PP3_Soll,PP3_Ist,PP3_Ist_V, ");
+ query.AppendLine(" pf.PP3_Fehler, ");
+ query.AppendLine(" PP4_Soll,PP4_Ist,PP4_Ist_V, ");
+ query.AppendLine(" pf.PP4_Fehler, ");
+ query.AppendLine(" PP5_Soll,PP5_Ist,PP5_Ist_V, ");
+ query.AppendLine(" pf.PP5_Fehler, ");
+ query.AppendLine(" PP6_Soll,PP6_Ist,PP6_Ist_V, ");
+ query.AppendLine(" pf.PP6_Fehler, ");
+ query.AppendLine(" PP7_Soll,PP7_Ist,PP7_Ist_V, ");
+ query.AppendLine(" pf.PP7_Fehler, ");
+ query.AppendLine(" PP8_Soll,PP8_Ist,PP8_Ist_V, ");
+ query.AppendLine(" pf.PP8_Fehler, ");
+ query.AppendLine(" PP9_Soll,PP9_Ist,PP9_Ist_V, ");
+ query.AppendLine(" pf.PP9_Fehler, ");
+ query.AppendLine(" PP10_Soll,PP10_Ist,PP10_Ist_V, ");
+ query.AppendLine(" pf.PP10_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' ");
@@ -230,13 +238,15 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
var sb = new StringBuilder();
- sb.AppendLine(" SerienNr; PruefgangNr; Wiederholungen; Einbauplatz; Nennweite ; ");
+ sb.Append("AuftragNr;PositionNr;SerienNr;PruefgangNr;Datum;Wiederholungen;Einbauplatz;Nennweite;");
+
+
for (int i = 1; i <= 10; i++)
{
- sb.AppendLine($"PP{i}_Soll;PP{i}_Ist;PP{i}_Ist_V;PP{i}_Fehler");
+ sb.Append($"PP{i}_Soll [m3/h];PP{i}_Ist[m3/h];PP{i}_Ist_V[l];PP{i}_Fehler[%];");
}
-
+ sb.AppendLine();
foreach (var item in dt.Select())
{
try
diff --git a/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs b/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs
index ad4b9da9..33d7b13f 100644
--- a/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs
+++ b/Common/Service/MeterProcessState/Controllers/FinalCheckController.cs
@@ -223,7 +223,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
sb.AppendLine(" Declare @OrderNr as int ");
sb.AppendLine($" set @OrderNr = {ProductionOrderNumber} ");
- sb.AppendLine(" SELECT TOP (1000) [auftragnr], ");
+ sb.AppendLine(" SELECT distinct [auftragnr], ");
sb.AppendLine(" [positionnr], ");
sb.AppendLine(" [menge], ");
sb.AppendLine(" (SELECT Count(*) ");
diff --git a/Common/Service/MeterProcessState/Controllers/ProccesStateController.cs b/Common/Service/MeterProcessState/Controllers/ProccesStateController.cs
index 3574304d..832542ba 100644
--- a/Common/Service/MeterProcessState/Controllers/ProccesStateController.cs
+++ b/Common/Service/MeterProcessState/Controllers/ProccesStateController.cs
@@ -760,23 +760,70 @@ namespace Service.MeterProcessState.Controllers
}
[Route("GetProductionSkipAndLifeTimeInfo")]
- public async Task GetProductionSkipAndLifeTimeInfo(Int32 pcbId, Int32 orderNumber)
+ public async Task GetProductionSkipAndLifeTimeInfo(Int32? pcbId = null, Int32? orderNumber = null)
{
try
{
+ if (!pcbId.HasValue && !orderNumber.HasValue)
+ {
+ return Request.CreateResponse(HttpStatusCode.InternalServerError, new ApplicationException("No Argument"));
+ }
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() =>
{
+
using (var dataAccess = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
StringBuilder sb = new StringBuilder();
- //TODO Roland Design new Table
+ int DefaultMaxMonthsNaRegion = 6;
+ int DefaultMaxMonthsEmeaRegion = 3;
+ Double DefaultRequiredLifeTimeYearsAssembly = 21.0;
+ Double DefaultRequiredLifeTimeYearsShipping = 20.0;
+ Double DefaultMaxDrainedBatteryLoadPercent = 10.0;
+ sb.AppendLine("Select IdendKey, [Value] from ProductionDefaultKeys where IdendKey in (");
+ sb.AppendLine(" 'DefaultMaxMonthsNaRegion'");
+ sb.AppendLine(" ,'DefaultMaxMonthsEmeaRegion'");
+ sb.AppendLine(" ,'DefaultRequiredLifeTimeYearsAssembly'");
+ sb.AppendLine(" ,'DefaultRequiredLifeTimeYearsShipping'");
+ sb.AppendLine(" ,'DefaultMaxDrainedBatteryLoadPercent'");
+ sb.AppendLine(" )");
+
+
+ var dt = dataAccess.ExecuteQuery(sb.ToString());
+
+ foreach (var item in dt.Select())
+ {
+ switch (item["IdendKey"].ToString())
+ {
+ case "DefaultMaxMonthsNaRegion":
+ int.TryParse(item["Value"].ToString(), out DefaultMaxMonthsNaRegion);
+
+ break;
+ case "DefaultMaxMonthsEmeaRegion":
+ int.TryParse(item["Value"].ToString(), out DefaultMaxMonthsEmeaRegion);
+ break;
+ case "DefaultRequiredLifeTimeYearsAssembly":
+ double.TryParse(item["Value"].ToString(), out DefaultRequiredLifeTimeYearsAssembly);
+ break;
+ case "DefaultRequiredLifeTimeYearsShipping":
+ double.TryParse(item["Value"].ToString(), out DefaultRequiredLifeTimeYearsShipping);
+ break;
+ case "DefaultMaxDrainedBatteryLoadPercent":
+ double.TryParse(item["Value"].ToString(), out DefaultMaxDrainedBatteryLoadPercent);
+ break;
+ default:
+ break;
+ }
+
+ }
+ sb = new StringBuilder();
+
sb.AppendLine($" select [id] ");
sb.AppendLine($" ,[OrderNumber] ");
sb.AppendLine($" ,[PcbId] ");
sb.AppendLine($" ,[SkipRadioParametersCheck] ");
- sb.AppendLine($" ,[SkipFwCheck] ");
- sb.AppendLine($" ,[SkipLutCheck] ");
+ sb.AppendLine($" ,[OverrideFwCheck] ");
+ sb.AppendLine($" ,[OverrideLutCheck] ");
sb.AppendLine($" ,[RequiredLifeTimeYearsAssembly] ");
sb.AppendLine($" ,[RequiredLifeTimeYearsShipping] ");
sb.AppendLine($" ,[KitronProductionDate] ");
@@ -785,26 +832,33 @@ namespace Service.MeterProcessState.Controllers
sb.AppendLine($" ,[ApprovalDate] ");
sb.AppendLine($" ,[ApproverName] ");
sb.AppendLine($" ,[ApprovalComment] ");
+
sb.AppendLine($" FROM [Auftrag].[dbo].[ProductionSkipAndLifeTimeInfo] ");
- sb.AppendLine($" where ");
- sb.AppendLine($" (OrderNumber = {orderNumber} or OrderNumber is null) ");
- sb.AppendLine($" and (PcbId = {pcbId} or PcbId is null) ");
+ sb.AppendLine($" where 1 = 1 ");
+ if (orderNumber.HasValue)
+ {
+ sb.AppendLine($" and (OrderNumber = {orderNumber.Value} or OrderNumber is null) ");
+ }
+ if (pcbId.HasValue)
+ {
+ sb.AppendLine($" and (PcbId = {pcbId.Value} or PcbId is null) ");
+ }
+
// PcbId != null sticht ordernumber , Ordernumbner
//TODO Roland: The defaults should come from a DefaultProductionSkipAndLifeTimeInfo table
- const Int32 DefaultMaxMonthsNaRegion = 6;
- const Int32 DefaultMaxMonthsEmeaRegion = 3;
- const Double DefaultRequiredLifeTimeYearsAssembly = 21.0;
- const Double DefaultRequiredLifeTimeYearsShipping = 20.0;
- const Double DefaultMaxDrainedBatteryLoadPercent = 10.0;
- var dt = dataAccess.ExecuteQuery(sb.ToString());
+
+
+
+
+ dt = dataAccess.ExecuteQuery(sb.ToString());
if (dt.Rows.Count == 1 )
{
var stat = new GenesisStatus
{
- SkipFwCheck = false,
- SkipLutCheck = false,
+ OverrideLutCheck = null,
+ OverrideFwCheck = null,
SkipRadioParametersCheck = false,
RequiredLifeTimeYearsAssembly = DefaultRequiredLifeTimeYearsAssembly,
RequiredLifeTimeYearsShipping = DefaultRequiredLifeTimeYearsShipping,
@@ -826,8 +880,8 @@ namespace Service.MeterProcessState.Controllers
ret.OrderNumber = orderNumber;
ret.PcbId = pcbId.ToString();
ret.SkipRadioParametersCheck = (Boolean)item["SkipRadioParametersCheck"];
- ret.SkipFwCheck = (Boolean)item["SkipFWCheck"];
- ret.SkipLutCheck = (Boolean)item["SkipLutCheck"];
+ 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"];
diff --git a/Common/Ui/LegacyGenesisControl/PreAdjWr.cs b/Common/Ui/LegacyGenesisControl/PreAdjWr.cs
index 2b236f2d..e7c75937 100644
--- a/Common/Ui/LegacyGenesisControl/PreAdjWr.cs
+++ b/Common/Ui/LegacyGenesisControl/PreAdjWr.cs
@@ -197,6 +197,10 @@ namespace XylemCommonUiLegacyGenCtl
// s.TempSouce = TestsetuptContainer.TempSouce;
_logger.Info($"SetSettings [{s.ToString()}]");
wrappedControl.SetSettings(s);
+
+ s.Production = TestsetuptContainer.ProductionMode;
+
+
foreach (var item in TestsetuptContainer?.meterTestSettings.Where(f => f != null && f.PreAdjustment && (!string.IsNullOrEmpty(f.SerialNr) && f.SerialNr != "-")))
{
EnableMeter(item.Slot, true, item.SerialNr);