This commit is contained in:
tanglong 2026-01-16 13:33:13 +08:00
parent c837d4d9a4
commit 365a84baa0

View File

@ -129,25 +129,27 @@ namespace VOL.Ai.Services
// =========================
// 1️⃣ 查询学校信息
// =========================
var res = await (
from a in _studentRepository.DbContext.Set<Ai_DeviceAssocSchool>()
join s in _studentRepository.DbContext.Set<S_School>()
on a.SchoolCode equals s.SchoolCode
where a.Code == paramDto.Code
select new Ai_SchoolDto
{
SchoolCode = s.SchoolCode,
Name = s.SchoolName,
Type = s.SchoolNatureId,
Province = s.Province,
City = s.City
}
).FirstOrDefaultAsync();
//var res = await (
// from a in _studentRepository.DbContext.Set<Ai_DeviceAssocSchool>()
// join s in _studentRepository.DbContext.Set<S_School>()
// on a.SchoolCode equals s.SchoolCode
// where a.Code == paramDto.Code
// select new Ai_SchoolDto
// {
// SchoolCode = s.SchoolCode,
// Name = s.SchoolName,
// Type = s.SchoolNatureId,
// Province = s.Province,
// City = s.City
// }
//).FirstOrDefaultAsync();
if (res == null)
return new Ai_SchoolDto();
//if (res == null)
// return new Ai_SchoolDto();
var schoolCode = res.SchoolCode;
var res = new Ai_SchoolDto();
var schoolCode = paramDto.Code;
// =========================
// 2️⃣ 调用京师接口获取学校年级班级