refactor(datasync): delete old ETL source files
This commit is contained in:
-24
@@ -1,24 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.Organization;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for Branch entities.
|
||||
/// </summary>
|
||||
public sealed class BranchMergeConfiguration : IMergeConfiguration<Branch>
|
||||
{
|
||||
public string TableName => "Branch";
|
||||
|
||||
public Expression<Func<Branch, object>> MatchOn =>
|
||||
x => x.Code;
|
||||
|
||||
public Expression<Func<Branch, object>>? UpdateColumns =>
|
||||
x => x.Description;
|
||||
|
||||
public Expression<Func<Branch, Branch, bool>>? UpdateWhen =>
|
||||
(src, tgt) => src.LastUpdateDt > tgt.LastUpdateDt;
|
||||
|
||||
public Expression<Func<Branch, object>>? InsertColumns => null;
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.Inventory;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for Item entities.
|
||||
/// </summary>
|
||||
public sealed class ItemMergeConfiguration : IMergeConfiguration<Item>
|
||||
{
|
||||
public string TableName => "Item";
|
||||
|
||||
public Expression<Func<Item, object>> MatchOn =>
|
||||
x => x.ShortItemNumber;
|
||||
|
||||
public Expression<Func<Item, object>>? UpdateColumns =>
|
||||
x => new
|
||||
{
|
||||
x.ItemNumber,
|
||||
x.Description,
|
||||
x.PlanningFamily,
|
||||
x.StockingType
|
||||
};
|
||||
|
||||
public Expression<Func<Item, Item, bool>>? UpdateWhen =>
|
||||
(src, tgt) => src.LastUpdateDt > tgt.LastUpdateDt;
|
||||
|
||||
public Expression<Func<Item, object>>? InsertColumns => null;
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.Organization;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for JdeUser entities.
|
||||
/// </summary>
|
||||
public sealed class JdeUserMergeConfiguration : IMergeConfiguration<JdeUser>
|
||||
{
|
||||
public string TableName => "JdeUser";
|
||||
|
||||
public Expression<Func<JdeUser, object>> MatchOn =>
|
||||
x => x.AddressNumber;
|
||||
|
||||
public Expression<Func<JdeUser, object>>? UpdateColumns =>
|
||||
x => new { x.UserId, x.FullName };
|
||||
|
||||
public Expression<Func<JdeUser, JdeUser, bool>>? UpdateWhen =>
|
||||
(src, tgt) => src.LastUpdateDt > tgt.LastUpdateDt;
|
||||
|
||||
public Expression<Func<JdeUser, object>>? InsertColumns => null;
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.Inventory;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for Lot entities.
|
||||
/// </summary>
|
||||
public sealed class LotMergeConfiguration : IMergeConfiguration<Lot>
|
||||
{
|
||||
public string TableName => "Lot";
|
||||
|
||||
public Expression<Func<Lot, object>> MatchOn =>
|
||||
x => new { x.LotNumber, x.BranchCode };
|
||||
|
||||
public Expression<Func<Lot, object>>? UpdateColumns =>
|
||||
x => new
|
||||
{
|
||||
x.ShortItemNumber,
|
||||
x.ItemNumber,
|
||||
x.SupplierCode,
|
||||
x.StatusCode,
|
||||
x.Memo1,
|
||||
x.Memo2,
|
||||
x.Memo3
|
||||
};
|
||||
|
||||
public Expression<Func<Lot, Lot, bool>>? UpdateWhen =>
|
||||
(src, tgt) => src.LastUpdateDt > tgt.LastUpdateDt;
|
||||
|
||||
public Expression<Func<Lot, object>>? InsertColumns => null;
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.Inventory;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for LotUsage entities.
|
||||
/// </summary>
|
||||
public sealed class LotUsageMergeConfiguration : IMergeConfiguration<LotUsage>
|
||||
{
|
||||
public string TableName => "LotUsage";
|
||||
|
||||
public Expression<Func<LotUsage, object>> MatchOn =>
|
||||
x => x.UniqueId;
|
||||
|
||||
public Expression<Func<LotUsage, object>>? UpdateColumns =>
|
||||
x => new
|
||||
{
|
||||
x.WorkOrderNumber,
|
||||
x.LotNumber,
|
||||
x.BranchCode,
|
||||
x.ShortItemNumber,
|
||||
x.Quantity
|
||||
};
|
||||
|
||||
public Expression<Func<LotUsage, LotUsage, bool>>? UpdateWhen =>
|
||||
(src, tgt) => src.LastUpdateDt > tgt.LastUpdateDt;
|
||||
|
||||
public Expression<Func<LotUsage, object>>? InsertColumns => null;
|
||||
}
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.Quality;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for MisData entities.
|
||||
/// </summary>
|
||||
public sealed class MisDataMergeConfiguration : IMergeConfiguration<MisData>
|
||||
{
|
||||
public string TableName => "MisData";
|
||||
|
||||
public Expression<Func<MisData, object>> MatchOn =>
|
||||
x => new { x.ItemNumber, x.BranchCode, x.SequenceNumber, x.MisNumber, x.CharNumber };
|
||||
|
||||
public Expression<Func<MisData, object>>? UpdateColumns =>
|
||||
x => new
|
||||
{
|
||||
x.RevId,
|
||||
x.TestDescription,
|
||||
x.SamplingType,
|
||||
x.SamplingValue,
|
||||
x.ToolsGauges,
|
||||
x.WorkInstructions,
|
||||
x.Status,
|
||||
x.ReleaseDate
|
||||
};
|
||||
|
||||
// MisData doesn't have LastUpdateDt, so always update on match
|
||||
public Expression<Func<MisData, MisData, bool>>? UpdateWhen => null;
|
||||
|
||||
public Expression<Func<MisData, object>>? InsertColumns => null;
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.Organization;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for ProfitCenter entities.
|
||||
/// </summary>
|
||||
public sealed class ProfitCenterMergeConfiguration : IMergeConfiguration<ProfitCenter>
|
||||
{
|
||||
public string TableName => "ProfitCenter";
|
||||
|
||||
public Expression<Func<ProfitCenter, object>> MatchOn =>
|
||||
x => x.Code;
|
||||
|
||||
public Expression<Func<ProfitCenter, object>>? UpdateColumns =>
|
||||
x => x.Description;
|
||||
|
||||
public Expression<Func<ProfitCenter, ProfitCenter, bool>>? UpdateWhen =>
|
||||
(src, tgt) => src.LastUpdateDt > tgt.LastUpdateDt;
|
||||
|
||||
public Expression<Func<ProfitCenter, object>>? InsertColumns => null;
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.Organization;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for WorkCenter entities.
|
||||
/// </summary>
|
||||
public sealed class WorkCenterMergeConfiguration : IMergeConfiguration<WorkCenter>
|
||||
{
|
||||
public string TableName => "WorkCenter";
|
||||
|
||||
public Expression<Func<WorkCenter, object>> MatchOn =>
|
||||
x => x.Code;
|
||||
|
||||
public Expression<Func<WorkCenter, object>>? UpdateColumns =>
|
||||
x => x.Description;
|
||||
|
||||
public Expression<Func<WorkCenter, WorkCenter, bool>>? UpdateWhen =>
|
||||
(src, tgt) => src.LastUpdateDt > tgt.LastUpdateDt;
|
||||
|
||||
public Expression<Func<WorkCenter, object>>? InsertColumns => null;
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
using System.Linq.Expressions;
|
||||
using JdeScoping.Core.Models.WorkOrders;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
|
||||
namespace JdeScoping.DataSync.Configuration.MergeConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// Merge configuration for WorkOrder entities.
|
||||
/// </summary>
|
||||
public sealed class WorkOrderMergeConfiguration : IMergeConfiguration<WorkOrder>
|
||||
{
|
||||
public string TableName => "WorkOrder";
|
||||
|
||||
public Expression<Func<WorkOrder, object>> MatchOn =>
|
||||
x => new { x.WorkOrderNumber, x.BranchCode };
|
||||
|
||||
public Expression<Func<WorkOrder, object>>? UpdateColumns =>
|
||||
x => new
|
||||
{
|
||||
x.LotNumber,
|
||||
x.ItemNumber,
|
||||
x.ShortItemNumber,
|
||||
x.ParentWorkOrderNumber,
|
||||
x.OrderQuantity,
|
||||
x.HeldQuantity,
|
||||
x.ShippedQuantity,
|
||||
x.StatusCode,
|
||||
x.StatusCodeUpdateDt,
|
||||
x.IssueDate,
|
||||
x.StartDate,
|
||||
x.RoutingType
|
||||
};
|
||||
|
||||
public Expression<Func<WorkOrder, WorkOrder, bool>>? UpdateWhen =>
|
||||
(src, tgt) => src.LastUpdateDt > tgt.LastUpdateDt;
|
||||
|
||||
public Expression<Func<WorkOrder, object>>? InsertColumns => null; // All columns
|
||||
}
|
||||
Reference in New Issue
Block a user