mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
增加edu模块
This commit is contained in:
parent
9c74df5d37
commit
485b05c263
8
pom.xml
8
pom.xml
@ -180,6 +180,13 @@
|
||||
<version>${ruoyi-vue-plus.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- edu模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-edu</artifactId>
|
||||
<version>${ruoyi-vue-plus.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
@ -191,6 +198,7 @@
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>ruoyi-demo</module>
|
||||
<module>ruoyi-edu</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
||||
@ -1,89 +1,95 @@
|
||||
<?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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi-vue-plus</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>${ruoyi-vue-plus.version}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-admin</artifactId>
|
||||
|
||||
<description>
|
||||
web服务入口
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 定时任务-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-quartz</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- demo模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-demo</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
<?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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi-vue-plus</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>${ruoyi-vue-plus.version}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-admin</artifactId>
|
||||
|
||||
<description>
|
||||
web服务入口
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 定时任务-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-quartz</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- demo模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-demo</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- edu模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-edu</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
28
ruoyi-edu/pom.xml
Normal file
28
ruoyi-edu/pom.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi-vue-plus</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>${ruoyi-vue-plus.version}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-edu</artifactId>
|
||||
|
||||
<description>
|
||||
edu模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
40
ruoyi-edu/src/main/java/com/ruoyi/edu/bo/EduExamAddBo.java
Normal file
40
ruoyi-edu/src/main/java/com/ruoyi/edu/bo/EduExamAddBo.java
Normal file
@ -0,0 +1,40 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 考试信息添加对象 edu_exam
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("考试信息添加对象")
|
||||
public class EduExamAddBo {
|
||||
|
||||
/** 考试编号 */
|
||||
@ApiModelProperty("考试编号")
|
||||
@NotBlank(message = "考试编号不能为空")
|
||||
private String examNo;
|
||||
/** 考试名称 */
|
||||
@ApiModelProperty("考试名称")
|
||||
@NotBlank(message = "考试名称不能为空")
|
||||
private String examName;
|
||||
/** 考试简称 */
|
||||
@ApiModelProperty("考试简称")
|
||||
private String examShortName;
|
||||
/** 考试日期 */
|
||||
@ApiModelProperty("考试日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@NotNull(message = "考试日期不能为空")
|
||||
private Date examDate;
|
||||
}
|
||||
47
ruoyi-edu/src/main/java/com/ruoyi/edu/bo/EduExamEditBo.java
Normal file
47
ruoyi-edu/src/main/java/com/ruoyi/edu/bo/EduExamEditBo.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 考试信息编辑对象 edu_exam
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("考试信息编辑对象")
|
||||
public class EduExamEditBo {
|
||||
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
private Long id;
|
||||
|
||||
/** 考试编号 */
|
||||
@ApiModelProperty("考试编号")
|
||||
@NotBlank(message = "考试编号不能为空")
|
||||
private String examNo;
|
||||
|
||||
/** 考试名称 */
|
||||
@ApiModelProperty("考试名称")
|
||||
@NotBlank(message = "考试名称不能为空")
|
||||
private String examName;
|
||||
|
||||
/** 考试简称 */
|
||||
@ApiModelProperty("考试简称")
|
||||
private String examShortName;
|
||||
|
||||
/** 考试日期 */
|
||||
@ApiModelProperty("考试日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@NotNull(message = "考试日期不能为空")
|
||||
private Date examDate;
|
||||
}
|
||||
54
ruoyi-edu/src/main/java/com/ruoyi/edu/bo/EduExamQueryBo.java
Normal file
54
ruoyi-edu/src/main/java/com/ruoyi/edu/bo/EduExamQueryBo.java
Normal file
@ -0,0 +1,54 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 考试信息分页查询对象 edu_exam
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("考试信息分页查询对象")
|
||||
public class EduExamQueryBo extends BaseEntity {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
/** 排序列 */
|
||||
@ApiModelProperty("排序列")
|
||||
private String orderByColumn;
|
||||
/** 排序的方向desc或者asc */
|
||||
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||
private String isAsc;
|
||||
|
||||
|
||||
/** 考试编号 */
|
||||
@ApiModelProperty("考试编号")
|
||||
private String examNo;
|
||||
/** 考试名称 */
|
||||
@ApiModelProperty("考试名称")
|
||||
private String examName;
|
||||
/** 考试简称 */
|
||||
@ApiModelProperty("考试简称")
|
||||
private String examShortName;
|
||||
/** 考试日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("考试日期")
|
||||
private Date examDate;
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 学生信息添加对象 edu_student
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生信息添加对象")
|
||||
public class EduStudentAddBo {
|
||||
|
||||
/** 身份证号 */
|
||||
@ApiModelProperty("身份证号")
|
||||
@NotBlank(message = "身份证号不能为空")
|
||||
private String idCardNo;
|
||||
/** 学生姓名 */
|
||||
@ApiModelProperty("学生姓名")
|
||||
@NotBlank(message = "学生姓名不能为空")
|
||||
private String studentName;
|
||||
/** 年级 */
|
||||
@ApiModelProperty("年级")
|
||||
private String currentGrade;
|
||||
/** 班级 */
|
||||
@ApiModelProperty("班级")
|
||||
private String currentClass;
|
||||
/** 学校 */
|
||||
@ApiModelProperty("学校")
|
||||
private String currentSchool;
|
||||
/** 手机号 */
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
/** 父亲手机 */
|
||||
@ApiModelProperty("父亲手机")
|
||||
private String fatherMobile;
|
||||
/** 母亲手机 */
|
||||
@ApiModelProperty("母亲手机")
|
||||
private String motherMobile;
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
/**
|
||||
* 学生信息编辑对象 edu_student
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生信息编辑对象")
|
||||
public class EduStudentEditBo {
|
||||
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
private Long id;
|
||||
|
||||
/** 身份证号 */
|
||||
@ApiModelProperty("身份证号")
|
||||
@NotBlank(message = "身份证号不能为空")
|
||||
private String idCardNo;
|
||||
|
||||
/** 学生姓名 */
|
||||
@ApiModelProperty("学生姓名")
|
||||
@NotBlank(message = "学生姓名不能为空")
|
||||
private String studentName;
|
||||
|
||||
/** 年级 */
|
||||
@ApiModelProperty("年级")
|
||||
private String currentGrade;
|
||||
|
||||
/** 班级 */
|
||||
@ApiModelProperty("班级")
|
||||
private String currentClass;
|
||||
|
||||
/** 学校 */
|
||||
@ApiModelProperty("学校")
|
||||
private String currentSchool;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
/** 父亲手机 */
|
||||
@ApiModelProperty("父亲手机")
|
||||
private String fatherMobile;
|
||||
|
||||
/** 母亲手机 */
|
||||
@ApiModelProperty("母亲手机")
|
||||
private String motherMobile;
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import com.ruoyi.edu.domain.EduStudent;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生考试信息添加对象 edu_student_exam
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生考试信息添加对象")
|
||||
public class EduStudentExamAddBo {
|
||||
|
||||
/** 学生id */
|
||||
@ApiModelProperty("学生id")
|
||||
@NotNull(message = "学生id不能为空")
|
||||
private Long studentId;
|
||||
/** 考试id */
|
||||
@ApiModelProperty("考试id")
|
||||
@NotNull(message = "考试id不能为空")
|
||||
private Long examId;
|
||||
/** 语文分数 */
|
||||
@ApiModelProperty("语文分数")
|
||||
private BigDecimal chineseScore;
|
||||
/** 数学分数 */
|
||||
@ApiModelProperty("数学分数")
|
||||
private BigDecimal mathScore;
|
||||
/** 英语分数 */
|
||||
@ApiModelProperty("英语分数")
|
||||
private BigDecimal englishScore;
|
||||
/** 化学分数 */
|
||||
@ApiModelProperty("化学分数")
|
||||
private BigDecimal chemistryScore;
|
||||
/** 物理分数 */
|
||||
@ApiModelProperty("物理分数")
|
||||
private BigDecimal physicsScore;
|
||||
/** 生物分数 */
|
||||
@ApiModelProperty("生物分数")
|
||||
private BigDecimal biologyScore;
|
||||
/** 政治分数 */
|
||||
@ApiModelProperty("政治分数")
|
||||
private BigDecimal politicsScore;
|
||||
/** 历史分数 */
|
||||
@ApiModelProperty("历史分数")
|
||||
private BigDecimal historyScore;
|
||||
/** 地理分数 */
|
||||
@ApiModelProperty("地理分数")
|
||||
private BigDecimal geographyScore;
|
||||
/** 思想品德分数 */
|
||||
@ApiModelProperty("思想品德分数")
|
||||
private BigDecimal ethicScore;
|
||||
/** 班级排名 */
|
||||
@ApiModelProperty("班级排名")
|
||||
private Long classRank;
|
||||
/** 级部排名 */
|
||||
@ApiModelProperty("级部排名")
|
||||
private Long gradeRank;
|
||||
|
||||
/** 学生信息信息 */
|
||||
@ApiModelProperty("学生信息")
|
||||
private List<EduStudent> eduStudentList;
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import com.ruoyi.edu.domain.EduStudent;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生考试信息编辑对象 edu_student_exam
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生考试信息编辑对象")
|
||||
public class EduStudentExamEditBo {
|
||||
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
private Long id;
|
||||
|
||||
/** 学生id */
|
||||
@ApiModelProperty("学生id")
|
||||
@NotNull(message = "学生id不能为空")
|
||||
private Long studentId;
|
||||
|
||||
/** 考试id */
|
||||
@ApiModelProperty("考试id")
|
||||
@NotNull(message = "考试id不能为空")
|
||||
private Long examId;
|
||||
|
||||
/** 语文分数 */
|
||||
@ApiModelProperty("语文分数")
|
||||
private BigDecimal chineseScore;
|
||||
|
||||
/** 数学分数 */
|
||||
@ApiModelProperty("数学分数")
|
||||
private BigDecimal mathScore;
|
||||
|
||||
/** 英语分数 */
|
||||
@ApiModelProperty("英语分数")
|
||||
private BigDecimal englishScore;
|
||||
|
||||
/** 化学分数 */
|
||||
@ApiModelProperty("化学分数")
|
||||
private BigDecimal chemistryScore;
|
||||
|
||||
/** 物理分数 */
|
||||
@ApiModelProperty("物理分数")
|
||||
private BigDecimal physicsScore;
|
||||
|
||||
/** 生物分数 */
|
||||
@ApiModelProperty("生物分数")
|
||||
private BigDecimal biologyScore;
|
||||
|
||||
/** 政治分数 */
|
||||
@ApiModelProperty("政治分数")
|
||||
private BigDecimal politicsScore;
|
||||
|
||||
/** 历史分数 */
|
||||
@ApiModelProperty("历史分数")
|
||||
private BigDecimal historyScore;
|
||||
|
||||
/** 地理分数 */
|
||||
@ApiModelProperty("地理分数")
|
||||
private BigDecimal geographyScore;
|
||||
|
||||
/** 思想品德分数 */
|
||||
@ApiModelProperty("思想品德分数")
|
||||
private BigDecimal ethicScore;
|
||||
|
||||
/** 班级排名 */
|
||||
@ApiModelProperty("班级排名")
|
||||
private Long classRank;
|
||||
|
||||
/** 级部排名 */
|
||||
@ApiModelProperty("级部排名")
|
||||
private Long gradeRank;
|
||||
|
||||
/** 学生信息信息 */
|
||||
@ApiModelProperty("学生信息")
|
||||
private List<EduStudent> eduStudentList;
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 学生考试信息分页查询对象 edu_student_exam
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("学生考试信息分页查询对象")
|
||||
public class EduStudentExamQueryBo extends BaseEntity {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
/** 排序列 */
|
||||
@ApiModelProperty("排序列")
|
||||
private String orderByColumn;
|
||||
/** 排序的方向desc或者asc */
|
||||
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||
private String isAsc;
|
||||
|
||||
|
||||
/** 学生id */
|
||||
@ApiModelProperty("学生id")
|
||||
private Long studentId;
|
||||
/** 考试id */
|
||||
@ApiModelProperty("考试id")
|
||||
private Long examId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.ruoyi.edu.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 学生信息分页查询对象 edu_student
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("学生信息分页查询对象")
|
||||
public class EduStudentQueryBo extends BaseEntity {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
/** 排序列 */
|
||||
@ApiModelProperty("排序列")
|
||||
private String orderByColumn;
|
||||
/** 排序的方向desc或者asc */
|
||||
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||
private String isAsc;
|
||||
|
||||
|
||||
/** 身份证号 */
|
||||
@ApiModelProperty("身份证号")
|
||||
private String idCardNo;
|
||||
/** 学生姓名 */
|
||||
@ApiModelProperty("学生姓名")
|
||||
private String studentName;
|
||||
/** 年级 */
|
||||
@ApiModelProperty("年级")
|
||||
private String currentGrade;
|
||||
/** 班级 */
|
||||
@ApiModelProperty("班级")
|
||||
private String currentClass;
|
||||
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.ruoyi.edu.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.edu.vo.EduExamVo;
|
||||
import com.ruoyi.edu.bo.EduExamQueryBo;
|
||||
import com.ruoyi.edu.bo.EduExamAddBo;
|
||||
import com.ruoyi.edu.bo.EduExamEditBo;
|
||||
import com.ruoyi.edu.service.IEduExamService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 考试信息Controller
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Api(value = "考试信息控制器", tags = {"考试信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/edu/exam")
|
||||
public class EduExamController extends BaseController {
|
||||
|
||||
private final IEduExamService iEduExamService;
|
||||
|
||||
/**
|
||||
* 查询考试信息列表
|
||||
*/
|
||||
@ApiOperation("查询考试信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('edu:exam:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EduExamVo> list(@Validated EduExamQueryBo bo) {
|
||||
return iEduExamService.queryPageList(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考试信息列表
|
||||
*/
|
||||
@ApiOperation("导出考试信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('edu:exam:export')")
|
||||
@Log(title = "考试信息", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult<EduExamVo> export(@Validated EduExamQueryBo bo) {
|
||||
List<EduExamVo> list = iEduExamService.queryList(bo);
|
||||
ExcelUtil<EduExamVo> util = new ExcelUtil<EduExamVo>(EduExamVo.class);
|
||||
return util.exportExcel(list, "考试信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考试信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取考试信息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:exam:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<EduExamVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iEduExamService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试信息
|
||||
*/
|
||||
@ApiOperation("新增考试信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:exam:add')")
|
||||
@Log(title = "考试信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping()
|
||||
public AjaxResult<Void> add(@Validated @RequestBody EduExamAddBo bo) {
|
||||
return toAjax(iEduExamService.insertByAddBo(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试信息
|
||||
*/
|
||||
@ApiOperation("修改考试信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:exam:edit')")
|
||||
@Log(title = "考试信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> edit(@Validated @RequestBody EduExamEditBo bo) {
|
||||
return toAjax(iEduExamService.updateByEditBo(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试信息
|
||||
*/
|
||||
@ApiOperation("删除考试信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:exam:remove')")
|
||||
@Log(title = "考试信息" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iEduExamService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.ruoyi.edu.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.edu.vo.EduStudentVo;
|
||||
import com.ruoyi.edu.bo.EduStudentQueryBo;
|
||||
import com.ruoyi.edu.bo.EduStudentAddBo;
|
||||
import com.ruoyi.edu.bo.EduStudentEditBo;
|
||||
import com.ruoyi.edu.service.IEduStudentService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 学生信息Controller
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
@Api(value = "学生信息控制器", tags = {"学生信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/edu/student")
|
||||
public class EduStudentController extends BaseController {
|
||||
|
||||
private final IEduStudentService iEduStudentService;
|
||||
|
||||
/**
|
||||
* 查询学生信息列表
|
||||
*/
|
||||
@ApiOperation("查询学生信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('edu:student:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EduStudentVo> list(@Validated EduStudentQueryBo bo) {
|
||||
return iEduStudentService.queryPageList(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生信息列表
|
||||
*/
|
||||
@ApiOperation("导出学生信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('edu:student:export')")
|
||||
@Log(title = "学生信息", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult<EduStudentVo> export(@Validated EduStudentQueryBo bo) {
|
||||
List<EduStudentVo> list = iEduStudentService.queryList(bo);
|
||||
ExcelUtil<EduStudentVo> util = new ExcelUtil<EduStudentVo>(EduStudentVo.class);
|
||||
return util.exportExcel(list, "学生信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取学生信息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:student:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<EduStudentVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iEduStudentService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生信息
|
||||
*/
|
||||
@ApiOperation("新增学生信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:student:add')")
|
||||
@Log(title = "学生信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping()
|
||||
public AjaxResult<Void> add(@Validated @RequestBody EduStudentAddBo bo) {
|
||||
return toAjax(iEduStudentService.insertByAddBo(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生信息
|
||||
*/
|
||||
@ApiOperation("修改学生信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:student:edit')")
|
||||
@Log(title = "学生信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> edit(@Validated @RequestBody EduStudentEditBo bo) {
|
||||
return toAjax(iEduStudentService.updateByEditBo(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生信息
|
||||
*/
|
||||
@ApiOperation("删除学生信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:student:remove')")
|
||||
@Log(title = "学生信息" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iEduStudentService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.ruoyi.edu.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.edu.vo.EduStudentExamVo;
|
||||
import com.ruoyi.edu.bo.EduStudentExamQueryBo;
|
||||
import com.ruoyi.edu.bo.EduStudentExamAddBo;
|
||||
import com.ruoyi.edu.bo.EduStudentExamEditBo;
|
||||
import com.ruoyi.edu.service.IEduStudentExamService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 学生考试信息Controller
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Api(value = "学生考试信息控制器", tags = {"学生考试信息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/edu/score")
|
||||
public class EduStudentExamController extends BaseController {
|
||||
|
||||
private final IEduStudentExamService iEduStudentExamService;
|
||||
|
||||
/**
|
||||
* 查询学生考试信息列表
|
||||
*/
|
||||
@ApiOperation("查询学生考试信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('edu:score:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EduStudentExamVo> list(@Validated EduStudentExamQueryBo bo) {
|
||||
return iEduStudentExamService.queryPageList(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生考试信息列表
|
||||
*/
|
||||
@ApiOperation("导出学生考试信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('edu:score:export')")
|
||||
@Log(title = "学生考试信息", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult<EduStudentExamVo> export(@Validated EduStudentExamQueryBo bo) {
|
||||
List<EduStudentExamVo> list = iEduStudentExamService.queryList(bo);
|
||||
ExcelUtil<EduStudentExamVo> util = new ExcelUtil<EduStudentExamVo>(EduStudentExamVo.class);
|
||||
return util.exportExcel(list, "学生考试信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生考试信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取学生考试信息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:score:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<EduStudentExamVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iEduStudentExamService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生考试信息
|
||||
*/
|
||||
@ApiOperation("新增学生考试信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:score:add')")
|
||||
@Log(title = "学生考试信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping()
|
||||
public AjaxResult<Void> add(@Validated @RequestBody EduStudentExamAddBo bo) {
|
||||
return toAjax(iEduStudentExamService.insertByAddBo(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生考试信息
|
||||
*/
|
||||
@ApiOperation("修改学生考试信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:score:edit')")
|
||||
@Log(title = "学生考试信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> edit(@Validated @RequestBody EduStudentExamEditBo bo) {
|
||||
return toAjax(iEduStudentExamService.updateByEditBo(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生考试信息
|
||||
*/
|
||||
@ApiOperation("删除学生考试信息")
|
||||
@PreAuthorize("@ss.hasPermi('edu:score:remove')")
|
||||
@Log(title = "学生考试信息" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iEduStudentExamService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
59
ruoyi-edu/src/main/java/com/ruoyi/edu/domain/EduExam.java
Normal file
59
ruoyi-edu/src/main/java/com/ruoyi/edu/domain/EduExam.java
Normal file
@ -0,0 +1,59 @@
|
||||
package com.ruoyi.edu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 考试信息对象 edu_exam
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("edu_exam")
|
||||
public class EduExam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** $column.columnComment */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 考试编号 */
|
||||
private String examNo;
|
||||
|
||||
/** 考试名称 */
|
||||
private String examName;
|
||||
|
||||
/** 考试简称 */
|
||||
private String examShortName;
|
||||
|
||||
/** 考试日期 */
|
||||
private Date examDate;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/** 创建人id */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/** 修改时间 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/** 修改人id */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
}
|
||||
71
ruoyi-edu/src/main/java/com/ruoyi/edu/domain/EduStudent.java
Normal file
71
ruoyi-edu/src/main/java/com/ruoyi/edu/domain/EduStudent.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.ruoyi.edu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 学生信息对象 edu_student
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("edu_student")
|
||||
public class EduStudent implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** $column.columnComment */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 身份证号 */
|
||||
private String idCardNo;
|
||||
|
||||
/** 学生姓名 */
|
||||
private String studentName;
|
||||
|
||||
/** 年级 */
|
||||
private String currentGrade;
|
||||
|
||||
/** 班级 */
|
||||
private String currentClass;
|
||||
|
||||
/** 学校 */
|
||||
private String currentSchool;
|
||||
|
||||
/** 手机号 */
|
||||
private String mobile;
|
||||
|
||||
/** 父亲手机 */
|
||||
private String fatherMobile;
|
||||
|
||||
/** 母亲手机 */
|
||||
private String motherMobile;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/** 创建人id */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/** 修改时间 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/** 修改人id */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.edu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 学生考试信息对象 edu_student_exam
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("edu_student_exam")
|
||||
public class EduStudentExam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** $column.columnComment */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 学生id */
|
||||
private Long studentId;
|
||||
|
||||
/** 考试id */
|
||||
private Long examId;
|
||||
|
||||
/** 语文分数 */
|
||||
private BigDecimal chineseScore;
|
||||
|
||||
/** 数学分数 */
|
||||
private BigDecimal mathScore;
|
||||
|
||||
/** 英语分数 */
|
||||
private BigDecimal englishScore;
|
||||
|
||||
/** 化学分数 */
|
||||
private BigDecimal chemistryScore;
|
||||
|
||||
/** 物理分数 */
|
||||
private BigDecimal physicsScore;
|
||||
|
||||
/** 生物分数 */
|
||||
private BigDecimal biologyScore;
|
||||
|
||||
/** 政治分数 */
|
||||
private BigDecimal politicsScore;
|
||||
|
||||
/** 历史分数 */
|
||||
private BigDecimal historyScore;
|
||||
|
||||
/** 地理分数 */
|
||||
private BigDecimal geographyScore;
|
||||
|
||||
/** 思想品德分数 */
|
||||
private BigDecimal ethicScore;
|
||||
|
||||
/** 班级排名 */
|
||||
private Long classRank;
|
||||
|
||||
/** 级部排名 */
|
||||
private Long gradeRank;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/** 创建人id */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/** 修改时间 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/** 修改人id */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.edu.mapper;
|
||||
|
||||
import com.ruoyi.edu.domain.EduExam;
|
||||
import com.ruoyi.common.core.page.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 考试信息Mapper接口
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
public interface EduExamMapper extends BaseMapperPlus<EduExam> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.edu.mapper;
|
||||
|
||||
import com.ruoyi.edu.domain.EduStudentExam;
|
||||
import com.ruoyi.common.core.page.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 学生考试信息Mapper接口
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
public interface EduStudentExamMapper extends BaseMapperPlus<EduStudentExam> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.edu.mapper;
|
||||
|
||||
import com.ruoyi.edu.domain.EduStudent;
|
||||
import com.ruoyi.common.core.page.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 学生信息Mapper接口
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
public interface EduStudentMapper extends BaseMapperPlus<EduStudent> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.ruoyi.edu.service;
|
||||
|
||||
import com.ruoyi.edu.domain.EduExam;
|
||||
import com.ruoyi.edu.vo.EduExamVo;
|
||||
import com.ruoyi.edu.bo.EduExamQueryBo;
|
||||
import com.ruoyi.edu.bo.EduExamAddBo;
|
||||
import com.ruoyi.edu.bo.EduExamEditBo;
|
||||
import com.ruoyi.common.core.page.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考试信息Service接口
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
public interface IEduExamService extends IServicePlus<EduExam> {
|
||||
/**
|
||||
* 查询单个
|
||||
* @return
|
||||
*/
|
||||
EduExamVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
TableDataInfo<EduExamVo> queryPageList(EduExamQueryBo bo);
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<EduExamVo> queryList(EduExamQueryBo bo);
|
||||
|
||||
/**
|
||||
* 根据新增业务对象插入考试信息
|
||||
* @param bo 考试信息新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insertByAddBo(EduExamAddBo bo);
|
||||
|
||||
/**
|
||||
* 根据编辑业务对象修改考试信息
|
||||
* @param bo 考试信息编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean updateByEditBo(EduExamEditBo bo);
|
||||
|
||||
/**
|
||||
* 校验并删除数据
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.ruoyi.edu.service;
|
||||
|
||||
import com.ruoyi.edu.domain.EduStudentExam;
|
||||
import com.ruoyi.edu.vo.EduStudentExamVo;
|
||||
import com.ruoyi.edu.bo.EduStudentExamQueryBo;
|
||||
import com.ruoyi.edu.bo.EduStudentExamAddBo;
|
||||
import com.ruoyi.edu.bo.EduStudentExamEditBo;
|
||||
import com.ruoyi.common.core.page.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生考试信息Service接口
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
public interface IEduStudentExamService extends IServicePlus<EduStudentExam> {
|
||||
/**
|
||||
* 查询单个
|
||||
* @return
|
||||
*/
|
||||
EduStudentExamVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
TableDataInfo<EduStudentExamVo> queryPageList(EduStudentExamQueryBo bo);
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<EduStudentExamVo> queryList(EduStudentExamQueryBo bo);
|
||||
|
||||
/**
|
||||
* 根据新增业务对象插入学生考试信息
|
||||
* @param bo 学生考试信息新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insertByAddBo(EduStudentExamAddBo bo);
|
||||
|
||||
/**
|
||||
* 根据编辑业务对象修改学生考试信息
|
||||
* @param bo 学生考试信息编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean updateByEditBo(EduStudentExamEditBo bo);
|
||||
|
||||
/**
|
||||
* 校验并删除数据
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.ruoyi.edu.service;
|
||||
|
||||
import com.ruoyi.edu.domain.EduStudent;
|
||||
import com.ruoyi.edu.vo.EduStudentVo;
|
||||
import com.ruoyi.edu.bo.EduStudentQueryBo;
|
||||
import com.ruoyi.edu.bo.EduStudentAddBo;
|
||||
import com.ruoyi.edu.bo.EduStudentEditBo;
|
||||
import com.ruoyi.common.core.page.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生信息Service接口
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
public interface IEduStudentService extends IServicePlus<EduStudent> {
|
||||
/**
|
||||
* 查询单个
|
||||
* @return
|
||||
*/
|
||||
EduStudentVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
TableDataInfo<EduStudentVo> queryPageList(EduStudentQueryBo bo);
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<EduStudentVo> queryList(EduStudentQueryBo bo);
|
||||
|
||||
/**
|
||||
* 根据新增业务对象插入学生信息
|
||||
* @param bo 学生信息新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insertByAddBo(EduStudentAddBo bo);
|
||||
|
||||
/**
|
||||
* 根据编辑业务对象修改学生信息
|
||||
* @param bo 学生信息编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean updateByEditBo(EduStudentEditBo bo);
|
||||
|
||||
/**
|
||||
* 校验并删除数据
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.edu.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.core.page.PagePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.edu.bo.EduExamAddBo;
|
||||
import com.ruoyi.edu.bo.EduExamQueryBo;
|
||||
import com.ruoyi.edu.bo.EduExamEditBo;
|
||||
import com.ruoyi.edu.domain.EduExam;
|
||||
import com.ruoyi.edu.mapper.EduExamMapper;
|
||||
import com.ruoyi.edu.vo.EduExamVo;
|
||||
import com.ruoyi.edu.service.IEduExamService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 考试信息Service业务层处理
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Service
|
||||
public class EduExamServiceImpl extends ServiceImpl<EduExamMapper, EduExam> implements IEduExamService {
|
||||
|
||||
@Override
|
||||
public EduExamVo queryById(Long id){
|
||||
return getVoById(id, EduExamVo.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<EduExamVo> queryPageList(EduExamQueryBo bo) {
|
||||
PagePlus<EduExam, EduExamVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo), EduExamVo.class);
|
||||
return PageUtils.buildDataInfo(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EduExamVo> queryList(EduExamQueryBo bo) {
|
||||
return listVo(buildQueryWrapper(bo), EduExamVo.class);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EduExam> buildQueryWrapper(EduExamQueryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EduExam> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getExamNo()), EduExam::getExamNo, bo.getExamNo());
|
||||
lqw.like(StrUtil.isNotBlank(bo.getExamName()), EduExam::getExamName, bo.getExamName());
|
||||
lqw.like(StrUtil.isNotBlank(bo.getExamShortName()), EduExam::getExamShortName, bo.getExamShortName());
|
||||
lqw.eq(bo.getExamDate() != null, EduExam::getExamDate, bo.getExamDate());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByAddBo(EduExamAddBo bo) {
|
||||
EduExam add = BeanUtil.toBean(bo, EduExam.class);
|
||||
validEntityBeforeSave(add);
|
||||
return save(add);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByEditBo(EduExamEditBo bo) {
|
||||
EduExam update = BeanUtil.toBean(bo, EduExam.class);
|
||||
validEntityBeforeSave(update);
|
||||
return updateById(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(EduExam entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
package com.ruoyi.edu.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.core.page.PagePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.edu.bo.EduStudentExamAddBo;
|
||||
import com.ruoyi.edu.bo.EduStudentExamQueryBo;
|
||||
import com.ruoyi.edu.bo.EduStudentExamEditBo;
|
||||
import com.ruoyi.edu.domain.EduStudentExam;
|
||||
import com.ruoyi.edu.mapper.EduStudentExamMapper;
|
||||
import com.ruoyi.edu.vo.EduStudentExamVo;
|
||||
import com.ruoyi.edu.service.IEduStudentExamService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 学生考试信息Service业务层处理
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Service
|
||||
public class EduStudentExamServiceImpl extends ServiceImpl<EduStudentExamMapper, EduStudentExam> implements IEduStudentExamService {
|
||||
|
||||
@Override
|
||||
public EduStudentExamVo queryById(Long id){
|
||||
return getVoById(id, EduStudentExamVo.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<EduStudentExamVo> queryPageList(EduStudentExamQueryBo bo) {
|
||||
PagePlus<EduStudentExam, EduStudentExamVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo), EduStudentExamVo.class);
|
||||
return PageUtils.buildDataInfo(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EduStudentExamVo> queryList(EduStudentExamQueryBo bo) {
|
||||
return listVo(buildQueryWrapper(bo), EduStudentExamVo.class);
|
||||
}
|
||||
|
||||
private Wrapper<EduStudentExam> buildQueryWrapper(EduStudentExamQueryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EduStudentExam> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getStudentId() != null, EduStudentExam::getStudentId, bo.getStudentId());
|
||||
lqw.eq(bo.getExamId() != null, EduStudentExam::getExamId, bo.getExamId());
|
||||
|
||||
QueryWrapper<EduStudentExam> qw = new QueryWrapper<>();
|
||||
// qw.eq("b.id", 2);
|
||||
return qw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByAddBo(EduStudentExamAddBo bo) {
|
||||
EduStudentExam add = BeanUtil.toBean(bo, EduStudentExam.class);
|
||||
validEntityBeforeSave(add);
|
||||
return save(add);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByEditBo(EduStudentExamEditBo bo) {
|
||||
EduStudentExam update = BeanUtil.toBean(bo, EduStudentExam.class);
|
||||
validEntityBeforeSave(update);
|
||||
return updateById(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(EduStudentExam entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.edu.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.core.page.PagePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.edu.bo.EduStudentAddBo;
|
||||
import com.ruoyi.edu.bo.EduStudentQueryBo;
|
||||
import com.ruoyi.edu.bo.EduStudentEditBo;
|
||||
import com.ruoyi.edu.domain.EduStudent;
|
||||
import com.ruoyi.edu.mapper.EduStudentMapper;
|
||||
import com.ruoyi.edu.vo.EduStudentVo;
|
||||
import com.ruoyi.edu.service.IEduStudentService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 学生信息Service业务层处理
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
@Service
|
||||
public class EduStudentServiceImpl extends ServiceImpl<EduStudentMapper, EduStudent> implements IEduStudentService {
|
||||
|
||||
@Override
|
||||
public EduStudentVo queryById(Long id){
|
||||
return getVoById(id, EduStudentVo.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<EduStudentVo> queryPageList(EduStudentQueryBo bo) {
|
||||
PagePlus<EduStudent, EduStudentVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo), EduStudentVo.class);
|
||||
return PageUtils.buildDataInfo(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EduStudentVo> queryList(EduStudentQueryBo bo) {
|
||||
return listVo(buildQueryWrapper(bo), EduStudentVo.class);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EduStudent> buildQueryWrapper(EduStudentQueryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EduStudent> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getIdCardNo()), EduStudent::getIdCardNo, bo.getIdCardNo());
|
||||
lqw.like(StrUtil.isNotBlank(bo.getStudentName()), EduStudent::getStudentName, bo.getStudentName());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getCurrentGrade()), EduStudent::getCurrentGrade, bo.getCurrentGrade());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getCurrentClass()), EduStudent::getCurrentClass, bo.getCurrentClass());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByAddBo(EduStudentAddBo bo) {
|
||||
EduStudent add = BeanUtil.toBean(bo, EduStudent.class);
|
||||
validEntityBeforeSave(add);
|
||||
return save(add);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByEditBo(EduStudentEditBo bo) {
|
||||
EduStudent update = BeanUtil.toBean(bo, EduStudent.class);
|
||||
validEntityBeforeSave(update);
|
||||
return updateById(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(EduStudent entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
}
|
||||
47
ruoyi-edu/src/main/java/com/ruoyi/edu/vo/EduExamVo.java
Normal file
47
ruoyi-edu/src/main/java/com/ruoyi/edu/vo/EduExamVo.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.ruoyi.edu.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 考试信息视图对象 mall_package
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("考试信息视图对象")
|
||||
public class EduExamVo {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $pkColumn.columnComment */
|
||||
@ApiModelProperty("$pkColumn.columnComment")
|
||||
private Long id;
|
||||
|
||||
/** 考试编号 */
|
||||
@Excel(name = "考试编号")
|
||||
@ApiModelProperty("考试编号")
|
||||
private String examNo;
|
||||
/** 考试名称 */
|
||||
@Excel(name = "考试名称")
|
||||
@ApiModelProperty("考试名称")
|
||||
private String examName;
|
||||
/** 考试简称 */
|
||||
@Excel(name = "考试简称")
|
||||
@ApiModelProperty("考试简称")
|
||||
private String examShortName;
|
||||
/** 考试日期 */
|
||||
@Excel(name = "考试日期" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("考试日期")
|
||||
private Date examDate;
|
||||
|
||||
}
|
||||
110
ruoyi-edu/src/main/java/com/ruoyi/edu/vo/EduStudentExamVo.java
Normal file
110
ruoyi-edu/src/main/java/com/ruoyi/edu/vo/EduStudentExamVo.java
Normal file
@ -0,0 +1,110 @@
|
||||
package com.ruoyi.edu.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 学生考试信息视图对象 mall_package
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生考试信息视图对象")
|
||||
public class EduStudentExamVo {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $pkColumn.columnComment */
|
||||
@ApiModelProperty("$pkColumn.columnComment")
|
||||
private Long id;
|
||||
|
||||
/** 语文分数 */
|
||||
@Excel(name = "语文分数")
|
||||
@ApiModelProperty("语文分数")
|
||||
private BigDecimal chineseScore;
|
||||
/** 数学分数 */
|
||||
@Excel(name = "数学分数")
|
||||
@ApiModelProperty("数学分数")
|
||||
private BigDecimal mathScore;
|
||||
/** 英语分数 */
|
||||
@Excel(name = "英语分数")
|
||||
@ApiModelProperty("英语分数")
|
||||
private BigDecimal englishScore;
|
||||
/** 化学分数 */
|
||||
@Excel(name = "化学分数")
|
||||
@ApiModelProperty("化学分数")
|
||||
private BigDecimal chemistryScore;
|
||||
/** 物理分数 */
|
||||
@Excel(name = "物理分数")
|
||||
@ApiModelProperty("物理分数")
|
||||
private BigDecimal physicsScore;
|
||||
/** 生物分数 */
|
||||
@Excel(name = "生物分数")
|
||||
@ApiModelProperty("生物分数")
|
||||
private BigDecimal biologyScore;
|
||||
/** 政治分数 */
|
||||
@Excel(name = "政治分数")
|
||||
@ApiModelProperty("政治分数")
|
||||
private BigDecimal politicsScore;
|
||||
/** 历史分数 */
|
||||
@Excel(name = "历史分数")
|
||||
@ApiModelProperty("历史分数")
|
||||
private BigDecimal historyScore;
|
||||
/** 地理分数 */
|
||||
@Excel(name = "地理分数")
|
||||
@ApiModelProperty("地理分数")
|
||||
private BigDecimal geographyScore;
|
||||
/** 思想品德分数 */
|
||||
@Excel(name = "思想品德分数")
|
||||
@ApiModelProperty("思想品德分数")
|
||||
private BigDecimal ethicScore;
|
||||
/** 班级排名 */
|
||||
@Excel(name = "班级排名")
|
||||
@ApiModelProperty("班级排名")
|
||||
private Long classRank;
|
||||
/** 级部排名 */
|
||||
@Excel(name = "级部排名")
|
||||
@ApiModelProperty("级部排名")
|
||||
private Long gradeRank;
|
||||
|
||||
// 补充主表字段
|
||||
private Long studentId;
|
||||
// 关联表 eduStudent 字段
|
||||
@Excel(name = "身份证号")
|
||||
private String eduStudentIdCardNo;
|
||||
@Excel(name = "班级")
|
||||
private String eduStudentCurrentClass;
|
||||
@Excel(name = "年级")
|
||||
private String eduStudentCurrentGrade;
|
||||
@Excel(name = "学生姓名")
|
||||
private String eduStudentStudentName;
|
||||
@Excel(name = "手机号")
|
||||
private String eduStudentMobile;
|
||||
@Excel(name = "父亲手机")
|
||||
private String eduStudentFatherMobile;
|
||||
@Excel(name = "母亲手机")
|
||||
private String eduStudentMotherMobile;
|
||||
@Excel(name = "学校")
|
||||
private String eduStudentCurrentSchool;
|
||||
|
||||
// 补充主表字段
|
||||
private Long examId;
|
||||
// 关联表 eduExam 字段
|
||||
@Excel(name = "考试日期" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date eduExamExamDate;
|
||||
@Excel(name = "考试编号")
|
||||
private String eduExamExamNo;
|
||||
@Excel(name = "考试名称")
|
||||
private String eduExamExamName;
|
||||
|
||||
|
||||
}
|
||||
60
ruoyi-edu/src/main/java/com/ruoyi/edu/vo/EduStudentVo.java
Normal file
60
ruoyi-edu/src/main/java/com/ruoyi/edu/vo/EduStudentVo.java
Normal file
@ -0,0 +1,60 @@
|
||||
package com.ruoyi.edu.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 学生信息视图对象 mall_package
|
||||
*
|
||||
* @author keyleaf
|
||||
* @date 2021-05-22
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生信息视图对象")
|
||||
public class EduStudentVo {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $pkColumn.columnComment */
|
||||
@ApiModelProperty("$pkColumn.columnComment")
|
||||
private Long id;
|
||||
|
||||
/** 身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
@ApiModelProperty("身份证号")
|
||||
private String idCardNo;
|
||||
/** 学生姓名 */
|
||||
@Excel(name = "学生姓名")
|
||||
@ApiModelProperty("学生姓名")
|
||||
private String studentName;
|
||||
/** 年级 */
|
||||
@Excel(name = "年级")
|
||||
@ApiModelProperty("年级")
|
||||
private String currentGrade;
|
||||
/** 班级 */
|
||||
@Excel(name = "班级")
|
||||
@ApiModelProperty("班级")
|
||||
private String currentClass;
|
||||
/** 学校 */
|
||||
@Excel(name = "学校")
|
||||
@ApiModelProperty("学校")
|
||||
private String currentSchool;
|
||||
/** 手机号 */
|
||||
@Excel(name = "手机号")
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
/** 父亲手机 */
|
||||
@Excel(name = "父亲手机")
|
||||
@ApiModelProperty("父亲手机")
|
||||
private String fatherMobile;
|
||||
/** 母亲手机 */
|
||||
@Excel(name = "母亲手机")
|
||||
@ApiModelProperty("母亲手机")
|
||||
private String motherMobile;
|
||||
|
||||
}
|
||||
20
ruoyi-edu/src/main/resources/mapper/edu/EduExamMapper.xml
Normal file
20
ruoyi-edu/src/main/resources/mapper/edu/EduExamMapper.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.edu.mapper.EduExamMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.edu.domain.EduExam" id="EduExamResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="examNo" column="exam_no"/>
|
||||
<result property="examName" column="exam_name"/>
|
||||
<result property="examShortName" column="exam_short_name"/>
|
||||
<result property="examDate" column="exam_date"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
108
ruoyi-edu/src/main/resources/mapper/edu/EduStudentExamMapper.xml
Normal file
108
ruoyi-edu/src/main/resources/mapper/edu/EduStudentExamMapper.xml
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.edu.mapper.EduStudentExamMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.edu.domain.EduStudentExam" id="EduStudentExamResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="studentId" column="student_id"/>
|
||||
<result property="examId" column="exam_id"/>
|
||||
<result property="chineseScore" column="chinese_score"/>
|
||||
<result property="mathScore" column="math_score"/>
|
||||
<result property="englishScore" column="english_score"/>
|
||||
<result property="chemistryScore" column="chemistry_score"/>
|
||||
<result property="physicsScore" column="physics_score"/>
|
||||
<result property="biologyScore" column="biology_score"/>
|
||||
<result property="politicsScore" column="politics_score"/>
|
||||
<result property="historyScore" column="history_score"/>
|
||||
<result property="geographyScore" column="geography_score"/>
|
||||
<result property="ethicScore" column="ethic_score"/>
|
||||
<result property="classRank" column="class_rank"/>
|
||||
<result property="gradeRank" column="grade_rank"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="Map" id="JoinResult" extends="EduStudentExamResult">
|
||||
<!-- eduStudent -->
|
||||
<result property="eduStudentIdCardNo" column="edu_student_id_card_no"/>
|
||||
<result property="eduStudentCurrentClass" column="edu_student_current_class"/>
|
||||
<result property="eduStudentCurrentGrade" column="edu_student_current_grade"/>
|
||||
<result property="eduStudentStudentName" column="edu_student_student_name"/>
|
||||
<result property="eduStudentMobile" column="edu_student_mobile"/>
|
||||
<result property="eduStudentFatherMobile" column="edu_student_father_mobile"/>
|
||||
<result property="eduStudentMotherMobile" column="edu_student_mother_mobile"/>
|
||||
<result property="eduStudentCurrentSchool" column="edu_student_current_school"/>
|
||||
<!-- eduExam -->
|
||||
<result property="eduExamExamDate" column="edu_exam_exam_date"/>
|
||||
<result property="eduExamExamNo" column="edu_exam_exam_no"/>
|
||||
<result property="eduExamExamName" column="edu_exam_exam_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
select
|
||||
<!-- 主表 edu_student_exam 字段 -->
|
||||
edu_student_exam.id as id,
|
||||
edu_student_exam.student_id as student_id,
|
||||
edu_student_exam.exam_id as exam_id,
|
||||
edu_student_exam.chinese_score as chinese_score,
|
||||
edu_student_exam.math_score as math_score,
|
||||
edu_student_exam.english_score as english_score,
|
||||
edu_student_exam.chemistry_score as chemistry_score,
|
||||
edu_student_exam.physics_score as physics_score,
|
||||
edu_student_exam.biology_score as biology_score,
|
||||
edu_student_exam.politics_score as politics_score,
|
||||
edu_student_exam.history_score as history_score,
|
||||
edu_student_exam.geography_score as geography_score,
|
||||
edu_student_exam.ethic_score as ethic_score,
|
||||
edu_student_exam.class_rank as class_rank,
|
||||
edu_student_exam.grade_rank as grade_rank,
|
||||
edu_student_exam.create_time as create_time,
|
||||
edu_student_exam.create_by as create_by,
|
||||
edu_student_exam.update_time as update_time,
|
||||
edu_student_exam.update_by as update_by,
|
||||
|
||||
<!-- 关联表 eduStudent 字段 -->
|
||||
edu_student.id_card_no as edu_student_id_card_no,
|
||||
edu_student.current_class as edu_student_current_class,
|
||||
edu_student.current_grade as edu_student_current_grade,
|
||||
edu_student.student_name as edu_student_student_name,
|
||||
edu_student.mobile as edu_student_mobile,
|
||||
edu_student.father_mobile as edu_student_father_mobile,
|
||||
edu_student.mother_mobile as edu_student_mother_mobile,
|
||||
edu_student.current_school as edu_student_current_school,
|
||||
<!-- 关联表 eduExam 字段 -->
|
||||
edu_exam.exam_date as edu_exam_exam_date,
|
||||
edu_exam.exam_no as edu_exam_exam_no,
|
||||
edu_exam.exam_name as edu_exam_exam_name
|
||||
<!-- 最后的逗号没找到好办法去除,先手动去除 -->
|
||||
from edu_student_exam
|
||||
left join edu_student on edu_student_exam.student_id = edu_student.id
|
||||
left join edu_exam on edu_student_exam.exam_id = edu_exam.id
|
||||
</sql>
|
||||
|
||||
<select id="selectById" parameterType="Long" resultMap="JoinResult">
|
||||
<include refid="Base_Column_List"></include>
|
||||
where edu_student_exam.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectList" parameterType="Long" resultMap="JoinResult">
|
||||
<include refid="Base_Column_List"></include>
|
||||
<if test="ew.emptyOfWhere == false">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" parameterType="Long" resultMap="JoinResult">
|
||||
<include refid="Base_Column_List"></include>
|
||||
<if test="ew.emptyOfWhere == false">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
23
ruoyi-edu/src/main/resources/mapper/edu/EduStudentMapper.xml
Normal file
23
ruoyi-edu/src/main/resources/mapper/edu/EduStudentMapper.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.edu.mapper.EduStudentMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.edu.domain.EduStudent" id="EduStudentResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="idCardNo" column="id_card_no"/>
|
||||
<result property="studentName" column="student_name"/>
|
||||
<result property="currentGrade" column="current_grade"/>
|
||||
<result property="currentClass" column="current_class"/>
|
||||
<result property="currentSchool" column="current_school"/>
|
||||
<result property="mobile" column="mobile"/>
|
||||
<result property="fatherMobile" column="father_mobile"/>
|
||||
<result property="motherMobile" column="mother_mobile"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
63
ruoyi-edu/src/main/resources/sql/edu.sql
Normal file
63
ruoyi-edu/src/main/resources/sql/edu.sql
Normal file
@ -0,0 +1,63 @@
|
||||
create table edu_exam
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
exam_no varchar(64) null comment '考试编号',
|
||||
exam_name varchar(64) null comment '考试名称',
|
||||
exam_short_name varchar(64) null comment '考试简称',
|
||||
exam_date datetime null comment '考试日期',
|
||||
create_time datetime null comment '创建时间',
|
||||
create_by varchar(64) null comment '创建人id',
|
||||
update_time datetime null comment '修改时间',
|
||||
update_by varchar(64) null comment '修改人id',
|
||||
constraint edu_exam_exam_no_uindex
|
||||
unique (exam_no)
|
||||
)
|
||||
comment '考试信息' charset=utf8;
|
||||
|
||||
create table ruoyi.edu_student
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
id_card_no varchar(64) null comment '身份证号',
|
||||
student_name varchar(64) null comment '学生姓名',
|
||||
current_grade varchar(64) null comment '学生当前所在年级',
|
||||
current_class varchar(64) null comment '学生当前所在班级',
|
||||
current_school varchar(64) null comment '学生当前所在学校',
|
||||
mobile varchar(64) null comment '手机号',
|
||||
father_mobile varchar(64) null comment '父亲手机',
|
||||
mother_mobile varchar(64) null comment '母亲手机',
|
||||
create_time datetime null comment '创建时间',
|
||||
create_by varchar(64) null comment '创建人id',
|
||||
update_time datetime null comment '修改时间',
|
||||
update_by varchar(64) null comment '修改人id',
|
||||
constraint edu_student_id_card_no_uindex
|
||||
unique (id_card_no)
|
||||
)
|
||||
comment '学生信息表' charset=utf8;
|
||||
|
||||
create table ruoyi.edu_student_exam
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
student_id int null comment '学生id',
|
||||
exam_id int null comment '考试id',
|
||||
chinese_score decimal(10,2) null comment '语文分数',
|
||||
math_score decimal(10,2) null comment '数学分数',
|
||||
english_score decimal(10,2) null comment '英语分数',
|
||||
chemistry_score decimal(10,2) null comment '化学分数',
|
||||
physics_score decimal(10,2) null comment '物理分数',
|
||||
biology_score decimal(10,2) null comment '生物分数',
|
||||
politics_score decimal(10,2) null comment '政治分数',
|
||||
history_score decimal(10,2) null comment '历史分数',
|
||||
geography_score decimal(10,2) null comment '地理分数',
|
||||
ethic_score decimal(10,2) null comment '思想品德分数',
|
||||
class_rank int null comment '班级排名',
|
||||
grade_rank int null comment '级部排名',
|
||||
create_time datetime null comment '创建时间',
|
||||
create_by varchar(64) null comment '创建人id',
|
||||
update_time datetime null comment '修改时间',
|
||||
update_by varchar(64) null comment '修改人id'
|
||||
)
|
||||
comment '学生考试信息' charset=utf8;
|
||||
|
||||
53
ruoyi-ui/src/api/edu/exam.js
Normal file
53
ruoyi-ui/src/api/edu/exam.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询考试信息列表
|
||||
export function listExam(query) {
|
||||
return request({
|
||||
url: '/edu/exam/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询考试信息详细
|
||||
export function getExam(id) {
|
||||
return request({
|
||||
url: '/edu/exam/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增考试信息
|
||||
export function addExam(data) {
|
||||
return request({
|
||||
url: '/edu/exam',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改考试信息
|
||||
export function updateExam(data) {
|
||||
return request({
|
||||
url: '/edu/exam',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除考试信息
|
||||
export function delExam(id) {
|
||||
return request({
|
||||
url: '/edu/exam/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出考试信息
|
||||
export function exportExam(query) {
|
||||
return request({
|
||||
url: '/edu/exam/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
53
ruoyi-ui/src/api/edu/score.js
Normal file
53
ruoyi-ui/src/api/edu/score.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询学生考试信息列表
|
||||
export function listScore(query) {
|
||||
return request({
|
||||
url: '/edu/score/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询学生考试信息详细
|
||||
export function getScore(id) {
|
||||
return request({
|
||||
url: '/edu/score/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增学生考试信息
|
||||
export function addScore(data) {
|
||||
return request({
|
||||
url: '/edu/score',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改学生考试信息
|
||||
export function updateScore(data) {
|
||||
return request({
|
||||
url: '/edu/score',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除学生考试信息
|
||||
export function delScore(id) {
|
||||
return request({
|
||||
url: '/edu/score/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出学生考试信息
|
||||
export function exportScore(query) {
|
||||
return request({
|
||||
url: '/edu/score/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
53
ruoyi-ui/src/api/edu/student.js
Normal file
53
ruoyi-ui/src/api/edu/student.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询学生信息列表
|
||||
export function listStudent(query) {
|
||||
return request({
|
||||
url: '/edu/student/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询学生信息详细
|
||||
export function getStudent(id) {
|
||||
return request({
|
||||
url: '/edu/student/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增学生信息
|
||||
export function addStudent(data) {
|
||||
return request({
|
||||
url: '/edu/student',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改学生信息
|
||||
export function updateStudent(data) {
|
||||
return request({
|
||||
url: '/edu/student',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除学生信息
|
||||
export function delStudent(id) {
|
||||
return request({
|
||||
url: '/edu/student/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出学生信息
|
||||
export function exportStudent(query) {
|
||||
return request({
|
||||
url: '/edu/student/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
442
ruoyi-ui/src/views/edu/score/index.vue
Normal file
442
ruoyi-ui/src/views/edu/score/index.vue
Normal file
@ -0,0 +1,442 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="学生id" prop="studentId">
|
||||
<el-input
|
||||
v-model="queryParams.studentId"
|
||||
placeholder="请输入学生id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试id" prop="examId">
|
||||
<el-input
|
||||
v-model="queryParams.examId"
|
||||
placeholder="请输入考试id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['edu:score:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['edu:score:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['edu:score:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['edu:score:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="考试id" align="center" prop="id" v-if="false"/>
|
||||
<el-table-column label="语文分数" align="center" prop="chineseScore" />
|
||||
<el-table-column label="数学分数" align="center" prop="mathScore" />
|
||||
<el-table-column label="英语分数" align="center" prop="englishScore" />
|
||||
<el-table-column label="化学分数" align="center" prop="chemistryScore" />
|
||||
<el-table-column label="物理分数" align="center" prop="physicsScore" />
|
||||
<el-table-column label="生物分数" align="center" prop="biologyScore" />
|
||||
<el-table-column label="政治分数" align="center" prop="politicsScore" />
|
||||
<el-table-column label="历史分数" align="center" prop="historyScore" />
|
||||
<el-table-column label="地理分数" align="center" prop="geographyScore" />
|
||||
<el-table-column label="思想品德分数" align="center" prop="ethicScore" />
|
||||
<el-table-column label="班级排名" align="center" prop="classRank" />
|
||||
<el-table-column label="级部排名" align="center" prop="gradeRank" />
|
||||
<!-- 关联表 eduStudent 字段 -->
|
||||
<el-table-column label="身份证号" align="center" prop="eduStudentIdCardNo" />
|
||||
<el-table-column label="班级" align="center" prop="eduStudentCurrentClass" :formatter="eduStudentCurrentClassFormat" />
|
||||
<el-table-column label="年级" align="center" prop="eduStudentCurrentGrade" :formatter="eduStudentCurrentGradeFormat" />
|
||||
<el-table-column label="学生姓名" align="center" prop="eduStudentStudentName" />
|
||||
<el-table-column label="手机号" align="center" prop="eduStudentMobile" />
|
||||
<el-table-column label="父亲手机" align="center" prop="eduStudentFatherMobile" />
|
||||
<el-table-column label="母亲手机" align="center" prop="eduStudentMotherMobile" />
|
||||
<el-table-column label="学校" align="center" prop="eduStudentCurrentSchool" :formatter="eduStudentCurrentSchoolFormat" />
|
||||
<!-- 关联表 eduExam 字段 -->
|
||||
<el-table-column label="考试日期" align="center" prop="eduExamExamDate" />
|
||||
<el-table-column label="考试编号" align="center" prop="eduExamExamNo" />
|
||||
<el-table-column label="考试名称" align="center" prop="eduExamExamName" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['edu:score:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['edu:score:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改学生考试信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
|
||||
<el-form-item label="学生id" prop="studentId">
|
||||
<el-select
|
||||
v-model="form.studentId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入身份证号搜索"
|
||||
:remote-method="remoteFetchEduStudent"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in eduStudentOptions"
|
||||
:key="item.id"
|
||||
:label="item.idCardNo"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="考试id" prop="examId">
|
||||
<el-select
|
||||
v-model="form.examId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入考试日期搜索"
|
||||
:remote-method="remoteFetchEduExam"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in eduExamOptions"
|
||||
:key="item.id"
|
||||
:label="item.examDate"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="语文分数" prop="chineseScore">
|
||||
<el-input v-model="form.chineseScore" placeholder="请输入语文分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数学分数" prop="mathScore">
|
||||
<el-input v-model="form.mathScore" placeholder="请输入数学分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="英语分数" prop="englishScore">
|
||||
<el-input v-model="form.englishScore" placeholder="请输入英语分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="化学分数" prop="chemistryScore">
|
||||
<el-input v-model="form.chemistryScore" placeholder="请输入化学分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物理分数" prop="physicsScore">
|
||||
<el-input v-model="form.physicsScore" placeholder="请输入物理分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生物分数" prop="biologyScore">
|
||||
<el-input v-model="form.biologyScore" placeholder="请输入生物分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="政治分数" prop="politicsScore">
|
||||
<el-input v-model="form.politicsScore" placeholder="请输入政治分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="历史分数" prop="historyScore">
|
||||
<el-input v-model="form.historyScore" placeholder="请输入历史分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="地理分数" prop="geographyScore">
|
||||
<el-input v-model="form.geographyScore" placeholder="请输入地理分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="思想品德分数" prop="ethicScore">
|
||||
<el-input v-model="form.ethicScore" placeholder="请输入思想品德分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级排名" prop="classRank">
|
||||
<el-input v-model="form.classRank" placeholder="请输入班级排名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="级部排名" prop="gradeRank">
|
||||
<el-input v-model="form.gradeRank" placeholder="请输入级部排名" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listScore, getScore, delScore, addScore, updateScore, exportScore } from "@/api/edu/score";
|
||||
import { listStudent } from "@/api/edu/student";
|
||||
import { listExam } from "@/api/edu/exam";
|
||||
|
||||
|
||||
export default {
|
||||
name: "Score",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 学生考试信息表格数据
|
||||
scoreList: [],
|
||||
eduStudentOptions: [],
|
||||
eduExamOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 修改人id字典
|
||||
eduStudentCurrentClassOptions: [],
|
||||
// 修改人id字典
|
||||
eduStudentCurrentGradeOptions: [],
|
||||
// 修改人id字典
|
||||
eduStudentCurrentSchoolOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentId: undefined,
|
||||
examId: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
studentId: [
|
||||
{ required: true, message: "学生id不能为空", trigger: "blur" }
|
||||
],
|
||||
examId: [
|
||||
{ required: true, message: "考试id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
this.getDicts("edu_class").then(response => {
|
||||
this.eduStudentCurrentClassOptions = response.data;
|
||||
});
|
||||
this.getDicts("edu_grade").then(response => {
|
||||
this.eduStudentCurrentGradeOptions = response.data;
|
||||
});
|
||||
this.getDicts("edu_school").then(response => {
|
||||
this.eduStudentCurrentSchoolOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询学生考试信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listScore(this.queryParams).then(response => {
|
||||
this.scoreList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
remoteFetchEduStudent(keyword) {
|
||||
let that = this;
|
||||
listStudent({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
idCardNo: keyword
|
||||
}).then(response => {
|
||||
that.eduStudentOptions = response.rows
|
||||
});
|
||||
},
|
||||
remoteFetchEduExam(keyword) {
|
||||
let that = this;
|
||||
listExam({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
examDate: keyword
|
||||
}).then(response => {
|
||||
that.eduExamOptions = response.rows
|
||||
});
|
||||
},
|
||||
// 考试id字典翻译
|
||||
eduStudentCurrentClassFormat(row, column) {
|
||||
return this.selectDictLabel(this.eduStudentCurrentClassOptions, row.eduStudentCurrentClass);
|
||||
},
|
||||
// 考试id字典翻译
|
||||
eduStudentCurrentGradeFormat(row, column) {
|
||||
return this.selectDictLabel(this.eduStudentCurrentGradeOptions, row.eduStudentCurrentGrade);
|
||||
},
|
||||
// 考试id字典翻译
|
||||
eduStudentCurrentSchoolFormat(row, column) {
|
||||
return this.selectDictLabel(this.eduStudentCurrentSchoolOptions, row.eduStudentCurrentSchool);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
studentId: undefined,
|
||||
examId: undefined,
|
||||
chineseScore: undefined,
|
||||
mathScore: undefined,
|
||||
englishScore: undefined,
|
||||
chemistryScore: undefined,
|
||||
physicsScore: undefined,
|
||||
biologyScore: undefined,
|
||||
politicsScore: undefined,
|
||||
historyScore: undefined,
|
||||
geographyScore: undefined,
|
||||
ethicScore: undefined,
|
||||
classRank: undefined,
|
||||
gradeRank: undefined,
|
||||
createTime: undefined,
|
||||
createBy: undefined,
|
||||
updateTime: undefined,
|
||||
updateBy: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加学生考试信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getScore(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改学生考试信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateScore(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addScore(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除学生考试信息编号为"' + ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delScore(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有学生考试信息数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportScore(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
425
ruoyi-ui/src/views/edu/student/index.vue
Normal file
425
ruoyi-ui/src/views/edu/student/index.vue
Normal file
@ -0,0 +1,425 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="身份证号" prop="idCardNo">
|
||||
<el-input
|
||||
v-model="queryParams.idCardNo"
|
||||
placeholder="请输入身份证号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="学生姓名" prop="studentName">
|
||||
<el-input
|
||||
v-model="queryParams.studentName"
|
||||
placeholder="请输入学生姓名"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="年级" prop="currentGrade">
|
||||
<el-select v-model="queryParams.currentGrade" placeholder="请选择年级" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in currentGradeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="currentClass">
|
||||
<el-select v-model="queryParams.currentClass" placeholder="请选择班级" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in currentClassOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校" prop="currentSchool">
|
||||
<el-select v-model="queryParams.currentSchool" placeholder="请选择学校" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in currentSchoolOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="父亲手机" prop="fatherMobile">
|
||||
<el-input
|
||||
v-model="queryParams.fatherMobile"
|
||||
placeholder="请输入父亲手机"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="母亲手机" prop="motherMobile">
|
||||
<el-input
|
||||
v-model="queryParams.motherMobile"
|
||||
placeholder="请输入母亲手机"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['edu:student:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['edu:student:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['edu:student:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['edu:student:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="studentList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="母亲手机" align="center" prop="id" v-if="false"/>
|
||||
<el-table-column label="身份证号" align="center" prop="idCardNo" />
|
||||
<el-table-column label="学生姓名" align="center" prop="studentName" />
|
||||
<el-table-column label="年级" align="center" prop="currentGrade" :formatter="currentGradeFormat" />
|
||||
<el-table-column label="班级" align="center" prop="currentClass" :formatter="currentClassFormat" />
|
||||
<el-table-column label="学校" align="center" prop="currentSchool" :formatter="currentSchoolFormat" />
|
||||
<el-table-column label="手机号" align="center" prop="mobile" />
|
||||
<el-table-column label="父亲手机" align="center" prop="fatherMobile" />
|
||||
<el-table-column label="母亲手机" align="center" prop="motherMobile" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['edu:student:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['edu:student:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改学生信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="身份证号" prop="idCardNo">
|
||||
<el-input v-model="form.idCardNo" placeholder="请输入身份证号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学生姓名" prop="studentName">
|
||||
<el-input v-model="form.studentName" placeholder="请输入学生姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="年级" prop="currentGrade">
|
||||
<el-select v-model="form.currentGrade" placeholder="请选择年级">
|
||||
<el-option
|
||||
v-for="dict in currentGradeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="currentClass">
|
||||
<el-select v-model="form.currentClass" placeholder="请选择班级">
|
||||
<el-option
|
||||
v-for="dict in currentClassOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校" prop="currentSchool">
|
||||
<el-select v-model="form.currentSchool" placeholder="请选择学校">
|
||||
<el-option
|
||||
v-for="dict in currentSchoolOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="form.mobile" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父亲手机" prop="fatherMobile">
|
||||
<el-input v-model="form.fatherMobile" placeholder="请输入父亲手机" />
|
||||
</el-form-item>
|
||||
<el-form-item label="母亲手机" prop="motherMobile">
|
||||
<el-input v-model="form.motherMobile" placeholder="请输入母亲手机" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStudent, getStudent, delStudent, addStudent, updateStudent, exportStudent } from "@/api/edu/student";
|
||||
|
||||
export default {
|
||||
name: "Student",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 学生信息表格数据
|
||||
studentList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 年级字典
|
||||
currentGradeOptions: [],
|
||||
// 班级字典
|
||||
currentClassOptions: [],
|
||||
// 学校字典
|
||||
currentSchoolOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
idCardNo: undefined,
|
||||
studentName: undefined,
|
||||
currentGrade: undefined,
|
||||
currentClass: undefined,
|
||||
currentSchool: undefined,
|
||||
mobile: undefined,
|
||||
fatherMobile: undefined,
|
||||
motherMobile: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
idCardNo: [
|
||||
{ required: true, message: "身份证号不能为空", trigger: "blur" }
|
||||
],
|
||||
studentName: [
|
||||
{ required: true, message: "学生姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("edu_grade").then(response => {
|
||||
this.currentGradeOptions = response.data;
|
||||
});
|
||||
this.getDicts("edu_class").then(response => {
|
||||
this.currentClassOptions = response.data;
|
||||
});
|
||||
this.getDicts("edu_school").then(response => {
|
||||
this.currentSchoolOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询学生信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listStudent(this.queryParams).then(response => {
|
||||
this.studentList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 年级字典翻译
|
||||
currentGradeFormat(row, column) {
|
||||
return this.selectDictLabel(this.currentGradeOptions, row.currentGrade);
|
||||
},
|
||||
// 班级字典翻译
|
||||
currentClassFormat(row, column) {
|
||||
return this.selectDictLabel(this.currentClassOptions, row.currentClass);
|
||||
},
|
||||
// 学校字典翻译
|
||||
currentSchoolFormat(row, column) {
|
||||
return this.selectDictLabel(this.currentSchoolOptions, row.currentSchool);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
idCardNo: undefined,
|
||||
studentName: undefined,
|
||||
currentGrade: undefined,
|
||||
currentClass: undefined,
|
||||
currentSchool: undefined,
|
||||
mobile: undefined,
|
||||
fatherMobile: undefined,
|
||||
motherMobile: undefined,
|
||||
createTime: undefined,
|
||||
createBy: undefined,
|
||||
updateTime: undefined,
|
||||
updateBy: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加学生信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getStudent(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改学生信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateStudent(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addStudent(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除学生信息编号为"' + ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delStudent(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有学生信息数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportStudent(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user