|
|
|
@ -62,6 +62,35 @@ getStudentByNo
|
|
|
|
|
WHERE
|
|
|
|
|
core_user.CODE = #username#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getStudentByNoOfNet
|
|
|
|
|
===
|
|
|
|
|
SELECT
|
|
|
|
|
core_user.old_id AS userId,
|
|
|
|
|
core_user.NAME AS NAME,
|
|
|
|
|
core_role.NAME AS roleName,
|
|
|
|
|
universities_colleges.old_school_id AS schoolId,
|
|
|
|
|
school_class.class_id AS classId,
|
|
|
|
|
university_system.university_system_id AS majorId,
|
|
|
|
|
university_system.university_system_name AS majorName,
|
|
|
|
|
school_class.class_name AS className,
|
|
|
|
|
universities_colleges.universities_colleges_name AS schoolName,
|
|
|
|
|
university_faculty.university_faculty_id AS collegeId,
|
|
|
|
|
university_faculty.university_faculty_name AS collegeName,
|
|
|
|
|
student.student_id AS studentId
|
|
|
|
|
FROM
|
|
|
|
|
core_user
|
|
|
|
|
JOIN student ON core_user.CODE = student.student_sn
|
|
|
|
|
JOIN universities_colleges ON core_user.ORG_ID = universities_colleges.org_id
|
|
|
|
|
JOIN school_class ON student.class_id = school_class.class_id
|
|
|
|
|
JOIN university_faculty ON school_class.university_faculty_id = university_faculty.university_faculty_id
|
|
|
|
|
JOIN university_system ON school_class.university_system_id = university_system.university_system_id
|
|
|
|
|
JOIN core_user_role ON core_user_role.USER_ID = core_user.ID
|
|
|
|
|
JOIN core_role ON core_user_role.ROLE_ID = core_role.ID
|
|
|
|
|
WHERE
|
|
|
|
|
core_user.CODE = #username#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getTeacherByNo
|
|
|
|
|
===
|
|
|
|
|
SELECT
|
|
|
|
@ -87,6 +116,32 @@ getTeacherByNo
|
|
|
|
|
WHERE
|
|
|
|
|
teacher.teacher_job_number = #username#
|
|
|
|
|
|
|
|
|
|
getTeacherByNoOfNet
|
|
|
|
|
===
|
|
|
|
|
SELECT
|
|
|
|
|
core_user.old_id AS userId,
|
|
|
|
|
core_user.NAME AS NAME,
|
|
|
|
|
core_role.NAME AS roleName,
|
|
|
|
|
universities_colleges.old_school_id AS schoolId,
|
|
|
|
|
university_system.university_system_id AS majorId,
|
|
|
|
|
university_system.university_system_name AS majorName,
|
|
|
|
|
universities_colleges.universities_colleges_name AS schoolName,
|
|
|
|
|
university_faculty.university_faculty_id AS collegeId,
|
|
|
|
|
university_faculty.university_faculty_name AS collegeName,
|
|
|
|
|
teacher.teacher_id AS teacherId
|
|
|
|
|
FROM
|
|
|
|
|
core_user
|
|
|
|
|
JOIN teacher ON core_user.CODE = teacher.teacher_job_number
|
|
|
|
|
JOIN universities_colleges ON core_user.ORG_ID = universities_colleges.org_id
|
|
|
|
|
|
|
|
|
|
JOIN university_faculty ON teacher.university_faculty_id = university_faculty.university_faculty_id
|
|
|
|
|
JOIN university_system ON teacher.university_system_id = university_system.university_system_id
|
|
|
|
|
JOIN core_user_role ON core_user_role.USER_ID = core_user.ID
|
|
|
|
|
JOIN core_role ON core_user_role.ROLE_ID = core_role.ID
|
|
|
|
|
WHERE
|
|
|
|
|
teacher.teacher_job_number = #username#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateUserId
|
|
|
|
|
===
|
|
|
|
|
update core_user set old_Id= #newId# where ID = #oldId#
|
|
|
|
|