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