This commit is contained in:
tanglong 2026-01-09 09:14:37 +08:00
parent 6a652a4427
commit 97d5c9e45d
2 changed files with 14 additions and 6 deletions

View File

@ -264,7 +264,7 @@ namespace VOL.Ai.Services
public async Task<Ai_StudentFaceInfo> StudentFace(GetFaceParam paramDto) public async Task<Ai_StudentFaceInfo> StudentFace(GetFaceParam paramDto)
{ {
var faces = await ALiYunFace.SearchFace(paramDto.Base64, false); var faces = await ALiYunFace.SearchFace(paramDto.Base64, true);
foreach (var body in faces) foreach (var body in faces)
{ {
@ -286,7 +286,7 @@ namespace VOL.Ai.Services
}).FirstOrDefaultAsync(); }).FirstOrDefaultAsync();
if (student == null) if (student == null)
throw new Exception("未查询到学生信息"); continue;
return student; return student;
} }
@ -652,7 +652,7 @@ namespace VOL.Ai.Services
var query = from a in _sportsTestDataRepository.FindAsIQueryable(x => var query = from a in _sportsTestDataRepository.FindAsIQueryable(x =>
x.CategoryValue == paramDto.ItemCode && x.CategoryValue == paramDto.ItemCode &&
x.SchoolCode == paramDto.SchoolCode) x.SchoolCode == paramDto.SchoolCode)
//.Include(c => c.FileList) //.Include(c => c.FileList)
orderby a.ScoreTime descending orderby a.ScoreTime descending
select new Ai_SportsTestDto() select new Ai_SportsTestDto()
{ {
@ -1299,15 +1299,24 @@ namespace VOL.Ai.Services
//return res; //return res;
//新逻辑 //新逻辑
var res = new Ai_TeacherFaceInfo();
var loginInfo = await _scanCodeLoginRepository.FindAsIQueryable(x => x.Code == paramDto.Code && x.SchoolCode == paramDto.SchoolCode).FirstOrDefaultAsync(); var loginInfo = await _scanCodeLoginRepository.FindAsIQueryable(x => x.Code == paramDto.Code && x.SchoolCode == paramDto.SchoolCode).FirstOrDefaultAsync();
if (loginInfo == null) if (loginInfo == null)
return new Ai_TeacherFaceInfo(); throw new Exception("未查询到登录信息!");
var teacher = await _jingShiTiJiaoService.GetClassListByTeacher(loginInfo.TeacherPhoneNo);
if (teacher == null)
throw new Exception("获取京师老师信息失败!");
res.TeacherName = teacher.TeacherName;
res.Phone = teacher.TeacherNo;
_scanCodeLoginRepository.Delete(loginInfo);
await _scanCodeLoginRepository.SaveChangesAsync();
return null; return null;
} }

View File

@ -36,7 +36,6 @@ namespace VOL.Model.Ai
/// <summary> /// <summary>
/// 类型固定的枚举值,1:小学2:中学3:初级中学 4:高级中学5:完全中学6:九年一贯制7:十 /// 类型固定的枚举值,1:小学2:中学3:初级中学 4:高级中学5:完全中学6:九年一贯制7:十
/// </summary> /// </summary>
public int Type { get; set; } public int Type { get; set; }