123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net.Http;
- using System.Text;
- using System.Threading.Tasks;
- namespace wispro.sp.entity
- {
- public class CaseCoefficientStatistics
- {
- public Customer customer { get; set; }
- public int Totals { get; set; }
- public int ACount { get; set; }
- public int SCount { get; set; }
- public bool ExceedingSLimit()
- {
- if (customer != null)
- {
- Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(customer));
- double dSRate = 0.05;
-
- if (customer.SRate != null)
- {
- dSRate = Convert.ToDouble(customer.SRate) / 100.00;
- }
- if (Totals > 0)
- {
- return (Convert.ToDouble(SCount) / Convert.ToDouble(Totals) > dSRate);
- }
- }
- return false;
- }
- public bool ExceedingALimit()
- {
- if (customer != null)
- {
- Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(customer));
- double dARate = 0.3;
- if (customer.ARate != null)
- {
- dARate = Convert.ToDouble(customer.ARate) / 100.00;
- }
- if (Totals > 0)
- {
- return (Convert.ToDouble(ACount + SCount) / Convert.ToDouble(Totals) > dARate);
- }
- }
- return false;
- }
- public bool isExceedingLimit()
- {
- if (customer != null)
- {
- Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(customer));
-
- double dARate = 0.3;
- double dSRate = 0.05;
- if (customer.ARate != null)
- {
- dARate = Convert.ToDouble(customer.ARate) / 100.00;
- }
- if (customer.SRate != null)
- {
- dSRate = Convert.ToDouble(customer.SRate) / 100.00;
- }
-
- if (Totals > 0)
- {
- return (Convert.ToDouble(ACount + SCount) / Convert.ToDouble(Totals) > dARate ||
- Convert.ToDouble(SCount) / Convert.ToDouble(Totals) > dSRate);
- }
- }
- return false;
- }
- }
- }
|