更新9.25

This commit is contained in:
许允枞 2024-09-25 14:28:15 +08:00
parent 7defd1d771
commit bc76d42343
3 changed files with 29 additions and 21 deletions

View File

@ -349,15 +349,18 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
if (ObjectUtils.isEmpty(hitRegInfoUser1)) {
throw new RuntimeException("您并未参加战队");
}
if (ObjectUtil.isNotEmpty(hitRegInfoUser1.getType()) && !hitRegInfoUser1.getType().equals("1")) {
throw new RuntimeException("请由学生修改");
}
HitRegInfo hitRegInfo1 = hitRegInfoMapper.selectOne(new LambdaQueryWrapper<HitRegInfo>()
.eq(HitRegInfo::getId, hitRegInfoUser1.getRegId())
.last("limit 1"));
// HitRegInfo hitRegInfo1 = hitRegInfoMapper.selectOne(new LambdaQueryWrapper<HitRegInfo>()
// .eq(HitRegInfo::getId, hitRegInfoUser1.getRegId())
// .last("limit 1"));
//判断当前登陆人是否是领队老师如果是查询该老师学校下的战队
HitRegistrationTeachInfo teacherInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(userId);
if (teacherInfo != null && teacherInfo.getType().equals("1")) {
hitRegInfo.setSchoolName(teacherInfo.getSchoolName());
}
// HitRegistrationTeachInfo teacherInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(userId);
// if (teacherInfo != null && teacherInfo.getType().equals("1")) {
// hitRegInfo.setSchoolName(teacherInfo.getSchoolName());
// }
PageUtils.startPage();
// List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectList(new LambdaQueryWrapper<HitRegInfo>()

View File

@ -206,6 +206,8 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
sysUser.setRoleIds(new Long[]{103L});
regFlag = userService.insertUser(sysUser)>0;
} else {
//指导老师
sysUser.setRoleIds(new Long[]{2L});
regFlag= userService.registerUser(sysUser);
}
if (!regFlag) {

View File

@ -302,21 +302,24 @@ export default {
}
}
this.HitRegistrationStudentInfoList[i].competitionName = ""
const arr = this.splitStringToArray(this.HitRegistrationStudentInfoList[i].competition)
const arr2 = []
//arr
for (let k = 0; k < arr.length; k++) {
//
if (arr[k] == "1") {
arr2.push('化验赛')
// this.HitRegistrationStudentInfoList[0].competitionName += ""
} else if (arr[k] == "2") {
arr2.push('虚拟赛')
// this.HitRegistrationStudentInfoList[0].competitionName += ","
}
}
this.HitRegistrationStudentInfoList[i].competitionName = this.arrayToString(arr2);
//this.HitRegistrationStudentInfoList[i].competition
if (this.HitRegistrationStudentInfoList[i].competition != null) {
const arr = this.splitStringToArray(this.HitRegistrationStudentInfoList[i].competition)
const arr2 = []
// arr
for (let k = 0; k < arr.length; k++) {
//
if (arr[k] == "1") {
arr2.push('化验赛')
// this.HitRegistrationStudentInfoList[0].competitionName += ""
} else if (arr[k] == "2") {
arr2.push('虚拟赛')
// this.HitRegistrationStudentInfoList[0].competitionName += ","
}
}
this.HitRegistrationStudentInfoList[i].competitionName = this.arrayToString(arr2);
}
}
console.log("this.HitRegistrationStudentInfoList", this.HitRegistrationStudentInfoList)