修改考试API

This commit is contained in:
高飞 2023-11-08 17:00:04 +08:00
parent 84e9b8b2c4
commit 897b3a88aa
1 changed files with 16 additions and 0 deletions

View File

@ -86,6 +86,22 @@ namespace BLL
returnItem.QRCodeUrl = getTestP.QRCodeUrl.Replace('\\', '/');
}
returnItem.TrainingPlanId = getTestP.PlanId;
//返回考生记录
var getTestRecord = db.Training_TestRecord.Where(x => x.TestPlanId == testPlanId).ToList();
List<Model.TestRecordItem> trItemList = new List<Model.TestRecordItem>();
if (getTestRecord.Count>0)
{
foreach (var item in getTestRecord)
{
Model.TestRecordItem trItemModel = new Model.TestRecordItem();
trItemModel.TestManId = item.TestManId;
trItemModel.TestManName = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == item.TestManId).PersonName;
trItemList.Add(trItemModel);
}
}
returnItem.TestRecordItems = trItemList;
}
return returnItem;
}