更新9.20

This commit is contained in:
许允枞 2024-09-20 10:24:14 +08:00
parent d055702fa7
commit 1c445c1888
6 changed files with 61 additions and 75 deletions

View File

@ -71,12 +71,11 @@ public class HitCompetitionStudentInfoController extends BaseController {
/**
* 获取大赛学生详细信息
*/
// @PreAuthorize("@ss.hasPermi('system:info:query')")
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") String id)
// {
// return success(hitCompetitionStudentInfoService.selectHitCompetitionStudentInfoById(id));
// }
@GetMapping(value = "/byId/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(hitCompetitionStudentInfoService.selectHitCompetitionStudentInfoById(id));
}
/**
* 新增大赛学生

View File

@ -27,7 +27,6 @@ public interface IHitRegInfoService
* @return 报名信息集合
*/
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo);
// public HitRegInfoVo selectHitRegInfoListC(HitRegInfo hitRegInfo);
/**
* 新增报名信息

View File

@ -112,44 +112,6 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
return hitRegInfos;
}
public HitRegInfoVo selectHitRegInfoListC(HitRegInfo hitRegInfo)
{
Long userId = SecurityUtils.getLoginUser().getUserId();
//判断当前登陆人是否是领队老师如果是查询该老师学校下的战队
HitRegistrationTeachInfo teacherInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(userId);
if (teacherInfo != null && teacherInfo.getType().equals("1")) {
hitRegInfo.setSchoolName(teacherInfo.getSchoolName());
}
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
for (HitRegInfo regInfo : hitRegInfos) {
HitRegInfoUser hitRegInfoUser =new HitRegInfoUser();
hitRegInfoUser.setRegId(regInfo.getId());
List<HitRegInfoUser> hitRegInfoUsers = regInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
for (HitRegInfoUser regInfoUser : hitRegInfoUsers) {
switch (regInfoUser.getType()) {
case "3": {
HitRegistrationTeachInfo hitRegistrationTeachInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(regInfoUser.getUserId());
regInfo.setLdTeacher(hitRegistrationTeachInfo);
break;
}
case "2": {
HitRegistrationTeachInfo hitRegistrationTeachInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(regInfoUser.getUserId());
regInfo.getZdTeacher().add(hitRegistrationTeachInfo);
break;
}
case "1":
HitCompetitionStudentInfo studentInfo = hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoByUserId(regInfoUser.getUserId());
regInfo.getStudentUserss().add(studentInfo);
break;
}
}
}
HitRegInfoVo hitRegInfoVo = new HitRegInfoVo();
hitRegInfoVo.setHitRegInfo(hitRegInfos);
return hitRegInfoVo;
}
/**
* 新增报名信息
*

View File

@ -54,6 +54,7 @@
<select id="selectHitCompetitionStudentInfoById" parameterType="String"
resultType="com.ruoyi.cms.domain.HitCompetitionStudentInfo">
select * from hit_competition_student_info
where id = #{id}
</select>
<select id="selectHitCompetitionStudentInfoByUserId"

View File

@ -15,6 +15,12 @@ export function getInfo(id) {
url: '/system/hit_stu_info/' + id,
method: 'get'
})
}// 查询大赛学生详细
export function byId(id) {
return request({
url: '/system/hit_stu_info/byId/' + id,
method: 'get'
})
}
// 新增大赛学生

View File

@ -85,6 +85,17 @@
<el-button size="mini" type="text" v-else icon="el-icon-edit"
@click="updateStatus(scope.row, 0)">取消入选</el-button>
<el-button
type="text"
plain
icon="el-icon-plus"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['cms:student:edit']"
>修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
@ -96,12 +107,12 @@
<!-- 添加或修改大赛学生对话框 -->
<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="hitRegId">
<el-input v-model="form.hitRegId" placeholder="请输入团队报名主键" />
</el-form-item>
<el-form-item label="学生姓名" prop="stuName">
<el-input v-model="form.stuName" placeholder="请输入学生姓名" />
</el-form-item>
<!-- <el-form-item label="团队报名主键" prop="hitRegId">-->
<!-- <el-input v-model="form.hitRegId" placeholder="请输入团队报名主键" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="学生姓名" prop="stuName">-->
<!-- <el-input v-model="form.stuName" placeholder="请输入学生姓名" />-->
<!-- </el-form-item>-->
<el-form-item label="学校名称" prop="schoolName">
<el-input v-model="form.schoolName" placeholder="请输入学校名称" />
</el-form-item>
@ -112,29 +123,35 @@
<el-input v-model="form.major" placeholder="请输入专业" />
</el-form-item>
<el-form-item label="所属赛区" prop="division">
<el-input v-model="form.division" placeholder="请输入所属赛区" />
</el-form-item>
<el-form-item label="手机号" prop="phoneNumber">
<el-input v-model="form.phoneNumber" placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model="form.email" placeholder="请输入邮箱" />
</el-form-item>
<el-form-item label="学生证" prop="studentIdCard">
<el-input v-model="form.studentIdCard" placeholder="请输入学生证" />
</el-form-item>
<el-form-item label="个人选拔赛分数" prop="trialsScore">
<el-input v-model="form.trialsScore" placeholder="请输入个人选拔赛分数" />
</el-form-item>
<el-form-item label="是否被选为参加初赛人员 (0: 否, 1: 是)" prop="isPreliminary">
<el-input v-model="form.isPreliminary" placeholder="请输入是否被选为参加初赛人员 (0: 否, 1: 是)" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="逻辑删除 0未删除 1真删除" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入逻辑删除 0未删除 1真删除" />
<el-select v-model="form.division" filterable allow-create default-first-option
placeholder="请选择学校名称">
<el-option v-for="item in dict.type.com_region" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
<!-- <el-input v-model="form.division" placeholder="请输入所属赛区" />-->
</el-form-item>
<!-- <el-form-item label="手机号" prop="phoneNumber">-->
<!-- <el-input v-model="form.phoneNumber" placeholder="请输入手机号" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="邮箱" prop="email">-->
<!-- <el-input v-model="form.email" placeholder="请输入邮箱" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="学生证" prop="studentIdCard">-->
<!-- <el-input v-model="form.studentIdCard" placeholder="请输入学生证" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="个人选拔赛分数" prop="trialsScore">-->
<!-- <el-input v-model="form.trialsScore" placeholder="请输入个人选拔赛分数" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否被选为参加初赛人员 (0: 否, 1: 是)" prop="isPreliminary">-->
<!-- <el-input v-model="form.isPreliminary" placeholder="请输入是否被选为参加初赛人员 (0: 否, 1: 是)" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="逻辑删除 0未删除 1真删除" prop="delFlag">-->
<!-- <el-input v-model="form.delFlag" placeholder="请输入逻辑删除 0未删除 1真删除" />-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -176,10 +193,11 @@
</template>
<script>
import { listInfo, getInfo, delInfo, addInfo, updateInfo, updateTime } from "@/api/hit/stuInfo";
import {listInfo, getInfo, delInfo, addInfo, updateInfo, updateTime, byId} from "@/api/hit/stuInfo";
import { getToken } from "@/utils/auth";
export default {
name: "Info",
dicts: ["sys_user_sex", "school_name", "com_region"],
data() {
return {
selectedTime: null, //
@ -358,7 +376,8 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getInfo(id).then(response => {
console.log("row",row)
byId(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改大赛学生";