This commit is contained in:
Roland Drabesch 2025-07-25 09:50:30 +02:00
parent f8eafc1bc5
commit 95c78f325d
22 changed files with 23365 additions and 22428 deletions

View File

@ -98,6 +98,7 @@
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="ServiceUrls.cs" />
<Compile Include="ServiceUrlsBackUp_New.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -8,6 +8,7 @@ namespace Xylem.Common.CommonCore.Configuration
/// Urls for data base accesses
/// </summary>
public static class ServiceUrls
{
private const String DefaultInspectCordonelRequirementInfoUrl =
@ -23,9 +24,14 @@ namespace Xylem.Common.CommonCore.Configuration
private const String DefaultAddPcbIdsToSafeServiceUrl =
"http://sla12iis01.emea.sensus.net/MeterProcessState/AddPcbIdsToSafe?ContainerDbId=";
private const String DefaultDownloadFilesPartsServiceUrl =
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetFileParts?ParentFileId=";
private const String DefaultGetLutUrl =
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetLutFiles";
private const String DefaultListAllFwPackagesServiceUrl =
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=1";
@ -261,6 +267,18 @@ namespace Xylem.Common.CommonCore.Configuration
return string.Format(url, pcbId);
}
/// <summary>
/// List all Cordonel FW packages.
/// </summary>
/// <returns></returns>
public static String GetLutUrl()
{
return ConfigurationManager.AppSettings["GetLutUrl"] ??
DefaultGetLutUrl;
}
/// <summary>
/// List all Cordonel FW packages.
/// </summary>
@ -815,4 +833,6 @@ namespace Xylem.Common.CommonCore.Configuration
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,837 @@
using System;
using System.Configuration;
namespace Xylem.Common.CommonCore.Configuration
{
/// <summary>
/// Urls for data base accesses
/// </summary>
public static class ServiceUrls_back
{
private const String DefaultInspectCordonelRequirementInfoUrl =
"http://sla12iis01.emea.sensus.net/LaaProductionWeb/";
// return code: 404 not found, 400 Error with text, 200 okay
private const String DefaultEolDataForSentinelServiceUrl =
"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/cordonel/eolprogress/";
private const String DefaultGetPcbIdsFromSafeServiceUrl =
"http://delaz1web01/MeterProcessState/GetPcbIdsFromSafe?ContainerDbId=";
private const String DefaultAddPcbIdsToSafeServiceUrl =
"http://delaz1web01/MeterProcessState/AddPcbIdsToSafe?ContainerDbId=";
private const String DefaultDownloadFilesPartsServiceUrl =
"http://delaz1web01/MeterProcessState/api/FileUpToDate/GetFileParts?ParentFileId=";
private const String DefaultGetLutUrl =
"http://delaz1web01/MeterProcessState/api/FileUpToDate/GetLutFiles";
private const String DefaultListAllFwPackagesServiceUrl =
"http://delaz1web01/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=1";
private const String DefaultListAllSwPackagesServiceUrl =
"http://delaz1web01/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=5";
private const String DefaultListAllConfigFilePackagesServiceUrl =
"http://delaz1web01/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=6";
private const String DefaultListAllFwUpdateSafesServiceUrl =
"http://delaz1web01/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=4";
private const String DefaultSetCordonelAppVersionServiceUrl =
"http://delaz1web01/MeterProcessState/api/ProccesState/SetCordonelProgress?PcbId=";
private const String DefaultGetCordonelRequirementInfoUrl =
"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/cordonel/requirements/pcbid/";
private const String DefaultGetCordonelAppVersionServiceUrl =
"http://delaz1web01/MeterProcessState/api/ProccesState/GetCordonelAppVersion?PcbId=";
private const String DefaultListAllCordonelCustomersWithFilterServiceUrl =
"http://delaz1web01/MeterProcessState/api/Order/GetCordonelCustomers?FilterName=";
private const String DefaultListAllCordonelCustomerOrdersServiceUrl =
"http://delaz1web01/MeterProcessState/api/Order/GetCustomersCordonelOrders?CustomerNumber=";
private const String DefaultListCordonelOrderDetailsServiceUrl =
"http://delaz1web01/MeterProcessState/api/Order/GetCordonelOrderDetails?OrderNr=";
private const String DefaultListAllOrderCordonelsServiceUrl =
"http://delaz1web01/MeterProcessState/api/Order/GetCordonelOrderList?CustomerOrderNumber=";
private const String DefaultDownloadFwUpdateSafeServiceUrl =
"http://delaz1web01/MeterProcessState/GetFWUpdateSafeContainerContent?SafeContainerId=";
private const String DefaultListAllFwUpdateSafesForUserServiceUrl =
"http://delaz1web01/MeterProcessState/GetFWUpdateSafeContainers?UserId=";
private const String DefaultFileContentDownloadServiceUrl =
"http://delaz1web01/MeterProcessState/GetFileContent?FileId=";
private const String DefaultFwUpdateReportUploadServiceUrl =
"http://delaz1web01/MeterProcessState/PostFWUpdateReportFile";
private const String DefaultFwUpdateReportDownloadServiceUrl =
"http://delaz1web01/MeterProcessState/GetFWUpdateReportFile?";
private const String DefaultFwUpdateSafeContainerUploadServiceUrl =
"http://delaz1web01/MeterProcessState/PostFWUpdateSafeOdd";
private const String DefaultEditFwUpdateUserValidityServiceUrl =
"http://delaz1web01/MeterProcessState/EditUserValidity?Id=";
private const String DefaultRefreshFwUpdateUsersHardwareIdServiceUrl =
"http://delaz1web01/MeterProcessState/RefreshUsersHardwareId?Id=";
private const String DefaultRefreshFwUpdateUsersPasswordHashServiceUrl =
"http://delaz1web01/MeterProcessState/RefreshUsersPasswordHash?Id=";
private const String DefaultCreateNewFwUpdateUserServiceUrl =
"http://delaz1web01/MeterProcessState/AddNewUser?";
private const String DefaultListAllFwUpdateUsersServiceUrl =
"http://delaz1web01/MeterProcessState/GetUserList";
private const String DefaultListAllFwUpdateBuilderOperatorsServiceUrl =
"http://delaz1web01/MeterProcessState/GetAllBuilderOperator";
private const String DefaultGetFwUpdateUserByIdServiceUrl =
"http://delaz1web01/MeterProcessState/GetUserList?Id=";
private const String DefaultGetFwUpdateUserByLoginNameServiceUrl =
"http://delaz1web01/MeterProcessState/GetUserList?LogInName=";
private const String DefaultRegisterWatchServiceUrl =
"http://delaz1web01/MeterProcessState/api/RegisterWatch/";
private const String DefaultGenesisGetOrderNumberServiceUrl =
"http://delaz1web01/MeterProcessState/api/Password/ordernumber?PcbId=";
private const String DefaultGenesisGetRadioAddressServiceUrl =
"http://delaz1web01/MeterProcessState/api/Password/radioadress?PcbId=";
private const String DefaultGenesisGetKeySetIdServiceUrl =
"http://delaz1web01/MeterProcessState/api/Password/getkeysetid?PcbId=";
private const String DefaultGenesisGetPasswordServiceUrl =
"http://delaz1web01/MeterProcessState/api/Password/GetPassword?PcbId=";
private const String DefaultGenesisSetPasswordServiceUrl =
"http://delaz1web01/MeterProcessState/api/Password/setpassword?PcbId=";
private const String DefaultGenesisPasswordContainerServiceUrl =
"http://delaz1web01/MeterProcessState/api/Password/GetPasswordHashFileContent?PcbId=";
private const String DefaultMarriageServiceUrl =
"http://delaz1web01/MeterProcessState/api/Marriage/";
private const String DefaultMeterProcessStateUrl =
"http://delaz1web01/MeterProcessState/api/ProccesState/";
private const String DefaultGenesisFinalCheckServiceUrl =
"http://delaz1web01/MeterProcessState/api/FinalCheck/";
private const String DefaultGenesisRadioCheckServiceUrl =
"http://delaz1web01/MeterProcessState/api/RadioCheck/";
private const String DefaultGetSoftwareStartUpAccessUrl =
"http://delaz1web01/MeterProcessState/api/SoftwareAccess/GetVersionIsValid";
private const String DefaultSetSoftwareLicenseUrl =
"http://delaz1web01/MeterProcessState/api/SoftwareAccess/SetVersionIsValid?Program=";
private const String DefaultGetSoftwareLicenseUrl =
"http://delaz1web01/MeterProcessState/api/SoftwareAccess/GetCurrentVersion?Program=";
private const String DefaultGenesisCalibrationResult =
"http://delaz1web01/MeterProcessState/api/GenesisMeter/PostCalibrationResult";
private const String DefaultGetGenesisCalibrationResults =
"http://delaz1web01/MeterProcessState/api/FinalCheck/CalibrationResults/";
private const String DefaultGenesisMeter =
"http://delaz1web01/MeterProcessState/api/GenesisMeter/";
private const String DefaultFileContentController =
"http://delaz1web01/MeterProcessState/api/FileUpToDate/";
private const String DefaultKeyServerCustom =
"https://nodes.sms-esaap.com/keygenproxy/api/v3/custom/";
private const String DefaultMeterInfoForTestBench =
"http://delaz1web01/MeterProcessState/api/TestBench/GetMeterInfoForTestBench?PcbID=";
private const String DefaultCordonelFwInfoUrl =
"http://delaz1web01/MeterProcessState/api/FileUpToDate/GetCordonelFw";
private const String DefaultDbDataAtEolServiceUrl =
"http://delaz1web01/MeterProcessState/api/fwupdate/databaseateol/";
//private const String DefaultGenesisGetOrderNumberServiceUrl =
// "http://localhost:56011/api/Password/ordernumber?PcbId=";
//private const String DefaultGenesisGetRadioAdressServiceUrl =
// "http://localhost:56011/api/Password/radioadress?PcbId=";
//private const String DefaultGenesisGetKeySetIdServiceUrl =
// "http://localhost:56011/api/Password/getkeysetid?PcbId=";
//private const String DefaultGenesisGetPasswordServiceUrl =
// "http://localhost:56011/api/Password/GetPassword?PcbId=";
//private const String DefaultGenesisSetPasswordServiceUrl =
// "http://localhost:56011/api/Password/setpassword?PcbId=";
//private const String DefaultGenesisPasswordContainerServiceUrl =
// "http://localhost:56011/api/Password/GetPasswordHashFileContent?PcbId=";
//private const String DefaultMarriageServiceUrl =
// "http://localhost:56011/api/Marriage/";
//private const String DefaultMeterProcessStateUrl =
// "http://localhost:56011/api/ProccesState/";
//private const String DefaultGenesisFinalCheckServiceUrl =
// "http://localhost:56011/api/FinalCheck/";
//private const String DefaultGenesisRadioCheckServiceUrl =
// "http://localhost:56011/api/RadioCheck/";
//private const String DefaultGetSoftwareStartUpAccessUrl =
// "http://localhost:56011/api/SoftwareAccess/GetVersionIsValid";
private const String PressureSensorTestURL_GetTestSpec
= "http://delaz1web01/MeterProcessState/api/CordonelPressureSensorTest/GetTestSpec";
private const String PressureSensorTestURL_PostTestResults
= "http://delaz1web01/MeterProcessState/api/CordonelPressureSensorTest/PostTestResults";
/// <summary>
/// usage: string.Format(CordonelPressureSensorTestURL_GetTestResults, pcbId);
/// </summary>
private const String PressureSensorTestURL_GetTestResults
= "http://delaz1web01/MeterProcessState/api/CordonelPressureSensorTest/GetTestResults/{0}";
public const String LaaProductionAPI
#if DEBUG == false // when false uses always the production url.
= "http://localhost:52822";
#else
= "http://delaz1web01";
#endif
/// <summary>
/// GET: test specification for water meter with pressure sensor.
/// </summary>
public static string GetPressureSensorSpecificationURL
#if DEBUG
=> "http://localhost:56011/api/CordonelPressureSensorTest/GetTestSpec";
#else
=> ConfigurationManager.AppSettings[nameof(GetPressureSensorSpecificationURL)]
?? PressureSensorTestURL_GetTestSpec;
#endif
/// <summary>
/// POST: test result for water meter with pressure sensor.
/// </summary>
public static string PostPressureSensorResultURL
#if DEBUG
=> "http://localhost:56011/api/CordonelPressureSensorTest/PostTestResults";
public static String Q3CalibrationResultURL { get; set; }
#else
=> ConfigurationManager.AppSettings[nameof(PostPressureSensorResultURL)]
?? PressureSensorTestURL_PostTestResults;
#endif
/// <summary>
/// GET: a list of test results for the water meter with specified pcbId.
/// </summary>
public static string PressureSensorResultsURL<T>(this T pcbId)
{
#if DEBUG
var url = "http://localhost:56011/api/CordonelPressureSensorTest/GetTestResults/{0}";
#else
var url = ConfigurationManager.AppSettings[nameof(PressureSensorResultsURL)] ?? PressureSensorTestURL_GetTestResults;
#endif
return string.Format(url, pcbId);
}
/// <summary>
/// List all Cordonel FW packages.
/// </summary>
/// <returns></returns>
public static String GetLutUrl()
{
return ConfigurationManager.AppSettings["GetLutUrl"] ??
DefaultGetLutUrl;
}
/// <summary>
/// List all Cordonel FW packages.
/// </summary>
/// <returns></returns>
public static String ListAllCordonelFwPackagesUrl()
{
return ConfigurationManager.AppSettings["CordonelFwInfoUrl"] ??
DefaultCordonelFwInfoUrl;
}
/// <summary>
/// List all PCB IDs from a safe. As the safe may be deleted, this information is still accessible.
/// </summary>
/// <returns></returns>
public static String MeterInfoForTestBench()
{
return ConfigurationManager.AppSettings["MeterInfoForTestBenchServiceUrl"] ??
DefaultMeterInfoForTestBench;
}
/// <summary>
/// List all PCB IDs from a safe. As the safe may be deleted, this information is still accessible.
/// </summary>
/// <returns></returns>
public static String ListAllPcbIdsFromSafe()
{
return ConfigurationManager.AppSettings["GetPcbIdsFromSafeServiceUrl"] ??
DefaultGetPcbIdsFromSafeServiceUrl;
}
/// <summary>
/// Add PCB IDs to a safe. As the safe may be deleted, this information is still accessible.
/// </summary>
/// <returns></returns>
public static String AddPcbIdsToSafeServiceUrl()
{
return ConfigurationManager.AppSettings["AddPcbIdsToSafeServiceUrl"] ??
DefaultAddPcbIdsToSafeServiceUrl;
}
/// <summary>
/// Get all Cordonel FW package.
/// </summary>
/// <returns></returns>
public static String DownloadFileParts()
{
return ConfigurationManager.AppSettings["DownloadFilePartsServiceUrl"] ??
DefaultDownloadFilesPartsServiceUrl;
}
/// <summary>
/// FW-Update Safe container list for specific user
/// </summary>
/// <returns></returns>
public static String ListAllFwUpdateSafesForUserServiceUrl()
{
return ConfigurationManager.AppSettings["ListAllFwUpdateSafesForUserServiceUrl"] ??
DefaultListAllFwUpdateSafesForUserServiceUrl;
}
/// <summary>
/// FW-Update Safe container
/// </summary>
/// <returns></returns>
public static String DownloadFwUpdateSafeServiceUrl()
{
return ConfigurationManager.AppSettings["DownloadFwUpdateSafeServiceUrl"] ??
DefaultDownloadFwUpdateSafeServiceUrl;
}
/// <summary>
/// Download the EOL logging data for power correction of overestimated power consumption
/// </summary>
/// <returns></returns>
public static String DownloadDbDataAtEolServiceUrl()
{
return ConfigurationManager.AppSettings["DownloadDbDataAtEolServiceUrl"] ??
DefaultDbDataAtEolServiceUrl;
}
/// <summary>
/// Get EOL data for sentinel
/// </summary>
/// <returns></returns>
public static String EolDataForSentinelServiceUrl()
{
return ConfigurationManager.AppSettings["EolDataForSentinelServiceUrl"] ??
DefaultEolDataForSentinelServiceUrl;
}
/// <summary>
/// Get all Cordonel safes description files.
/// </summary>
/// <returns></returns>
public static String ListAllFwUpdateSafes()
{
return ConfigurationManager.AppSettings["ListAllFwUpdateSafesServiceUrl"] ??
DefaultListAllFwUpdateSafesServiceUrl;
}
/// <summary>
/// Get all Cordonel FW package description files.
/// </summary>
/// <returns></returns>
public static String ListAllFwPackages()
{
return ConfigurationManager.AppSettings["ListAllFwPackagesServiceUrl"] ??
DefaultListAllFwPackagesServiceUrl;
}
/// <summary>
/// Get all Cordonel FW update SW package description files.
/// </summary>
/// <returns></returns>
public static String ListAllSwPackages()
{
return ConfigurationManager.AppSettings["ListAllSwPackagesServiceUrl"] ??
DefaultListAllSwPackagesServiceUrl;
}
/// <summary>
/// Get all Cordonel FW update SW package description files.
/// </summary>
/// <returns></returns>
public static String ListAllConfigurationFilePackages()
{
return ConfigurationManager.AppSettings["ListAllConfigFilePackagesServiceUrl"] ??
DefaultListAllConfigFilePackagesServiceUrl;
}
/// <summary>
/// Set all applications versions installed to a specific Cordonel.
/// </summary>
/// <returns></returns>
public static String UploadCordonelAppVersionServiceUrl()
{
return ConfigurationManager.AppSettings["SetCordonelAppVersionServiceUrl"] ??
DefaultSetCordonelAppVersionServiceUrl;
}
/// <summary>
/// Inspect a specific requirement (read only).
/// </summary>
/// <returns></returns>
public static String InspectCordonelRequirementInfoServiceUrl()
{
return ConfigurationManager.AppSettings["InspectCordonelRequirementInfoServiceUrl"] ??
DefaultInspectCordonelRequirementInfoUrl;
}
/// <summary>
/// Get all production infos for skip process checks or limits for production like:
/// - Battery drained percentage upper limit,
/// - Production due date for a special register,
/// - Required life time for assembly line,
/// - Required life time for shipping line.
/// </summary>
/// <returns></returns>
public static String GetCordonelRequirementInfoServiceUrl()
{
return ConfigurationManager.AppSettings["GetCordonelRequirementInfoServiceUrl"] ??
DefaultGetCordonelRequirementInfoUrl;
}
/// <summary>
/// Get all production infos for skip process checks or limits for production like:
/// - Battery drained percentage upper limit,
/// - Production due date for a special register,
/// - Required life time for assembly line,
/// - Required life time for shipping line.
/// </summary>
/// <returns></returns>
public static String GetCordonelRequirementByFANrInfoServiceUrl(string ponr)
{
return $"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/cordonel/requirements/pono/{ponr}";
}
/// <summary>
/// Get all production infos for skip process checks or limits for production like:
/// - Battery drained percentage upper limit,
/// - Production due date for a special register,
/// - Required life time for assembly line,
/// - Required life time for shipping line.
/// </summary>
/// <returns></returns>
public static string GetCordonelRequirementByMeterSizeInfoServiceUrl(int size)
{
return $"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/cordonel/requirements/isize/{size}";
}
/// <summary>
/// Get all applications versions installed to a specific Cordonel.
/// </summary>
/// <returns></returns>
public static String DownloadCordonelAppVersionServiceUrl()
{
return ConfigurationManager.AppSettings["GetCordonelAppVersionServiceUrl"] ??
DefaultGetCordonelAppVersionServiceUrl;
}
/// <summary>
/// List all Cordonel customers with search filter (e.g. %sus% where % is a filter for 0 to multiple
/// alphanumeric characters) to get the customer names and the order numbers.
/// </summary>
/// <returns></returns>
public static String ListAllCordonelCustomersWithFilterServiceUrl()
{
return ConfigurationManager.AppSettings["ListAllCordonelCustomersWithFilterServiceUrl"] ??
DefaultListAllCordonelCustomersWithFilterServiceUrl;
}
/// <summary>
/// Get Cordonel order details to capture the production order
/// </summary>
/// <returns></returns>
public static String ListCordonelOrderDetailsServiceUrl()
{
return ConfigurationManager.AppSettings["ListCordonelOrderDetailsServiceUrl"] ??
DefaultListCordonelOrderDetailsServiceUrl;
}
/// <summary>
/// List all Cordonel orders of a selected customer
/// </summary>
/// <returns></returns>
public static String ListAllCordonelCustomerOrdersServiceUrl()
{
return ConfigurationManager.AppSettings["ListAllCordonelCustomerOrdersServiceUrl"] ??
DefaultListAllCordonelCustomerOrdersServiceUrl;
}
/// <summary>
/// List all Cordonels of a specific order number to get the customer serial number and the Pcb ID.
/// </summary>
/// <returns></returns>
public static String ListAllOrderCordonelsServiceUrl()
{
return ConfigurationManager.AppSettings["ListAllOrderCordonelsServiceUrl"] ??
DefaultListAllOrderCordonelsServiceUrl;
}
/// <summary>
/// Register watch service
/// </summary>
/// <returns></returns>
public static String RegisterWatchServiceUrl()
{
return ConfigurationManager.AppSettings["RegisterWatchServiceUrl"] ??
DefaultRegisterWatchServiceUrl;
}
/// <summary>
/// File content download
/// </summary>
/// <returns></returns>
public static String DownloadFileContentServiceUrl()
{
return ConfigurationManager.AppSettings["FileContentDownloadServiceUrl"] ??
DefaultFileContentDownloadServiceUrl;
}
/// <summary>
/// FW-Update report download as string
/// </summary>
/// <returns></returns>
public static String DownloadFwUpdateReportServiceUrl()
{
return ConfigurationManager.AppSettings["FwUpdateReportDownloadServiceUrl"] ??
DefaultFwUpdateReportDownloadServiceUrl;
}
/// <summary>
/// FW-Update report upload as string
/// </summary>
/// <returns></returns>
public static String UploadFwUpdateReportServiceUrl()
{
return ConfigurationManager.AppSettings["FwUpdateReportUploadServiceUrl"] ??
DefaultFwUpdateReportUploadServiceUrl;
}
/// <summary>
/// FW-Update Safe container upload
/// </summary>
/// <returns></returns>
public static String UploadFwUpdateSafeContainerServiceUrl()
{
return ConfigurationManager.AppSettings["FwUpdateSafeContainerUploadServiceUrl"] ??
DefaultFwUpdateSafeContainerUploadServiceUrl;
}
/// <summary>
/// FW-Update user validation url
/// </summary>
/// <returns></returns>
public static String EditFwUpdateUserValidityServiceUrl()
{
return ConfigurationManager.AppSettings["EditFwUpdateUserValidityServiceUrl"] ??
DefaultEditFwUpdateUserValidityServiceUrl;
}
/// <summary>
/// FW-Update user HW-Id url
/// </summary>
/// <returns></returns>
public static String RefreshFwUpdateUsersHardwareIdServiceUrl()
{
return ConfigurationManager.AppSettings["RefreshFwUpdateUsersHardwareIdServiceUrl"] ??
DefaultRefreshFwUpdateUsersHardwareIdServiceUrl;
}
/// <summary>
/// FW-Update user password hash for encryption url
/// </summary>
/// <returns></returns>
public static String RefreshFwUpdateUsersPasswordHashServiceUrl()
{
return ConfigurationManager.AppSettings["RefreshFwUpdateUsersPasswordHashServiceUrl"] ??
DefaultRefreshFwUpdateUsersPasswordHashServiceUrl;
}
/// <summary>
/// FW-Update create new user url
/// </summary>
/// <returns></returns>
public static String CreateNewFwUpdateUserServiceUrl()
{
return ConfigurationManager.AppSettings["CreateNewFwUpdateUserServiceUrl"] ??
DefaultCreateNewFwUpdateUserServiceUrl;
}
/// <summary>
/// FW-Update list all users url
/// </summary>
/// <returns></returns>
public static String ListAllFwUpdateUsersServiceUrl()
{
return ConfigurationManager.AppSettings["ListAllFwUpdateUsersServiceUrl"] ??
DefaultListAllFwUpdateUsersServiceUrl;
}
/// <summary>
/// FW-Update list all users url
/// </summary>
/// <returns></returns>
public static String ListAllFwUpdateBuilderOperatorsServiceUrl()
{
return ConfigurationManager.AppSettings["ListAllFwUpdateBuilderOperatorsServiceUrl"] ??
DefaultListAllFwUpdateBuilderOperatorsServiceUrl;
}
/// <summary>
/// FW-Update get user information by user Id url
/// </summary>
/// <returns></returns>
public static String GetFwUpdateUserByIdServiceUrl()
{
return ConfigurationManager.AppSettings["GetFwUpdateUserByIdServiceUrl"] ??
DefaultGetFwUpdateUserByIdServiceUrl;
}
/// <summary>
/// FW-Update get user information by user login name url
/// </summary>
/// <returns></returns>
public static String GetFwUpdateUserByLoginNameServiceUrl()
{
return ConfigurationManager.AppSettings["GetFwUpdateUserByLoginNameServiceUrl"] ??
DefaultGetFwUpdateUserByLoginNameServiceUrl;
}
/// <summary>
/// Genesis check radio parameter url
/// </summary>
/// <returns></returns>
public static String GenesisRadioCheckServiceUrl()
{
return ConfigurationManager.AppSettings["GenesisRadioCheckServiceUrl"] ??
DefaultGenesisRadioCheckServiceUrl;
}
/// <summary>
/// Genesis radio parameter get url
/// </summary>
/// <returns></returns>
public static String GenesisFinalCheckServiceUrl()
{
return ConfigurationManager.AppSettings["GenesisFinalCheckServiceUrl"] ??
DefaultGenesisFinalCheckServiceUrl;
}
/// <summary>
/// Marriage service url
/// </summary>
/// <returns></returns>
public static String MarriageServiceUrl()
{
return ConfigurationManager.AppSettings["MarriageServiceUrl"] ??
DefaultMarriageServiceUrl;
}
/// <summary>
/// Genesis process status url
/// </summary>
/// <returns></returns>
public static String MeterProcessStateUrl()
{
return ConfigurationManager.AppSettings["MeterProcessStateUrl"] ??
DefaultMeterProcessStateUrl;
}
/// <summary>
/// Genesis get radio address url
/// </summary>
/// <returns></returns>
public static String GenesisGetRadioAddressServiceUrl()
{
return ConfigurationManager.AppSettings["GenesisGetRadioAddressServiceUrl"] ??
DefaultGenesisGetRadioAddressServiceUrl;
}
/// <summary>
/// Genesis get key set id url
/// </summary>
/// <returns></returns>
public static String GenesisGetOrderNumberServiceUrl()
{
return ConfigurationManager.AppSettings["GenesisGetOrderNumberServiceUrl"] ??
DefaultGenesisGetOrderNumberServiceUrl;
}
/// <summary>
/// Genesis get key set id url
/// </summary>
/// <returns></returns>
public static String GenesisGetKeySetIdServiceUrl()
{
return ConfigurationManager.AppSettings["GenesisGetKeySetIdServiceUrl"] ??
DefaultGenesisGetKeySetIdServiceUrl;
}
/// <summary>
/// Genesis get password url
/// </summary>
/// <returns></returns>
public static String GenesisGetPasswordServiceUrl()
{
return ConfigurationManager.AppSettings["GenesisGetPasswordServiceUrl"] ??
DefaultGenesisGetPasswordServiceUrl;
}
/// <summary>
/// Genesis get password url
/// </summary>
/// <returns></returns>
public static String GenesisGetPasswordContainerServiceUrl()
{
return ConfigurationManager.AppSettings["GenesisPasswordContainerServiceUrl"] ??
DefaultGenesisPasswordContainerServiceUrl;
}
/// <summary>
/// Genesis set password url
/// </summary>
/// <returns></returns>
public static String GenesisSetPasswordServiceUrl()
{
return ConfigurationManager.AppSettings["GenesisSetPasswordServiceUrl"] ??
DefaultGenesisSetPasswordServiceUrl;
}
/// <summary>
/// Set the SW license
/// </summary>
/// <returns></returns>
public static String SetSoftwareLicenseUrl()
{
return ConfigurationManager.AppSettings["SetSoftwareLicenseUrl"] ??
DefaultSetSoftwareLicenseUrl;
}
/// <summary>
/// Set the SW license
/// </summary>
/// <returns></returns>
public static String GetSoftwareLicenseUrl()
{
return ConfigurationManager.AppSettings["GetSoftwareLicenseUrl"] ??
DefaultGetSoftwareLicenseUrl;
}
/// <summary>
/// Check the SW license with a given name and version
/// </summary>
/// <returns></returns>
public static String GetSoftwareStartUpAccessUrl()
{
return ConfigurationManager.AppSettings["GetSoftwareStartUpAccessUrl"] ??
DefaultGetSoftwareStartUpAccessUrl;
}
/// <summary>
/// Get Genesis calibration results for final check if those have been correctly set
/// </summary>
/// <returns></returns>
public static String GetGenesisCalibrationResultsUrl()
{
return ConfigurationManager.AppSettings["GetGenesisCalibrationResults"] ??
DefaultGetGenesisCalibrationResults;
}
/// <summary>
/// Post Genesis calibration results
/// </summary>
/// <returns></returns>
public static String PostGenesisCalibrationResultUrl()
{
return ConfigurationManager.AppSettings["GenesisCalibrationResult"] ??
DefaultGenesisCalibrationResult;
}
/// <summary>
/// Post Genesis calibration results
/// </summary>
/// <returns></returns>
public static String FileContentControllerUrl()
{
return ConfigurationManager.AppSettings["DefaultFileContentController"] ??
DefaultFileContentController;
}
/// <summary>
/// Root for all function regarding the BSI Key generation service
/// </summary>
/// <returns></returns>
public static String KeyServerCustom()
{
return ConfigurationManager.AppSettings["DefaultKeyServerCustom"] ??
DefaultKeyServerCustom;
}
/// <summary>
/// Root for all function regarding the meter itself
/// </summary>
/// <returns></returns>
public static String GenesisMeter()
{
return ConfigurationManager.AppSettings["GenesisMeter"] ??
DefaultGenesisMeter;
}
public static String GetQ3CalibrationsURI(String currentPcbId)
{
throw new NotImplementedException();
}
}
}

View File

@ -81,7 +81,7 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>5586F8F849F79C1CEB990ED4E3ACB22CDF595CB5</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>305BF210A6BBE3C987AD135C96F7B55EC538E555</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>CordonelAssemblyLine_TemporaryKey.pfx</ManifestKeyFile>
@ -90,10 +90,10 @@
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
@ -184,6 +184,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="CordonelAssemblyLine_TemporaryKey.pfx" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

View File

@ -292,7 +292,7 @@ namespace CordonelAssemblyLine.Model
{
InputIsEnabled = false;
Result = new PressureResultDataNotifyable() { Remark = "loading", TestPoints = new ObservableCollection<PressureTestPoints>(), PcbId = "" };
Task<PressureResultDataNotifyable>.Run(() =>
Task<PressureResultDataNotifyable>.Run((Func<PressureResultDataNotifyable>)(() =>
{
try
{
@ -331,7 +331,7 @@ namespace CordonelAssemblyLine.Model
return new PressureResultDataNotifyable();
}
}).ContinueWith((a) =>
})).ContinueWith((a) =>
{
if (a == null)
{
@ -362,7 +362,7 @@ namespace CordonelAssemblyLine.Model
InputIsEnabled = false;
var isStored = "";
Result.TesterName = TesterName;
Task.Run(() =>
Task.Run((Func<Boolean>)(() =>
{
var url = ServiceUrls.MeterProcessStateUrl();
var status = DisplayCodes.PressureTestedFailed;
@ -422,7 +422,7 @@ namespace CordonelAssemblyLine.Model
OnStoreDone?.Invoke(null, new StringPressureArgs("Bitte erneut testen oder Linienleitung und QS informieren.", true));
return false;
});
}));
}
return false;

View File

@ -626,15 +626,14 @@ namespace CordonelAssemblyLine.Model
if (genesisStatus.AlternativeRequiredBatteryLoadPercent != null &&
genesisStatus.AlternativeRequiredBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly)
{
sbMSG.AppendLine($"{nameof(genesisStatus.AlternativeRequiredBatteryLoadPercent)}: " +
$"{genesisStatus.AlternativeRequiredBatteryLoadPercent} > " +
$"{requirements.MaxDrainedBatteryLoadPercentAssembly}");
ret = false;
}
else sbMSG.AppendLine($"Alternative Batterieverbrauch Montage i.O.");
//if (genesisStatus.AlternativeRequiredBatteryLoadPercent != null &&
// genesisStatus.AlternativeRequiredBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly)
//{
// sbMSG.AppendLine($"{nameof(genesisStatus.AlternativeRequiredBatteryLoadPercent)}: " +
// $"{genesisStatus.AlternativeRequiredBatteryLoadPercent} > " + $"{requirements.MaxDrainedBatteryLoadPercentAssembly}");
// ret = false;
//}
//else sbMSG.AppendLine($"Alternative Batterieverbrauch Montage i.O.");
// max bat verbrauch - MaxDrainedBatteryLoadPercentAssembly
if (genesisStatus.DrainedBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly)
@ -745,7 +744,7 @@ namespace CordonelAssemblyLine.Model
StringBuilder sbUrl = new StringBuilder();
sbUrl.Append("http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetLutFiles");
sbUrl.Append(ServiceUrls.GetLutUrl());
sbUrl.Append($"?Metersize={_orderDetails.MeterSize}");
sbUrl.Append("&ForProd=true");
//?Metersize=2&Region=EMEA&
@ -922,7 +921,7 @@ namespace CordonelAssemblyLine.Model
lblS06Color = _progressError;
return false;
}
if (meter.InstalledFwVersion.Value != checkAppsIdVersion.FirstOrDefault().Value)
@ -934,7 +933,7 @@ namespace CordonelAssemblyLine.Model
return false;
}
}
else
{
@ -1113,7 +1112,7 @@ namespace CordonelAssemblyLine.Model
}
catch (Exception e)
{
Log($"Error occur.{ Environment.NewLine} {e.Message}");
Log($"Error occur.{Environment.NewLine} {e.Message}");
}
}
}
@ -1157,7 +1156,7 @@ namespace CordonelAssemblyLine.Model
}
catch (Exception e)
{
Log($"Error occur.{ Environment.NewLine} {e.Message}");
Log($"Error occur.{Environment.NewLine} {e.Message}");
}
}
}
@ -1221,7 +1220,7 @@ namespace CordonelAssemblyLine.Model
_state = PickingStateMachine.Compare;
lblS03Text = $"Nr {_orderOverview.OrderOverViewCordonel.AssignedPicking + 1 } von {_orderOverview.OrderOverViewCordonel.Count}";
lblS03Text = $"Nr {_orderOverview.OrderOverViewCordonel.AssignedPicking + 1} von {_orderOverview.OrderOverViewCordonel.Count}";
lblS03Color = _progressDone;
lblS04Color = _progressCurrent;
@ -1297,7 +1296,7 @@ namespace CordonelAssemblyLine.Model
Scanner = $"Öffne {_scannerPort}";
_barScanner = new BarScanner(_scannerPort, token);
HistoryText = $"{HistoryText} {Environment.NewLine}{_order}({_orderOverview.OrderOverViewCordonel.AssignedPicking + 1 }/{ _orderOverview.OrderOverViewCordonel.Count})";
HistoryText = $"{HistoryText} {Environment.NewLine}{_order}({_orderOverview.OrderOverViewCordonel.AssignedPicking + 1}/{_orderOverview.OrderOverViewCordonel.Count})";
_barScanner.Start();
_state = PickingStateMachine.WaitForBuildingMeterReady;
Thread.Sleep(10000);
@ -1383,7 +1382,7 @@ namespace CordonelAssemblyLine.Model
{
Log(ex.Message);
}
}
}
@ -1392,7 +1391,7 @@ namespace CordonelAssemblyLine.Model
// ReSharper disable once UnusedParameter.Local
private void Log(String v)
{
}
}

View File

@ -5,7 +5,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Xylem.Common.Ui.CordonelPreadjustmentUi</RootNamespace>
<AssemblyName>Xylem.Common.Ui.CordonelPreadjustmentUi</AssemblyName>

View File

@ -45,6 +45,12 @@ namespace Xylem.Common.Ui.CordonelPreadjustmentUi.Parameters
FlowrateQmH = 400;
DurationS = 60;
break;
case MeterSize.US8:
case MeterSize.DN200:
FlowrateQmH = 400;
DurationS = 60;
break;
default:
Message = $"Warning no parameter for meter size {meterSize.GetHashCode()} use default!{Environment.NewLine}";
FlowrateQmH = 40;

View File

@ -58,7 +58,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
//(pp.Setting.OffsetTestNumberOfLines * number of path) / 1000
//((9000 * 3) / 1000 ) = 27 min
var pataDataActivitCheck = new MultiPathDataLogContainer<int>(pp.Setting.NumberOfPaths);
var MaxTimeoutWarnings = 300;
pataDataActivitCheck.Update(null, -1);
@ -105,7 +105,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
if (MaxTimeoutWarnings <= 0)
{
pp.DebugMessage($"Fatal timeout while collecting data. Please check LED singnal. Has {offsetRecords.Count} from {pp.Setting.OffsetTestNumberOfLines * 3}", meterctl.Slot, "DC", meterctl.Meter.PcbId);
// Ok = false;
// Ok = false;
}
if (CheckAbort(Ok, meterctl)) { return Ok; }
@ -168,7 +168,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
{
Ok = false;
}
}
if (CheckAbort(Ok, meterctl)) { return Ok; }
@ -197,9 +197,12 @@ namespace CordonelPreadjustmentUi.Processes.Actions
pp.DebugMessage($"Average positive amplitude, PATH{(Path + 1)}: {Math.Round(amplitudeValuesMeanUp.Get(Path), 2).ToString("000.00")}mV", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
pp.DebugMessage($"Average negative amplitude, PATH{(Path + 1)}: {Math.Round(amplitudeValuesMeanDown.Get(Path), 2).ToString("000.00")}mV", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average positive amplitude PATH { (Path + 1)}", $"{ Math.Round(amplitudeValuesMeanUp.Get(Path), 2).ToString("000.00")}mV");
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average negative amplitude PATH { (Path + 1)}", $"{ Math.Round(amplitudeValuesMeanDown.Get(Path), 2).ToString("000.00")}mV");
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average positive amplitude PATH {(Path + 1)}", $"{Math.Round(amplitudeValuesMeanUp.Get(Path), 2).ToString("000.00")}mV");
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average negative amplitude PATH {(Path + 1)}", $"{Math.Round(amplitudeValuesMeanDown.Get(Path), 2).ToString("000.00")}mV");
if (pp.Setting.MeterSize == Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN200 || pp.Setting.MeterSize == Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.US8)
{
pp.Setting.OffsetTestLowerVoltageLimitMV = 180;
}
if ((amplitudeValuesMeanUp.Get(Path) > pp.Setting.OffsetTestUpperVoltageLimitMV) ||
(amplitudeValuesMeanUp.Get(Path) < pp.Setting.OffsetTestLowerVoltageLimitMV) ||
(amplitudeValuesMeanDown.Get(Path) < pp.Setting.OffsetTestLowerVoltageLimitMV) ||
@ -209,9 +212,9 @@ namespace CordonelPreadjustmentUi.Processes.Actions
pp.DebugMessage($"Amplitude check failed!", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
}
pp.DebugMessage($"Average delta time of flight valuePATH{(Path + 1)}: Raw{DeltaTimeOfFlightAverage.Get(Path)} -> in picoseconds= { Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average delta time of flight value PATH { (Path + 1)} RAW ", $"{DeltaTimeOfFlightAverage.Get(Path)}");
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average delta time of flight value PATH { (Path + 1)} picoseconds ", $"{Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}");
pp.DebugMessage($"Average delta time of flight valuePATH{(Path + 1)}: Raw{DeltaTimeOfFlightAverage.Get(Path)} -> in picoseconds= {Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average delta time of flight value PATH {(Path + 1)} RAW ", $"{DeltaTimeOfFlightAverage.Get(Path)}");
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average delta time of flight value PATH {(Path + 1)} picoseconds ", $"{Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}");
if ((DeltaTimeOfFlightAverage.Get(Path) > pp.Setting.OffsetTestOffsetLimitPS) ||
(DeltaTimeOfFlightAverage.Get(Path) < -pp.Setting.OffsetTestOffsetLimitPS))
@ -233,7 +236,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
{
if (CheckAbort(false, meterctl)) { return false; }
}
}
Ok = meterctl.Meter.ReLogin();
@ -270,7 +273,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
Ok = WriteRegisterSafe(meterctl.Meter, $"Zero flow offset Path {Path + 1}", RegValue, OffsetValue);
Ok = true;
}
}
return Ok;
}));

View File

@ -122,9 +122,21 @@ namespace CordonelPreadjustmentUi.Processes.Actions
var r = LocalWebRequest.GetRequest($"{ ServiceUrls.GenesisFinalCheckServiceUrl()}GetMetersizeProgrammingData?MeterSize={pp.Setting.MeterSize.GetHashCode()}", 2000);
var dt = JsonConvert.DeserializeObject<Dictionary<string, UInt32>>(r);
try
{
if (meterctl.Meter.GetRegistersDic().Any(a => a.Key.RegisterName == "GENESISFLOW_DelayedLedOff"))
{
Ok = WriteRegisterSafe(meterctl.Meter, "ledDelay", "GENESISFLOW_DelayedLedOff", 60 * 60 * 2, false);
if (CheckAbort(Ok, meterctl)) { return Ok; }
}
}
catch (Exception)
{
//Ok = WriteRegisterSafe(meterctl.Meter, "ledDelay", "GENESISFLOW_DelayedLedOff", 60 * 60* 2, false);
//if (CheckAbort(Ok, meterctl)) { return Ok; }
}
foreach (var item in dt)

View File

@ -1 +1 @@
8cb55c312de586b683d72cf58c13e2801d10e14b767777d98338d3e1473a1213
b03dfbada453427a2bb1275645a5f1b525f29900

View File

@ -61,7 +61,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Model
internal void ReloadData()
{
Task.Run(() =>
Task.Run((Action)(() =>
{
try
{
@ -151,7 +151,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Model
{
Log(ex.Message);
}
});
}));
}
private void UpdatePickingUi(String state, Brush StateColor, String order, Int32 toDo, Int32 done)

View File

@ -78,7 +78,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Model
}
Result = new PressureResultDataNotifyable { Remark = "loading", Testpoints = new ObservableCollection<PressureTestPoints>(), PcbId = "" };
Task.Run(() =>
Task.Run((Func<PressureResultDataNotifyable>)(() =>
{
try
{
@ -100,7 +100,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Model
return new PressureResultDataNotifyable();
}
}).ContinueWith(a =>
})).ContinueWith(a =>
{
var res = a.Result;
res.PcbId = CurrentPcbID;
@ -123,7 +123,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Model
var isStored = false;
var status = DisplayCodes.PressureTestedFailed;
Task.Run(() =>
Task.Run((Action)(() =>
{
var url = ServiceUrls.MeterProcessStateUrl();
@ -182,7 +182,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Model
}
OnStoreDone?.Invoke(null, new StringArgs("Pressure test stored successfully. But Meter is marked with a leakage. Please inform QS"));
});
}));
}
}

View File

@ -58,7 +58,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Gener
"&withRadioAdress=true";
var responseJson = LocalWebRequest.GetRequest(url, 30000);
var stringArray = JsonConvert.DeserializeObject<String[]>(responseJson);
var stringArray = JsonConvert.DeserializeObject<String[]>(responseJson);
if (stringArray != null)
{

View File

@ -61,7 +61,7 @@ namespace ProductionUiCordonelLegacy.Model
internal void ReloadData()
{
Task.Run(() =>
Task.Run((Action)(() =>
{
try
{
@ -151,7 +151,7 @@ namespace ProductionUiCordonelLegacy.Model
{
Log(ex.Message);
}
});
}));
}
private void UpdatePickingUi(String state, Brush StateColor, String order, Int32 toDo, Int32 done)

View File

@ -78,7 +78,7 @@ namespace ProductionUiCordonelLegacy.Model
}
Result = new PressureResultDataNotifyable { Remark = "loading", Testpoints = new ObservableCollection<PressureTestPoints>(), PcbId = "" };
Task<PressureResultDataNotifyable>.Run(() =>
Task<PressureResultDataNotifyable>.Run((Func<PressureResultDataNotifyable>)(() =>
{
try
{
@ -100,7 +100,7 @@ namespace ProductionUiCordonelLegacy.Model
return new PressureResultDataNotifyable();
}
}).ContinueWith(a =>
})).ContinueWith(a =>
{
var res = a.Result;
res.PcbId = CurrentPcbID;
@ -123,7 +123,7 @@ namespace ProductionUiCordonelLegacy.Model
var isStored = false;
var status = DisplayCodes.PressureTestedFailed;
Task.Run(() =>
Task.Run((Action)(() =>
{
var url = ServiceUrls.MeterProcessStateUrl();
@ -182,7 +182,7 @@ namespace ProductionUiCordonelLegacy.Model
}
OnStoreDone?.Invoke(null, new StringArgs("Pressure test stored successfully. But Meter is marked with a leakage. Please inform QS"));
});
}));
}
}

View File

@ -720,10 +720,9 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
sb.AppendLine($" inner join [Identnr] ident on ap.Identnr = ident.IdentNr ");
sb.AppendLine($" where ap.FertigungsauftragNr = {ProductionOrderNumber}");
sb.AppendLine(" SELECT [DS_ID] ,[ID_PCB] ,[ID_TEST] ,[JSON], @DN as [DN] ,@Length as [Length] FROM [MyOraDB]..[DELTACHEF].[GENESIS_PCBRADIOTEST_PD] ");
sb.AppendLine(" where [ID_PCB] = @PcbId ");
sb.AppendLine(" order by ID_TEST desc ");
sb.AppendLine($" sELECT * ,@DN as [DN] ,@Length as [Length] FROM OPENQUERY (MyOraDB, ' SELECT DS_ID,ID_PCB,ID_TEST,JSON FROM DELTACHEF.GENESIS_PCBRADIOTEST_PD WHERE ID_PCB = ''{CheckPcbId.Value}'' order by ID_TEST desc '); ");
@ -825,14 +824,9 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
sb = new StringBuilder();
sb.AppendLine(" SELECT top 1 [DS_ID] ,[ID_PCB] ,[ID_TEST] ,[JSON] FROM [MyOraDB]..[DELTACHEF].[GENESIS_PCBFUNCTIONALTEST_PD] ");
sb.AppendLine($" where [ID_PCB] = '{CheckPcbId.Value}' ");
sb.AppendLine(" order by ID_TEST desc ");
sb.AppendLine($" sELECT * FROM OPENQUERY (MyOraDB, ' SELECT JSON FROM DELTACHEF.GENESIS_PCBFUNCTIONALTEST_PD WHERE ID_PCB = ''{CheckPcbId.Value}'' order by ID_TEST desc '); ");
var dtPrdDate = dataacces.ExecuteQuery(sb.ToString());
if (dtPrdDate.Rows.Count == 1)
if (dtPrdDate.Rows.Count >= 1)
{
var St = dtPrdDate.Rows[0]["JSON"].ToString();
var startInex = St.IndexOf("\"StartDT\":\"") + "\"StartDT\":\"".Length;

View File

@ -90,18 +90,18 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
OracleCommand command = con.CreateCommand();
command.CommandText = strSQLOra;
OracleDataReader reader = command.ExecuteReader();
while (reader.Read())
{
Q1 = ((double)reader["Q1_SOLL"]) / 1000;
Q2 = ((double)reader["Q2_SOLL"]) / 1000;
F1 = (double)reader["FEHLER_Q1"];
F2 = (double)reader["FEHLER_Q2"];
Q1 = ((double)reader["Q1_SOLL"]) / 1000;
Q2 = ((double)reader["Q2_SOLL"]) / 1000;
F1 = (double)reader["FEHLER_Q1"];
F2 = (double)reader["FEHLER_Q2"];
}
@ -121,8 +121,73 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
}
}
[Route("GetProddate")]
public async Task<HttpResponseMessage> GetProddate(string Seriennumer = "")
{
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() => { return getLastProductionDateByPcb(Seriennumer); }));
}
public async Task<DateTime> getLastProductionDateByPcb(string Seriennumer = "")
{
DateTime lastProdDate = DateTime.MinValue;
try
{
var sb = new StringBuilder();
sb.AppendLine(" SELECT top 1 [DS_ID] ,[ID_PCB] ,[ID_TEST] ,[JSON] FROM [DELTACHEF].[GENESIS_PCBFUNCTIONALTEST_PD] ");
sb.AppendLine($" where [ID_PCB] = '{Seriennumer}' ");
sb.AppendLine(" order by ID_TEST desc ");
// create connection
using (OracleConnection con = new OracleConnection())
{
// create connection string using builder
OracleConnectionStringBuilder ocsb = new OracleConnectionStringBuilder();
ocsb.Password = "senspi2012";
ocsb.UserID = "prima_ro";
ocsb.DataSource = "//SLUORADB:1521/DT01";
// connect
con.ConnectionString = ocsb.ConnectionString;
con.Open();
OracleCommand command = con.CreateCommand();
command.CommandText = sb.ToString();
OracleDataReader reader = command.ExecuteReader();
while (reader.Read())
{
var St = ((string)reader["JSON"]);
var startInex = St.IndexOf("\"StartDT\":\"") + "\"StartDT\":\"".Length;
var datestring = St.Substring(startInex, "29.07.2022 06:47:27".Length);
DateTime.TryParse(datestring, out lastProdDate);
}
}
}
catch (Exception ex)
{
throw ex;
}
return lastProdDate;
}
//connect

View File

@ -512,6 +512,10 @@ namespace Xylem.Common.Logic.SoftwareAccessHelper
/// <returns></returns>
public static String GetRequest(String url, Int32? timeoutMs = null, Dictionary<String, String> header = null, Boolean isRetry = false)
{
//if (true && (url.Contains("sla12iis01/MeterProcessState") || url.Contains("sla12iis01.emea.sensus.net/MeterProcessState")))
//{
// url = url.Replace("sla12iis01/MeterProcessState", "delaz1web01/MeterProcessState").Replace("sla12iis01.emea.sensus.net/MeterProcessState", "delaz1web01/MeterProcessState")
//}
var ret = GetRequestWithError(url, out var temp, timeoutMs, header, isRetry);
if (temp != 200)
{

View File

@ -53,7 +53,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
{
try
{
Task.Factory.StartNew(() =>
Task.Factory.StartNew((Action)(() =>
{
ViewProgressDb(true);
#pragma warning disable CS0618 // Type or member is obsolete
@ -116,7 +116,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
////TODO remove until here
}));
}).ContinueWith(delegate { ViewProgressDb(false); });
})).ContinueWith(delegate { ViewProgressDb(false); });
}
catch (Exception)
{

View File

@ -1926,13 +1926,13 @@ namespace Xylem.Common.Ui.GenesisToolBox
int.TryParse(cbComSlot.SelectedItem.ToString(), out slotNR))
{
SetBusy(true, "GetPcbId");
Task.Factory.StartNew(() =>
Task.Factory.StartNew((Action)(() =>
{
getPcbId(slotNR);
var str = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetPossibleRadioLengths?CheckPcbId={_currentPcbId}", 15000);
MessageBox.Show(str);
}).ContinueWith(delegate
})).ContinueWith(delegate
{
Invoke(new Action(() =>