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) { if (LowScore == 0) { return 90; } //int minscore = requestScore - 60;//最小 //int constscore = requestScore;//中位数 //int maxscore = requestScore + 15;//最大 int percentage = 0; if (LowScore >= requestScore - 60 && LowScore <= requestScore - 26) { percentage = new Random().Next(81, 99); } if (LowScore <= requestScore - 1 && LowScore >= requestScore - 26) { percentage = new Random().Next(31, 80); } if (LowScore >= requestScore && LowScore <= requestScore + 30) { percentage = new Random().Next(1, 30); } //else //{ // percentage = new Random().Next(1, 30); //} return percentage; } /// /// 冲稳保计算(逻辑待调整) /// /// /// public static int GetPlanScore(int LowScore, int requestScore) { //int minscore = requestScore - 60;//最小 // // int constscore = requestScore;//中位数 //int maxscore = requestScore + 15;//最大 int type = 0; // int type = LowScore <= minscore ? 0 : minscore < LowScore && LowScore <= constscore ? 1 : LowScore > constscore && LowScore <= maxscore ? 2 : 0; if (LowScore >= requestScore - 60 && LowScore <= requestScore - 26) { type = 0; } if (LowScore <= requestScore - 1 && LowScore >= requestScore - 26) { type = 1; } if (LowScore >= requestScore && LowScore <= requestScore + 30) { type = 2; } return type; } } }