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:
Joseph Doherty
2026-01-02 07:43:29 -05:00
commit 26ff8d9b4f
1761 changed files with 596509 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// JDE branch model
/// </summary>
public class Branch
{
/// <summary>
/// Branch unique code
/// </summary>
public string Code { get; set; }
/// <summary>
/// Branch description
/// </summary>
public string Description { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// Camstar manufacturing order
/// </summary>
public class CamstarMO
{
/// <summary>
/// Manufacturing order number
/// </summary>
public string MONumber { get; set; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT { get; set; }
}
}
+18
View File
@@ -0,0 +1,18 @@
namespace DataModel.Models
{
/// <summary>
/// Database column specification
/// </summary>
public class ColumnSpec
{
/// <summary>
/// Column name
/// </summary>
public string Name { get; set; }
/// <summary>
/// Column definition
/// </summary>
public string Definition { get; set; }
}
}
+65
View File
@@ -0,0 +1,65 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// Cache data update
/// </summary>
public class DataUpdate
{
/// <summary>
/// PK ID of record
/// </summary>
public int ID { get; set; }
/// <summary>
/// Name of source system (JDE/CMS/etc)
/// </summary>
public string SourceSystem { get; set; }
/// <summary>
/// Name of source data (WORK_ORDER, WORK_ORDER_STEP, etc)
/// </summary>
public string SourceData { get; set; }
/// <summary>
/// Cache table name
/// </summary>
public string TableName { get; set; }
/// <summary>
/// Timestamp at start of update
/// </summary>
public DateTime StartDT { get; set; }
/// <summary>
/// Timestamp at end of update
/// </summary>
public DateTime EndDT { get; set; }
/// <summary>
/// Type of data update
/// </summary>
public UpdateTypes UpdateType { get; set; }
/// <summary>
/// Whether or not the update was successful
/// </summary>
public bool WasSuccessful { get; set; }
/// <summary>
/// Number of records in update
/// </summary>
public long NumberRecords { get; set; }
}
/// <summary>
/// Types of data update
/// </summary>
public enum UpdateTypes
{
Hourly = 1,
Daily = 2,
Mass = 3
}
}
+30
View File
@@ -0,0 +1,30 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// DCS lot record
/// </summary>
public class DcsLot
{
/// <summary>
/// Item number for lot of parts
/// </summary>
public string ItemNumber { get; set; }
/// <summary>
/// Lot number for lot of parts
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Lot suffix for lot of parts
/// </summary>
public string LotSuffix { get; set; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT { get; set; }
}
}
+25
View File
@@ -0,0 +1,25 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// JDE function code model
/// </summary>
public class FunctionCode
{
/// <summary>
/// Unique function code
/// </summary>
public string Code { get; set; }
/// <summary>
/// Function description
/// </summary>
public string Description { get; set; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT { get; set; }
}
}
+25
View File
@@ -0,0 +1,25 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// Generic JDE business unit
/// </summary>
interface IBusinessUnit
{
/// <summary>
/// Business unit unique code
/// </summary>
string Code { get; set; }
/// <summary>
/// Business unit description
/// </summary>
string Description { get; set; }
/// <summary>
/// Timestamp of last update to business unit
/// </summary>
DateTime LastUpdateDT { get; }
}
}
+65
View File
@@ -0,0 +1,65 @@
using System;
using DataModel.Helpers;
using DataModel.ViewModels;
namespace DataModel.Models
{
/// <summary>
/// JDE item (part type) unit model
/// </summary>
public class Item
{
/// <summary>
/// Item unique short number
/// </summary>
public long ShortItemNumber { get; set; }
/// <summary>
/// Item unique number
/// </summary>
public string ItemNumber { get; set; }
/// <summary>
/// Item description
/// </summary>
public string Description { get; set; }
/// <summary>
/// Item master planning family
/// </summary>
public string PlanningFamily { get; set; }
/// <summary>
/// Item master stocking type code
/// </summary>
public string StockingType { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
/// <summary>
/// Converts object to view model
/// </summary>
/// <returns>Projected view model for object</returns>
public ItemViewModel ToViewModel()
{
return new ItemViewModel()
{
ItemNumber = ItemNumber,
Description = Description
};
}
}
}
+56
View File
@@ -0,0 +1,56 @@
using System;
using DataModel.Helpers;
using DataModel.ViewModels;
namespace DataModel.Models
{
/// <summary>
/// JDE user model
/// </summary>
public class JdeUser
{
/// <summary>
/// User unique address number
/// </summary>
public long AddressNumber { get; set; }
/// <summary>
/// User unique login ID
/// </summary>
public string UserID { get; set; }
/// <summary>
/// User's full name (last, first [middle initial])
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
/// <summary>
/// Converts object to view model
/// </summary>
/// <returns>Projected view model for object</returns>
public JdeUserViewModel ToViewModel()
{
return new JdeUserViewModel()
{
AddressNumber = AddressNumber,
UserID = UserID,
FullName = FullName
};
}
}
}
+54
View File
@@ -0,0 +1,54 @@
namespace DataModel.Models
{
/// <summary>
/// LDAP search result
/// </summary>
public class LDAPEntry
{
/// <summary>
/// LDAP distinguished name
/// </summary>
public string DN { get; set; }
/// <summary>
/// LDAP username
/// </summary>
public string Username { get; set; }
/// <summary>
/// User's first name
/// </summary>
public string FirstName { get; set; }
/// <summary>
/// User's last name
/// </summary>
public string LastName { get; set; }
/// <summary>
/// User's display name
/// </summary>
public string DisplayName
{
get
{
if (string.IsNullOrEmpty(LastName) && string.IsNullOrEmpty(FirstName))
{
return Username;
}
return $"{FirstName} {LastName}".Trim();
}
}
/// <summary>
/// Organization title
/// </summary>
public string Title { get; set; }
/// <summary>
/// User's email address
/// </summary>
public string EmailAddress { get; set; }
}
}
+85
View File
@@ -0,0 +1,85 @@
using System;
using DataModel.Helpers;
using DataModel.ViewModels;
namespace DataModel.Models
{
/// <summary>
/// JDE lot model
/// </summary>
public class Lot
{
/// <summary>
/// Lot unique number
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Business unit unique code
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Short item number
/// </summary>
public long ShortItemNumber { get; set; }
/// <summary>
/// Item number
/// </summary>
public string ItemNumber { get; set; }
/// <summary>
/// Supplier address number
/// </summary>
public long SupplierCode { get; set; }
/// <summary>
/// Lot status code
/// </summary>
public char StatusCode { get; set; }
/// <summary>
/// Memo line 1
/// </summary>
public string Memo1 { get; set; }
/// <summary>
/// Memo line 2
/// </summary>
public string Memo2 { get; set; }
/// <summary>
/// Memo line 3
/// </summary>
public string Memo3 { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
/// <summary>
/// Converts object to view model
/// </summary>
/// <returns>Projected view model for object</returns>
public LotViewModel ToViewModel()
{
return new LotViewModel()
{
LotNumber = LotNumber,
ItemNumber = ItemNumber
};
}
}
}
+35
View File
@@ -0,0 +1,35 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// JDE lot location model
/// </summary>
public class LotLocation
{
/// <summary>
/// Lot unique number
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Short item number
/// </summary>
public long ShortItemNumber { get; set; }
/// <summary>
/// Business unit unique code
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Location code for where lot is located
/// </summary>
public string Location { get; set; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT { get; set; }
}
}
+56
View File
@@ -0,0 +1,56 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// Cardex entry
/// </summary>
public class LotUsage
{
/// <summary>
/// Record unique / PK ID
/// </summary>
public long UniqueID { get; set; }
/// <summary>
/// Work order unique number
/// </summary>
public long WorkOrderNumber { get; set; }
/// <summary>
/// Lot number of component
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Component issuance branch code
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Component item short number
/// </summary>
public long ShortItemNumber { get; set; }
/// <summary>
/// Transaction quantity
/// </summary>
public decimal Quantity { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}
+75
View File
@@ -0,0 +1,75 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// CMS MIS data model
/// </summary>
public class MisData
{
/// <summary>
/// Item unique number
/// </summary>
public string ItemNumber { get; set; }
/// <summary>
/// Branch unique code
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Operation job step number
/// </summary>
public string SequenceNumber { get; set; }
/// <summary>
/// MIS unique number
/// </summary>
public string MisNumber { get; set; }
/// <summary>
/// MIS revision ID
/// </summary>
public string RevID { get; set; }
/// <summary>
/// Characteristic number
/// </summary>
public string CharNumber { get; set; }
/// <summary>
/// Test description
/// </summary>
public string TestDescription { get; set; }
/// <summary>
/// Type of sampling
/// </summary>
public string SamplingType { get; set; }
/// <summary>
/// Sampling selection value
/// </summary>
public string SamplingValue { get; set; }
/// <summary>
/// Tools & gauges for MIS
/// </summary>
public string ToolsGauges { get; set; }
/// <summary>
/// Instructions for MIS
/// </summary>
public string WorkInstructions { get; set; }
/// <summary>
/// MIS release status
/// </summary>
public string Status { get; set; }
/// <summary>
/// MIS release date
/// </summary>
public DateTime? ReleaseDate { get; set; }
}
}
+41
View File
@@ -0,0 +1,41 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// Organization hierarchy (profit center -> work center mapping) model
/// </summary>
public class OrgHierarchy
{
/// <summary>
/// Work center unique code
/// </summary>
public string WorkCenterCode { get; set; }
/// <summary>
/// Branch unit code
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Profit center unique code
/// </summary>
public string ProfitCenterCode { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}
+50
View File
@@ -0,0 +1,50 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// JDE PO inspect record
/// </summary>
public class POInspect
{
/// <summary>
/// Record unique / PK ID
/// </summary>
public long UniqueID { get; set; }
/// <summary>
/// PO number
/// </summary>
public long OrderNumber { get; set; }
/// <summary>
/// PO order company code
/// </summary>
public string OrderCompany { get; set; }
/// <summary>
/// Line number within PO
/// </summary>
public decimal LineNumber { get; set; }
/// <summary>
/// PO invoice number
/// </summary>
public long InvoiceNumber { get; set; }
/// <summary>
/// Product lot number
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Product unique item number
/// </summary>
public string ShortItemNumber { get; set; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT { get; set; }
}
}
+75
View File
@@ -0,0 +1,75 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// JDE PO receiver record
/// </summary>
public class POReceiver
{
/// <summary>
/// PO number
/// </summary>
public long OrderNumber { get; set; }
/// <summary>
/// PO order company code
/// </summary>
public string OrderCompany { get; set; }
/// <summary>
/// PO suffix
/// </summary>
public string OrderSuffix { get; set; }
/// <summary>
/// Line number within PO
/// </summary>
public decimal LineNumber { get; set; }
/// <summary>
/// Total number of lines in PO
/// </summary>
public int NumberOfLines { get; set; }
/// <summary>
/// PO invoice number
/// </summary>
public long InvoiceNumber { get; set; }
/// <summary>
/// Receiving site identifier
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Product lot number
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Product unique item number
/// </summary>
public string ShortItemNumber { get; set; }
/// <summary>
/// Date product was received
/// </summary>
public DateTime DateReceived { get; set; }
/// <summary>
/// Subledger name
/// </summary>
public string Subledger { get; set; }
/// <summary>
/// Product quantity recieved
/// </summary>
public decimal QtyReceived { get; set; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT { get; set; }
}
}
+50
View File
@@ -0,0 +1,50 @@
using System;
using DataModel.Helpers;
using DataModel.ViewModels;
namespace DataModel.Models
{
/// <summary>
/// JDE profit center model
/// </summary>
public class ProfitCenter : IBusinessUnit
{
/// <summary>
/// Profit center unique code
/// </summary>
public string Code { get; set; }
/// <summary>
/// Profit center description
/// </summary>
public string Description { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
/// <summary>
/// Converts object to view model
/// </summary>
/// <returns>Projected view model for object</returns>
public ProfitCenterViewModel ToViewModel()
{
return new ProfitCenterViewModel()
{
Code = Code,
Description = Description
};
}
}
}
+44
View File
@@ -0,0 +1,44 @@
using System.Collections.Generic;
namespace DataModel.Models
{
public class QueryTypes
{
public string Code { get; private set; }
public string Name { get; private set; }
public int OrderIndex { get; private set; }
public bool TimeSpanFilter { get; }
public bool WorkOrderFilter { get; private set; }
public bool ItemNumberFilter { get; }
public bool ProfitCenterFilter { get; }
public bool WorkCenterFilter { get; }
public bool ComponentLotFilter { get; }
public bool OperatorFilter { get; }
public bool ItemOperationMISFilter { get; }
public bool ExtractMISFilter { get; }
public bool ReceivedItemNumberIISFilter { get; }
private static readonly Dictionary<string, QueryTypes> definedTypes = new Dictionary<string, QueryTypes>();
public QueryTypes()
{
}
public QueryTypes(string code, string name, int orderIndex)
{
Code = code;
Name = name;
OrderIndex = orderIndex;
definedTypes[code] = this;
}
public QueryTypes Identify(SearchCriteria searchCriteria)
{
return null;
}
public static QueryTypes WorkOrder = new QueryTypes("WorkOrder", "Work Order", 10) { WorkOrderFilter = true };
}
}
+76
View File
@@ -0,0 +1,76 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// JDE item router master model
/// </summary>
public class RouteMaster
{
/// <summary>
/// Unique code for branch
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Unique number for item
/// </summary>
public string ItemNumber { get; set; }
/// <summary>
/// Router type
/// </summary>
public string RoutingType { get; set; }
/// <summary>
/// Job step operation number
/// </summary>
public decimal SequenceNumber { get;set; }
/// <summary>
/// Job step function code
/// </summary>
public string FunctionCode { get; set; }
/// <summary>
/// Work center unique code
/// </summary>
public string WorkCenterCode { get; set; }
/// <summary>
/// Numeric representation of date record effectivity starts
/// </summary>
public int StartDate_Date { get; set; }
/// <summary>
/// Date record effectivity starts
/// </summary>
public DateTime StartDate => StartDate_Date.FromJDEDate();
/// <summary>
/// Numeric representation of date record effectivity ends
/// </summary>
public int? EndDate_Date { get; set; }
/// <summary>
/// Date record effectivity ends
/// </summary>
public DateTime? EndDate => EndDate_Date?.FromJDEDate();
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}
+63
View File
@@ -0,0 +1,63 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace DataModel.Models
{
/// <summary>
/// Search model
/// </summary>
public class Search
{
/// <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; }
/// <summary>
/// User-friendly name for search
/// </summary>
public string Name { get; set; }
/// <summary>
/// Current search status
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public SearchStatus Status { get; set; }
/// <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>
/// JSON-packed search criteria
/// </summary>
public string CriteriaJSON { get; set; }
/// <summary>
/// Search critera
/// </summary>
public SearchCriteria Criteria { get; set; }
/// <summary>
/// Excel search results file
/// </summary>
public byte[] Results { get; set; }
}
}
+76
View File
@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using DataModel.ViewModels;
namespace DataModel.Models
{
/// <summary>
/// JDE data filter criteria
/// </summary>
public class SearchCriteria
{
/// <summary>
/// Minimum timestamp to include
/// </summary>
public DateTime? MinimumDT { get; set; }
/// <summary>
/// Maxmimum timestamp to include
/// </summary>
public DateTime? MaximumDT { get; set; }
/// <summary>
/// Collection of workorder numbers to include
/// </summary>
public List<long> WorkOrderNumbers { get; set; }
/// <summary>
/// Collection of item numbers to include
/// </summary>
public List<string> ItemNumbers { get; set; }
/// <summary>
/// Collection of included profit centers
/// </summary>
public List<string> ProfitCenters { get; set; }
/// <summary>
/// Collection of included work centers
/// </summary>
public List<string> WorkCenters { get; set; }
/// <summary>
/// Collection of included operator IDs
/// </summary>
public List<string> OperatorIDs { get; set; }
/// <summary>
/// Collection of included upper level lot numbers
/// </summary>
public List<LotViewModel> ComponentLotNumbers { get; set; }
/// <summary>
/// Whether or not to extract MIS data
/// </summary>
public bool ExtractMisData { get; set; }
/// <summary>
/// List of part/operation combinations for MIS filtering
/// </summary>
public List<PartOperationViewModel> PartOperations { get; set; }
/// <summary>
/// Constructor
/// </summary>
public SearchCriteria()
{
WorkOrderNumbers = new List<long>();
ItemNumbers = new List<string>();
ProfitCenters = new List<string>();
WorkCenters = new List<string>();
OperatorIDs = new List<string>();
ComponentLotNumbers = new List<LotViewModel>();
PartOperations = new List<PartOperationViewModel>();
}
}
}
+14
View File
@@ -0,0 +1,14 @@
namespace DataModel.Models
{
/// <summary>
/// Status of search
/// </summary>
public enum SearchStatus
{
New = 0,
Submitted = 1,
Started = 2,
Ended = 3,
Error = 4
}
}
+76
View File
@@ -0,0 +1,76 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace DataModel.Models
{
/// <summary>
/// Search status update message
/// </summary>
public class SearchUpdate
{
/// <summary>
/// Search PK ID
/// </summary>
public int ID { get; set; }
/// <summary>
/// User name of user that submitted search
/// </summary>
public string UserName { get; set; }
/// <summary>
/// Name of user that submitted search
/// </summary>
public string Name { get; set; }
/// <summary>
/// Search status code
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public SearchStatus Status { get; set; }
/// <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>
/// Timestamp when update was generated
/// </summary>
public DateTime Timestamp { get; set; }
/// <summary>
/// Constructor
/// </summary>
public SearchUpdate()
{
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="search">Search to copy values from</param>
public SearchUpdate(Search search)
{
ID = search.ID;
UserName = search.UserName;
Name = search.Name;
Status = search.Status;
SubmitDT = search.SubmitDT;
StartDT = search.StartDT;
EndDT = search.EndDT;
Timestamp = DateTime.Now;
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// JDE work order status code model
/// </summary>
public class StatusCode
{
/// <summary>
/// Status code unique code
/// </summary>
public string Code { get; set; }
/// <summary>
/// Status code description
/// </summary>
public string Description { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
namespace DataModel.Models
{
/// <summary>
/// Process status update message
/// </summary>
public class StatusUpdate
{
/// <summary>
/// Update message to display
/// </summary>
public string Message { get; set; }
/// <summary>
/// Timestamp message was sent
/// </summary>
public DateTime Timestamp { get; set; }
}
}
+55
View File
@@ -0,0 +1,55 @@
using System.Collections.Generic;
namespace DataModel.Models
{
/// <summary>
/// Database table specification
/// </summary>
public class TableSpec
{
/// <summary>
/// Table name
/// </summary>
public string Name { get; set; }
/// <summary>
/// Temporary table name
/// </summary>
public string TempTableName => $"#{Name}";
/// <summary>
/// Table columns
/// </summary>
public List<ColumnSpec> Columns { get; set; }
/// <summary>
/// Table columns that form the primary key
/// </summary>
public List<ColumnSpec> PrimaryKey { get; set; }
/// <summary>
/// Constructor
/// </summary>
public TableSpec()
{
Columns = new List<ColumnSpec>();
PrimaryKey = new List<ColumnSpec>();
}
public string GenerateIndex()
{
return "";
}
public string GenerateDrop()
{
return "";
}
public string GenerateCreate()
{
return "";
}
public ColumnSpec GetColumn(string columnName)
{
return null;
}
}
}
+50
View File
@@ -0,0 +1,50 @@
using System;
using DataModel.Helpers;
using DataModel.ViewModels;
namespace DataModel.Models
{
/// <summary>
/// JDE work center model
/// </summary>
public class WorkCenter : IBusinessUnit
{
/// <summary>
/// Work center unique code
/// </summary>
public string Code { get; set; }
/// <summary>
/// Work center description
/// </summary>
public string Description { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
/// <summary>
/// Converts object to view model
/// </summary>
/// <returns>Projected view model for object</returns>
public WorkCenterViewModel ToViewModel()
{
return new WorkCenterViewModel()
{
Code = Code,
Description = Description
};
}
}
}
+110
View File
@@ -0,0 +1,110 @@
using System;
using DataModel.Helpers;
using DataModel.ViewModels;
namespace DataModel.Models
{
/// <summary>
/// JDE work order model
/// </summary>
public class WorkOrder
{
/// <summary>
/// Work order unique number
/// </summary>
public long WorkOrderNumber { get; set; }
/// <summary>
/// Work order branch code
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Work order assigned lot number
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Work order item number
/// </summary>
public string ItemNumber { get; set; }
/// <summary>
/// Work order short item number
/// </summary>
public long ShortItemNumber { get; set; }
/// <summary>
/// Work order's parent unique number
/// </summary>
public string ParentWorkOrderNumber { get; set; }
/// <summary>
/// Order quantity
/// </summary>
public decimal OrderQuantity { get; set; }
/// <summary>
/// Quantity on hold
/// </summary>
public decimal HeldQuantity { get; set; }
/// <summary>
/// Quantity shipped
/// </summary>
public decimal ShippedQuantity { get; set; }
/// <summary>
/// Work order status code
/// </summary>
public string StatusCode { get; set; }
/// <summary>
/// Date of last update to status code
/// </summary>
public DateTime? StatusCodeUpdateDT { get; set; }
/// <summary>
/// Date work order was issued
/// </summary>
public DateTime IssueDate { get; set; }
/// <summary>
/// Date work order was started
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// Work order routing type
/// </summary>
public string RoutingType { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
/// <summary>
/// Converts object to view model
/// </summary>
/// <returns>Projected view model for object</returns>
public WorkOrderViewModel ToViewModel()
{
return new WorkOrderViewModel()
{
WorkOrderNumber = WorkOrderNumber,
ItemNumber = ItemNumber
};
}
}
}
+56
View File
@@ -0,0 +1,56 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// Work order component usage model
/// </summary>
public class WorkOrderComponent
{
/// <summary>
/// Record unique / PK ID
/// </summary>
public long UniqueID { get; set; }
/// <summary>
/// Work order unique number
/// </summary>
public long WorkOrderNumber { get; set; }
/// <summary>
/// Lot number of component
/// </summary>
public string LotNumber { get; set; }
/// <summary>
/// Component issuance branch code
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Component item short number
/// </summary>
public long? ShortItemNumber { get; set; }
/// <summary>
/// Transaction quantity
/// </summary>
public decimal Quantity { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}
+91
View File
@@ -0,0 +1,91 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// Work order step transaction model
/// </summary>
public class WorkOrderRouting
{
/// <summary>
/// Transaction user ID
/// </summary>
public string UserID { get; set; }
/// <summary>
/// Transaction batch number
/// </summary>
public string BatchNumber { get; set; }
/// <summary>
/// Transaction number
/// </summary>
public string TransactionNumber { get; set; }
/// <summary>
/// Transaction line number
/// </summary>
public int LineNumber { get; set; }
/// <summary>
/// Operation sequence number
/// </summary>
public decimal StepNumber { get; set; }
/// <summary>
/// Unique code for work center
/// </summary>
public string WorkCenterCode { get; set; }
/// <summary>
/// Unique number for workorder
/// </summary>
public long WorkOrderNumber { get; set; }
/// <summary>
/// Work order routing type
/// </summary>
public string RoutingType { get; set; }
/// <summary>
/// Unique code for branch
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Operation sequence description
/// </summary>
public string StepDescription { get; set; }
/// <summary>
/// Operation function code
/// </summary>
public string FunctionCode { get; set; }
/// <summary>
/// Numeric representation of transaction original date
/// </summary>
private int TransactionDate_Date { get; }
/// <summary>
/// Transaction original date
/// </summary>
public DateTime TransactionDate => TransactionDate_Date.FromJDEDate();
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}
+81
View File
@@ -0,0 +1,81 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// JDE work order step model
/// </summary>
public class WorkOrderStep
{
/// <summary>
/// Unique number for workorder
/// </summary>
public long WorkOrderNumber { get; set; }
/// <summary>
/// Unique code for branch
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Unique code for work center
/// </summary>
public string WorkCenterCode { get; set; }
/// <summary>
/// Operation sequence number
/// </summary>
public decimal StepNumber { get; set; }
/// <summary>
/// Operation sequence description
/// </summary>
public string StepDescription { get; set; }
/// <summary>
/// Function operation description (long text)
/// </summary>
public string FunctionOperationDescription { get; set; }
/// <summary>
/// Operation sequence type
/// </summary>
public string StepTypeCode { get; set; }
/// <summary>
/// Timestamp when work step began
/// </summary>
public DateTime? StartDT { get; set; }
/// <summary>
/// Timestamp when work step ended
/// </summary>
public DateTime? EndDT { get; set; }
/// <summary>
/// Operation function code
/// </summary>
public string FunctionCode { get; set; }
/// <summary>
/// Quantity scrapped/cancelled
/// </summary>
public decimal ScrappedQuantity { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}
+61
View File
@@ -0,0 +1,61 @@
using System;
using DataModel.Helpers;
namespace DataModel.Models
{
/// <summary>
/// F31122 work order time transaction record
/// </summary>
public class WorkOrderTime
{
/// <summary>
/// Unique ID for record
/// </summary>
public long UniqueID { get; set; }
/// <summary>
/// Unique number for workorder
/// </summary>
public long WorkOrderNumber { get; set; }
/// <summary>
/// Unique code for branch
/// </summary>
public string BranchCode { get; set; }
/// <summary>
/// Unique code for work center
/// </summary>
public string WorkCenterCode { get; set; }
/// <summary>
/// Operation sequence number
/// </summary>
public decimal StepNumber { get; set; }
/// <summary>
/// Unique address number for user
/// </summary>
public long AddressNumber { get; set; }
/// <summary>
/// G/L date entry was processed
/// </summary>
public DateTime? GlDate { get; set; }
/// <summary>
/// Date of last update to record
/// </summary>
private int LastUpdateDate { get; }
/// <summary>
/// Time of day of last update to record
/// </summary>
private int LastUpdateTime { get; }
/// <summary>
/// Timestamp of last update to record
/// </summary>
public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime);
}
}