Adding
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
|
||||
|
||||
public class CustomWeightedDispersalRequest
|
||||
{
|
||||
public int DepartmentId { get; set; }
|
||||
public Product DispersalProduct { get; set; }
|
||||
public Dictionary<string,double> DispersalWeightByRole { get; set; }
|
||||
public int month { get; set; }
|
||||
public int year { get; set; }
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Entities;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
|
||||
|
||||
public class DefaultWeightedGoalDispersalData
|
||||
{
|
||||
public int DepartmentId { get; set; }
|
||||
public DateTime DispersalMonthStartDate { get; set; }
|
||||
public List<AppUser> DispersalMonthPersonnel { get; set; }
|
||||
public PerProductGoal DispersalMonthDepartmentGoals { get; set; }
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
|
||||
|
||||
public class DepartmentGoalExtrapolationRequest
|
||||
{
|
||||
public DateTime DepartmentGoalStartDate { get; set; }
|
||||
public DateTime DepartmentGoalEndDate { get; set; }
|
||||
public int OriginalDepartmentGoal { get; set; }
|
||||
public int NewDepartmentGoal { get; set; }
|
||||
public int DepartmentId { get; set; }
|
||||
public Product Product;
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Entities;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
|
||||
|
||||
public class ExtrapolationGoalDispersalData
|
||||
{
|
||||
public int DepartmentId { get; set; }
|
||||
public DateTime DispersalMonthStartDate { get; set; }
|
||||
public PersonnelGoals DispersalMonthPersonnelGoals { get; set; }
|
||||
public PerProductGoal DispersalMonthDepartmentGoals { get; set; }
|
||||
public PerProductGoal ModelDepartmentGoals { get; set; }
|
||||
public PersonnelGoals ModelPersonnelGoals { get; set; }
|
||||
public List<AppUser> DispersalMonthPersonnel { get; set; }
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Entities;
|
||||
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
|
||||
|
||||
public class GoalDispersalReceipt
|
||||
{
|
||||
public GoalDispersalReceipt(int deptId, GoalDispersalStrategy strategy)
|
||||
{
|
||||
GoalChanges = new List<GoalChange>();
|
||||
GoalDispersalErrors = new List<GoalDispersalReceiptItem>();
|
||||
DepartmentId = deptId;
|
||||
Strategy = strategy;
|
||||
}
|
||||
public int DepartmentId { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<GoalChange> GoalChanges { get; set; }
|
||||
public List<GoalDispersalReceiptItem> GoalDispersalErrors { get; set; }
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public GoalDispersalStrategy Strategy { get; set; }
|
||||
public void AddNewDispersalError(GoalDispersalError errorType, string employeeId, string message, string employeeName = null)
|
||||
{
|
||||
var newError = new GoalDispersalReceiptItem(errorType, employeeId, message);
|
||||
if (!String.IsNullOrEmpty(employeeName))
|
||||
{
|
||||
newError.EmployeeName = employeeName;
|
||||
}
|
||||
GoalDispersalErrors.Add(newError);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
|
||||
|
||||
public class GoalDispersalReceiptItem
|
||||
{
|
||||
public GoalDispersalReceiptItem(GoalDispersalError errorType, string employeeId, string message)
|
||||
{
|
||||
ErrorType = errorType;
|
||||
EmployeeId = employeeId;
|
||||
Message = message;
|
||||
}
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public GoalDispersalError ErrorType { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string EmployeeId { get; set; }
|
||||
public string EmployeeName { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user