Files
jdescopingtool/NEW/src/JdeScoping.ExcelIO/Models/Reporting/SearchModel.cs
T
Joseph Doherty 8883fb2680 refactor(ExcelIO): migrate ExcelExportService to Core models and FluentTableWriter
- Replace AttributeTableWriter with FluentTableWriter in ExcelExportService
- Inject ExcelMapRegistry for fluent map lookups
- Use registry.GetMap<T>().TabName instead of reflection-based attribute reading
- Update ExcelIO SearchModel to reference Core result types via aliases
- Remove System.Reflection import (no longer needed)
- Add JdeScoping.Core.Models.SearchResults import for result types
2026-01-06 23:38:30 -05:00

147 lines
4.5 KiB
C#

using CoreSearchResult = JdeScoping.Core.Models.SearchResults.SearchResult;
using CoreMisSearchResult = JdeScoping.Core.Models.SearchResults.MisSearchResult;
using CoreMisNonMatchSearchResult = JdeScoping.Core.Models.SearchResults.MisNonMatchSearchResult;
namespace JdeScoping.ExcelIO.Models.Reporting;
/// <summary>
/// Reporting search data model for Excel export.
/// </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.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.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.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.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.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.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.Count > 0;
/// <summary>
/// Whether or not to extract MIS data.
/// </summary>
public bool ExtractMisData { get; set; }
/// <summary>
/// Work order search results.
/// </summary>
public List<CoreSearchResult> Results { get; set; } = [];
/// <summary>
/// MIS results.
/// </summary>
public List<CoreMisSearchResult>? MisResults { get; set; }
/// <summary>
/// MIS no match found results.
/// </summary>
public List<CoreMisNonMatchSearchResult>? MisNonMatchResults { get; set; }
}