From b7db7f8d5bb483617be423051c568c47b944f2bc Mon Sep 17 00:00:00 2001 From: pallvigrover <146028915+pallvigrover@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:23:05 -0800 Subject: [PATCH] OFMCC-6323-update coding for Phase 2 OFM and Irregular Expense (#260) * OFMCC-6323-update coding for Phase 2 OFM and Irregular Expense * update cohort --- ECC.Core.DataContext/DataverseContext.cs | 11 + ECC.Core.DataContext/Entities/Entities.cs | 832 ++++++++++++++++++ ECC.Core.DataContext/OptionSets/OptionSets.cs | 44 +- ECC.Core.DataContext/generatorSettings.xml | 5 +- .../Models/Fundings/Fundings.cs | 2 + .../OFM.Infrastructure.WebAPI.xml | 236 +++++ .../P500SendPaymentRequestProvider.cs | 64 +- 7 files changed, 1183 insertions(+), 11 deletions(-) diff --git a/ECC.Core.DataContext/DataverseContext.cs b/ECC.Core.DataContext/DataverseContext.cs index bee42f0..0a2a26a 100644 --- a/ECC.Core.DataContext/DataverseContext.cs +++ b/ECC.Core.DataContext/DataverseContext.cs @@ -94,6 +94,17 @@ public System.Linq.IQueryable msfp_surveySet } } + /// + /// Gets a binding to the set of all entities. + /// + public System.Linq.IQueryable ofm_ack_codesSet + { + get + { + return this.CreateQuery(); + } + } + /// /// Gets a binding to the set of all entities. /// diff --git a/ECC.Core.DataContext/Entities/Entities.cs b/ECC.Core.DataContext/Entities/Entities.cs index b627351..7166e91 100644 --- a/ECC.Core.DataContext/Entities/Entities.cs +++ b/ECC.Core.DataContext/Entities/Entities.cs @@ -15721,6 +15721,7 @@ public partial class Fields public const string modifiedonbehalfbyyominame = "modifiedonbehalfbyyominame"; public const string msdyn_copilotengaged = "msdyn_copilotengaged"; public const string msdyn_copilotengagedname = "msdyn_copilotengagedname"; + public const string msdyn_emailengagementinteractions = "msdyn_emailengagementinteractions"; public const string msdyn_recipientlist = "msdyn_recipientlist"; public const string msft_datastate = "msft_datastate"; public const string msft_datastatename = "msft_datastatename"; @@ -17513,6 +17514,24 @@ public string msdyn_copilotengagedname } } + /// + /// Email engagement interactions + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("msdyn_emailengagementinteractions")] + public string msdyn_emailengagementinteractions + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("msdyn_emailengagementinteractions"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("msdyn_emailengagementinteractions", value); + } + } + /// /// Individual email will be sent to each recipient. /// @@ -22509,6 +22528,768 @@ public msfp_survey(object anonymousType) : } } + [System.Runtime.Serialization.DataContractAttribute()] + [Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("ofm_ack_codes")] + public partial class ofm_ack_codes : Microsoft.Xrm.Sdk.Entity + { + + /// + /// Available fields, a the time of codegen, for the ofm_ack_codes entity + /// + public partial class Fields + { + public const string createdby = "createdby"; + public const string createdbyname = "createdbyname"; + public const string createdbyyominame = "createdbyyominame"; + public const string createdon = "createdon"; + public const string createdonbehalfby = "createdonbehalfby"; + public const string createdonbehalfbyname = "createdonbehalfbyname"; + public const string createdonbehalfbyyominame = "createdonbehalfbyyominame"; + public const string importsequencenumber = "importsequencenumber"; + public const string modifiedby = "modifiedby"; + public const string modifiedbyname = "modifiedbyname"; + public const string modifiedbyyominame = "modifiedbyyominame"; + public const string modifiedon = "modifiedon"; + public const string modifiedonbehalfby = "modifiedonbehalfby"; + public const string modifiedonbehalfbyname = "modifiedonbehalfbyname"; + public const string modifiedonbehalfbyyominame = "modifiedonbehalfbyyominame"; + public const string ofm_ack_codesid = "ofm_ack_codesid"; + public const string Id = "ofm_ack_codesid"; + public const string ofm_ack_number = "ofm_ack_number"; + public const string ofm_cohort = "ofm_cohort"; + public const string ofm_id = "ofm_id"; + public const string ofm_payment_type = "ofm_payment_type"; + public const string ofm_payment_typename = "ofm_payment_typename"; + public const string overriddencreatedon = "overriddencreatedon"; + public const string ownerid = "ownerid"; + public const string owneridname = "owneridname"; + public const string owneridyominame = "owneridyominame"; + public const string owningbusinessunit = "owningbusinessunit"; + public const string owningbusinessunitname = "owningbusinessunitname"; + public const string owningteam = "owningteam"; + public const string owninguser = "owninguser"; + public const string statecode = "statecode"; + public const string statecodename = "statecodename"; + public const string statuscode = "statuscode"; + public const string statuscodename = "statuscodename"; + public const string team_ofm_ack_codes = "team_ofm_ack_codes"; + public const string timezoneruleversionnumber = "timezoneruleversionnumber"; + public const string utcconversiontimezonecode = "utcconversiontimezonecode"; + public const string versionnumber = "versionnumber"; + } + + [System.Diagnostics.DebuggerNonUserCode()] + public ofm_ack_codes(System.Guid id) : + base(EntityLogicalName, id) + { + } + + [System.Diagnostics.DebuggerNonUserCode()] + public ofm_ack_codes(string keyName, object keyValue) : + base(EntityLogicalName, keyName, keyValue) + { + } + + [System.Diagnostics.DebuggerNonUserCode()] + public ofm_ack_codes(Microsoft.Xrm.Sdk.KeyAttributeCollection keyAttributes) : + base(EntityLogicalName, keyAttributes) + { + } + + /// + /// Default Constructor. + /// + [System.Diagnostics.DebuggerNonUserCode()] + public ofm_ack_codes() : + base(EntityLogicalName) + { + } + + public const string PrimaryIdAttribute = "ofm_ack_codesid"; + + public const string PrimaryNameAttribute = "ofm_id"; + + public const string EntitySchemaName = "ofm_ack_codes"; + + public const string EntityLogicalName = "ofm_ack_codes"; + + public const string EntityLogicalCollectionName = "ofm_ack_codeses"; + + public const string EntitySetName = "ofm_ack_codeses"; + + /// + /// Unique identifier of the user who created the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdby")] + public Microsoft.Xrm.Sdk.EntityReference createdby + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("createdby"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdbyname")] + public string createdbyname + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("createdby")) + { + return this.FormattedValues["createdby"]; + } + else + { + return default(string); + } + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdbyyominame")] + public string createdbyyominame + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("createdby")) + { + return this.FormattedValues["createdby"]; + } + else + { + return default(string); + } + } + } + + /// + /// Date and time when the record was created. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdon")] + public System.Nullable createdon + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("createdon"); + } + } + + /// + /// Unique identifier of the delegate user who created the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdonbehalfby")] + public Microsoft.Xrm.Sdk.EntityReference createdonbehalfby + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("createdonbehalfby"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("createdonbehalfby", value); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdonbehalfbyname")] + public string createdonbehalfbyname + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("createdonbehalfby")) + { + return this.FormattedValues["createdonbehalfby"]; + } + else + { + return default(string); + } + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdonbehalfbyyominame")] + public string createdonbehalfbyyominame + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("createdonbehalfby")) + { + return this.FormattedValues["createdonbehalfby"]; + } + else + { + return default(string); + } + } + } + + /// + /// Sequence number of the import that created this record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("importsequencenumber")] + public System.Nullable importsequencenumber + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("importsequencenumber"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("importsequencenumber", value); + } + } + + /// + /// Unique identifier of the user who modified the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedby")] + public Microsoft.Xrm.Sdk.EntityReference modifiedby + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("modifiedby"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedbyname")] + public string modifiedbyname + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("modifiedby")) + { + return this.FormattedValues["modifiedby"]; + } + else + { + return default(string); + } + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedbyyominame")] + public string modifiedbyyominame + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("modifiedby")) + { + return this.FormattedValues["modifiedby"]; + } + else + { + return default(string); + } + } + } + + /// + /// Date and time when the record was modified. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedon")] + public System.Nullable modifiedon + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("modifiedon"); + } + } + + /// + /// Unique identifier of the delegate user who modified the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfby")] + public Microsoft.Xrm.Sdk.EntityReference modifiedonbehalfby + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("modifiedonbehalfby"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("modifiedonbehalfby", value); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfbyname")] + public string modifiedonbehalfbyname + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("modifiedonbehalfby")) + { + return this.FormattedValues["modifiedonbehalfby"]; + } + else + { + return default(string); + } + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfbyyominame")] + public string modifiedonbehalfbyyominame + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("modifiedonbehalfby")) + { + return this.FormattedValues["modifiedonbehalfby"]; + } + else + { + return default(string); + } + } + } + + /// + /// Unique identifier for entity instances + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_ack_codesid")] + public System.Nullable ofm_ack_codesid + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("ofm_ack_codesid"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("ofm_ack_codesid", value); + if (value.HasValue) + { + base.Id = value.Value; + } + else + { + base.Id = System.Guid.Empty; + } + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_ack_codesid")] + public override System.Guid Id + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return base.Id; + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.ofm_ack_codesid = value; + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_ack_number")] + public string ofm_ack_number + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("ofm_ack_number"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("ofm_ack_number", value); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_cohort")] + public string ofm_cohort + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("ofm_cohort"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("ofm_cohort", value); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_id")] + public string ofm_id + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("ofm_id"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("ofm_id", value); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_payment_type")] + public virtual ecc_payment_type? ofm_payment_type + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return ((ecc_payment_type?)(EntityOptionSetEnum.GetEnum(this, "ofm_payment_type"))); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("ofm_payment_type", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_payment_typename")] + public string ofm_payment_typename + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("ofm_payment_type")) + { + return this.FormattedValues["ofm_payment_type"]; + } + else + { + return default(string); + } + } + } + + /// + /// Date and time that the record was migrated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("overriddencreatedon")] + public System.Nullable overriddencreatedon + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("overriddencreatedon"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("overriddencreatedon", value); + } + } + + /// + /// Owner Id + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ownerid")] + public Microsoft.Xrm.Sdk.EntityReference ownerid + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("ownerid"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("ownerid", value); + } + } + + /// + /// Name of the owner + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owneridname")] + public string owneridname + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("ownerid")) + { + return this.FormattedValues["ownerid"]; + } + else + { + return default(string); + } + } + } + + /// + /// Yomi name of the owner + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owneridyominame")] + public string owneridyominame + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("ownerid")) + { + return this.FormattedValues["ownerid"]; + } + else + { + return default(string); + } + } + } + + /// + /// Unique identifier for the business unit that owns the record + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningbusinessunit")] + public Microsoft.Xrm.Sdk.EntityReference owningbusinessunit + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("owningbusinessunit"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("owningbusinessunit", value); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningbusinessunitname")] + public string owningbusinessunitname + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("owningbusinessunit")) + { + return this.FormattedValues["owningbusinessunit"]; + } + else + { + return default(string); + } + } + } + + /// + /// Unique identifier for the team that owns the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningteam")] + public Microsoft.Xrm.Sdk.EntityReference owningteam + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("owningteam"); + } + } + + /// + /// Unique identifier for the user that owns the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owninguser")] + public Microsoft.Xrm.Sdk.EntityReference owninguser + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue("owninguser"); + } + } + + /// + /// Status of the ACK Codes + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statecode")] + public virtual ofm_ack_codes_statecode? statecode + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return ((ofm_ack_codes_statecode?)(EntityOptionSetEnum.GetEnum(this, "statecode"))); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("statecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statecodename")] + public string statecodename + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("statecode")) + { + return this.FormattedValues["statecode"]; + } + else + { + return default(string); + } + } + } + + /// + /// Reason for the status of the ACK Codes + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statuscode")] + public virtual ofm_ack_codes_StatusCode? statuscode + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return ((ofm_ack_codes_StatusCode?)(EntityOptionSetEnum.GetEnum(this, "statuscode"))); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("statuscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statuscodename")] + public string statuscodename + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + if (this.FormattedValues.Contains("statuscode")) + { + return this.FormattedValues["statuscode"]; + } + else + { + return default(string); + } + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("timezoneruleversionnumber")] + public System.Nullable timezoneruleversionnumber + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("timezoneruleversionnumber"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("timezoneruleversionnumber", value); + } + } + + /// + /// Time zone code that was in use when the record was created. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("utcconversiontimezonecode")] + public System.Nullable utcconversiontimezonecode + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("utcconversiontimezonecode"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("utcconversiontimezonecode", value); + } + } + + /// + /// Version Number + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("versionnumber")] + public System.Nullable versionnumber + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("versionnumber"); + } + } + + /// + /// N:1 team_ofm_ack_codes + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningteam")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("team_ofm_ack_codes")] + public ECC.Core.DataContext.Team team_ofm_ack_codes + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetRelatedEntity("team_ofm_ack_codes", null); + } + } + + /// + /// Constructor for populating via LINQ queries given a LINQ anonymous type + /// LINQ anonymous type. + /// + [System.Diagnostics.DebuggerNonUserCode()] + public ofm_ack_codes(object anonymousType) : + this() + { + foreach (var p in anonymousType.GetType().GetProperties()) + { + var value = p.GetValue(anonymousType, null); + var name = p.Name.ToLower(); + + if (name.EndsWith("enum") && value.GetType().BaseType == typeof(System.Enum)) + { + value = new Microsoft.Xrm.Sdk.OptionSetValue((int) value); + name = name.Remove(name.Length - "enum".Length); + } + + switch (name) + { + case "id": + base.Id = (System.Guid)value; + Attributes["ofm_ack_codesid"] = base.Id; + break; + case "ofm_ack_codesid": + var id = (System.Nullable) value; + if(id == null){ continue; } + base.Id = id.Value; + Attributes[name] = base.Id; + break; + case "formattedvalues": + // Add Support for FormattedValues + FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value); + break; + default: + Attributes[name] = value; + break; + } + } + } + } + /// /// Supplementary Application Record /// @@ -24513,6 +25294,7 @@ public partial class Fields public const string ofm_provide_previous_fy_financial_statementsname = "ofm_provide_previous_fy_financial_statementsname"; public const string ofm_provider_type = "ofm_provider_type"; public const string ofm_provider_typename = "ofm_provider_typename"; + public const string ofm_ranking = "ofm_ranking"; public const string ofm_request_application = "ofm_request_application"; public const string ofm_review_underway_banner = "ofm_review_underway_banner"; public const string ofm_room_split_banner = "ofm_room_split_banner"; @@ -24562,6 +25344,7 @@ public partial class Fields public const string ofm_system_financial_good_standing = "ofm_system_financial_good_standing"; public const string ofm_system_financial_good_standingname = "ofm_system_financial_good_standingname"; public const string ofm_system_triage_rating = "ofm_system_triage_rating"; + public const string ofm_triage_score = "ofm_triage_score"; public const string ofm_union_cssea = "ofm_union_cssea"; public const string ofm_union_csseaname = "ofm_union_csseaname"; public const string ofm_union_description = "ofm_union_description"; @@ -26463,6 +27246,21 @@ public string ofm_provider_typename } } + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_ranking")] + public System.Nullable ofm_ranking + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("ofm_ranking"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("ofm_ranking", value); + } + } + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_review_underway_banner")] public string ofm_review_underway_banner { @@ -27219,6 +28017,21 @@ public string ofm_system_triage_rating } } + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_triage_score")] + public System.Nullable ofm_triage_score + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetAttributeValue>("ofm_triage_score"); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetAttributeValue("ofm_triage_score", value); + } + } + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ofm_union_cssea")] public System.Nullable ofm_union_cssea { @@ -73472,6 +74285,7 @@ public partial class Fields public const string team_msfp_project = "team_msfp_project"; public const string team_msfp_question = "team_msfp_question"; public const string team_msfp_survey = "team_msfp_survey"; + public const string team_ofm_ack_codes = "team_ofm_ack_codes"; public const string team_ofm_allowance = "team_ofm_allowance"; public const string team_ofm_application = "team_ofm_application"; public const string team_ofm_assistance_request = "team_ofm_assistance_request"; @@ -74601,6 +75415,24 @@ public System.Collections.Generic.IEnumerable } } + /// + /// 1:N team_ofm_ack_codes + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("team_ofm_ack_codes")] + public System.Collections.Generic.IEnumerable team_ofm_ack_codes + { + [System.Diagnostics.DebuggerNonUserCode()] + get + { + return this.GetRelatedEntities("team_ofm_ack_codes", null); + } + [System.Diagnostics.DebuggerNonUserCode()] + set + { + this.SetRelatedEntities("team_ofm_ack_codes", null, value); + } + } + /// /// 1:N team_ofm_allowance /// diff --git a/ECC.Core.DataContext/OptionSets/OptionSets.cs b/ECC.Core.DataContext/OptionSets/OptionSets.cs index 70f3470..e28b198 100644 --- a/ECC.Core.DataContext/OptionSets/OptionSets.cs +++ b/ECC.Core.DataContext/OptionSets/OptionSets.cs @@ -2082,6 +2082,10 @@ public enum ccof_pcf_unlocked_sections [OptionSetMetadataAttribute("CCFRI", 5)] CCFRI = 100000005, + [System.Runtime.Serialization.EnumMemberAttribute()] + [OptionSetMetadataAttribute("CCFRI AFS Unlock", 8)] + CCFRIAFSUnlock = 100000008, + [System.Runtime.Serialization.EnumMemberAttribute()] [OptionSetMetadataAttribute("CCFRI NMF RFI", 7)] CCFRINMFRFI = 100000007, @@ -13672,6 +13676,38 @@ public enum officedocument_DocumentType MicrosoftWord = 2, } + /// + /// Status of the ACK Codes + /// + [System.Runtime.Serialization.DataContractAttribute()] + public enum ofm_ack_codes_statecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + [OptionSetMetadataAttribute("Active", 0)] + Active = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + [OptionSetMetadataAttribute("Inactive", 1)] + Inactive = 1, + } + + /// + /// Reason for the status of the ACK Codes + /// + [System.Runtime.Serialization.DataContractAttribute()] + public enum ofm_ack_codes_StatusCode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + [OptionSetMetadataAttribute("Active", 0)] + Active = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + [OptionSetMetadataAttribute("Inactive", 1)] + Inactive = 2, + } + /// /// Status of the Allowance /// @@ -17252,19 +17288,19 @@ public enum sla_slaenabledentities { [System.Runtime.Serialization.EnumMemberAttribute()] - [OptionSetMetadataAttribute("Case", 2)] + [OptionSetMetadataAttribute("Case", 1)] Case = 112, [System.Runtime.Serialization.EnumMemberAttribute()] - [OptionSetMetadataAttribute("Lead", 3)] + [OptionSetMetadataAttribute("Lead", 0)] Lead = 4, [System.Runtime.Serialization.EnumMemberAttribute()] - [OptionSetMetadataAttribute("Order", 1)] + [OptionSetMetadataAttribute("Order", 2)] Order = 1088, [System.Runtime.Serialization.EnumMemberAttribute()] - [OptionSetMetadataAttribute("Quote", 0)] + [OptionSetMetadataAttribute("Quote", 3)] Quote = 1084, } diff --git a/ECC.Core.DataContext/generatorSettings.xml b/ECC.Core.DataContext/generatorSettings.xml index a1b78bc..eec16a2 100644 --- a/ECC.Core.DataContext/generatorSettings.xml +++ b/ECC.Core.DataContext/generatorSettings.xml @@ -16,6 +16,7 @@ true true false + builderSettings.json false @@ -1566,6 +1567,7 @@ email| msfp_project| msfp_question| msfp_survey| +ofm_ack_codes| ofm_allowance| ofm_application| ofm_assistance_request| @@ -1639,6 +1641,7 @@ ofm_licence_detail:ofm_Licence_Detail false true {0}_{1} + false 2 @@ -1707,5 +1710,5 @@ VoiceMail true 2.2024.2.1 true - 2.2024.2.1 + 2.2024.5.16 \ No newline at end of file diff --git a/OFM.Infrastructure.WebAPI/Models/Fundings/Fundings.cs b/OFM.Infrastructure.WebAPI/Models/Fundings/Fundings.cs index 4b1936a..e81de8f 100644 --- a/OFM.Infrastructure.WebAPI/Models/Fundings/Fundings.cs +++ b/OFM.Infrastructure.WebAPI/Models/Fundings/Fundings.cs @@ -1,4 +1,5 @@ using ECC.Core.DataContext; +using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace OFM.Infrastructure.WebAPI.Models.Fundings; @@ -38,6 +39,7 @@ public class Funding : ofm_funding public new decimal? ofm_envelope_programming { get; set; } public new decimal? ofm_envelope_programming_pf { get; set; } public new decimal? ofm_envelope_programming_proj { get; set; } + public new string? ofm_cohort { get; set; } public Guid? _ofm_provider_approver_value { get; set; } public new SpaceAllocation[]? ofm_funding_spaceallocation { get; set; } public new Facility? ofm_facility { get; set; } diff --git a/OFM.Infrastructure.WebAPI/OFM.Infrastructure.WebAPI.xml b/OFM.Infrastructure.WebAPI/OFM.Infrastructure.WebAPI.xml index daa7045..ae4ab09 100644 --- a/OFM.Infrastructure.WebAPI/OFM.Infrastructure.WebAPI.xml +++ b/OFM.Infrastructure.WebAPI/OFM.Infrastructure.WebAPI.xml @@ -563,6 +563,11 @@ Gets a binding to the set of all entities. + + + Gets a binding to the set of all entities. + + Gets a binding to the set of all entities. @@ -3913,6 +3918,11 @@ Shows who last updated the record on behalf of another user. + + + Email engagement interactions + + Individual email will be sent to each recipient. @@ -4887,6 +4897,127 @@ LINQ anonymous type. + + + Available fields, a the time of codegen, for the ofm_ack_codes entity + + + + + Default Constructor. + + + + + Unique identifier of the user who created the record. + + + + + Date and time when the record was created. + + + + + Unique identifier of the delegate user who created the record. + + + + + Sequence number of the import that created this record. + + + + + Unique identifier of the user who modified the record. + + + + + Date and time when the record was modified. + + + + + Unique identifier of the delegate user who modified the record. + + + + + Unique identifier for entity instances + + + + + Date and time that the record was migrated. + + + + + Owner Id + + + + + Name of the owner + + + + + Yomi name of the owner + + + + + Unique identifier for the business unit that owns the record + + + + + Unique identifier for the team that owns the record. + + + + + Unique identifier for the user that owns the record. + + + + + Status of the ACK Codes + + + + + Reason for the status of the ACK Codes + + + + + For internal use only. + + + + + Time zone code that was in use when the record was created. + + + + + Version Number + + + + + N:1 team_ofm_ack_codes + + + + + Constructor for populating via LINQ queries given a LINQ anonymous type + LINQ anonymous type. + + Supplementary Application Record @@ -13579,6 +13710,11 @@ 1:N team_msfp_survey + + + 1:N team_ofm_ack_codes + + 1:N team_ofm_allowance @@ -15802,6 +15938,26 @@ Source of the Intent or Intent Attributes + + + The customer feedback survey invite has been created + + + + + The customer feedback survey invite is invalid + + + + + The customer feedback survey invite has been responded + + + + + The customer feedback survey invite has been sent + + Calculated measurements @@ -15892,6 +16048,21 @@ This event is triggered when a skill is updated during chat. + + + The bot is disconnected + + + + + The bot is still provisioning + + + + + The bot is ready + + Defines the type for ML model @@ -16137,6 +16308,11 @@ CustomerEndConversation + + + CustomerReconnect + + CustomerRejoin @@ -16877,6 +17053,56 @@ Bot Session is resolved + + + Bot Session Outcome Reason option + + + + + Creator or author of the Bot configures the bot to transfer to agent + + + + + In Question node maximum attempts are reached but Bot could not help and proposes to transfer to agent + + + + + Actual user of the Bot decides to raise an agent transfer + + + + + Agent transfer without errors + + + + + No error found + + + + + Session Outcome is resolved + + + + + System Error is the last error in entire conversation + + + + + User Exception is the last error in entire conversation + + + + + Normal user exit + + category can be User/Contact/Account/Lead/Opportunity @@ -17282,6 +17508,16 @@ Option set for selecting the type of the office document. + + + Status of the ACK Codes + + + + + Reason for the status of the ACK Codes + + Status of the Allowance diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs index abeac89..9c663fe 100644 --- a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs +++ b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs @@ -15,7 +15,7 @@ namespace OFM.Infrastructure.WebAPI.Services.Processes.Payments; -public class P500SendPaymentRequestProvider(IOptionsSnapshot bccasApiSettings, ID365AppUserService appUserService, ID365WebApiService d365WebApiService, ILoggerFactory loggerFactory, TimeProvider timeProvider) : ID365ProcessProvider +public class P500SendPaymentRequestProvider(IOptionsSnapshot bccasApiSettings, ID365AppUserService appUserService, ID365WebApiService d365WebApiService, ID365DataService dataService, ILoggerFactory loggerFactory, TimeProvider timeProvider) : ID365ProcessProvider { private readonly BCCASApi _BCCASApi = bccasApiSettings.Value.BCCASApi; private readonly IOptionsSnapshot bccasApiSettings = bccasApiSettings; @@ -24,6 +24,7 @@ public class P500SendPaymentRequestProvider(IOptionsSnapshot b private readonly ILoggerFactory loggerFactory = loggerFactory; private readonly TimeProvider timeProvider = timeProvider; private readonly ILogger _logger = loggerFactory.CreateLogger(LogCategory.Process); + private readonly ID365DataService _dataService = dataService; private int _controlCount; private double _controlAmount; @@ -150,18 +151,43 @@ public string RequestPaymentLineUri + + + """; var requestUri = $""" - ofm_payments?$select=ofm_paymentid,ofm_name,createdon,ofm_amount,ofm_description,ofm_effective_date,_ofm_fiscal_year_value,ofm_revised_invoice_received_date,ofm_revised_invoice_date,ofm_revised_effective_date,_ofm_funding_value,ofm_invoice_line_number,_owningbusinessunit_value,ofm_payment_type,ofm_remittance_message,statuscode,ofm_invoice_number,_ofm_application_value,ofm_siteid,ofm_payment_method,ofm_supplierid,ofm_invoice_received_date,ofm_invoice_date&$expand=ofm_fiscal_year($select=ofm_financial_year),ofm_application($select=ofm_application),ofm_facility($select=accountnumber,name)&$filter=(statuscode eq {(int)ofm_payment_StatusCode.ApprovedforPayment} and ofm_supplierid ne null and ofm_siteid ne null and ofm_payment_method ne null and ofm_amount ne null and (ofm_invoice_date eq '{localDateOnlyPST}' or ofm_revised_invoice_date eq '{localDateOnlyPST}')) and (ofm_application/ofm_applicationid ne null)&$orderby=ofm_name asc + ofm_payments?$select=ofm_paymentid,ofm_name,createdon,ofm_amount,ofm_description,ofm_effective_date,_ofm_fiscal_year_value,ofm_revised_invoice_received_date,ofm_revised_invoice_date,ofm_revised_effective_date,_ofm_funding_value,ofm_invoice_line_number,_owningbusinessunit_value,ofm_payment_type,ofm_remittance_message,statuscode,ofm_invoice_number,_ofm_application_value,ofm_siteid,ofm_payment_method,ofm_supplierid,ofm_invoice_received_date,ofm_invoice_date&$expand=ofm_fiscal_year($select=ofm_financial_year),ofm_application($select=ofm_application),ofm_facility($select=accountnumber,name),ofm_funding($select=ofm_cohort)&$filter=(statuscode eq {(int)ofm_payment_StatusCode.ApprovedforPayment} and ofm_supplierid ne null and ofm_siteid ne null and ofm_payment_method ne null and ofm_amount ne null and (ofm_invoice_date eq '{localDateOnlyPST}' or ofm_revised_invoice_date eq '{localDateOnlyPST}')) and (ofm_application/ofm_applicationid ne null)and (ofm_funding/ofm_fundingid ne null)&$orderby=ofm_name asc """; return requestUri; } } + public string RequestACKCodeUri + { + get + { + // For reference only + var fetchXml = $""" + + + + + + + + """; + + var requestUri = $""" + ofm_ack_codeses?$select=ofm_ack_number,ofm_cohort,ofm_payment_type + """; + + return requestUri; + } + } public async Task GetDataAsync() { @@ -303,6 +329,12 @@ public async Task RunProcessAsync(ID365AppUserService appUserService #endregion + #region Step 0.3: Get ACK Codes + + IEnumerable ackCode = await LoadACKCodeAsync(); + + #endregion + #region Step 1: Handlebars format to generate Inbox data string source = "{{feederNumber}}{{batchType}}{{transactionType}}{{delimiter}}{{feederNumber}}{{fiscalYear}}{{cGIBatchNumber}}{{messageVersionNumber}}{{delimiter}}\n" + "{{#each InvoiceHeader}}{{this.feederNumber}}{{this.batchType}}{{this.headertransactionType}}{{this.delimiter}}{{this.supplierNumber}}{{this.supplierSiteNumber}}{{this.invoiceNumber}}{{this.PONumber}}{{this.invoiceType}}{{this.invoiceDate}}{{this.payGroupLookup}}{{this.remittanceCode}}{{this.grossInvoiceAmount}}{{this.CAD}}{{this.invoiceDate}}{{this.termsName}}{{this.description}}{{this.goodsDate}}{{this.invoiceRecDate}}{{this.oracleBatchName}}{{this.SIN}}{{this.payflag}}{{this.flow}}{{this.delimiter}}\n" + @@ -315,6 +347,18 @@ public async Task RunProcessAsync(ID365AppUserService appUserService foreach (var headeritem in grouppayment) { var pay_method = (ecc_payment_method)headeritem.First().ofm_payment_method; + var paymentType = (ecc_payment_type)headeritem.First().ofm_payment_type; //from payment line + var cohort = headeritem?.First().ofm_funding?.ofm_cohort; //from funding + string ackNumber = string.Empty; + var ackCodeList = ackCode?.Where(ack => ack.ofm_payment_type == paymentType).ToList(); + if (ackCodeList.Any() && ackCodeList.Count > 1) + { + ackNumber = ackCodeList.Where(code => code.ofm_cohort == cohort).Select(code => code.ofm_ack_number).FirstOrDefault(); + } + else + { + ackNumber = ackCodeList.Select(code => code.ofm_ack_number).FirstOrDefault(); + } double invoiceamount = 0.00; List invoiceLines = []; @@ -335,7 +379,8 @@ public async Task RunProcessAsync(ID365AppUserService appUserService committmentLine = _BCCASApi.InvoiceLines.committmentLine,//Static value:0000 lineAmount = (lineitem.item.ofm_amount < 0 ? "-" : "") + Math.Abs(lineitem.item.ofm_amount.Value).ToString("0.00", System.Globalization.CultureInfo.InvariantCulture).PadLeft(line.FieldLength("lineAmount") - (lineitem.item.ofm_amount < 0 ? 1 : 0), '0'),// come from split funding amount per facility lineCode = (lineitem.item.ofm_amount > 0 ? "D" : "C"),//if it is positive then line code is Debit otherwise credit - distributionACK = _BCCASApi.InvoiceLines.distributionACK.PadRight(line.FieldLength("distributionACK")),// using test data shared by CAS,should be changed for prod + //distributionACK = _BCCASApi.InvoiceLines.distributionACK.PadRight(line.FieldLength("distributionACK")),// using test data shared by CAS,should be changed for prod + distributionACK = ackNumber.PadRight(line.FieldLength("distributionACK")), //fetching from ACK Codes from dataverse based on payment type and cohort lineDescription = (lineitem.item.ofm_payment_type).ToString().PadRight(line.FieldLength("lineDescription")), // Pouplate extra info from facility/funding amount effectiveDate = lineitem.item.ofm_revised_effective_date?.ToString("yyyyMMdd") ?? lineitem.item.ofm_effective_date?.ToString("yyyyMMdd"),//same as invoice date quantity = _BCCASApi.InvoiceLines.quantity,//Static Value:0000000.00 not used by feeder @@ -373,10 +418,10 @@ public async Task RunProcessAsync(ID365AppUserService appUserService description = Regex.Replace(headeritem.First()?.ofm_facility?.name, @"[^\w $\-]", "").PadRight(header.FieldLength("description")).Substring(0, header.FieldLength("description")),// can be used to pass extra info flow = string.Empty.PadRight(header.FieldLength("flow")),// can be used to pass extra info invoiceLines = invoiceLines - });; + }); ; _controlAmount = _controlAmount + invoiceamount; _controlCount++; - + } // break transaction list into multiple list if it contains more than 250 transactions @@ -509,8 +554,15 @@ private async Task SaveInboxFileOnNewPaymentFileExchangeRecord(ID365AppUse return await Task.FromResult(false); } - } } + } return await Task.FromResult(true); } + private async Task> LoadACKCodeAsync() + { + var localdata = await _dataService.FetchDataAsync(RequestACKCodeUri, "ACK_Codes"); + var deserializedData = localdata.Data.Deserialize>(Setup.s_writeOptionsForLogs); + + return await Task.FromResult(deserializedData!); ; + } } \ No newline at end of file