@ -30,6 +30,12 @@ queryByCondition
@if (!isEmpty(universitiesCollegesId)){
and t.universities_colleges_id =#universitiesCollegesId#
@}
@if (!isEmpty(universityFacultyId)){
and t.university_faculty_id =#universityFacultyId#
@}
@if (!isEmpty(universitySystemId)){
and t.university_system_id =#universitySystemId#
@}
@if (!isEmpty(teacherName)){
and t.teacher_name like #'%'+teacherName+'%'#
@}
@ -133,6 +139,12 @@ getExcelValues
@if (!isEmpty(universitiesCollegesId)){
and t.universities_colleges_id =#universitiesCollegesId#
@}
@if (!isEmpty(universityFacultyId)){
and t.university_faculty_id =#universityFacultyId#
@}
@if (!isEmpty(universitySystemId)){
and t.university_system_id =#universitySystemId#
@}
@if (!isEmpty(teacherName)){
and t.teacher_name like #'%'+teacherName+'%'#
@}
@ -157,6 +169,12 @@ getExcelValues
@if (!isEmpty(universitiesCollegesId)){
and t.universities_colleges_id =#universitiesCollegesId#
@}
@if (!isEmpty(universityFacultyId)){
and t.university_faculty_id =#universityFacultyId#
@}
@if (!isEmpty(universitySystemId)){
and t.university_system_id =#universitySystemId#
@}
@if (!isEmpty(teacherName)){
and t.teacher_name like #'%'+teacherName+'%'#
@}
@ -191,6 +209,12 @@ getExcelValues2Competition
@if (!isEmpty(teacherSn)){
and t.teacher_sn like #'%'+teacherSn+'%'#
@}
@if (!isEmpty(universityFacultyId)){
and t.university_faculty_id =#universityFacultyId#
@}
@if (!isEmpty(universitySystemId)){
and t.university_system_id =#universitySystemId#
@}
@if (!isEmpty(competitionId)){
-- 1只包含参赛评委 2不包含参赛评委
@if (beCompetitionJudge == 1){
@ -208,9 +232,7 @@ getExcelValues2Competition
@}
@}
)
UNION ALL
(
SELECT
a.universities_colleges_name,
@ -231,6 +253,12 @@ getExcelValues2Competition
@if (!isEmpty(teacherSn)){
and t.teacher_sn like #'%'+teacherSn+'%'#
@}
@if (!isEmpty(universityFacultyId)){
and t.university_faculty_id =#universityFacultyId#
@}
@if (!isEmpty(universitySystemId)){
and t.university_system_id =#universitySystemId#
@}
@if (!isEmpty(competitionId)){
-- 1只包含参赛评委 2不包含参赛评委
@if (beCompetitionJudge == 1){
@ -298,6 +326,12 @@ getTeacherValues
@if (!isEmpty(userId)){
and t.user_id =#userId#
@}
@if (!isEmpty(universityFacultyId)){
and t.university_faculty_id =#universityFacultyId#
@}
@if (!isEmpty(universitySystemId)){
and t.university_system_id =#universitySystemId#
@}
getIdsByQuery
@ -356,14 +390,13 @@ getTeacherLog
getStatisticsLog
===
SELECT
TRIM(REPLACE(t.application_name,'子应用','')) platform,
a.teacher_count,a.teacher_online_count,
b.student_count,b.student_online_count
FROM resources_application t
LEFT JOIN (
SELECT t.platform,COUNT(t.teacher_id) teacher_count,SUM(CASE WHEN t.last_operate_time > date_add(NOW(), interval -1 hour) THEN 1 ELSE 0 END)teacher_online_count FROM
(
SELECT
@ -386,11 +419,8 @@ getStatisticsLog
WHERE b.resources_application_id > 0
)t GROUP BY t.teacher_id,t.platform
)t GROUP BY t.platform
)a ON a.platform = TRIM(REPLACE(t.application_name,'子应用',''))
LEFT JOIN (
SELECT t.platform, COUNT(student_id)student_count,SUM(CASE WHEN last_operate_time > date_add(NOW(), interval -1 hour) THEN 1 ELSE 0 END)student_online_count FROM
(
SELECT
@ -420,5 +450,4 @@ getStatisticsLog
WHERE a.params LIKE '%studentEnd\\_%'
)t GROUP BY t.student_id,t.platform
)t GROUP BY t.platform
)b ON b.platform = TRIM(REPLACE(t.application_name,'子应用',''))