merge
This commit is contained in:
parent
98cdb2467c
commit
594e64b01f
@ -155,7 +155,7 @@
|
||||
</site>
|
||||
<site name="MeterProcessState" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\SZLATEV\source\repos\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" />
|
||||
|
||||
@ -116,9 +116,8 @@
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<NoWin32Manifest>true</NoWin32Manifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@ -75,6 +75,10 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
|
||||
var csdIdent = vakoData.KeyValues.FirstOrDefault(a => a.Name == "C_GEN_CSD")?.Value;
|
||||
|
||||
if (String.IsNullOrEmpty(csdIdent))
|
||||
{
|
||||
throw new ApplicationException("CSD Could not befound");
|
||||
}
|
||||
if (orderNr == 3204790)
|
||||
{
|
||||
csdIdent = "773328";
|
||||
@ -141,8 +145,6 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
ident += vakoData.KeyValues.First(k => k.Key == "Nennweite").Charcode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var retStr = LocalWebRequest.GetRequest($"http://sla12iis01/csdcore/csdservice/getstampings?CsdIdent={csdIdent}&GroupId=1&ProductIdent={ident}&ProductDn={rawVako.Dn}&ShowOnlyValidStampings=0", 8000);
|
||||
var retListRealCsd = JsonConvert.DeserializeObject<List<CsdParameterResult>>(retStr);
|
||||
if (retListRealCsd != null && retListRealCsd.Any())
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
mc:Ignorable="d"
|
||||
Title="FinalTest" MinHeight="500" MinWidth="600" Height="638" Width="800" Initialized="Window_Initialized" Closing="Window_Closing" PreviewKeyDown="Window_PreviewKeyDown">
|
||||
<DockPanel HorizontalAlignment="Stretch" Width="800" Height="600" VerticalAlignment="Top" Margin="0,0,2,0">
|
||||
<ToolBarTray DockPanel.Dock="Top" Visibility="Visible">
|
||||
<ToolBarTray DockPanel.Dock="Top" Visibility="Collapsed">
|
||||
<ToolBar>
|
||||
<Label>Slot:</Label>
|
||||
<ComboBox Name="cbxSlotBox" Margin="0,5,0,0" VerticalAlignment="Top" SelectionChanged="CbxSlotBox_SelectionChanged" />
|
||||
|
||||
@ -75,6 +75,9 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
|
||||
var res = JsonConvert.DeserializeObject<String[]>(csdRet);
|
||||
|
||||
|
||||
|
||||
|
||||
var CalibrationRun = res[4];
|
||||
var LastTestBechState = 0;
|
||||
Boolean? HyState;
|
||||
@ -122,7 +125,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
var genesisStatus = new GenesisStatus();
|
||||
|
||||
// this calculates all life time values
|
||||
if (!GenesisStatusHandler.BuildLifeTimeInformation(Meter, genesisStatus))
|
||||
if (!GenesisStatusHandler.BuildLifeTimeInformation(Meter, genesisStatus))
|
||||
{
|
||||
|
||||
setTxt("Batterie nicht lesbar", true, true);
|
||||
@ -145,23 +148,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
{
|
||||
|
||||
|
||||
if (
|
||||
Meter.PcbId == "235130036" ||
|
||||
Meter.PcbId == "235130211" ||
|
||||
Meter.PcbId == "235130121" ||
|
||||
Meter.PcbId == "235130122" ||
|
||||
Meter.PcbId == "235130353" ||
|
||||
Meter.PcbId == "235130447" ||
|
||||
Meter.PcbId == "235130112" ||
|
||||
Meter.PcbId == "235130582" ||
|
||||
Meter.PcbId == "235130237")
|
||||
{
|
||||
//currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
else
|
||||
{
|
||||
//currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@ -523,7 +523,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
var sbQuery = new StringBuilder();
|
||||
|
||||
sbQuery.AppendLine($" SELECT ");
|
||||
sbQuery.AppendLine($" SELECT distinct ");
|
||||
sbQuery.AppendLine($" [Seriennummer] ");
|
||||
sbQuery.AppendLine($" ,mps.MapPcbIdToSerialNumber_PcbId ");
|
||||
sbQuery.AppendLine($" ,[Adresse] ");
|
||||
@ -536,6 +536,8 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
sbQuery.AppendLine($" ,passwordtbl.Password ");
|
||||
sbQuery.AppendLine($" ,passwordtbl.KitronSkeletonKey as Skeleton ");
|
||||
sbQuery.AppendLine($" ,passwordtbl.ProcessorID as ProcessorUid ");
|
||||
sbQuery.AppendLine($" ,passwordtbl.radioAdress ");
|
||||
|
||||
sbQuery.AppendLine($" FROM [Auftrag].[dbo].[Genesis_Meter] meter ");
|
||||
sbQuery.AppendLine($" inner join MapPcbIdToSerialNumber mps" +
|
||||
$" on mps.MapPcbIdToSerialNumber_SerialNumber = meter.Seriennummer and mps.MapPcbIdToSerialNumber_Deleted = 0 ");
|
||||
@ -556,13 +558,26 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
using (var dataAccess = new SqlDataAccess(GlobalConfig.connectionString.Value))
|
||||
{
|
||||
var dt = dataAccess.ExecuteQuery(sbQuery.ToString());
|
||||
if (dt.Rows.Count != 1)
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.InternalServerError, new PcbIdNotException("Pcb not unique, mapping problem", new Guid("160B4C44-6EF7-41DC-A48D-4B4105B4779B")));
|
||||
}
|
||||
foreach (var item in dt.Select())
|
||||
{
|
||||
result.OrderNumber = (Int32)item["FertigungsauftragNr"];
|
||||
result.RadioAddress = (Int64)item["Adresse"];
|
||||
result.Skeleton = (String)item["Skeleton"];
|
||||
result.Password = (String)item["Password"];
|
||||
result.PasswordFileIdent = (result.RadioAddress.HasValue && result.RadioAddress.Value != 0) ? result.RadioAddress.Value.ToString() : PcbId;
|
||||
if (item["radioAdress"].GetType() != typeof(System.DBNull))
|
||||
{
|
||||
result.PasswordFileIdent = (String)item["radioAdress"].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.PasswordFileIdent = (result.RadioAddress.HasValue && result.RadioAddress.Value != 0) ? result.RadioAddress.Value.ToString() : PcbId;
|
||||
}
|
||||
|
||||
|
||||
if (item["KeySetId"].GetType() != typeof(System.DBNull))
|
||||
{
|
||||
result.KeySetId = (String)item["KeySetId"];
|
||||
@ -864,10 +879,10 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
return LocalWebRequest.PostRequestAsyncAndGetContent(url: Url, header: header, json: helpArray.ToArray(), timeoutMs: 20000);
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
return ex.Message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -133,8 +133,8 @@
|
||||
$"{x.GetValue<Int32>(0)}", // SerialNr,
|
||||
$"{x.GetValue<Int32>(1)}", // FertigungsNr,
|
||||
$"{x.GetValue<Int64>(2)}", // RadioAddress,
|
||||
$"{x.GetValue<Int32?>(3)}", // CustomerSerialNr,
|
||||
$"{x.GetValue<String>(4)}", // CalibrationRunID,
|
||||
$"{x.GetValue<String>(3)}", // CustomerSerialNr,
|
||||
$"{x.GetValue<Int32?>(4)}", // CalibrationRunID,
|
||||
$"{x.GetValue<Byte>(5)}", // LastProcessState,
|
||||
$"{x.GetValue<Int32>(6)}", // Dn,
|
||||
$"{x.GetValue<Int32>(7)}", // NewNennweiteID,
|
||||
|
||||
@ -126,6 +126,32 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
sbMSG.AppendLine("");
|
||||
sbMSG.AppendLine($"Remaining life time in years {genesisStatus.RemainingLifeTimeYears:F2}");
|
||||
sbMSG.AppendLine($"Totally drained battery load in % {genesisStatus.DrainedBatteryLoadPercent:F2}");
|
||||
sbMSG.AppendLine("");
|
||||
if (genesisStatus.UNTStatus)
|
||||
{
|
||||
sbMSG.AppendLine($"UNT Limit OK ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbMSG.AppendLine($"UNT Limit Failed ");
|
||||
}
|
||||
sbMSG.AppendLine($"UNT Limit data Limit {genesisStatus.UNTLimit} Meter has {genesisStatus.DrainedBatteryLoad_uAs}");
|
||||
|
||||
if (genesisStatus.DrainedBatteryLoad_uAs <= genesisStatus.ExceededLifeTime_s * 77.7)
|
||||
{
|
||||
sbMSG.AppendLine($"UNT Limit before testbench OK");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbMSG.AppendLine($"UNT Limit before testbench Failed");
|
||||
}
|
||||
sbMSG.AppendLine($"UNT Limit before testbench {genesisStatus.ExceededLifeTime_s * 77.7} Meter has {genesisStatus.DrainedBatteryLoad_uAs}");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//ExceededLifeTime_s * 77.7)
|
||||
|
||||
MessageBox.Show(sbMSG.ToString(), $"Battery for {_currentGenesis.PcbId} has remaining life " +
|
||||
$"time of {genesisStatus.RemainingLifeTimeYears:F2} years");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user