更新
This commit is contained in:
parent
c1ad3f3580
commit
cd2d738511
@ -154,4 +154,10 @@ public class HitCompetitionStudentInfo implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private BigDecimal teamScore;
|
||||
|
||||
/**
|
||||
* 是否可以更新团队
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Boolean isUpdateTeam;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.ruoyi.cms.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Validator;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@ -272,13 +273,13 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
// TODO 不需要非得今年的老师
|
||||
LambdaQueryWrapper<HitRegistrationTeachInfo> queryWrapper1 = new LambdaQueryWrapper<>();
|
||||
queryWrapper1.eq(HitRegistrationTeachInfo::getSchoolName, hitCompetitionStudentInfo.getSchoolName())
|
||||
.likeRight(HitRegistrationTeachInfo::getCreateTime, year).eq(HitRegistrationTeachInfo::getType, 1).eq(HitRegistrationTeachInfo::getStatus, 1);
|
||||
.eq(HitRegistrationTeachInfo::getType, 1).eq(HitRegistrationTeachInfo::getStatus, 1);
|
||||
HitRegistrationTeachInfo hitRegistrationTeachInfo = hitRegistrationTeachInfoMapper.selectOne(queryWrapper1);
|
||||
hitCompetitionStudentInfo.setLdTeacherInfo(hitRegistrationTeachInfo);
|
||||
//根绝学校查询 团队成员 把自己排除掉 和 指导老师
|
||||
LambdaQueryWrapper<HitRegistrationTeachInfo> queryWrapper2 = new LambdaQueryWrapper<>();
|
||||
queryWrapper2.eq(HitRegistrationTeachInfo::getSchoolName, hitCompetitionStudentInfo.getSchoolName())
|
||||
.likeRight(HitRegistrationTeachInfo::getCreateTime, year).eq(HitRegistrationTeachInfo::getType, 0).eq(HitRegistrationTeachInfo::getStatus, 1);
|
||||
.eq(HitRegistrationTeachInfo::getType, 0).eq(HitRegistrationTeachInfo::getStatus, 1);
|
||||
List<HitRegistrationTeachInfo> hitRegistrationTeachInfos = hitRegistrationTeachInfoMapper.selectList(queryWrapper2);
|
||||
//领队老师也可以是指导老师
|
||||
if (ObjectUtils.isNotEmpty(hitRegistrationTeachInfo)) {
|
||||
@ -295,6 +296,7 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
hitCompetitionStudentInfo.setTdStudentList(studentInfos);
|
||||
//查询是否存在已组队团队
|
||||
HitRegInfo hitRegInfos1 = regInfoService.selectHitByUserId(user.getUserId(), "1");
|
||||
hitCompetitionStudentInfo.setIsUpdateTeam(true);
|
||||
String status = "-1";
|
||||
if (ObjectUtils.isNotEmpty(hitRegInfos1)) {
|
||||
status = "1";
|
||||
@ -309,6 +311,10 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
hitCompetitionStudentInfo.setZdTeacherStr(tmpStr.substring(0, tmpStr.length() - 1));
|
||||
hitCompetitionStudentInfo.setHitRegInfo(hitRegInfos1);
|
||||
hitCompetitionStudentInfo.setTeamScore(hitRegInfos1.getScore());
|
||||
//判断团队的创建时间距离现在是否超过七天
|
||||
if (DateUtil.between(hitRegInfos1.getCreateTime(), new Date(), DateUnit.DAY) > 7) {
|
||||
hitCompetitionStudentInfo.setIsUpdateTeam(false);
|
||||
}
|
||||
} else {
|
||||
//查询是否存在已确认团队 审核中
|
||||
HitRegInfo hitRegInfos2 = regInfoService.selectHitByUserId(user.getUserId(), "0");
|
||||
@ -325,6 +331,9 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
hitCompetitionStudentInfo.setZdTeacherStr(tmpStr.substring(0, tmpStr.length() - 1));
|
||||
hitCompetitionStudentInfo.setHitRegInfo(hitRegInfos2);
|
||||
hitCompetitionStudentInfo.setTeamScore(hitRegInfos2.getScore());
|
||||
if (DateUtil.between(hitRegInfos2.getCreateTime(), new Date(), DateUnit.DAY) > 7) {
|
||||
hitCompetitionStudentInfo.setIsUpdateTeam(false);
|
||||
}
|
||||
} else {
|
||||
//查询是否存在待确认团队
|
||||
HitRegInfo hitRegInfos3 = regInfoService.selectHitByUserId(user.getUserId(), "9");
|
||||
|
@ -69,6 +69,7 @@ public class HitTeamsServiceImpl extends ServiceImpl<HitTeamsMapper, HitTeams> i
|
||||
|
||||
//查询当前团队名今年是否存在
|
||||
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectList(Wrappers.lambdaQuery(HitRegInfo.class)
|
||||
.eq(HitRegInfo::getTeamName, preliminary.getTeamName())
|
||||
.between(HitRegInfo::getCreateTime, DateUtil.beginOfYear(now), DateUtil.endOfYear(now)));
|
||||
if (CollUtil.isNotEmpty(hitRegInfos)) {
|
||||
throw new Exception("当前团队名已存在,请修改团队名");
|
||||
|
@ -44,6 +44,14 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="年份" prop="year">
|
||||
<el-date-picker
|
||||
v-model="queryParams.year"
|
||||
type="year"
|
||||
placeholder="选择年份"
|
||||
>
|
||||
</el-date-picker>
|
||||
</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>
|
||||
@ -193,7 +201,8 @@ export default {
|
||||
pageSize: 10,
|
||||
teacherName: null,
|
||||
teacherNumber: null,
|
||||
type: null
|
||||
type: null,
|
||||
year: new Date().getFullYear().toString(),
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -227,6 +236,7 @@ export default {
|
||||
/** 查询教师信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.year = new Date(this.queryParams.year).getFullYear().toString()
|
||||
listHitRegistrationTeachInfo(this.queryParams).then(response => {
|
||||
this.HitRegistrationTeachInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -281,26 +281,44 @@
|
||||
</div>
|
||||
|
||||
<!-- 成绩查询 -->
|
||||
<div class="tabber-box" v-if="currentActive == 7">
|
||||
<div class="tabber-box1" v-if="currentActive == 7">
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tab-pane label="成绩" name="scores">
|
||||
<el-tab-pane label="成绩" name="scores" class="tabber-box">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<h3>个人选拔赛成绩</h3>
|
||||
<p style="color: red">{{ studentForm.trialsScore }}</p>
|
||||
<h3 v-if="studentForm.virtualScore">虚拟赛成绩</h3>
|
||||
<p style="color: red" v-if="studentForm.virtualScore">{{ studentForm.virtualScore }}</p>
|
||||
<h3 v-if="studentForm.assayScore">化验赛成绩</h3>
|
||||
<p style="color: red" v-if="studentForm.assayScore">{{ studentForm.assayScore }}</p>
|
||||
<h3 v-if="studentForm.teameScore">团队成绩</h3>
|
||||
<p style="color: red" v-if="studentForm.teameScore">{{ studentForm.teameScore }}</p>
|
||||
<p style="color: red; font-size: 20px" v-if="studentForm.trialsScore">{{ studentForm.trialsScore }}</p>
|
||||
<p style="font-size: 20px" v-else>暂无</p>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<h3>虚拟赛成绩</h3>
|
||||
<p style="color: red; font-size: 20px" v-if="studentForm.virtualScore">{{ studentForm.virtualScore }}</p>
|
||||
<p style="font-size: 20px" v-else>暂无</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<h3>化验赛成绩</h3>
|
||||
<p style="color: red; font-size: 20px" v-if="studentForm.assayScore">{{ studentForm.assayScore }}</p>
|
||||
<p style="font-size: 20px" v-else>暂无</p>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<h3>团队成绩</h3>
|
||||
<p style="color: red; font-size: 20px" v-if="studentForm.teamScore">{{ studentForm.teamScore }}</p>
|
||||
<p style="font-size: 20px" v-else>暂无</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="个人信息" name="edit-student">
|
||||
<el-form :model="studentForm" label-width="80px" :rules="rules">
|
||||
<el-form :model="studentForm" label-width="80px" :rules="rules" label-position="left">
|
||||
<h3>修改学生信息</h3>
|
||||
<el-form-item label="学号" prop="studentId">
|
||||
<el-input v-model="studentForm.studentId"></el-input>
|
||||
<el-input v-model="studentForm.studentId" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="stuName">
|
||||
<el-input v-model="studentForm.stuName"></el-input>
|
||||
<el-input v-model="studentForm.stuName" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="stuName">
|
||||
<el-select v-model="studentForm.sex" filterable allow-create default-first-option
|
||||
@ -334,19 +352,19 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="院系名称" prop="collegeName">
|
||||
<el-input v-model="studentForm.collegeName"></el-input>
|
||||
<el-input v-model="studentForm.collegeName" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="专业名称" prop="major">
|
||||
<el-input v-model="studentForm.major"></el-input>
|
||||
<el-input v-model="studentForm.major" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="手机号" prop="phoneNumber">
|
||||
<el-input v-model="studentForm.phoneNumber">
|
||||
<el-input v-model="studentForm.phoneNumber" style="width: 300px;">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input v-model="studentForm.email"></el-input>
|
||||
<el-input v-model="studentForm.email" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="学生证/学生卡" prop="studentIdCard" label-width="130px">
|
||||
<image-upload :limit="1" v-model="studentForm.studentIdCard"></image-upload>
|
||||
@ -357,11 +375,11 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="团队信息" name="edit-team" v-if="teamForm">
|
||||
<el-form :model="teamForm" label-width="80px" :rules="preliminaryFormRules">
|
||||
<el-tab-pane label="团队信息" name="edit-team" v-if="teamForm" label-position="left">
|
||||
<el-form :model="teamForm" label-width="100px" :rules="preliminaryFormRules">
|
||||
<h3>修改团队信息</h3>
|
||||
<el-form-item label="团队名称">
|
||||
<el-input v-model="teamForm.teamName"></el-input>
|
||||
<el-form-item label="团队名称" prop="teamName">
|
||||
<el-input v-model="teamForm.teamName" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属赛区" prop="division">
|
||||
<el-select v-model="teamForm.division" filterable allow-create default-first-option
|
||||
@ -373,7 +391,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校" label-width="80px" prop="schoolName">
|
||||
<el-form-item label="学校" prop="schoolName">
|
||||
<el-select v-model="teamForm.schoolName" filterable allow-create default-first-option
|
||||
placeholder="请选择学校名称"
|
||||
>
|
||||
@ -390,17 +408,17 @@
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="盲样联系人" prop="sampleConcat">
|
||||
<el-input v-model="teamForm.sampleConcat"></el-input>
|
||||
<el-input v-model="teamForm.sampleConcat" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="盲样联系人手机号" prop="sampleNumber">
|
||||
<el-input v-model="teamForm.sampleNumber"></el-input>
|
||||
<el-input v-model="teamForm.sampleNumber" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="teamForm.competition && teamForm.competition.includes('1')" label="盲样邮寄地址"
|
||||
prop="sampleAddress"
|
||||
>
|
||||
<el-input v-model="teamForm.sampleAddress"></el-input>
|
||||
<el-input v-model="teamForm.sampleAddress" style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-form-item v-if="studentForm.isUpdateTeam">
|
||||
<el-button type="primary" @click="updateTeamInfo">修改</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -567,9 +585,16 @@ export default {
|
||||
|
||||
},
|
||||
preliminaryFormRules: {
|
||||
competition: [
|
||||
{ required: true, message: '请选择至少一个赛事', trigger: 'change', type: 'array' }
|
||||
],
|
||||
|
||||
divisionLabel: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
division: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
schoolName: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
@ -1494,11 +1519,8 @@ h3 {
|
||||
}
|
||||
|
||||
.tabber-box1 {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
//border: 1px solid #ccc;
|
||||
width: 50%;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user