当前位置: 首页>>代码示例>>C#>>正文


C# Claim.CreateAmendClaimWithoutValidationTransaction方法代码示例

本文整理汇总了C#中Claim.CreateAmendClaimWithoutValidationTransaction方法的典型用法代码示例。如果您正苦于以下问题:C# Claim.CreateAmendClaimWithoutValidationTransaction方法的具体用法?C# Claim.CreateAmendClaimWithoutValidationTransaction怎么用?C# Claim.CreateAmendClaimWithoutValidationTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Claim的用法示例。


在下文中一共展示了Claim.CreateAmendClaimWithoutValidationTransaction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        public static Claim Execute(Claim claim)
        {
            var sw = Stopwatch.StartNew();
            try
            {

                if (!ShouldExecute(claim) ) return claim;
                var transaction =  claim.CreateAmendClaimWithoutValidationTransaction();
                
                ClaimHeader claimHeader = transaction.ClaimHeader;
                if (claimHeader == null && InvalidCodes.Contains(claimHeader.ClaimHeaderStatusCode))
                {
                    transaction.Cancel();
                    return claim;
                }

                // Transfer to Genius 
                CreateClaimTransferRequests(claimHeader, claim);
                transaction.Cancel();

                claim.ClaimTransfered = true;
                return claim;
            }
            finally
            {
                sw.Stop();
                var workDone = GlobalClaimWakeUp.Statistics.GetOrAdd(typeof(CreateClaimTransferRequestsBlock).Name, TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
                GlobalClaimWakeUp.Statistics[typeof(CreateClaimTransferRequestsBlock).Name] = (workDone + TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
            }
            

        }
开发者ID:victorxata,项目名称:261120,代码行数:32,代码来源:CreateClaimTransferRequestsBlock.cs

示例2: Execute

        public static Claim Execute(Claim claim)
        {
            var sw = Stopwatch.StartNew();
            if (!ShouldExecute(claim)) return claim;
            var transaction = claim.CreateAmendClaimWithoutValidationTransaction();
            if (transaction == null) return claim;
            try
            {
                var claimHeader = transaction.ClaimHeader;

                if (claimHeader.ClaimHeaderInternalStatus >= (short)StaticValues.ClaimHeaderInternalStatus.Finalized) return claim;
                var productEvent = claim.ProductType == "MOT" ? _motorProductEvents.Value : _liabilityProductEvents.Value;

                var reviewEvent = CreateReviewEvent(claimHeader, claim.GeniusXClaimHandler, productEvent.ProductEventId);
                transaction.Complete(false);
                if (reviewEvent != null)
                {
                    var processHandler = GlobalClaimWakeUp.Container.Resolve<ClaimsProcessHandler>();
                    processHandler.ProcessComponent(reviewEvent, ProcessInvocationPoint.Virtual, 0, new ProcessParameters { Alias = "AXAManualReviewStartClaimProcessHandler" });
                    Logger.InfoFormat("Review Task successfully created for Claim\r\n{0}\r\n", JObject.FromObject(new { claimHeader.ClaimReference, UserId = claim.GeniusXClaimHandler }));
                }
                return claim;
            }
            catch
            {
                transaction.Cancel();
                return claim;
            }
            finally
            {
                sw.Stop();
                var workDone = GlobalClaimWakeUp.Statistics.GetOrAdd(typeof(CreateReviewTaskBlock).Name, TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
                GlobalClaimWakeUp.Statistics[typeof(CreateReviewTaskBlock).Name] = (workDone + TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
            }
        }
开发者ID:victorxata,项目名称:261120,代码行数:35,代码来源:CreateReviewTaskBlock.cs

示例3: Execute

 public static void Execute(Claim claim)
 {
     var sw = Stopwatch.StartNew();
     var transaction = claim.CreateAmendClaimWithoutValidationTransaction();
     if (transaction == null) return;
     try
     {
         List<FlattenedTransaction> transactions;
         GlobalClaimWakeUp.MappedTransactionDetails.TryRemove(claim.ClaimReference, out transactions);
         if (ShouldExecute(claim))
         {
             
             var claimHeader = transaction.ClaimHeader;
             claimHeader.CustomCode18 = claim.CustomCode18;
             transaction.Complete(false);
         }
     }
     catch
     {
         transaction.Cancel();
     }
     finally
     {
         sw.Stop();
         var workDone = GlobalClaimWakeUp.Statistics.GetOrAdd(typeof(SetCustomCode18Block).Name, TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
         GlobalClaimWakeUp.Statistics[typeof(SetCustomCode18Block).Name] = (workDone + TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
     }
 }
开发者ID:victorxata,项目名称:261120,代码行数:28,代码来源:SetCustomCode18Block.cs

示例4: Execute

        public static Claim Execute(Claim claim)
        {
            var sw = Stopwatch.StartNew();
            if (!ShouldExecute(claim)) return claim;
            var transaction = claim.CreateAmendClaimWithoutValidationTransaction();
            if (transaction == null) return claim;
            try
            {

                var claimHeader = transaction.ClaimHeader;
                claim.ExcessAndDeductiblesToProcess = true;
                bool policyExists;
                if (!GlobalClaimWakeUp.GeniusXPolicyState.TryGetValue(claim.PolicyNumber, out policyExists) || !policyExists) return claim;

                if (!claimHeader.PolicyDeductible01.HasValue &&
                    !claimHeader.PolicyDeductible02.HasValue &&
                    !claimHeader.PolicyDeductible03.HasValue &&
                    !claimHeader.PolicyDeductible04.HasValue &&
                    !claimHeader.PolicyDeductible05.HasValue)
                {
                    Logger.InfoFormat("No excess or deductibles to calculate for\r\n{0}\r\n", JObject.FromObject(new { claim.ClaimReference }));
                    claim.ExcessAndDeductiblesToProcess = false;
                    return claim;
                }
                // If we didn't have to create a policy then we can execute E&D
                if (ExcessAndDeductiblesProcessing(claim, claimHeader))
                {
                    if (claim.ClaimIsClosed) claim.ClaimProcessingCompleted = true;
                    transaction.Complete(false);
                }
                else
                    transaction.Cancel();

                return claim;
            }
            catch
            {
                transaction.Cancel();
                return claim;
            }
            finally
            {
                sw.Stop();
                var workDone = GlobalClaimWakeUp.Statistics.GetOrAdd(typeof(ExcessAndDeductiblesBlock).Name, TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
                GlobalClaimWakeUp.Statistics[typeof(ExcessAndDeductiblesBlock).Name] = (workDone + TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
            }
        }
开发者ID:victorxata,项目名称:261120,代码行数:47,代码来源:ExcessAndDeductiblesBlock.cs

示例5: Execute

        public static Claim Execute(Claim claim)
        {
            var sw = Stopwatch.StartNew();
            try
            {
                if (!ShouldExecute(claim)) return claim;

                var transaction = claim.CreateAmendClaimWithoutValidationTransaction();
                if (transaction.ClaimHeader == null)
                {
                    transaction.Cancel();
                    return claim;
                }
                CreateNameTransferRequests(transaction.ClaimHeader);
                transaction.Cancel();
                return claim;
            }
            finally
            {
                sw.Stop();
                var workDone = GlobalClaimWakeUp.Statistics.GetOrAdd(typeof(CreateNameTransferRequestsBlock).Name, TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
                GlobalClaimWakeUp.Statistics[typeof(CreateNameTransferRequestsBlock).Name] = (workDone + TimeSpan.FromMilliseconds(sw.ElapsedMilliseconds));
            }
        }
开发者ID:victorxata,项目名称:261120,代码行数:24,代码来源:CreateNameTransferRequestsBlock.cs

示例6: Execute

        public static Claim Execute(Claim claim)
        {
            var sw = Stopwatch.StartNew();
            if (!ShouldExecute(claim)) return claim;
            // The change here is to allow us to automatically reprocess items that are F00, F01 or F02 as part of the
            // automated system.
            var transaction = claim.CreateAmendClaimWithoutValidationTransaction(true);
            if (transaction == null) return claim;
            try
            {

                var claimHeader = transaction.ClaimHeader;
                claimHeader.DateLastSeen = DateTime.UtcNow;
                // Update Custom Code 18 to NULL if it's an F- code since we now auto-retry those.
                //if (claimHeader.CustomCode18 != null && claimHeader.CustomCode18.StartsWith("F"))
                   // claimHeader.CustomCode18 = null;
                //Update CustomCode18 to be P01 - in progress
                claimHeader.CustomCode18 = "P01";
                if (GetPolicyAndAttachClaim(claim, claimHeader))
                {
                    Logger.Info("Checking for AD ClaimDetail");
                    var adClaimDetail = claimHeader.ClaimDetails.FirstOrDefault(cd => cd.ClaimDetailTypeCode == "AD");
                    if (adClaimDetail != null)
                    {
                        
                        // If there is no Excess on the ClaimDetail then copy it from the ClaimHeader
                        if (!adClaimDetail.PolicyDeductible01.HasValue)
                        {
                            if (adClaimDetail.GetProduct().ClaimDetailAutomaticDeductibleProcessingMethod == 
                                (short)StaticValues.ClaimDetailAutomaticDeductibleProcessingMethod.StandardClaimDetailDeductible
                                 && adClaimDetail.IsAutomaticDeductibleProcessingApplied == true)
                            {
                                Logger.InfoFormat("AD ClaimDetail found and has no Excess so copying from ClaimHeader:\r\n{0}", JObject.FromObject(
                                    new
                                    {
                                        claim.ClaimReference,
                                        adClaimDetail.ClaimDetailReference,
                                        IsDeductible01PaidByInsurer = claimHeader.CustomBoolean15,
                                        PolicyDeductible01 = claimHeader.CustomNumeric10
                                    }));
                                adClaimDetail.IsDeductible01PaidByInsurer = claimHeader.CustomBoolean15;
                                adClaimDetail.PolicyDeductible01 = claimHeader.CustomNumeric10;
                            }
                        }
                        // If there is Excess on the ClaimDetail then assume that is an override and update the ClaimHeader
                        else if(adClaimDetail.PolicyDeductible01 != claimHeader.CustomNumeric10)
                        {
                            Logger.InfoFormat("AD ClaimDetail found but looks like there is an override so updating ClaimHeader:\r\n{0}", JObject.FromObject(
                                   new
                                   {
                                       claim.ClaimReference,
                                       adClaimDetail.ClaimDetailReference, 
                                       adClaimDetail.IsDeductible01PaidByInsurer,
                                       adClaimDetail.PolicyDeductible01
                                   }));
                            claimHeader.CustomBoolean15 = adClaimDetail.IsDeductible01PaidByInsurer;
                            claimHeader.CustomNumeric10 = adClaimDetail.PolicyDeductible01;
                        }
                    }
                    transaction.Complete(false);
                    var policyReferenceLocks = LockManager.CheckLock(claim.PolicyNumber, LockLevel.HeaderReference, LockDurationType.Transaction, LockType.Update, LockOrigin.Underwriting);
                    if (policyReferenceLocks.Any())
                    {
                        foreach (var @lock in policyReferenceLocks)
                        {
                            LockManager.RemoveLock(@lock.LockLevel, @lock.LockData, @lock.TransactionID);
                            Logger.InfoFormat("Remove lock\r\n{0}\r\n", JObject.FromObject(new { claim.PolicyNumber }));
                        }
                    }

                    if (!string.Equals(claim.PolicyHeaderStatusCode, "OPV", StringComparison.OrdinalIgnoreCase))
                    {

                        using (var uwe = new UnderwritingEntities())
                        {
                            var policy = (from h in uwe.Header
                                          where h.HeaderReference == claim.PolicyNumber
                                          select h).FirstOrDefault();
                            if (policy != null)
                            {
                                policy.HeaderStatusCode = "OPV";
                            }
                            uwe.SaveChanges();
                            Logger.InfoFormat("Policy HeaderStatusCode change\r\n{0}\r\n", JObject.FromObject(new { claim.PolicyNumber, policy.HeaderStatusCode }));
                        }

                    }
                }
                else
                {
                    Logger.InfoFormat("Failed, cancelling");
                    transaction.Cancel();
                }
                return claim;
            }
            catch
            {
                transaction.Cancel();
                return claim;
            }
//.........这里部分代码省略.........
开发者ID:victorxata,项目名称:261120,代码行数:101,代码来源:AttachClaimToPolicyBlock.cs


注:本文中的Claim.CreateAmendClaimWithoutValidationTransaction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。