ProductionUiCordonel: - ASBL: - meter size from order
This commit is contained in:
parent
0c86c58f4e
commit
5076efd960
@ -13,4 +13,4 @@ using System.Reflection;
|
|||||||
//
|
//
|
||||||
//[assembly: AssemblyVersion("1.2.*.0")]
|
//[assembly: AssemblyVersion("1.2.*.0")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("2.8.5.*")]
|
[assembly: AssemblyVersion("2.8.6.*")]
|
||||||
|
|||||||
@ -34,6 +34,9 @@ namespace Xylem.Common.CommonCore.Configuration
|
|||||||
private static readonly String DefaultGetOrderOverviewServiceUrl =
|
private static readonly String DefaultGetOrderOverviewServiceUrl =
|
||||||
$"{ServerDns}/MeterProcessState/api/FinalCheck/GetOrderOverview?ProductionOrderNumber=";
|
$"{ServerDns}/MeterProcessState/api/FinalCheck/GetOrderOverview?ProductionOrderNumber=";
|
||||||
|
|
||||||
|
private static readonly String DefaultGetOrderDetailsServiceUrl =
|
||||||
|
$"{ServerDns}/MeterProcessState/api/FinalCheck/GetOrderDetails?ProductionOrderNumber=";
|
||||||
|
|
||||||
private static readonly String DefaultDownloadFilesPartsServiceUrl =
|
private static readonly String DefaultDownloadFilesPartsServiceUrl =
|
||||||
$"{ServerDns}/MeterProcessState/api/FileUpToDate/GetFileParts?ParentFileId=";
|
$"{ServerDns}/MeterProcessState/api/FileUpToDate/GetFileParts?ParentFileId=";
|
||||||
|
|
||||||
@ -260,6 +263,19 @@ namespace Xylem.Common.CommonCore.Configuration
|
|||||||
DefaultGetOrderOverviewServiceUrl;
|
DefaultGetOrderOverviewServiceUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Cordonel order details to check for order dependent requirements like
|
||||||
|
/// - MeterSize,
|
||||||
|
/// - FrequencyIndicator,
|
||||||
|
/// - PressurePresent.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static String GetOrderDetailsServiceUrl()
|
||||||
|
{
|
||||||
|
return ConfigurationManager.AppSettings["GetOrderDetailsServiceUrl"] ??
|
||||||
|
DefaultGetOrderDetailsServiceUrl;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// List all Cordonel FW packages.
|
/// List all Cordonel FW packages.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -18,6 +18,7 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisStatus;
|
|||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||||
|
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
using static Ui.ProductionControls.ctlPictureProgressBar;
|
using static Ui.ProductionControls.ctlPictureProgressBar;
|
||||||
|
|
||||||
|
|||||||
@ -225,7 +225,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public String MeterSize
|
public String MeterSize
|
||||||
{
|
{
|
||||||
protected set; get;
|
set; get;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@ -265,7 +265,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public Boolean PressureSensorAssembled
|
public Boolean PressureSensorAssembled
|
||||||
{
|
{
|
||||||
protected set; get;
|
set; get;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -116,10 +116,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the meter size.
|
/// This is the meter size.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
String MeterSize
|
String MeterSize { get; set; }
|
||||||
{
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Length of the meter.
|
/// Length of the meter.
|
||||||
@ -129,10 +126,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pressure sensor assembled to meter.
|
/// Pressure sensor assembled to meter.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Boolean PressureSensorAssembled
|
Boolean PressureSensorAssembled { get; set; }
|
||||||
{
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Region (EMEA, NA or China).
|
/// Region (EMEA, NA or China).
|
||||||
|
|||||||
@ -104,7 +104,6 @@
|
|||||||
<Compile Include="Cordonel\CalibrationResult.cs" />
|
<Compile Include="Cordonel\CalibrationResult.cs" />
|
||||||
<Compile Include="Cordonel\CordonelAppVersion.cs" />
|
<Compile Include="Cordonel\CordonelAppVersion.cs" />
|
||||||
<Compile Include="Cordonel\MarriagePossibleEnum.cs" />
|
<Compile Include="Cordonel\MarriagePossibleEnum.cs" />
|
||||||
<Compile Include="Cordonel\PickingCompareItem.cs" />
|
|
||||||
<Compile Include="Cordonel\RegisterHistory.cs" />
|
<Compile Include="Cordonel\RegisterHistory.cs" />
|
||||||
<Compile Include="Cordonel\SkipProcess.cs" />
|
<Compile Include="Cordonel\SkipProcess.cs" />
|
||||||
<Compile Include="Files\Fw\ClusteredFile.cs" />
|
<Compile Include="Files\Fw\ClusteredFile.cs" />
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.CommonCore.Consts;
|
using Xylem.Common.CommonCore.Consts;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
|
|
||||||
|
|
||||||
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -90,6 +91,46 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Cordonel order details for production status:
|
||||||
|
/// - MeterSize,
|
||||||
|
/// - FrequencyIndicator,
|
||||||
|
/// - PressurePresent.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="productionOrderNumber"></param>
|
||||||
|
/// <param name="pcbId"></param>
|
||||||
|
/// <param name="orderDetails"></param>
|
||||||
|
/// <returns>true if successful</returns>
|
||||||
|
/// <remarks date="2025-Sep-22" author="Thomas Wiedebusch">
|
||||||
|
/// - Initial.
|
||||||
|
/// </remarks>
|
||||||
|
public static Boolean GetOrderDetails(Int64 productionOrderNumber, String pcbId,
|
||||||
|
out PickingCompareItem orderDetails)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var url = ServiceUrls.GetOrderOverviewServiceUrl();
|
||||||
|
url += $@"{productionOrderNumber}&CheckPcbId={pcbId}";
|
||||||
|
var requestResponse = LocalWebRequest.GetRequest(url, hugeTimeoutDbRequest);
|
||||||
|
if (string.IsNullOrEmpty(requestResponse))
|
||||||
|
{
|
||||||
|
orderDetails = new PickingCompareItem(0, 0, false, null);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var o = JsonConvert.DeserializeObject<OrderOverViewCordonelWithPicking>(requestResponse);
|
||||||
|
orderDetails = new PickingCompareItem(o.PickingCompareItem.MeterSize, o.PickingCompareItem.FrequencyIndicator,
|
||||||
|
o.PickingCompareItem.PressurePresent, null);
|
||||||
|
|
||||||
|
return orderDetails != null;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
orderDetails = new PickingCompareItem(0, 0, false, null);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Cordonel overview of production status:
|
/// Get Cordonel overview of production status:
|
||||||
/// - Order no.
|
/// - Order no.
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
|
||||||
|
|
||||||
namespace Logic.ProductionToProductMapper.Cordonel
|
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Picking check and process state.
|
/// Picking check and process state.
|
||||||
@ -133,6 +133,7 @@
|
|||||||
<Compile Include="OrderData\OrderDetailsDb.cs" />
|
<Compile Include="OrderData\OrderDetailsDb.cs" />
|
||||||
<Compile Include="OrderData\MeterSize.cs" />
|
<Compile Include="OrderData\MeterSize.cs" />
|
||||||
<Compile Include="OrderData\MeterSizeConverter.cs" />
|
<Compile Include="OrderData\MeterSizeConverter.cs" />
|
||||||
|
<Compile Include="OrderData\PickingCompareItem.cs" />
|
||||||
<Compile Include="OrderData\RegionConverter.cs" />
|
<Compile Include="OrderData\RegionConverter.cs" />
|
||||||
<Compile Include="OrderData\OrderOverViewCordonel.cs" />
|
<Compile Include="OrderData\OrderOverViewCordonel.cs" />
|
||||||
<Compile Include="OrderData\OrderRadioParameter.cs" />
|
<Compile Include="OrderData\OrderRadioParameter.cs" />
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="Mode" value="1" /> <!--1 = EOL ; 2 = Picking-->
|
<add key="Mode" value="2" /> <!--1 = EOL ; 2 = Picking-->
|
||||||
<!--add key="SirtComport433" value="14" /--> <!--Thomas 14; Roland ; Stoyan ; VFM1 9; VFM4 7-->
|
<!--add key="SirtComport433" value="14" /--> <!--Thomas 14; Roland ; Stoyan ; VFM1 9; VFM4 7-->
|
||||||
<!--add key="SirtComport868" value="15" /--> <!--Thomas 15; Roland ; Stoyan ; VFM1 10; VFM4 8-->
|
<!--add key="SirtComport868" value="15" /--> <!--Thomas 15; Roland ; Stoyan ; VFM1 10; VFM4 8-->
|
||||||
<!--add key="SirtBoxNr" value="2" /--> <!--Thomas 2; Roland 2; Stoyan 2; VFM1 1; VFM4 3-->
|
<!--add key="SirtBoxNr" value="2" /--> <!--Thomas 2; Roland 2; Stoyan 2; VFM1 1; VFM4 3-->
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.GenericProcesses;
|
|
||||||
|
|
||||||
namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolProcesses
|
|
||||||
{
|
|
||||||
public class DetectCordonel : BaseDetectCordonel
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public DetectCordonel(String name) : base(name)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
protected override Boolean ValidateProcessAndPublishDataToGui()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -123,6 +123,14 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
|||||||
var stateContainer = new List<ProcessStateStruct>
|
var stateContainer = new List<ProcessStateStruct>
|
||||||
{
|
{
|
||||||
#region ----------------------------------- GENERIC-STATES---------------------------------------------
|
#region ----------------------------------- GENERIC-STATES---------------------------------------------
|
||||||
|
new ProcessStateStruct(
|
||||||
|
productionProcess: new DetectCordonel(Resources.StrStateDetectCordonel),
|
||||||
|
processState: ProcessState.DetectCordonel,
|
||||||
|
processInfo: Resources.StrStateDetectCordonel,
|
||||||
|
productionProcessNo: 0,
|
||||||
|
// CheckNewMeter will exit with repeated detect or connect
|
||||||
|
nextStateOnSuccess: ProcessState.CheckNewMeter),
|
||||||
|
|
||||||
new ProcessStateStruct(
|
new ProcessStateStruct(
|
||||||
productionProcess: new ConnectCordonel(Resources.StrStateConnectCordonel),
|
productionProcess: new ConnectCordonel(Resources.StrStateConnectCordonel),
|
||||||
processState: ProcessState.ConnectCordonel,
|
processState: ProcessState.ConnectCordonel,
|
||||||
@ -153,14 +161,6 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
|||||||
#endregion -------------------------------- GENERIC-STATES --------------------------------------------
|
#endregion -------------------------------- GENERIC-STATES --------------------------------------------
|
||||||
|
|
||||||
#region ----------------------------------- EOL-STATES ------------------------------------------------
|
#region ----------------------------------- EOL-STATES ------------------------------------------------
|
||||||
new ProcessStateStruct(
|
|
||||||
productionProcess: new DetectCordonel(Resources.StrStateDetectCordonel),
|
|
||||||
processState: ProcessState.DetectCordonel,
|
|
||||||
processInfo: Resources.StrStateDetectCordonel,
|
|
||||||
productionProcessNo: 0,
|
|
||||||
// CheckNewMeter will exit with repeated detect or connect
|
|
||||||
nextStateOnSuccess: ProcessState.CheckNewMeter),
|
|
||||||
|
|
||||||
// Precondition: - A new meter has to be detected
|
// Precondition: - A new meter has to be detected
|
||||||
// Create (hidden) EOL progress for sentinel.
|
// Create (hidden) EOL progress for sentinel.
|
||||||
new ProcessStateStruct(
|
new ProcessStateStruct(
|
||||||
|
|||||||
@ -18,7 +18,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Gener
|
|||||||
/// Connect initially to Cordonel.
|
/// Connect initially to Cordonel.
|
||||||
/// Checks the ability to login as it gets the password from DB.
|
/// Checks the ability to login as it gets the password from DB.
|
||||||
/// Precondition:
|
/// Precondition:
|
||||||
/// - The <see cref="BaseDetectCordonel"/> process has to be completed as the PcbId is needed.
|
/// - The <see cref="DetectCordonel"/> process has to be completed as the PcbId is needed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <remarks date="2023-Feb-14" author="Thomas Wiedebusch">
|
/// <remarks date="2023-Feb-14" author="Thomas Wiedebusch">
|
||||||
|
|||||||
@ -9,13 +9,13 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Gener
|
|||||||
/// Production process detects the serial number of the Cordonel.
|
/// Production process detects the serial number of the Cordonel.
|
||||||
/// This is the indication, that a Cordonel is connected to the hardware interface.
|
/// This is the indication, that a Cordonel is connected to the hardware interface.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class BaseDetectCordonel : BaseProductionProcess
|
public class DetectCordonel : BaseProductionProcess
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ctor
|
/// Ctor
|
||||||
/// Setup of name and single process state
|
/// Setup of name and single process state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected BaseDetectCordonel(String name) : base( name)
|
public DetectCordonel(String name) : base( name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,17 +43,12 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Gener
|
|||||||
|
|
||||||
// read the PcbId to validate Cordonel is attached
|
// read the PcbId to validate Cordonel is attached
|
||||||
var retVal = !string.IsNullOrEmpty(Meter.GetPcbId());
|
var retVal = !string.IsNullOrEmpty(Meter.GetPcbId());
|
||||||
if (retVal && ValidateProcessAndPublishDataToGui())
|
if (retVal)
|
||||||
return StatusReturn.Okay;
|
return StatusReturn.Okay;
|
||||||
|
|
||||||
ErrorMsgDispatcher(Resources.StrErrorMsgCordonelDetection);
|
ErrorMsgDispatcher(Resources.StrErrorMsgCordonelDetection);
|
||||||
return StatusReturn.Failed;
|
return StatusReturn.Failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Application differences in check result
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
protected abstract Boolean ValidateProcessAndPublishDataToGui();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Gener
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get programming parameters for Cordonel including VAKO and CSD
|
/// Get programming parameters for Cordonel including VAKO and CSD
|
||||||
/// Precondition:
|
/// Precondition:
|
||||||
/// - The <see cref="BaseDetectCordonel"/> process has to be completed as the PcbId is needed.
|
/// - The <see cref="DetectCordonel"/> process has to be completed as the PcbId is needed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <remarks date="2020-Mai-15" author="Roland Drahbesh">
|
/// <remarks date="2020-Mai-15" author="Roland Drahbesh">
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Xylem.Common.CommonCore.Consts;
|
using Xylem.Common.CommonCore.Consts;
|
||||||
using Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Enum;
|
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||||
using Xylem.Common.Production.ProductionUiCordonel.Properties;
|
|
||||||
|
|
||||||
namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.PickingProcesses
|
namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.PickingProcesses
|
||||||
{
|
{
|
||||||
@ -27,7 +26,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
|||||||
/// Precondition: - Detection of Cordonel has to be finished.
|
/// Precondition: - Detection of Cordonel has to be finished.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <remarks date="2025-Sep-16" author="Thomas Wiedebusch">
|
/// <remarks date="2025-Sep-22" author="Thomas Wiedebusch">
|
||||||
/// - Initial
|
/// - Initial
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public override StatusReturn ExecuteProcess()
|
public override StatusReturn ExecuteProcess()
|
||||||
@ -39,18 +38,25 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
|||||||
|
|
||||||
SignalRunningState();
|
SignalRunningState();
|
||||||
|
|
||||||
// TODO THW check order number and pcbid
|
// Check mapping information
|
||||||
/* Order/GetCordonelMapping?PcbId=212120036
|
if (!OrderDetailsDb.GetCordonelMapping(Meter.PcbId, out var cordonelMapping))
|
||||||
"PcbId": "212120036",
|
{
|
||||||
"CordonelAssignedPicking_FertigungsAuftragsNr": 3184020,
|
return StatusReturn.Failed;
|
||||||
"CordonelPressureTest_FertigungsAuftragsNr": 3184020,
|
}
|
||||||
"MapPcbIdToSerialNumber_SerialNumber": 22718451*/
|
// Reserve picking for this device
|
||||||
|
|
||||||
var retVal = !string.IsNullOrEmpty(Meter.GetPcbId());
|
|
||||||
if (retVal) return StatusReturn.Okay;
|
|
||||||
|
|
||||||
ErrorMsgDispatcher(Resources.StrErrorMsgCordonelDetection);
|
// Get detailed order information to set e.g. the correct meter size needed for LUT
|
||||||
return StatusReturn.Failed;
|
// installation
|
||||||
|
if (!OrderDetailsDb.GetOrderDetails(Meter.OrderNumber, Meter.PcbId, out var orderDetails))
|
||||||
|
{
|
||||||
|
return StatusReturn.Failed;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Meter has to be connected in advance being able to overwrite the meter size
|
||||||
|
Meter.MeterSize = MeterSizeConverter.ConvertMeterSizeEnumToSizeName((MeterSize)orderDetails.MeterSize);
|
||||||
|
Meter.PressureSensorAssembled = orderDetails.PressurePresent;
|
||||||
|
|
||||||
|
return StatusReturn.Okay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
|
||||||
using Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.GenericProcesses;
|
|
||||||
|
|
||||||
namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.PickingProcesses
|
|
||||||
{
|
|
||||||
public class DetectCordonel : BaseDetectCordonel
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public DetectCordonel(String name) : base(name)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
protected override Boolean ValidateProcessAndPublishDataToGui()
|
|
||||||
{
|
|
||||||
// Check mapping information
|
|
||||||
if (!OrderDetailsDb.GetCordonelMapping(Meter.PcbId, out var cordonelMapping))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// Reserve picking for this device
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -45,6 +45,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var url = ServiceUrls.GetLutUrl();
|
var url = ServiceUrls.GetLutUrl();
|
||||||
|
// ATTENTION: Meter.MeterSize has to be preset from order.MeterSize as this is forced by order.
|
||||||
|
// If not doing so, the wrong LUT will be loaded!
|
||||||
url += $"?Metersize={(Int32)MeterSizeConverter.ConvertMeterSizeNameToEnum(Meter.MeterSize)}" +
|
url += $"?Metersize={(Int32)MeterSizeConverter.ConvertMeterSizeNameToEnum(Meter.MeterSize)}" +
|
||||||
$"&ForProd=true&Region={Meter.Region}";
|
$"&ForProd=true&Region={Meter.Region}";
|
||||||
var requestResponse = LocalWebRequest.GetRequest(url, 30000);
|
var requestResponse = LocalWebRequest.GetRequest(url, 30000);
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
|||||||
/// INSTRUCTION FOR PREPARATION:
|
/// INSTRUCTION FOR PREPARATION:
|
||||||
/// -----------------------------
|
/// -----------------------------
|
||||||
/// STEP 1: Define some states for your processes <see cref="ProcessState"/>
|
/// STEP 1: Define some states for your processes <see cref="ProcessState"/>
|
||||||
/// STEP 2: Implement your processes like <see cref="BaseDetectCordonel"/>
|
/// STEP 2: Implement your processes like <see cref="DetectCordonel"/>
|
||||||
/// STEP 3: Register and chain your states here
|
/// STEP 3: Register and chain your states here
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
@ -104,13 +104,22 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
|||||||
var stateContainer = new List<ProcessStateStruct>
|
var stateContainer = new List<ProcessStateStruct>
|
||||||
{
|
{
|
||||||
#region ----------------------------------- GENERIC-STATES---------------------------------------------
|
#region ----------------------------------- GENERIC-STATES---------------------------------------------
|
||||||
|
// Detection of Cordonel has to be completed before assigning next state, so leave to automatic
|
||||||
|
// to change the state after successfully execution. The detection is the base for all others.
|
||||||
|
new ProcessStateStruct(
|
||||||
|
productionProcess: new DetectCordonel(Resources.StrStateDetectCordonel),
|
||||||
|
processState: ProcessState.DetectCordonel,
|
||||||
|
processInfo: Resources.StrStateDetectCordonel,
|
||||||
|
productionProcessNo: 1,
|
||||||
|
nextStateOnSuccess: ProcessState.CheckNewMeter),
|
||||||
|
|
||||||
// Precondition: - The detection process has to be completed as the PcbId is needed.
|
// Precondition: - The detection process has to be completed as the PcbId is needed.
|
||||||
new ProcessStateStruct(
|
new ProcessStateStruct(
|
||||||
productionProcess: new ConnectCordonel(Resources.StrStateConnectCordonel),
|
productionProcess: new ConnectCordonel(Resources.StrStateConnectCordonel),
|
||||||
processState: ProcessState.ConnectCordonel,
|
processState: ProcessState.ConnectCordonel,
|
||||||
processInfo: Resources.StrStateConnectCordonel,
|
processInfo: Resources.StrStateConnectCordonel,
|
||||||
productionProcessNo: 3,
|
productionProcessNo: 2,
|
||||||
nextStateOnSuccess: ProcessState.GetProgrammingParameters),
|
nextStateOnSuccess: ProcessState.CheckCordonelMapping),
|
||||||
|
|
||||||
// Precondition: - The connection process has to be completed as a readout of some register
|
// Precondition: - The connection process has to be completed as a readout of some register
|
||||||
// values from the Cordonel are needed to check the update capability:
|
// values from the Cordonel are needed to check the update capability:
|
||||||
@ -120,9 +129,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
|||||||
processState: ProcessState.GetProgrammingParameters,
|
processState: ProcessState.GetProgrammingParameters,
|
||||||
processInfo: Resources.StrStateGetProgrammingParameters,
|
processInfo: Resources.StrStateGetProgrammingParameters,
|
||||||
productionProcessNo: 4,
|
productionProcessNo: 4,
|
||||||
nextStateOnSuccess: ProcessState.InstallLut,
|
nextStateOnSuccess: ProcessState.InstallLut),
|
||||||
// Wait before starting this process until this process has been successfully completed
|
|
||||||
waitForSingleProcess: ProcessState.ConnectCordonel),
|
|
||||||
#endregion -------------------------------- GENERIC-STATES --------------------------------------------
|
#endregion -------------------------------- GENERIC-STATES --------------------------------------------
|
||||||
|
|
||||||
#region ----------------------------------- PICKING-STATES --------------------------------------------
|
#region ----------------------------------- PICKING-STATES --------------------------------------------
|
||||||
@ -134,23 +142,19 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
|||||||
productionProcessNo: 0,
|
productionProcessNo: 0,
|
||||||
nextStateOnSuccess: ProcessState.DetectCordonel),
|
nextStateOnSuccess: ProcessState.DetectCordonel),
|
||||||
|
|
||||||
// Detection of Cordonel has to be completed before assigning next state, so leave to automatic
|
// Connection of Cordonel has to be completed before assigning next state, so leave to automatic
|
||||||
// to change the state after successfully execution. The detection is the base for all others.
|
// to change the state after successfully execution. Meter has to be connected in advance being able to
|
||||||
new ProcessStateStruct(
|
// overwrite the meter size based on the order details. The initial meter size in connect Cordonel will
|
||||||
productionProcess: new DetectCordonel(Resources.StrStateDetectCordonel),
|
// be set by reading the Cordonel out. But a new meter size may be forced by the order needed to change
|
||||||
processState: ProcessState.DetectCordonel,
|
// it and install the correct LUT
|
||||||
processInfo: Resources.StrStateDetectCordonel,
|
|
||||||
productionProcessNo: 1,
|
|
||||||
nextStateOnSuccess: ProcessState.CheckCordonelMapping),
|
|
||||||
|
|
||||||
// Detection of Cordonel has to be completed before assigning next state, so leave to automatic
|
|
||||||
// to change the state after successfully execution. The detection is the base for all others.
|
|
||||||
new ProcessStateStruct(
|
new ProcessStateStruct(
|
||||||
productionProcess: new CheckCordonelMapping(Resources.StrStateCheckCordonelMapping),
|
productionProcess: new CheckCordonelMapping(Resources.StrStateCheckCordonelMapping),
|
||||||
processState: ProcessState.CheckCordonelMapping,
|
processState: ProcessState.CheckCordonelMapping,
|
||||||
processInfo: Resources.StrStateCheckCordonelMapping,
|
processInfo: Resources.StrStateCheckCordonelMapping,
|
||||||
productionProcessNo: 2,
|
productionProcessNo: 3,
|
||||||
nextStateOnSuccess: ProcessState.CheckNewMeter),
|
nextStateOnSuccess: ProcessState.GetProgrammingParameters,
|
||||||
|
// Wait before starting this process until this process has been successfully completed
|
||||||
|
waitForSingleProcess: ProcessState.ConnectCordonel),
|
||||||
|
|
||||||
// Connection of Cordonel has to be completed so leave to automatic
|
// Connection of Cordonel has to be completed so leave to automatic
|
||||||
new ProcessStateStruct(
|
new ProcessStateStruct(
|
||||||
|
|||||||
@ -168,7 +168,6 @@
|
|||||||
<Compile Include="Model\EOLHandler.cs" />
|
<Compile Include="Model\EOLHandler.cs" />
|
||||||
<Compile Include="ProductionProcesses\Enum\GuiItem.cs" />
|
<Compile Include="ProductionProcesses\Enum\GuiItem.cs" />
|
||||||
<Compile Include="ProductionProcesses\EolProcesses\CreateEolProgress.cs" />
|
<Compile Include="ProductionProcesses\EolProcesses\CreateEolProgress.cs" />
|
||||||
<Compile Include="ProductionProcesses\EolProcesses\DetectCordonel.cs" />
|
|
||||||
<Compile Include="ProductionProcesses\EolProcesses\VisualInspection.cs" />
|
<Compile Include="ProductionProcesses\EolProcesses\VisualInspection.cs" />
|
||||||
<Compile Include="ProductionProcesses\EventArgs\GuiMessageArgs.cs" />
|
<Compile Include="ProductionProcesses\EventArgs\GuiMessageArgs.cs" />
|
||||||
<Compile Include="ProductionProcesses\GenericModules\GenericChecks.cs" />
|
<Compile Include="ProductionProcesses\GenericModules\GenericChecks.cs" />
|
||||||
@ -178,7 +177,7 @@
|
|||||||
<Compile Include="ProductionProcesses\GenericProcesses\ErrorHandler.cs" />
|
<Compile Include="ProductionProcesses\GenericProcesses\ErrorHandler.cs" />
|
||||||
<Compile Include="ProductionProcesses\EolProcesses\ExecStoreConfiguration.cs" />
|
<Compile Include="ProductionProcesses\EolProcesses\ExecStoreConfiguration.cs" />
|
||||||
<Compile Include="ProductionProcesses\GenericProcesses\GetSerialNumberAndRadioAddress.cs" />
|
<Compile Include="ProductionProcesses\GenericProcesses\GetSerialNumberAndRadioAddress.cs" />
|
||||||
<Compile Include="ProductionProcesses\GenericProcesses\BaseDetectCordonel.cs" />
|
<Compile Include="ProductionProcesses\GenericProcesses\DetectCordonel.cs" />
|
||||||
<Compile Include="ProductionProcesses\EolProcesses\ExecRebootCordonel.cs" />
|
<Compile Include="ProductionProcesses\EolProcesses\ExecRebootCordonel.cs" />
|
||||||
<Compile Include="ProductionProcesses\EolProcesses\PrepareShipping.cs" />
|
<Compile Include="ProductionProcesses\EolProcesses\PrepareShipping.cs" />
|
||||||
<Compile Include="ProductionProcesses\Enum\DialogResult.cs" />
|
<Compile Include="ProductionProcesses\Enum\DialogResult.cs" />
|
||||||
@ -186,7 +185,6 @@
|
|||||||
<Compile Include="ProductionProcesses\Enum\ProcessState.cs" />
|
<Compile Include="ProductionProcesses\Enum\ProcessState.cs" />
|
||||||
<Compile Include="ProductionProcesses\EventArgs\SingleProcessStateArgs.cs" />
|
<Compile Include="ProductionProcesses\EventArgs\SingleProcessStateArgs.cs" />
|
||||||
<Compile Include="ProductionProcesses\EolProcesses\EolProcessStatesDef.cs" />
|
<Compile Include="ProductionProcesses\EolProcesses\EolProcessStatesDef.cs" />
|
||||||
<Compile Include="ProductionProcesses\PickingProcesses\DetectCordonel.cs" />
|
|
||||||
<Compile Include="ProductionProcesses\PickingProcesses\CheckOrderNumber.cs" />
|
<Compile Include="ProductionProcesses\PickingProcesses\CheckOrderNumber.cs" />
|
||||||
<Compile Include="ProductionProcesses\PickingProcesses\CheckProductionState.cs" />
|
<Compile Include="ProductionProcesses\PickingProcesses\CheckProductionState.cs" />
|
||||||
<Compile Include="ProductionProcesses\PickingProcesses\CheckCordonelMapping.cs" />
|
<Compile Include="ProductionProcesses\PickingProcesses\CheckCordonelMapping.cs" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user