1
This commit is contained in:
@@ -490,7 +490,7 @@ namespace WebAPI.Controllers
|
||||
var getTestTrainingItemList = (from x in Funs.DB.Training_TestTrainingItem
|
||||
join y in Funs.DB.Training_TestTraining on x.TrainingId equals y.TrainingId
|
||||
where y.TrainingName.Contains("岗位人员试题") &&
|
||||
x.WorkPostNames.Contains(person.WorkPostName)
|
||||
x.WorkPostIds.Contains(person.WorkPostId)
|
||||
orderby x.TestType, x.TrainingItemCode
|
||||
select new
|
||||
{
|
||||
|
||||
@@ -804,7 +804,37 @@ namespace WebAPI.Controllers
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 根据personId获取用户考试分数
|
||||
/// <summary>
|
||||
/// 根据personId获取用户信息
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getTestScoreByPersonId(string personId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
Model.Training_TestRecord testRecord = Funs.DB.Training_TestRecord
|
||||
.Where(e => e.TestManId == personId && e.TestScores != null && e.TestEndTime.HasValue && e.TestStartTime.HasValue)
|
||||
.OrderByDescending(e => e.TestStartTime)
|
||||
.FirstOrDefault();
|
||||
if (testRecord != null)
|
||||
{
|
||||
responeData.data = new {testRecord.TestScores};
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user