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