培训考试积分
This commit is contained in:
@@ -336,8 +336,7 @@ namespace WebAPI.Controllers
|
||||
////考试分数
|
||||
decimal getTestScores = APITestRecordService.getSubmitTestRecord(getTestRecord);
|
||||
////及格分数
|
||||
int getPassScores = 80;
|
||||
//int getPassScores = SysConstSetService.getPassScore();
|
||||
int getPassScores = SysConstSetService.getPassScore();
|
||||
if (getTestScores < getPassScores)
|
||||
{
|
||||
int testCount = Funs.DB.Training_TestRecord.Where(x => x.TestPlanId == getTestRecord.TestPlanId && x.TestManId == getTestRecord.TestManId).Count();
|
||||
@@ -355,6 +354,8 @@ namespace WebAPI.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
//记分
|
||||
ScoreFlowLogService.HseScoring(testRecordId);
|
||||
APITestRecordService.updateAll(getTestRecord.TestPlanId);
|
||||
responeData.message = "恭喜考试通过!您的成绩为:【" + getTestScores.ToString() + "】。";
|
||||
}
|
||||
@@ -444,14 +445,9 @@ namespace WebAPI.Controllers
|
||||
////考试分数
|
||||
decimal getTestScores = APITestRecordService.getSubmitTestRecord(getTestRecord);
|
||||
|
||||
int getPassScores = 80;
|
||||
int getPassScores = SysConstSetService.getPassScore();
|
||||
if (!string.IsNullOrEmpty(getTestRecord.TestPlanId))
|
||||
{////及格分数
|
||||
//var testRule = db.Sys_TestRule.FirstOrDefault();
|
||||
//if (testRule != null)
|
||||
//{
|
||||
// getPassScores = testRule.PassingScore;
|
||||
//}
|
||||
if (getTestScores < getPassScores)
|
||||
{
|
||||
int testCount = db.Training_TestRecord.Where(x => x.TestPlanId == getTestRecord.TestPlanId && x.TestManId == getTestRecord.TestManId).Count();
|
||||
@@ -469,6 +465,8 @@ namespace WebAPI.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
//记分
|
||||
ScoreFlowLogService.HseScoring(testRecordId);
|
||||
APITestRecordService.updateAll(getTestRecord.TestPlanId);
|
||||
responeData.message = "恭喜考试通过!您的成绩为:【" + getTestScores.ToString() + "】。";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user