9.21更新
This commit is contained in:
parent
d98dade6af
commit
0eee3a2fa0
@ -74,5 +74,5 @@ public interface IHitRegInfoUserService
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
HitRegInfoUser selectByUserId(Long id);
|
||||
List<HitRegInfoUser> selectByUserId(Long id);
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.cms.domain.HitRegInfo;
|
||||
@ -99,17 +101,19 @@ public class HitRegInfoUserServiceImpl implements IHitRegInfoUserService
|
||||
.in(HitRegInfoUser::getType, "1","2")
|
||||
.eq(HitRegInfoUser::getStatus,"0");
|
||||
List<HitRegInfoUser> hitRegInfoUsers = hitRegInfoUserMapper.selectList(queryWrapper);
|
||||
List<HitRegInfoUser> hitList = new ArrayList<>();
|
||||
//判断里面是否有指导老师,并且也是领队老师
|
||||
for (HitRegInfoUser regInfoUser : hitRegInfoUsers) {
|
||||
hitList.add(regInfoUser);
|
||||
if ("2".equals(regInfoUser.getType())){
|
||||
SysUser sysUser = sysUserService.selectUserById(regInfoUser.getUserId());
|
||||
if ("03".equals(sysUser.getUserType())){
|
||||
//将hitRegInfoUsers删除掉当前老师
|
||||
hitRegInfoUsers.remove(regInfoUser);
|
||||
hitList.remove(regInfoUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isEmpty(hitRegInfoUsers)){
|
||||
if (CollectionUtil.isEmpty(hitList)){
|
||||
//代表全部通过
|
||||
Long regId = hitRegInfoUser.getRegId();
|
||||
HitRegInfo hitRegInfo = hitRegInfoService.selectHitRegInfoById(regId);
|
||||
@ -158,9 +162,9 @@ public class HitRegInfoUserServiceImpl implements IHitRegInfoUserService
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public HitRegInfoUser selectByUserId(Long id) {
|
||||
public List<HitRegInfoUser> selectByUserId(Long id) {
|
||||
LambdaQueryWrapper<HitRegInfoUser> queryWrapper =new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HitRegInfoUser::getUserId,id).last("limit 1");
|
||||
return hitRegInfoUserMapper.selectOne(queryWrapper);
|
||||
queryWrapper.eq(HitRegInfoUser::getUserId,id);
|
||||
return hitRegInfoUserMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="userType" column="user_type" />
|
||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
select u.user_id, u.dept_id,u.user_type, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark ,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
from sys_user u
|
||||
|
@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="userType" column="user_type" />
|
||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
select u.user_id, u.dept_id,u.user_type, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark ,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
from sys_user u
|
||||
|
@ -112,23 +112,19 @@
|
||||
{{ props.row.createTime.substring(0, 11) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" align="center" prop="auditStatus" v-if="techerType != '0'">
|
||||
|
||||
<el-table-column label="审核状态" align="center" prop="auditStatus" >
|
||||
<template slot-scope="props">
|
||||
<div v-if="props.row.auditStatus == '0'" style="color:#007bff;"> 待审核</div>
|
||||
<div v-if="props.row.auditStatus == '1'" style="color:green;"> 通过</div>
|
||||
<div v-if="props.row.auditStatus == '2'" style="color:red;"> 拒绝</div>
|
||||
<div v-if="props.row.auditStatus == '0' && techerType != '0'" style="color:#007bff;"> 待审核</div>
|
||||
<div v-if="props.row.auditStatus == '1' && techerType != '0'" style="color:green;"> 通过</div>
|
||||
<div v-if="props.row.auditStatus == '2' && techerType != '0'" style="color:red;"> 拒绝</div>
|
||||
<div v-if="props.row.registrationInformation.status == '0' && props.row.zdTeacherList.includes(userId) && techerType == '0'" style="color:#007bff;"> 待确认</div>
|
||||
<div v-if="props.row.registrationInformation.status == '1' && props.row.zdTeacherList.includes(userId) && techerType == '0'" style="color:green;"> 已同意</div>
|
||||
<div v-if="props.row.registrationInformation.status == '2' && props.row.zdTeacherList.includes(userId) && techerType == '0'" style="color:red;"> 已拒绝</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="确认状态" align="center" v-if="techerType == '0' && zdTeacherList.includes(userId)" >
|
||||
<template >
|
||||
<div v-if="registrationInformation.status == '0'" style="color:#007bff;"> 待确认</div>
|
||||
<div v-if="registrationInformation.status == '1'" style="color:green;"> 已同意</div>
|
||||
<div v-if="registrationInformation.status == '2'" style="color:red;"> 已拒绝</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@ -145,12 +141,13 @@
|
||||
</el-popconfirm>
|
||||
|
||||
<!-- 指导老师 -->
|
||||
<el-popconfirm title="确定当前操作?" v-if="techerType == '0' && zdTeacherList.includes(userId)"
|
||||
@confirm="submitData(1,scope.row.id)">
|
||||
<el-popconfirm title="确定当前操作"
|
||||
@confirm="submitData(scope.row.registrationInformation,1)" v-if="techerType == '0' && scope.row.zdTeacherList.includes(userId) && scope.row.auditStatus == '9'">
|
||||
<el-button size="mini" type="text" slot="reference" >同意</el-button>
|
||||
|
||||
</el-popconfirm>
|
||||
<el-popconfirm title="确定当前操作?" style="margin-left: 10px"
|
||||
v-if="techerType == '0' && zdTeacherList.includes(userId)" @confirm="submitData(2,scope.row.id)">
|
||||
v-if="techerType == '0' && scope.row.zdTeacherList.includes(userId) && scope.row.auditStatus == '9'" @confirm="submitData(scope.row.registrationInformation,2)">
|
||||
<el-button size="mini" type="text" slot="reference">拒绝</el-button>
|
||||
|
||||
</el-popconfirm>
|
||||
@ -274,7 +271,7 @@ export default {
|
||||
console.log('当前登陆人id', this.$store);
|
||||
this.userId = this.$store.state.user.id
|
||||
this.getTeachInfoByIds(this.$store.state.user.id)
|
||||
this.fetchRegistrationInformation()
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 查询报名信息列表 */
|
||||
@ -287,7 +284,23 @@ export default {
|
||||
this.loading = false;
|
||||
}
|
||||
console.log("报名信息", this.HitRegistrationStudentInfoList);
|
||||
this.zdTeacherList = this.HitRegistrationStudentInfoList[0].zdTeacher.map(teacher => teacher.userId);
|
||||
//for循环this.HitRegistrationStudentInfoList
|
||||
for (let i = 0; i < this.HitRegistrationStudentInfoList.length; i++) {
|
||||
//判断当前登录用户是否为指导老师
|
||||
this.HitRegistrationStudentInfoList[i].zdTeacherList =this.HitRegistrationStudentInfoList[i].zdTeacher.map(teacher => teacher.userId)
|
||||
// this.HitRegistrationStudentInfoList[i].status = ''
|
||||
//循环this.registrationInformation
|
||||
for (let j = 0; j < this.registrationInformation.length; j++) {
|
||||
console.log("看看执行")
|
||||
if (this.registrationInformation[j].regId == this.HitRegistrationStudentInfoList[i].id){
|
||||
this.HitRegistrationStudentInfoList[i].registrationInformation = this.registrationInformation[j]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
console.log("this.HitRegistrationStudentInfoList", this.HitRegistrationStudentInfoList)
|
||||
|
||||
// this.zdTeacherList = this.HitRegistrationStudentInfoList[0].zdTeacher.map(teacher => teacher.userId);
|
||||
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -299,14 +312,15 @@ export default {
|
||||
console.log('当前老师类型', res.data.type);
|
||||
this.techerType = res.data.type
|
||||
})
|
||||
this.fetchRegistrationInformation()
|
||||
},
|
||||
//指导老师同意
|
||||
submitData(status,regId) {
|
||||
this.registrationInformation.status = status
|
||||
this.registrationInformation.regId = regId
|
||||
submitData(data,status) {
|
||||
data.status = status
|
||||
// this.registrationInformation.regId = regId
|
||||
|
||||
console.log("这是提交的信息", this.registrationInformation)
|
||||
editRegUser(this.registrationInformation).then(res => {
|
||||
console.log("这是提交的信息", data)
|
||||
editRegUser(data).then(res => {
|
||||
this.$modal.msgSuccess("成功")
|
||||
this.fetchRegistrationInformation()
|
||||
})
|
||||
@ -317,7 +331,7 @@ export default {
|
||||
fetchRegistrationInformation() {
|
||||
selectByUserId(this.userId).then(res => {
|
||||
this.registrationInformation = res.data
|
||||
console.log("这是获取的信息", data)
|
||||
console.log("这是获取的信息", this.registrationInformation)
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
|
@ -474,6 +474,7 @@ export default {
|
||||
},
|
||||
//将数组转为字符串
|
||||
arrayToString(arr) {
|
||||
console.log("执行了")
|
||||
return arr.join(',');
|
||||
},
|
||||
//用户信息
|
||||
@ -627,11 +628,12 @@ export default {
|
||||
},
|
||||
//初赛报名
|
||||
preliminarySubmit() {
|
||||
this.preliminaryForm.competition = this.arrayToString(this.preliminaryForm.competition);
|
||||
console.log("个人选拔赛报名",this.preliminaryForm);
|
||||
const data = JSON.parse(JSON.stringify(this.preliminaryForm));
|
||||
data.competition = this.arrayToString(data.competition);
|
||||
console.log("个人选拔赛报名",data);
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
PreliminaryRegistration(this.preliminaryForm).then(res => {
|
||||
PreliminaryRegistration(data).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess("地区选拔赛报名提交成功")
|
||||
this.fetchRegistrationInformation()
|
||||
|
Loading…
Reference in New Issue
Block a user