@ -64,21 +62,30 @@ public interface ExperimentallearningMapper {
voidinsertAttendance(Attendanceattendance);
/**
*获取实验班级信息
*@paramcourseId
*@paramstudentId
*@return
*/
@Select("select ecn.experimentalClassId from experimental_class_ning ecn left join experimental_class_student ecs on ecn.experimentalClassId=ecs.experimentalClassId where\n"+
"ecn.courseId=#{courseId} and ecs.studentId=#{studentId} GROUP BY ecn.experimentalClassId")
@Select("select staffName from staff where staffId =(select staffId from course where courseId=#{courseid})")
StringqueryTeacherName(Integercourseid);
@Select("select name,userAvatars from experimental_class_ning ecs left join user u on ecs.userId=u.userId where ecs.experimentalClassId=#{experimentalClassId}")
@Select("select studentName from student where FIND_IN_SET(#{courseId},courseId) > 0 ")
List<Student>queryStudentName(IntegercourseId);
@Select("select name,userAvatars from user u left join student s on (u.phone=s.phone and u.uniqueIdentificationAccount=s.uniqueIdentificationAccount) left join experimental_class_student ecs "+
" on s.studentId=ecs.studentId where ecs.experimentalClassId=#{experimentalClassId} GROUP BY u.userId")
@ -107,4 +114,15 @@ public interface ExperimentallearningMapper {
*/
@Select("select studentId from record where assesmentId=#{assesmentId}")
List<Integer>queryStudentId(IntegerassesmentId);
@Select("select c.courseId,c.courseName from course c left join experimental_class_ning ecn on c.courseId=ecn.courseId left join experimental_class_student ecs "+
" on ecn.experimentalClassId=ecs.experimentalClassId where ecn.isdel=0 and c.isdel=0 and ecs.studentId=#{StudentId} GROUP BY c.courseId")
List<Course>queryStudentCourse(IntegerStudentId);
@Select("select DISTINCT hpm.projectId,projectName,isAttendance from hr_project_management hpm left join teacher_project tp on hpm.projectId=tp.projectId "+
" where tp.courseId=#{courseId} and tp.experimentalClassId=#{experimentalClassId} and tp.isOpenProject=0")
// "select projectId,projectName,isExperiment,isAttendance from hr_project_management WHERE isdel=0 and projectPermissions=0 and state=1 " +
// " and systemId in (select systemId FROM hr_course_tc where courseId=#{courseId} GROUP BY systemId)",
// "<if test='isExperiment!=null'> and isExperiment=0</if>",
// "<if test='isAttendance!=null'> and isAttendance=0</if>",
// "</script>"})
@Select("select DISTINCT hpm.projectId,projectName,isOpenProject,isAttendance from hr_project_management hpm left join teacher_project tp on hpm.projectId=tp.projectId "+
" where tp.courseId=#{courseId} and tp.experimentalClassId=#{experimentalClassId}")
@Update("update teacher_project set isOpenProject=#{project.isOpenProject} where courseId=#{courseId} and experimentalClassId=#{experimentalClassId} and projectId=#{project.projectId}")
voidupdateIsExperiment(CourseAndProjectVovo);
/**
*修改是否开启考勤
*@parammanagement
*/
@Update("update hr_project_management set isAttendance=#{isAttendance} where projectId=#{projectId}")
@Update("update teacher_project set isAttendance=#{project.isAttendance} where courseId=#{courseId} and experimentalClassId=#{experimentalClassId} and projectId=#{project.projectId}")
voidupdateIsAttendance(CourseAndProjectVovo);
@Select("select count(*) from hr_course_schedule where courseId=#{courseId}")
IntegergetCourseSchedule(IntegercourseId);
@Select("select DISTINCT tc.projectId from hr_course_tc tc left join hr_project_management pm on tc.projectId=pm.projectId where tc.courseId=#{courseId} and pm.projectPermissions=0 ")
List<Integer>queryProject(IntegercourseId);
@Insert({"<script>",
"insert into teacher_project(courseId,experimentalClassId,projectId) values ",