Adding
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LCU.API.Collections.RepoApi.Domain.Extensions;
|
||||
using LCU.API.Collections.RepoApi.Domain.Processing;
|
||||
using LCU.API.Collections.RepoApi.Extensions;
|
||||
using LCU.Shared.Collections.RepoApiLib.Models;
|
||||
|
||||
namespace LCU.API.Collections.RepoApi.Domain.AlertChecker
|
||||
{
|
||||
public class SkipEndChecker : IAlertChecker
|
||||
{
|
||||
private readonly int _dayCount;
|
||||
private const string O4RStatus = "O4R";
|
||||
|
||||
public SkipEndChecker(int dayCount = 30)
|
||||
{
|
||||
_dayCount = dayCount;
|
||||
}
|
||||
|
||||
public List<EventAlert> CheckForAlert(RepoAccountProcessingSlip slip)
|
||||
{
|
||||
if (slip.UpdatedRepoAccount.Status == O4RStatus
|
||||
&& slip.UpdatedRepoAccount.GetDaysInStatus(O4RStatus) >= _dayCount
|
||||
&& slip.UpdatedRepoAccount.IsCurrentlySkipClaim())
|
||||
{
|
||||
return new List<EventAlert>
|
||||
{
|
||||
new EventAlert()
|
||||
{
|
||||
RepoId = slip.UpdatedRepoAccount.RepoId,
|
||||
AccountNo = slip.UpdatedRepoAccount.AccountNo,
|
||||
Message = "Skip Claim Ended",
|
||||
CreatedBy = "Batch",
|
||||
DateAdded = DateTime.Now
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user