|
|
@@ -369,16 +369,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
var queryParam = queryJson.ToJObject(); |
|
|
|
var strSql = new StringBuilder(); |
|
|
|
strSql.Append(@"select b.classroomname,b.classroombuildingname,usecount,usecount as rate from "); |
|
|
|
strSql.Append(@"(select teachclassno,classroomno,count(1) as usecount from ArrangeLessonTerm t where 1=1 "); |
|
|
|
//教室使用频率去掉班级查询条件 |
|
|
|
//strSql.Append(@"(select teachclassno,classroomno,count(1) as usecount from ArrangeLessonTerm t where 1=1 "); |
|
|
|
strSql.Append(@"(select classroomno,count(1) as usecount from ArrangeLessonTerm t where 1=1 "); |
|
|
|
if (!queryParam["StartTime"].IsEmpty()) |
|
|
|
{ |
|
|
|
strSql.Append(" and t.LessonDate >= '"+ queryParam["StartTime"] + "' "); |
|
|
|
strSql.Append(" and t.LessonDate >= '" + queryParam["StartTime"] + "' "); |
|
|
|
} |
|
|
|
if (!queryParam["EndTime"].IsEmpty()) |
|
|
|
{ |
|
|
|
strSql.Append(" and t.LessonDate <= '" + queryParam["EndTime"] + "' "); |
|
|
|
} |
|
|
|
strSql.Append(@" group by teachclassno,classroomno) a "); |
|
|
|
//教室使用频率去掉班级查询条件 |
|
|
|
//strSql.Append(@" group by teachclassno,classroomno) a "); |
|
|
|
strSql.Append(@" group by classroomno) a "); |
|
|
|
strSql.Append(@"left join "); |
|
|
|
strSql.Append(@"(select r.classroomno,r.classroomname,b.classroombuildingno,b.classroombuildingname from CLASSROOMINFO r "); |
|
|
|
strSql.Append(@"left join ClassroomBuilding b on b.classroombuildingno=r.classroombuildingno) b on b.classroomno=a.classroomno"); |
|
|
|