diff --git a/Btms.Analytics/MovementsAggregationService.cs b/Btms.Analytics/MovementsAggregationService.cs index d7d856a..b146c5c 100644 --- a/Btms.Analytics/MovementsAggregationService.cs +++ b/Btms.Analytics/MovementsAggregationService.cs @@ -5,7 +5,7 @@ using Btms.Common.Extensions; using Btms.Model.Extensions; using Btms.Model; -using Btms.Model.Alvs; +using Btms.Model.Cds; using Btms.Model.Auditing; using Btms.Model.Ipaffs; using MongoDB.Bson; @@ -344,7 +344,7 @@ public Task> .FirstOrDefault()) // Creates a default item & check so we don't lose // it in the selectmany below - ?? new AlvsClearanceRequest() + ?? new CdsClearanceRequest() { Items = new [] { diff --git a/Btms.Business.Tests/Services/Decisions/NoMatchDecisionsTest.cs b/Btms.Business.Tests/Services/Decisions/NoMatchDecisionsTest.cs index 48bb034..0256120 100644 --- a/Btms.Business.Tests/Services/Decisions/NoMatchDecisionsTest.cs +++ b/Btms.Business.Tests/Services/Decisions/NoMatchDecisionsTest.cs @@ -12,7 +12,7 @@ using TestDataGenerator; using TestDataGenerator.Scenarios; using Xunit; -using Check = Btms.Model.Alvs.Check; +using Check = Btms.Model.Cds.Check; using Decision = Btms.Model.Ipaffs.Decision; namespace Btms.Business.Tests.Services.Decisions; diff --git a/Btms.Business.Tests/Services/Linking/LinkingServiceTests.cs b/Btms.Business.Tests/Services/Linking/LinkingServiceTests.cs index 02f3735..c787ab8 100644 --- a/Btms.Business.Tests/Services/Linking/LinkingServiceTests.cs +++ b/Btms.Business.Tests/Services/Linking/LinkingServiceTests.cs @@ -2,14 +2,14 @@ using Btms.Backend.Data.InMemory; using Btms.Business.Services.Linking; using Btms.Metrics; -using Btms.Model.Alvs; +using Btms.Model.Cds; using Btms.Model.ChangeLog; using Btms.Model.Ipaffs; using FluentAssertions; using Microsoft.Extensions.Logging.Abstractions; using Xunit; -using Document = Btms.Model.Alvs.Document; -using Items = Btms.Model.Alvs.Items; +using Document = Btms.Model.Cds.Document; +using Items = Btms.Model.Cds.Items; using Movement = Btms.Model.Movement; namespace Btms.Business.Tests.Services.Linking; @@ -393,7 +393,7 @@ private ImportNotificationLinkContext CreateNotificationContext(int chedReferenc EntryReference = entryRef, ClearanceRequests = [ - new AlvsClearanceRequest + new CdsClearanceRequest { Header = new() { EntryReference = entryRef, EntryVersionNumber = 3, DeclarationType = "F" } } diff --git a/Btms.Business/Pipelines/PreProcessing/MovementPreProcessor.cs b/Btms.Business/Pipelines/PreProcessing/MovementPreProcessor.cs index 9f39852..e63c80b 100644 --- a/Btms.Business/Pipelines/PreProcessing/MovementPreProcessor.cs +++ b/Btms.Business/Pipelines/PreProcessing/MovementPreProcessor.cs @@ -64,7 +64,7 @@ public async Task> Process(PreProcessingContext BuildItems(Movement movement, IGrouping BuildChecks(Model.Alvs.Items item, IGrouping itemsGroup) + private static IEnumerable BuildChecks(Model.Cds.Items item, IGrouping itemsGroup) { if (item.Checks != null) { @@ -81,7 +81,7 @@ private static IEnumerable BuildChecks(Model.Alvs.Items item, IGrouping +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable + +using JsonApiDotNetCore.Resources.Annotations; +using System.Text.Json.Serialization; +using System.Dynamic; + + +namespace Btms.Model.Cds; + +/// +/// +/// +public partial class AlvsDecisionItem +{ + [Attr] + [System.ComponentModel.Description("")] + public int ItemNumber { get; set; } + + [Attr] + [System.ComponentModel.Description("")] + public required string CheckCode { get; set; } + + [Attr] + [System.ComponentModel.Description("")] + public required string AlvsDecisionCode { get; set; } + + [Attr] + [System.ComponentModel.Description("")] + public string? BtmsDecisionCode { get; set; } +} + +/// +/// +/// +public partial class AlvsDecision // +{ + [Attr] + [System.ComponentModel.Description("")] + public required CdsClearanceRequest Decision { get; set; } + + [Attr] + [System.ComponentModel.Description("")] + public int AlvsDecisionNumber { get; set; } = default; + + [Attr] + [System.ComponentModel.Description("")] + public int BtmsDecisionNumber { get; set; } = default; + + [Attr] + [System.ComponentModel.Description("")] + public int EntryVersionNumber { get; set; } = default; + + [Attr] + [System.ComponentModel.Description("")] + public bool Paired { get; set; } = default; + + [Attr] + [System.ComponentModel.Description("")] + public string? PairStatus { get; set; } + + [Attr] + [System.ComponentModel.Description("")] + public bool IsNoMatch { get; set; } = default; + + [Attr] + [System.ComponentModel.Description("")] + public bool BtmsDecisionMatched { get; set; } = default; + + [Attr] + [System.ComponentModel.Description("")] + public required List Checks { get; set; } + +} + + diff --git a/Btms.Model/Alvs/AlvsClearanceRequest.g.cs b/Btms.Model/Cds/CdsClearanceRequest.g.cs similarity index 93% rename from Btms.Model/Alvs/AlvsClearanceRequest.g.cs rename to Btms.Model/Cds/CdsClearanceRequest.g.cs index 07e8337..aa47bd8 100644 --- a/Btms.Model/Alvs/AlvsClearanceRequest.g.cs +++ b/Btms.Model/Cds/CdsClearanceRequest.g.cs @@ -13,12 +13,12 @@ using System.Dynamic; -namespace Btms.Model.Alvs; +namespace Btms.Model.Cds; /// /// /// -public partial class AlvsClearanceRequest // +public partial class CdsClearanceRequest // { diff --git a/Btms.Model/Alvs/AlvsClearanceRequestPost.g.cs b/Btms.Model/Cds/CdsClearanceRequestPost.g.cs similarity index 90% rename from Btms.Model/Alvs/AlvsClearanceRequestPost.g.cs rename to Btms.Model/Cds/CdsClearanceRequestPost.g.cs index 641ff95..ab3a823 100644 --- a/Btms.Model/Alvs/AlvsClearanceRequestPost.g.cs +++ b/Btms.Model/Cds/CdsClearanceRequestPost.g.cs @@ -13,12 +13,12 @@ using System.Dynamic; -namespace Btms.Model.Alvs; +namespace Btms.Model.Cds; /// /// Message sent to the server to send an ALVSClearanceRequest. /// -public partial class AlvsClearanceRequestPost // +public partial class CdsClearanceRequestPost // { @@ -59,7 +59,7 @@ public partial class AlvsClearanceRequestPost // /// [Attr] [System.ComponentModel.Description("")] - public AlvsClearanceRequest? AlvsClearanceRequest { get; set; } + public CdsClearanceRequest? AlvsClearanceRequest { get; set; } } diff --git a/Btms.Model/Alvs/Check.g.cs b/Btms.Model/Cds/Check.g.cs similarity index 98% rename from Btms.Model/Alvs/Check.g.cs rename to Btms.Model/Cds/Check.g.cs index 5ecbb7a..acd0102 100644 --- a/Btms.Model/Alvs/Check.g.cs +++ b/Btms.Model/Cds/Check.g.cs @@ -13,7 +13,7 @@ using System.Dynamic; -namespace Btms.Model.Alvs; +namespace Btms.Model.Cds; /// /// diff --git a/Btms.Model/Alvs/Document.g.cs b/Btms.Model/Cds/Document.g.cs similarity index 98% rename from Btms.Model/Alvs/Document.g.cs rename to Btms.Model/Cds/Document.g.cs index ccefa90..60f14c6 100644 --- a/Btms.Model/Alvs/Document.g.cs +++ b/Btms.Model/Cds/Document.g.cs @@ -13,7 +13,7 @@ using System.Dynamic; -namespace Btms.Model.Alvs; +namespace Btms.Model.Cds; /// /// diff --git a/Btms.Model/Alvs/Header.g.cs b/Btms.Model/Cds/Header.g.cs similarity index 99% rename from Btms.Model/Alvs/Header.g.cs rename to Btms.Model/Cds/Header.g.cs index 8f8e172..9a09035 100644 --- a/Btms.Model/Alvs/Header.g.cs +++ b/Btms.Model/Cds/Header.g.cs @@ -13,7 +13,7 @@ using System.Dynamic; -namespace Btms.Model.Alvs; +namespace Btms.Model.Cds; /// /// diff --git a/Btms.Model/Alvs/Items.cs b/Btms.Model/Cds/Items.cs similarity index 98% rename from Btms.Model/Alvs/Items.cs rename to Btms.Model/Cds/Items.cs index d5ed210..baccbb5 100644 --- a/Btms.Model/Alvs/Items.cs +++ b/Btms.Model/Cds/Items.cs @@ -9,7 +9,7 @@ #nullable enable -namespace Btms.Model.Alvs; +namespace Btms.Model.Cds; /// /// diff --git a/Btms.Model/Alvs/Items.g.cs b/Btms.Model/Cds/Items.g.cs similarity index 98% rename from Btms.Model/Alvs/Items.g.cs rename to Btms.Model/Cds/Items.g.cs index 29e28fd..e5e49c8 100644 --- a/Btms.Model/Alvs/Items.g.cs +++ b/Btms.Model/Cds/Items.g.cs @@ -13,7 +13,7 @@ using System.Dynamic; -namespace Btms.Model.Alvs; +namespace Btms.Model.Cds; /// /// diff --git a/Btms.Model/Alvs/ServiceHeader.g.cs b/Btms.Model/Cds/ServiceHeader.g.cs similarity index 97% rename from Btms.Model/Alvs/ServiceHeader.g.cs rename to Btms.Model/Cds/ServiceHeader.g.cs index 5ec5368..59581ca 100644 --- a/Btms.Model/Alvs/ServiceHeader.g.cs +++ b/Btms.Model/Cds/ServiceHeader.g.cs @@ -13,7 +13,7 @@ using System.Dynamic; -namespace Btms.Model.Alvs; +namespace Btms.Model.Cds; /// /// diff --git a/Btms.Model/Movement.cs b/Btms.Model/Movement.cs index 80f555d..bc9d2a7 100644 --- a/Btms.Model/Movement.cs +++ b/Btms.Model/Movement.cs @@ -4,7 +4,7 @@ using MongoDB.Bson.Serialization.Attributes; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; -using Btms.Model.Alvs; +using Btms.Model.Cds; using Btms.Model.Auditing; using Btms.Model.ChangeLog; using Btms.Model.Data; @@ -24,9 +24,11 @@ public class Movement : IMongoIdentifiable, IDataEntity, IAuditable [ChangeSetIgnore] public string Type { get; set; } = "movements"; - [Attr] public List ClearanceRequests { get; set; } = default!; + [Attr] public List ClearanceRequests { get; set; } = default!; - [Attr] public List Decisions { get; set; } = default!; + [Attr] public List Decisions { get; set; } = default!; + + [Attr] public List AlvsDecisions { get; set; } = new List(); [Attr] public List Items { get; set; } = []; @@ -121,9 +123,15 @@ public void Update(AuditEntry auditEntry) matchReferences = []; } - public bool MergeDecision(string path, AlvsClearanceRequest clearanceRequest) + public bool MergeDecision(string path, CdsClearanceRequest clearanceRequest) { - if (clearanceRequest.ServiceHeader?.SourceSystem == "BTMS") + var sourceSystem = clearanceRequest.ServiceHeader?.SourceSystem; + var isAlvs = sourceSystem != "BTMS"; + var isBtms = sourceSystem == "BTMS"; + // CdsClearanceRequest? btmsDecision = null; + // AlvsDecision? alvsDecision = null; + + if (isBtms) { foreach (var item in clearanceRequest.Items!) { @@ -134,6 +142,125 @@ public bool MergeDecision(string path, AlvsClearanceRequest clearanceRequest) existingItem.MergeChecks(item); } } + + // btmsDecision = clearanceRequest; + + // This is an initial implementation - we want to be smarter about how we 'pair' things. + var alvsDecision = this.AlvsDecisions.Find( + d => d.EntryVersionNumber == EntryVersionNumber); + + if (alvsDecision != null) + { + var btmsChecks = this + .Items! + .SelectMany(i => i.Checks!.Select(c => new { Item = i, Check = c })) + .ToDictionary(ic => (ic.Item.ItemNumber!.Value, ic.Check.CheckCode!), ic => ic.Check.DecisionCode!); + + alvsDecision.Checks = alvsDecision + .Checks + .Select(c => + { + var decisionCode = btmsChecks[(c.ItemNumber, c.CheckCode)]; + c.BtmsDecisionCode = decisionCode; + return c; + }).ToList(); + + // TODO + alvsDecision.BtmsDecisionMatched = false; + alvsDecision.PairStatus = "TODO-BTMS"; + } + + Decisions ??= []; + Decisions.Add(clearanceRequest); + + } + else if (isAlvs) + { + // This is an initial implementation - we want to be smarter about how we 'pair' things. + var btmsDecision = this.Decisions? + .Where(d => d.Header!.EntryVersionNumber == EntryVersionNumber) + .OrderBy(d => d.ServiceHeader!.ServiceCalled) + .Reverse() + .FirstOrDefault(); + + var btmsChecks = btmsDecision ? + .Items! + .SelectMany(i => i.Checks!.Select(c => new { Item = i!, Check = c })) + .ToDictionary(ic => (ic.Item.ItemNumber!.Value, ic.Check.CheckCode!), ic => ic.Check.DecisionCode!); + + var alvsDecision = new AlvsDecision() + { + Decision = clearanceRequest, + AlvsDecisionNumber = clearanceRequest!.Header!.DecisionNumber!.Value, + BtmsDecisionNumber = btmsDecision == null ? 0 : btmsDecision!.Header!.DecisionNumber!.Value, + EntryVersionNumber = clearanceRequest!.Header!.EntryVersionNumber!.Value, + Checks = clearanceRequest + .Items!.SelectMany(i => i.Checks!.Select(c => new { Item = i, Check = c })) + .Select(ic => + { + var decisionCode = btmsChecks == null ? null : btmsChecks!.GetValueOrDefault((ic.Item.ItemNumber!.Value, ic.Check.CheckCode!), null); + return new AlvsDecisionItem() + { + ItemNumber = ic.Item!.ItemNumber!.Value, + CheckCode = ic.Check!.CheckCode!, + AlvsDecisionCode = ic.Check!.DecisionCode!, + BtmsDecisionCode = decisionCode + }; + }) + .ToList() + }; + + // Previous code from analytics + // a.BtmsDecisionInfo == null ? "Btms Decision Not Present" : + // a.AlvsDecisionInfo == null ? "Alvs Decision Not Present" : + // + // // TODO : we may want to try to consider clearance request version as well as the decision code + // a.BtmsDecisionInfo.DecisionCode == a.AlvsDecisionInfo.DecisionCode ? "Btms Made Same Decision As Alvs" : + // a.MovementInfo.Movement.Decisions + // .Any(d => d.Header!.DecisionNumber == 1) ? "Alvs Decision Version 1 Not Present" : + // a.MovementInfo.Movement.ClearanceRequests + // .Any(d => d.Header!.EntryVersionNumber == 1) ? "Alvs Clearance Request Version 1 Not Present" : + // a.AlvsDecisionInfo.DecisionNumber == 1 && a.AlvsDecisionInfo.EntryVersion == 1 ? "Single Entry And Decision Version" : + // a.BtmsDecisionInfo.DecisionCode != a.AlvsDecisionInfo.DecisionCode ? "Btms Made Different Decision To Alvs" : + // "Further Classification Needed" + // + + var pairStatus = "Investigation Needed"; + + if (alvsDecision.BtmsDecisionNumber == 0) + { + pairStatus = "Btms Decision Not Present"; + } + else + { + var checksMatch = alvsDecision.Checks.All(c => c.AlvsDecisionCode == c.BtmsDecisionCode); + + if (checksMatch) + { + alvsDecision.BtmsDecisionMatched = true; + pairStatus = "Btms Made Same Decision As Alvs"; + } + else if (!this.ClearanceRequests.Exists(c => c.Header!.EntryVersionNumber == 1)) + { + pairStatus = "Alvs Clearance Request Version 1 Not Present"; + } + else if (alvsDecision.Decision.Header!.DecisionNumber != 1 && !this.AlvsDecisions.Exists(c => c.AlvsDecisionNumber == 1)) + { + pairStatus = "Alvs Decision Version 1 Not Present"; + } + + + } + + + alvsDecision.PairStatus = pairStatus; + // AlvsDecisions ??= []; + AlvsDecisions.Add(alvsDecision); + } + else + { + throw new ArgumentException( + $"Unexpected decision source system {clearanceRequest.ServiceHeader?.SourceSystem}"); } var decisionAuditContext = new Dictionary>(); @@ -157,9 +284,6 @@ public bool MergeDecision(string path, AlvsClearanceRequest clearanceRequest) clearanceRequest.Header.DeclarantName!, decisionAuditContext, clearanceRequest.ServiceHeader?.SourceSystem != "BTMS"); - - Decisions ??= []; - Decisions.Add(clearanceRequest); this.Update(auditEntry); return true; diff --git a/Btms.Types.Alvs.Mapping.V1/AlvsClearanceRequestMapper.g.cs b/Btms.Types.Alvs.Mapping.V1/AlvsClearanceRequestMapper.g.cs index 4565326..0f166c4 100644 --- a/Btms.Types.Alvs.Mapping.V1/AlvsClearanceRequestMapper.g.cs +++ b/Btms.Types.Alvs.Mapping.V1/AlvsClearanceRequestMapper.g.cs @@ -14,14 +14,14 @@ namespace Btms.Types.Alvs.Mapping; public static class AlvsClearanceRequestMapper { - public static Btms.Model.Alvs.AlvsClearanceRequest Map(Btms.Types.Alvs.AlvsClearanceRequest from) + public static Btms.Model.Cds.CdsClearanceRequest Map(Btms.Types.Alvs.AlvsClearanceRequest from) { if (from is null) { return default!; } - var to = new Btms.Model.Alvs.AlvsClearanceRequest(); + var to = new Btms.Model.Cds.CdsClearanceRequest(); to.ServiceHeader = ServiceHeaderMapper.Map(from?.ServiceHeader!); to.Header = HeaderMapper.Map(from?.Header!); to.Items = from?.Items?.Select(x => ItemsMapper.Map(x)).ToArray(); diff --git a/Btms.Types.Alvs.Mapping.V1/AlvsClearanceRequestPostMapper.g.cs b/Btms.Types.Alvs.Mapping.V1/AlvsClearanceRequestPostMapper.g.cs index fc7710c..eea141d 100644 --- a/Btms.Types.Alvs.Mapping.V1/AlvsClearanceRequestPostMapper.g.cs +++ b/Btms.Types.Alvs.Mapping.V1/AlvsClearanceRequestPostMapper.g.cs @@ -14,14 +14,14 @@ namespace Btms.Types.Alvs.Mapping; public static class AlvsClearanceRequestPostMapper { - public static Btms.Model.Alvs.AlvsClearanceRequestPost Map(Btms.Types.Alvs.AlvsClearanceRequestPost from) + public static Btms.Model.Cds.CdsClearanceRequestPost Map(Btms.Types.Alvs.AlvsClearanceRequestPost from) { if (from is null) { return default!; } - var to = new Btms.Model.Alvs.AlvsClearanceRequestPost(); + var to = new Btms.Model.Cds.CdsClearanceRequestPost(); to.XmlSchemaVersion = from.XmlSchemaVersion; to.UserIdentification = from.UserIdentification; to.UserPassword = from.UserPassword; diff --git a/Btms.Types.Alvs.Mapping.V1/CheckMapper.g.cs b/Btms.Types.Alvs.Mapping.V1/CheckMapper.g.cs index 2005d1b..7073b01 100644 --- a/Btms.Types.Alvs.Mapping.V1/CheckMapper.g.cs +++ b/Btms.Types.Alvs.Mapping.V1/CheckMapper.g.cs @@ -14,14 +14,14 @@ namespace Btms.Types.Alvs.Mapping; public static class CheckMapper { - public static Btms.Model.Alvs.Check Map(Btms.Types.Alvs.Check from) + public static Btms.Model.Cds.Check Map(Btms.Types.Alvs.Check from) { if (from is null) { return default!; } - var to = new Btms.Model.Alvs.Check(); + var to = new Btms.Model.Cds.Check(); to.CheckCode = from.CheckCode; to.DepartmentCode = from.DepartmentCode; to.DecisionCode = from.DecisionCode; diff --git a/Btms.Types.Alvs.Mapping.V1/DecisionMapper.g.cs b/Btms.Types.Alvs.Mapping.V1/DecisionMapper.g.cs index 4216d01..59d95a4 100644 --- a/Btms.Types.Alvs.Mapping.V1/DecisionMapper.g.cs +++ b/Btms.Types.Alvs.Mapping.V1/DecisionMapper.g.cs @@ -14,14 +14,14 @@ namespace Btms.Types.Alvs.Mapping; public static class DecisionMapper { - public static Btms.Model.Alvs.AlvsClearanceRequest Map(Btms.Types.Alvs.Decision from) + public static Btms.Model.Cds.CdsClearanceRequest Map(Btms.Types.Alvs.Decision from) { if (from is null) { return default!; } - var to = new Btms.Model.Alvs.AlvsClearanceRequest(); + var to = new Btms.Model.Cds.CdsClearanceRequest(); to.ServiceHeader = ServiceHeaderMapper.Map(from?.ServiceHeader!); to.Header = HeaderMapper.Map(from?.Header!); to.Items = from?.Items?.Select(x => ItemsMapper.Map(x)).ToArray(); diff --git a/Btms.Types.Alvs.Mapping.V1/DocumentMapper.g.cs b/Btms.Types.Alvs.Mapping.V1/DocumentMapper.g.cs index eafb1d5..ca51032 100644 --- a/Btms.Types.Alvs.Mapping.V1/DocumentMapper.g.cs +++ b/Btms.Types.Alvs.Mapping.V1/DocumentMapper.g.cs @@ -14,13 +14,13 @@ namespace Btms.Types.Alvs.Mapping; public static class DocumentMapper { - public static Btms.Model.Alvs.Document Map(Btms.Types.Alvs.Document from) + public static Btms.Model.Cds.Document Map(Btms.Types.Alvs.Document from) { if(from is null) { return default!; } - var to = new Btms.Model.Alvs.Document (); + var to = new Btms.Model.Cds.Document (); to.DocumentCode = from.DocumentCode; to.DocumentReference = from.DocumentReference; to.DocumentStatus = from.DocumentStatus; diff --git a/Btms.Types.Alvs.Mapping.V1/HeaderMapper.g.cs b/Btms.Types.Alvs.Mapping.V1/HeaderMapper.g.cs index f911bf1..e796beb 100644 --- a/Btms.Types.Alvs.Mapping.V1/HeaderMapper.g.cs +++ b/Btms.Types.Alvs.Mapping.V1/HeaderMapper.g.cs @@ -14,13 +14,13 @@ namespace Btms.Types.Alvs.Mapping; public static class HeaderMapper { - public static Btms.Model.Alvs.Header Map(Btms.Types.Alvs.Header from) + public static Btms.Model.Cds.Header Map(Btms.Types.Alvs.Header from) { if(from is null) { return default!; } - var to = new Btms.Model.Alvs.Header (); + var to = new Btms.Model.Cds.Header (); to.EntryReference = from.EntryReference; to.EntryVersionNumber = from.EntryVersionNumber; to.PreviousVersionNumber = from.PreviousVersionNumber; diff --git a/Btms.Types.Alvs.Mapping.V1/ItemsMapper.g.cs b/Btms.Types.Alvs.Mapping.V1/ItemsMapper.g.cs index 873cbaa..de384fe 100644 --- a/Btms.Types.Alvs.Mapping.V1/ItemsMapper.g.cs +++ b/Btms.Types.Alvs.Mapping.V1/ItemsMapper.g.cs @@ -14,13 +14,13 @@ namespace Btms.Types.Alvs.Mapping; public static class ItemsMapper { - public static Btms.Model.Alvs.Items Map(Btms.Types.Alvs.Items from) + public static Btms.Model.Cds.Items Map(Btms.Types.Alvs.Items from) { if(from is null) { return default!; } - var to = new Btms.Model.Alvs.Items (); + var to = new Btms.Model.Cds.Items (); to.ItemNumber = from.ItemNumber; to.CustomsProcedureCode = from.CustomsProcedureCode; to.TaricCommodityCode = from.TaricCommodityCode; diff --git a/Btms.Types.Alvs.Mapping.V1/ServiceHeaderMapper.g.cs b/Btms.Types.Alvs.Mapping.V1/ServiceHeaderMapper.g.cs index 2f6f83c..090d4f1 100644 --- a/Btms.Types.Alvs.Mapping.V1/ServiceHeaderMapper.g.cs +++ b/Btms.Types.Alvs.Mapping.V1/ServiceHeaderMapper.g.cs @@ -14,13 +14,13 @@ namespace Btms.Types.Alvs.Mapping; public static class ServiceHeaderMapper { - public static Btms.Model.Alvs.ServiceHeader Map(Btms.Types.Alvs.ServiceHeader from) + public static Btms.Model.Cds.ServiceHeader Map(Btms.Types.Alvs.ServiceHeader from) { if(from is null) { return default!; } - var to = new Btms.Model.Alvs.ServiceHeader (); + var to = new Btms.Model.Cds.ServiceHeader (); to.SourceSystem = from.SourceSystem; to.DestinationSystem = from.DestinationSystem; to.CorrelationId = from.CorrelationId;