mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-19 09:55:16 +08:00
edu代码调整
This commit is contained in:
parent
c22e815bbe
commit
6e62e2fafe
@ -15,7 +15,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||||||
* 学生考试信息分页查询对象 edu_student_exam
|
* 学生考试信息分页查询对象 edu_student_exam
|
||||||
*
|
*
|
||||||
* @author keyleaf
|
* @author keyleaf
|
||||||
* @date 2021-05-23
|
* @date 2021-05-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -37,11 +37,21 @@ public class EduStudentExamQueryBo extends BaseEntity {
|
|||||||
private String isAsc;
|
private String isAsc;
|
||||||
|
|
||||||
|
|
||||||
/** 学生id */
|
|
||||||
@ApiModelProperty("学生id")
|
|
||||||
private Long studentId;
|
|
||||||
/** 考试id */
|
/** 考试id */
|
||||||
@ApiModelProperty("考试id")
|
@ApiModelProperty("考试id")
|
||||||
private Long examId;
|
private Long examId;
|
||||||
|
|
||||||
|
|
||||||
|
// 补充主表字段
|
||||||
|
private Long studentId;
|
||||||
|
|
||||||
|
// 关联表 eduStudent 相关字段
|
||||||
|
/** 学生姓名 */
|
||||||
|
@ApiModelProperty("学生姓名")
|
||||||
|
private String eduStudentStudentName;
|
||||||
|
/** 学校 */
|
||||||
|
@ApiModelProperty("学校")
|
||||||
|
private String eduStudentCurrentSchool;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,15 +2,13 @@ package com.ruoyi.edu.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
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.utils.PageUtils;
|
||||||
import com.ruoyi.common.core.page.PagePlus;
|
import com.ruoyi.common.core.page.PagePlus;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.ruoyi.edu.bo.EduStudentExamAddBo;
|
import com.ruoyi.edu.bo.EduStudentExamAddBo;
|
||||||
import com.ruoyi.edu.bo.EduStudentExamQueryBo;
|
import com.ruoyi.edu.bo.EduStudentExamQueryBo;
|
||||||
import com.ruoyi.edu.bo.EduStudentExamEditBo;
|
import com.ruoyi.edu.bo.EduStudentExamEditBo;
|
||||||
@ -27,7 +25,7 @@ import java.util.Collection;
|
|||||||
* 学生考试信息Service业务层处理
|
* 学生考试信息Service业务层处理
|
||||||
*
|
*
|
||||||
* @author keyleaf
|
* @author keyleaf
|
||||||
* @date 2021-05-23
|
* @date 2021-05-26
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class EduStudentExamServiceImpl extends ServiceImpl<EduStudentExamMapper, EduStudentExam> implements IEduStudentExamService {
|
public class EduStudentExamServiceImpl extends ServiceImpl<EduStudentExamMapper, EduStudentExam> implements IEduStudentExamService {
|
||||||
@ -50,12 +48,10 @@ public class EduStudentExamServiceImpl extends ServiceImpl<EduStudentExamMapper,
|
|||||||
|
|
||||||
private Wrapper<EduStudentExam> buildQueryWrapper(EduStudentExamQueryBo bo) {
|
private Wrapper<EduStudentExam> buildQueryWrapper(EduStudentExamQueryBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
LambdaQueryWrapper<EduStudentExam> lqw = Wrappers.lambdaQuery();
|
QueryWrapper<EduStudentExam> qw = new QueryWrapper();
|
||||||
lqw.eq(bo.getStudentId() != null, EduStudentExam::getStudentId, bo.getStudentId());
|
// 关联表 eduStudent 相关字段
|
||||||
lqw.eq(bo.getExamId() != null, EduStudentExam::getExamId, bo.getExamId());
|
qw.like(StrUtil.isNotBlank(bo.getEduStudentStudentName()), "edu_student.student_name", bo.getEduStudentStudentName());
|
||||||
|
qw.eq(StrUtil.isNotBlank(bo.getEduStudentCurrentSchool()), "edu_student.current_school", bo.getEduStudentCurrentSchool());
|
||||||
QueryWrapper<EduStudentExam> qw = new QueryWrapper<>();
|
|
||||||
// qw.eq("b.id", 2);
|
|
||||||
return qw;
|
return qw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
<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-form-item label="考试id" prop="examId">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.examId"
|
v-model="queryParams.examId"
|
||||||
@ -19,6 +10,26 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="学生姓名" prop="eduStudentStudentName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.eduStudentStudentName"
|
||||||
|
placeholder="请输入学生姓名"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学校" prop="eduStudentCurrentSchool">
|
||||||
|
<el-select v-model="queryParams.eduStudentCurrentSchool" placeholder="请选择学校" clearable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in eduStudentCurrentSchoolOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@ -87,13 +98,10 @@
|
|||||||
<el-table-column label="班级排名" align="center" prop="classRank" />
|
<el-table-column label="班级排名" align="center" prop="classRank" />
|
||||||
<el-table-column label="级部排名" align="center" prop="gradeRank" />
|
<el-table-column label="级部排名" align="center" prop="gradeRank" />
|
||||||
<!-- 关联表 eduStudent 字段 -->
|
<!-- 关联表 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="eduStudentStudentName" />
|
||||||
<el-table-column label="手机号" align="center" prop="eduStudentMobile" />
|
<el-table-column label="身份证号" align="center" prop="eduStudentIdCardNo" />
|
||||||
<el-table-column label="父亲手机" align="center" prop="eduStudentFatherMobile" />
|
<el-table-column label="年级" align="center" prop="eduStudentCurrentGrade" :formatter="eduStudentCurrentGradeFormat" />
|
||||||
<el-table-column label="母亲手机" align="center" prop="eduStudentMotherMobile" />
|
<el-table-column label="班级" align="center" prop="eduStudentCurrentClass" :formatter="eduStudentCurrentClassFormat" />
|
||||||
<el-table-column label="学校" align="center" prop="eduStudentCurrentSchool" :formatter="eduStudentCurrentSchoolFormat" />
|
<el-table-column label="学校" align="center" prop="eduStudentCurrentSchool" :formatter="eduStudentCurrentSchoolFormat" />
|
||||||
<!-- 关联表 eduExam 字段 -->
|
<!-- 关联表 eduExam 字段 -->
|
||||||
<el-table-column label="考试日期" align="center" prop="eduExamExamDate" />
|
<el-table-column label="考试日期" align="center" prop="eduExamExamDate" />
|
||||||
@ -137,14 +145,14 @@
|
|||||||
filterable
|
filterable
|
||||||
remote
|
remote
|
||||||
reserve-keyword
|
reserve-keyword
|
||||||
placeholder="请输入身份证号搜索"
|
placeholder="请输入学生姓名搜索"
|
||||||
:remote-method="remoteFetchEduStudent"
|
:remote-method="remoteFetchEduStudent"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in eduStudentOptions"
|
v-for="item in eduStudentOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.idCardNo"
|
:label="item.studentName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -156,14 +164,14 @@
|
|||||||
filterable
|
filterable
|
||||||
remote
|
remote
|
||||||
reserve-keyword
|
reserve-keyword
|
||||||
placeholder="请输入考试日期搜索"
|
placeholder="请输入考试名称搜索"
|
||||||
:remote-method="remoteFetchEduExam"
|
:remote-method="remoteFetchEduExam"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in eduExamOptions"
|
v-for="item in eduExamOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.examDate"
|
:label="item.examName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -247,17 +255,16 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 修改人id字典
|
// 年级字典
|
||||||
eduStudentCurrentClassOptions: [],
|
|
||||||
// 修改人id字典
|
|
||||||
eduStudentCurrentGradeOptions: [],
|
eduStudentCurrentGradeOptions: [],
|
||||||
// 修改人id字典
|
// 班级字典
|
||||||
|
eduStudentCurrentClassOptions: [],
|
||||||
|
// 学校字典
|
||||||
eduStudentCurrentSchoolOptions: [],
|
eduStudentCurrentSchoolOptions: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
studentId: undefined,
|
|
||||||
examId: undefined,
|
examId: undefined,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
@ -276,12 +283,12 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
this.getDicts("edu_class").then(response => {
|
|
||||||
this.eduStudentCurrentClassOptions = response.data;
|
|
||||||
});
|
|
||||||
this.getDicts("edu_grade").then(response => {
|
this.getDicts("edu_grade").then(response => {
|
||||||
this.eduStudentCurrentGradeOptions = response.data;
|
this.eduStudentCurrentGradeOptions = response.data;
|
||||||
});
|
});
|
||||||
|
this.getDicts("edu_class").then(response => {
|
||||||
|
this.eduStudentCurrentClassOptions = response.data;
|
||||||
|
});
|
||||||
this.getDicts("edu_school").then(response => {
|
this.getDicts("edu_school").then(response => {
|
||||||
this.eduStudentCurrentSchoolOptions = response.data;
|
this.eduStudentCurrentSchoolOptions = response.data;
|
||||||
});
|
});
|
||||||
@ -301,7 +308,7 @@ export default {
|
|||||||
listStudent({
|
listStudent({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
idCardNo: keyword
|
studentName: keyword
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
that.eduStudentOptions = response.rows
|
that.eduStudentOptions = response.rows
|
||||||
});
|
});
|
||||||
@ -311,20 +318,20 @@ export default {
|
|||||||
listExam({
|
listExam({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
examDate: keyword
|
examName: keyword
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
that.eduExamOptions = response.rows
|
that.eduExamOptions = response.rows
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 考试id字典翻译
|
// 考试id字典翻译
|
||||||
eduStudentCurrentClassFormat(row, column) {
|
|
||||||
return this.selectDictLabel(this.eduStudentCurrentClassOptions, row.eduStudentCurrentClass);
|
|
||||||
},
|
|
||||||
// 考试id字典翻译
|
|
||||||
eduStudentCurrentGradeFormat(row, column) {
|
eduStudentCurrentGradeFormat(row, column) {
|
||||||
return this.selectDictLabel(this.eduStudentCurrentGradeOptions, row.eduStudentCurrentGrade);
|
return this.selectDictLabel(this.eduStudentCurrentGradeOptions, row.eduStudentCurrentGrade);
|
||||||
},
|
},
|
||||||
// 考试id字典翻译
|
// 考试id字典翻译
|
||||||
|
eduStudentCurrentClassFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.eduStudentCurrentClassOptions, row.eduStudentCurrentClass);
|
||||||
|
},
|
||||||
|
// 考试id字典翻译
|
||||||
eduStudentCurrentSchoolFormat(row, column) {
|
eduStudentCurrentSchoolFormat(row, column) {
|
||||||
return this.selectDictLabel(this.eduStudentCurrentSchoolOptions, row.eduStudentCurrentSchool);
|
return this.selectDictLabel(this.eduStudentCurrentSchoolOptions, row.eduStudentCurrentSchool);
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user