diff --git a/Common/Common.sln b/Common/Common.sln index 440d178b..dc73dec6 100644 --- a/Common/Common.sln +++ b/Common/Common.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.14.36310.24 d17.14 +VisualStudioVersion = 17.14.36310.24 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{7A0EE7B8-6B7E-41E9-B679-319C8CA48CF1}" EndProject @@ -101,8 +101,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IrdaDemo", "Ui\IrdaDemo\Ird EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WaterMeterRegisters", "Hardware\WaterMeter\WaterMeterCore\WaterMeterRegisters\WaterMeterRegisters.csproj", "{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductionUiCordonelLegacy", "ProductionUiCordonel\ProductionUiCordonelLegacy.csproj", "{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonCore.Configuration", "CommonCore.Configuration\CommonCore.Configuration.csproj", "{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductionOrderCore", "Logic\ProductionOrderCore\ProductionOrderCore.csproj", "{6D2777BB-7A88-466D-A49B-3266F9BF0160}" @@ -2125,70 +2123,6 @@ Global {26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x64.Build.0 = Release|x64 {26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x86.ActiveCfg = Release|Any CPU {26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x86.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|Any CPU.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|x64.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|x64.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|x86.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|x86.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.COM|Any CPU.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.COM|Any CPU.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.COM|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.COM|Mixed Platforms.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.COM|x64.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.COM|x64.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.COM|x86.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.COM|x86.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Debug|x64.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Debug|x64.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Debug|x86.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Debug|x86.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.GenesisDisplayTool_V01|Any CPU.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.GenesisDisplayTool_V01|Any CPU.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.GenesisDisplayTool_V01|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.GenesisDisplayTool_V01|Mixed Platforms.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.GenesisDisplayTool_V01|x64.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.GenesisDisplayTool_V01|x64.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.GenesisDisplayTool_V01|x86.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.GenesisDisplayTool_V01|x86.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.PerformTest|Any CPU.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.PerformTest|Any CPU.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.PerformTest|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.PerformTest|Mixed Platforms.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.PerformTest|x64.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.PerformTest|x64.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.PerformTest|x86.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.PerformTest|x86.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Release|Any CPU.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Release|x64.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Release|x64.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Release|x86.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.Release|x86.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.ReleaseTest|x64.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.ReleaseTest|x64.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.ReleaseTest|x86.ActiveCfg = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.ReleaseTest|x86.Build.0 = Release|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|Any CPU.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|Any CPU.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x64.ActiveCfg = Debug|x64 - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x64.Build.0 = Debug|x64 - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x86.ActiveCfg = Debug|Any CPU - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x86.Build.0 = Debug|Any CPU {9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU {9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}._MANUAL_CONTROL|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU {9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = _MANUAL_CONTROL|Any CPU @@ -5816,7 +5750,6 @@ Global {F013A56B-7BE6-4852-9CD8-B971CD1ADD0C} = {B5F43F61-4448-4992-85B5-7EDFB82FD643} {407E05EE-F1DE-4020-83AD-8C18EDE6B32C} = {03D4F23E-7E4A-4091-BC96-036C996D351A} {26AFCF1E-1287-48B8-A506-32B1E8A0DD0E} = {5563DD3B-2287-4BED-97BF-F0389FF505AF} - {D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4} = {03D4F23E-7E4A-4091-BC96-036C996D351A} {9EB1F659-6F73-4F65-BCAB-4114FD94F5FC} = {C17363DF-A043-4F25-8EBA-2B3B078227DC} {6D2777BB-7A88-466D-A49B-3266F9BF0160} = {57AA2731-BFD9-40A5-820F-E943FBC75D91} {315E94B8-B82F-4B25-B5BD-297DF3BC1D54} = {B5F43F61-4448-4992-85B5-7EDFB82FD643} diff --git a/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs b/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs index d7a8e9ce..991371ed 100644 --- a/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs +++ b/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs @@ -23,7 +23,8 @@ namespace Xylem.Common.CommonCore.Configuration private const String DefaultAddPcbIdsToSafeServiceUrl = "http://delaz1web01/MeterProcessState/AddPcbIdsToSafe?ContainerDbId="; - + private const String DefaultGetOrderOverviewServiceUrl = + "http://delaz1web01/MeterProcessState/api/FinalCheck/GetOrderOverview?ProductionOrderNumber="; private const String DefaultDownloadFilesPartsServiceUrl = "http://delaz1web01/MeterProcessState/api/FileUpToDate/GetFileParts?ParentFileId="; @@ -267,7 +268,16 @@ namespace Xylem.Common.CommonCore.Configuration } - + /// + /// Get Cordonel order overview to check the assignment state + /// + /// + public static String GetOrderOverviewServiceUrl() + { + return ConfigurationManager.AppSettings["GetOrderOverviewServiceUrl"] ?? + DefaultGetOrderOverviewServiceUrl; + } + /// /// List all Cordonel FW packages. /// diff --git a/Common/Production/ProductionUiCordonel/App.config b/Common/Production/ProductionUiCordonel/App.config index 45ce790e..23952da7 100644 --- a/Common/Production/ProductionUiCordonel/App.config +++ b/Common/Production/ProductionUiCordonel/App.config @@ -34,7 +34,7 @@ - + diff --git a/Common/Production/ProductionUiCordonel/Docu/TBF_COM_ASMBLY_SRSe.docx b/Common/Production/ProductionUiCordonel/Docu/TBF_COM_ASBL_SRSe.docx similarity index 88% rename from Common/Production/ProductionUiCordonel/Docu/TBF_COM_ASMBLY_SRSe.docx rename to Common/Production/ProductionUiCordonel/Docu/TBF_COM_ASBL_SRSe.docx index 5c7e2ce1..96b8e1f8 100644 Binary files a/Common/Production/ProductionUiCordonel/Docu/TBF_COM_ASMBLY_SRSe.docx and b/Common/Production/ProductionUiCordonel/Docu/TBF_COM_ASBL_SRSe.docx differ diff --git a/Common/Production/ProductionUiCordonel/ProductionProcesses/PickingProcesses/CheckOrderNumber.cs b/Common/Production/ProductionUiCordonel/ProductionProcesses/PickingProcesses/CheckOrderNumber.cs index a4e23818..5dec885d 100644 --- a/Common/Production/ProductionUiCordonel/ProductionProcesses/PickingProcesses/CheckOrderNumber.cs +++ b/Common/Production/ProductionUiCordonel/ProductionProcesses/PickingProcesses/CheckOrderNumber.cs @@ -1,5 +1,9 @@ using System; +using System.Net; +using Newtonsoft.Json.Linq; +using Xylem.Common.CommonCore.Configuration; using Xylem.Common.CommonCore.Consts; +using Xylem.Common.Logic.SoftwareAccessHelper; using Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Enum; using Xylem.Common.Production.ProductionUiCordonel.Properties; using Xylem.Common.Production.ProductionUiCordonel.UserControls; @@ -85,10 +89,33 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki if (!string.IsNullOrEmpty(_scan) && _scan.Length > 6) { - //TODO Roland, Do something with the scanned order - if (int.TryParse(_scan, out var result)) + if (int.TryParse(_scan, out var prodOrderNo)) { - Meter.OrderNumber = result; + // Get order overview + var url = $"{ServiceUrls.GetOrderOverviewServiceUrl()}{prodOrderNo}"; + var body = LocalWebRequest.GetRequest(url, 300000, out var httpStatus); + if (httpStatus != HttpStatusCode.OK || string.IsNullOrEmpty(body)) + { + //TODO THW message that database access failed + ErrorMsgDispatcher(Resources.StrErrorMsgScanOrderNumber); + return StatusReturn.Failed; + } + var o = JObject.Parse(body); + + Meter.OrderNumber = Convert.ToInt32(o.SelectToken("OrderNumber")?.ToString()); + var orderSize = Convert.ToInt32(o.SelectToken("Count")?.ToString()); + var assignedPicking = Convert.ToInt32(o.SelectToken("AssignedPicking")?.ToString()); + var pressureTested = Convert.ToInt32(o.SelectToken("PressureTested")?.ToString()); + var heliumTested = Convert.ToInt32(o.SelectToken("HeliumTested")?.ToString()); + SuccessMsgDispatcher(""); + ActualProcessProgress++; + + // Display order overview in GUI + + // Exit if order is complete + + // Assign order number to meter internally + Meter.OrderNumber = prodOrderNo; return StatusReturn.Okay; } }