using Org.BouncyCastle.Asn1.Ocsp; using System; using System.Collections.Generic; using System.Text; namespace New_College.Common { public class MajorPlanScoreTool { /// /// 冲稳保百分比(逻辑待调整) /// /// /// /// public static int GetPlanPercentage(int LowScore, int requestScore) { int minscore = requestScore - 15;//最小 int constscore = requestScore;//中位数 int maxscore = requestScore + 15;//最大 int percentage = LowScore <= minscore ? new Random().Next(90, 99) : minscore < LowScore && LowScore <= constscore ? new Random().Next(65, 89) : LowScore > constscore && LowScore <= maxscore ? new Random().Next(30, 64) : new Random().Next(1, 29); return percentage; } /// /// 冲稳保计算(逻辑待调整) /// /// /// public static int GetPlanScore(int LowScore, int requestScore) { int minscore = requestScore - 15;//最小 int constscore = requestScore;//中位数 int maxscore = requestScore + 15;//最大 int type = LowScore <= minscore ? 0 : minscore < LowScore && LowScore <= constscore ? 1 : LowScore > constscore && LowScore <= maxscore ? 2 : 0; return type; } } }