修改实验班级详情有关的sql

master
pd 4 years ago
parent bc29cc989e
commit 5d15dde821
  1. 14
      pom.xml
  2. 3
      src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java
  3. 4
      src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java
  4. 2
      src/main/java/com/yipin/liuwanr/mapper/TeacherProjectAndCourseMapper.java

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.yipin</groupId> <groupId>com.yipin</groupId>
@ -149,15 +149,15 @@
</dependency> </dependency>
<!--读取excel文件 --> <!--读取excel文件 -->
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>3.17</version> <version>3.17</version>
</dependency> </dependency>
<!--导出excel文件 --> <!--导出excel文件 -->
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId> <artifactId>poi-ooxml</artifactId>
<version>3.17</version> <version>3.17</version>
</dependency> </dependency>
<!-- mybatis分页插件 --> <!-- mybatis分页插件 -->
<dependency> <dependency>

@ -32,7 +32,8 @@ public interface AssesmentMapper {
* 查询项目权限为考核的项目 * 查询项目权限为考核的项目
* @return * @return
*/ */
@Select("select projectId,projectName,projectPermissions,founder,creationTime from hr_project_management where isdel=0 and projectPermissions=1 AND systemId in (SELECT systemId FROM course WHERE courseId=#{courseId})") @Select("select projectId,projectName,projectPermissions,founder,creationTime from hr_project_management " +
" where isdel=0 and projectPermissions=1 AND systemId in (SELECT systemId FROM course WHERE courseId=#{courseId})")
List<Project_Management> queryGetByAssesmentProject(Integer courseId); List<Project_Management> queryGetByAssesmentProject(Integer courseId);

@ -85,11 +85,11 @@ public interface ExperimentalClassMapper {
*/ */
@Select({"<script>", @Select({"<script>",
"select s.studentId,studentName,studentNumber,gradeName,className from experimental_class_student st,student s,class c,grade g,professional p" "select s.studentId,studentName,studentNumber,gradeName,className from experimental_class_student st,student s,class c,grade g,professional p"
+ "where st.studentId=s.studentId and s.classId=c.classId and c.gradeId=g.gradeId and s.professionalId=p.professionalId and st.experimentalClassId=#{experimentalClassId} ", + " where st.studentId=s.studentId and s.classId=c.classId and c.gradeId=g.gradeId and s.professionalId=p.professionalId and st.experimentalClassId=#{experimentalClassId} ",
" <if test='professionalId!=null'>and stu.professionalId = #{professionalId} </if>", " <if test='professionalId!=null'>and stu.professionalId = #{professionalId} </if>",
" <if test='classId !=null'>and stu.classId = #{classId} </if>", " <if test='classId !=null'>and stu.classId = #{classId} </if>",
" <if test='studentNameNumber !=null'>and (stu.studentNumber like CONCAT('%',#{studentNameNumber},'%') or stu.studentName like CONCAT('%',#{studentNameNumber},'%'))</if>", " <if test='studentNameNumber !=null'>and (stu.studentNumber like CONCAT('%',#{studentNameNumber},'%') or stu.studentName like CONCAT('%',#{studentNameNumber},'%'))</if>",
"GROUP BY stu.studentId", "GROUP BY st.studentId",
"</script> "}) "</script> "})
List<Student> getExperimentalClassDetails(Student student); List<Student> getExperimentalClassDetails(Student student);

@ -31,7 +31,7 @@ public interface TeacherProjectAndCourseMapper {
* @return * @return
*/ */
@Select({"<script>", @Select({"<script>",
"select projectId,projectName,isExperiment,isAttendance from hr_project_management WHERE isdel=0 and projectPermissions=0 and p.state=1", "select projectId,projectName,isExperiment,isAttendance from hr_project_management WHERE isdel=0 and projectPermissions=0 and state=1",
"<if test='isExperiment!=null'> and isExperiment=0</if>", "<if test='isExperiment!=null'> and isExperiment=0</if>",
"<if test='isAttendance!=null'> and isAttendance=0</if>", "<if test='isAttendance!=null'> and isAttendance=0</if>",
"<foreach collection='systemIds' item='systemId' open='and systemId in(' separator=',' close=')'>" + "#{systemId} " + "</foreach> ", "<foreach collection='systemIds' item='systemId' open='and systemId in(' separator=',' close=')'>" + "#{systemId} " + "</foreach> ",

Loading…
Cancel
Save