Initial commit: JDE Scoping Tool migration project
Set up repository with legacy .NET Framework 4.8 source (OLD/), new .NET 10 Blazor solution (NEW/), OpenSpec specifications, documentation, and project configuration.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.FilterEntries;
|
||||
|
||||
/// <summary>
|
||||
/// Component lot search filter entry.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Component Lot Filter", ShowHeader = true, TableName = "Component_Lot_Filter")]
|
||||
public sealed record ComponentLotFilterEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Component lot number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Lot Number")]
|
||||
public string LotNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Component lot item number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Item Number")]
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.FilterEntries;
|
||||
|
||||
/// <summary>
|
||||
/// Item number search filter entry.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Item Number Filter", ShowHeader = true, TableName = "Item_Number_Filter")]
|
||||
public sealed record ItemNumberFilterEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Item number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Item Number")]
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Item description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Item Description")]
|
||||
public string ItemDescription { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.FilterEntries;
|
||||
|
||||
/// <summary>
|
||||
/// Item/operation/MIS search filter entry.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Item/Operation/MIS Filter", ShowHeader = true, TableName = "Item_Operation_MIS_Filter")]
|
||||
public sealed record ItemOperationMisFilterEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Part's item number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Item Number")]
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Operation's job step number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Operation Number")]
|
||||
public string OperationNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// MIS number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 30, HeaderText = "MIS Number")]
|
||||
public string MisNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// MIS revision.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 40, HeaderText = "MIS Revision")]
|
||||
public string MisRevision { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.FilterEntries;
|
||||
|
||||
/// <summary>
|
||||
/// Operator search filter entry.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Operator Filter", ShowHeader = true, TableName = "Operator_Filter")]
|
||||
public sealed record OperatorFilterEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Operator unique JDE address number.
|
||||
/// </summary>
|
||||
public long AddressNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Operator login user ID.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Username")]
|
||||
public string UserId { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Operator full name (FIRST + LAST).
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Name")]
|
||||
public string FullName { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.FilterEntries;
|
||||
|
||||
/// <summary>
|
||||
/// Profit center search filter entry.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Profit Center Filter", ShowHeader = true, TableName = "Profit_Center_Filter")]
|
||||
public sealed record ProfitCenterFilterEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Profit center code.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Profit Center")]
|
||||
public string Code { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Profit center description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Description")]
|
||||
public string Description { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.FilterEntries;
|
||||
|
||||
/// <summary>
|
||||
/// Work center search filter entry.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Work Center Filter", ShowHeader = true, TableName = "Work_Center_Filter")]
|
||||
public sealed record WorkCenterFilterEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Work center code.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Work Center")]
|
||||
public string Code { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Work center description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Description")]
|
||||
public string Description { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.FilterEntries;
|
||||
|
||||
/// <summary>
|
||||
/// Work order search filter entry.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Work Order Filter", ShowHeader = true, TableName = "Work_Order_Filter")]
|
||||
public sealed record WorkOrderFilterEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Work order number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Work Order Number")]
|
||||
public long WorkOrderNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order item number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Item Number")]
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace JdeScoping.DataAccess.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Result of applying a filter handler.
|
||||
/// </summary>
|
||||
/// <param name="SetupSql">List of SQL statements for filter setup (temp tables, etc.).</param>
|
||||
/// <param name="Parameters">Dictionary of parameter names and values.</param>
|
||||
public sealed record FilterResult(
|
||||
IReadOnlyList<string> SetupSql,
|
||||
IDictionary<string, object> Parameters);
|
||||
@@ -0,0 +1,82 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.Results;
|
||||
|
||||
/// <summary>
|
||||
/// MIS non-match reporting model.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Investigation", TableName = "Investigation")]
|
||||
public sealed record MisNonMatchSearchResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Work order job step work center code.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Work Center Code")]
|
||||
public string WorkCenterCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Work order unique number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Work Order Number")]
|
||||
public long WorkOrderNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order start date.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 30, HeaderText = "Work Order Start Date", Format = OutputColumnAttribute.DateFormat)]
|
||||
public DateTime WorkOrderStartDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order job step number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 40, HeaderText = "Job Step Number")]
|
||||
public decimal JobStepNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order job step description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 50, HeaderText = "Function Operation Description")]
|
||||
public string JobStepDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Work order job step completion date.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 60, HeaderText = "Job Step End Date", Format = OutputColumnAttribute.DateFormat)]
|
||||
public DateTime? JobStepEndDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order job step function code.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 70, HeaderText = "Function Code")]
|
||||
public string FunctionCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the job step was added (not in original router).
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 75, HeaderText = "Was Job Step Added?")]
|
||||
public bool WasJobStepAdded { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Matched work order job step number (match to original router by work order number, work center code, and function code).
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 76, HeaderText = "Matched Job Step Number")]
|
||||
public decimal? MatchedJobStepNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order item number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 80, HeaderText = "Item Number")]
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Work order item description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 90, HeaderText = "Item Description")]
|
||||
public string ItemDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Work order router type.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 100, HeaderText = "Routing Type")]
|
||||
public string RoutingType { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.Results;
|
||||
|
||||
/// <summary>
|
||||
/// MIS data reporting model.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "MIS Info", TableName = "MIS_Info")]
|
||||
public sealed record MisSearchResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Item unique number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Item Number")]
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Item description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 50, HeaderText = "Item Description")]
|
||||
public string ItemDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Operation job step number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "MIS Job Step Sequence Number")]
|
||||
public string SequenceNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// MIS unique number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 30, HeaderText = "MIS Number")]
|
||||
public string MisNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// MIS revision ID.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 40, HeaderText = "MIS Revision")]
|
||||
public string RevId { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// MIS release status.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 60, HeaderText = "MIS Release Status")]
|
||||
public string Status { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// MIS release date.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 70, HeaderText = "MIS Release Date", Format = OutputColumnAttribute.TimestampFormat)]
|
||||
public DateTime? ReleaseDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Branch unique code.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 80, HeaderText = "Branch Code")]
|
||||
public string BranchCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Job step number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 90, HeaderText = "Job Step Sequence Number")]
|
||||
public decimal JobStepSequenceNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Job step number for matched F3112Z1 / F3111 record.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 100, HeaderText = "Matched Sequence Number")]
|
||||
public decimal? MatchedSequenceNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the job step was matched to F3112Z1 record.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 110, HeaderText = "Matched to F3112Z1?")]
|
||||
public bool RoutingMatch { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the job step was matched to F3111 record.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 120, HeaderText = "Matched to F3003?")]
|
||||
public bool MasterMatch { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Job step function description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 130, HeaderText = "Function Operation Description")]
|
||||
public string FunctionOperationDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Characteristic number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 140, HeaderText = "Char Number")]
|
||||
public string CharNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Test description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 150, HeaderText = "Test Description", AutoWidth = false, Width = OutputColumnAttribute.WrappedColumnWidth, WrapText = true)]
|
||||
public string TestDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Type of sampling.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 160, HeaderText = "Sampling Type")]
|
||||
public string SamplingType { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Sampling selection value.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 170, HeaderText = "Sampling Value")]
|
||||
public string SamplingValue { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Tools and gauges for MIS.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 180, HeaderText = "Tools & Gauges", AutoWidth = false, Width = OutputColumnAttribute.WrappedColumnWidth, WrapText = true)]
|
||||
public string ToolsGauges { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Instructions for MIS.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 190, HeaderText = "Work Instructions", AutoWidth = false, Width = OutputColumnAttribute.WrappedColumnWidth, WrapText = true)]
|
||||
public string WorkInstructions { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
using JdeScoping.DataAccess.Attributes;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models.Results;
|
||||
|
||||
/// <summary>
|
||||
/// JDE search result reporting model.
|
||||
/// </summary>
|
||||
[OutputTable(TabName = "Search Results", TableName = "Search_Results")]
|
||||
public sealed record SearchResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Order unique number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 10, HeaderText = "Work Order Number")]
|
||||
public long WorkOrderNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Order branch code.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 20, HeaderText = "Work Order Branch Code")]
|
||||
public string WorkOrderBranchCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Order lot number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 30, HeaderText = "Lot Number")]
|
||||
public string LotNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Order item number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 40, HeaderText = "Item Number")]
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Item master planning family.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 50, HeaderText = "Planning Family")]
|
||||
public string PlanningFamily { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Item master stocking type.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 55, HeaderText = "Stocking Type")]
|
||||
public string StockingType { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Order quantity.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 60, HeaderText = "Order Quantity")]
|
||||
public decimal OrderQuantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Quantity on hold.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 70, HeaderText = "Held Quantity")]
|
||||
public decimal HeldQuantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Quantity scrapped/cancelled.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 80, HeaderText = "Scrapped Quantity")]
|
||||
public decimal ScrappedQuantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Quantity shipped.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 90, HeaderText = "Shipped Quantity")]
|
||||
public decimal ShippedQuantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Operation branch code.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 100, HeaderText = "Operation Step Branch Code")]
|
||||
public string StepBranchCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Operation step number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 110, HeaderText = "Operation Step")]
|
||||
public decimal StepNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Operation step description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 120, HeaderText = "Operation Step Description")]
|
||||
public string StepDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Function operation description (long text).
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 130, HeaderText = "Function Operation Description")]
|
||||
public string FunctionOperationDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp of last update to operation step number.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 140, HeaderText = "Operation Step Update Timestamp", Format = OutputColumnAttribute.TimestampFormat)]
|
||||
public DateTime StepUpdateDt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Order status code.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 150, HeaderText = "Status Code")]
|
||||
public string StatusCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Order status description.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 160, HeaderText = "Status Description")]
|
||||
public string StatusDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp of last update to order status.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 170, HeaderText = "Status Update Timestamp", Format = OutputColumnAttribute.DateFormat)]
|
||||
public DateTime? StatusUpdateDt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order was included because it was manually specified.
|
||||
/// </summary>
|
||||
public bool ManuallySpecified { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order was included because it was split from a flagged work order.
|
||||
/// </summary>
|
||||
public bool SplitOrder { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order was included because it received parts from a flagged work order (CARDEX / F4111).
|
||||
/// </summary>
|
||||
public bool Cardex { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order was included because it received parts from a flagged work order (parts list / F3111).
|
||||
/// </summary>
|
||||
public bool PartsList { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order was included because it met the filter criteria.
|
||||
/// </summary>
|
||||
public bool Flagged { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Reason work order was included in results.
|
||||
/// </summary>
|
||||
[OutputColumn(Order = 180, HeaderText = "Inclusion Reason")]
|
||||
public string InclusionReason
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ManuallySpecified)
|
||||
{
|
||||
return "ManuallySpecified";
|
||||
}
|
||||
if (Flagged)
|
||||
{
|
||||
return "Flagged";
|
||||
}
|
||||
if (Cardex && PartsList)
|
||||
{
|
||||
return "ComponentUsage (CARDEX + Parts List)";
|
||||
}
|
||||
if (Cardex && !PartsList)
|
||||
{
|
||||
return "ComponentUsage (CARDEX)";
|
||||
}
|
||||
if (!Cardex && PartsList)
|
||||
{
|
||||
return "ComponentUsage (Parts List)";
|
||||
}
|
||||
if (SplitOrder)
|
||||
{
|
||||
return "Split order";
|
||||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
using JdeScoping.DataAccess.Models.FilterEntries;
|
||||
using JdeScoping.DataAccess.Models.Results;
|
||||
|
||||
namespace JdeScoping.DataAccess.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Reporting search data model.
|
||||
/// </summary>
|
||||
public class SearchModel
|
||||
{
|
||||
/// <summary>
|
||||
/// PK ID of search.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User name of user that created search.
|
||||
/// </summary>
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User-friendly name for search.
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp search was submitted.
|
||||
/// </summary>
|
||||
public DateTime? SubmitDt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp search was started.
|
||||
/// </summary>
|
||||
public DateTime? StartDt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp search was completed.
|
||||
/// </summary>
|
||||
public DateTime? EndDt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Minimum timestamp to include.
|
||||
/// </summary>
|
||||
public DateTime? MinimumDt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Maximum timestamp to include.
|
||||
/// </summary>
|
||||
public DateTime? MaximumDt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not timespan filter is enabled.
|
||||
/// </summary>
|
||||
public bool TimespanFilterEnabled => MinimumDt.HasValue || MaximumDt.HasValue;
|
||||
|
||||
/// <summary>
|
||||
/// Collection of work order numbers to include.
|
||||
/// </summary>
|
||||
public List<WorkOrderFilterEntry> WorkOrderFilter { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not work order filter is enabled.
|
||||
/// </summary>
|
||||
public bool WorkOrderFilterEnabled => WorkOrderFilter is { Count: > 0 };
|
||||
|
||||
/// <summary>
|
||||
/// Collection of item numbers to include.
|
||||
/// </summary>
|
||||
public List<ItemNumberFilterEntry> ItemNumberFilter { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not item number filter is enabled.
|
||||
/// </summary>
|
||||
public bool ItemNumberFilterEnabled => ItemNumberFilter is { Count: > 0 };
|
||||
|
||||
/// <summary>
|
||||
/// Collection of included profit centers.
|
||||
/// </summary>
|
||||
public List<ProfitCenterFilterEntry> ProfitCenterFilter { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not profit center filter is enabled.
|
||||
/// </summary>
|
||||
public bool ProfitCenterFilterEnabled => ProfitCenterFilter is { Count: > 0 };
|
||||
|
||||
/// <summary>
|
||||
/// Collection of included work centers.
|
||||
/// </summary>
|
||||
public List<WorkCenterFilterEntry> WorkCenterFilter { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not work center filter is enabled.
|
||||
/// </summary>
|
||||
public bool WorkCenterFilterEnabled => WorkCenterFilter is { Count: > 0 };
|
||||
|
||||
/// <summary>
|
||||
/// Collection of included operator IDs.
|
||||
/// </summary>
|
||||
public List<OperatorFilterEntry> OperatorFilter { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not operator filter is enabled.
|
||||
/// </summary>
|
||||
public bool OperatorFilterEnabled => OperatorFilter is { Count: > 0 };
|
||||
|
||||
/// <summary>
|
||||
/// Collection of included upper level lot numbers.
|
||||
/// </summary>
|
||||
public List<ComponentLotFilterEntry> ComponentLotFilter { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not component lot filter is enabled.
|
||||
/// </summary>
|
||||
public bool ComponentLotFilterEnabled => ComponentLotFilter is { Count: > 0 };
|
||||
|
||||
/// <summary>
|
||||
/// List of part/operation combinations for MIS filtering.
|
||||
/// </summary>
|
||||
public List<ItemOperationMisFilterEntry> ItemOperationMisFilter { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not item/operation/mis filter is enabled.
|
||||
/// </summary>
|
||||
public bool ItemOperationMisFilterEnabled => ItemOperationMisFilter is { Count: > 0 };
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to extract MIS data.
|
||||
/// </summary>
|
||||
public bool ExtractMisData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Work order search results.
|
||||
/// </summary>
|
||||
public List<SearchResult> Results { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// MIS results.
|
||||
/// </summary>
|
||||
public List<MisSearchResult> MisResults { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// MIS no match found results.
|
||||
/// </summary>
|
||||
public List<MisNonMatchSearchResult> MisNonMatchResults { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace JdeScoping.DataAccess.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Result of building a search query, containing the SQL and parameters.
|
||||
/// </summary>
|
||||
/// <param name="Sql">The compiled SQL query string.</param>
|
||||
/// <param name="Parameters">Dictionary of parameter names and values.</param>
|
||||
/// <param name="TempTableSetupSql">List of SQL statements for temp table setup (executed before main query).</param>
|
||||
public sealed record SearchQueryResult(
|
||||
string Sql,
|
||||
IDictionary<string, object> Parameters,
|
||||
IReadOnlyList<string> TempTableSetupSql);
|
||||
Reference in New Issue
Block a user