Commit f7ba3cd1 by taowenzhong
parents 944481b1 5c63916a
...@@ -352,14 +352,14 @@ export function addressList(id, query) { ...@@ -352,14 +352,14 @@ export function addressList(id, query) {
// 考场分配 成绩管理 获取详情 // 考场分配 成绩管理 获取详情
export function getAddressInfo(id) { export function getAddressInfo(id) {
return request({ return request({
url: '/artRelation/getAddressInfo/' + id, url: '/recruit-relation/getAddressInfo/' + id,
method: 'get', method: 'get',
}) })
} }
// 考场分配 成绩管理修改 // 考场分配 成绩管理修改
export function handleEdit(data) { export function handleEdit(data) {
return request({ return request({
url: '/artRelation/edit', url: '/recruit-relation/edit',
method: 'put', method: 'put',
data: data data: data
}) })
......
...@@ -198,16 +198,15 @@ ...@@ -198,16 +198,15 @@
<script> <script>
import { import {
getAddressInfo,
delRelation,
addRelation, addRelation,
handleEdit,
addressEnd, addressEnd,
addressList, addressList,
listProject delRelation,
getAddressInfo,
handleEdit
} from "@/api/smartSchool/openRecruitment"; } from "@/api/smartSchool/openRecruitment";
import {getToken} from "@/utils/auth"; import {getToken} from "@/utils/auth";
import {Gender, Nations} from "@/enums/common"; import {Gender} from "@/enums/common";
export default { export default {
name: "Relation", name: "Relation",
...@@ -274,7 +273,7 @@ export default { ...@@ -274,7 +273,7 @@ export default {
// 设置上传的请求头部 // 设置上传的请求头部
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
// 上传的地址 // 上传的地址
url: process.env.VUE_APP_BASE_API + `/artExam/importAddressData/${this.examId}`, url: process.env.VUE_APP_BASE_API + `/recruitExam/importAddressData/${this.examId}`,
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -445,7 +444,7 @@ export default { ...@@ -445,7 +444,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download(`/artExam/exportAddress/${this.examId}`, { this.download(`/recruitExam/exportAddress/${this.examId}`, {
...this.queryParams ...this.queryParams
}, `考场分配${Date.now()}.xlsx`) }, `考场分配${Date.now()}.xlsx`)
}, },
......
...@@ -51,7 +51,10 @@ import yangtz.cs.liu.webpage.vo.RecruitAdmissionTicketVo; ...@@ -51,7 +51,10 @@ import yangtz.cs.liu.webpage.vo.RecruitAdmissionTicketVo;
import yangtz.cs.liu.webpage.vo.WebSchoolRecruitStudentVo; import yangtz.cs.liu.webpage.vo.WebSchoolRecruitStudentVo;
@Service @Service
public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitStudentMapper, SchoolRecruitStudent> implements ISchoolRecruitStudentService { public class SchoolRecruitStudentServiceImpl extends
ServiceImpl<SchoolRecruitStudentMapper, SchoolRecruitStudent> implements
ISchoolRecruitStudentService {
@Autowired @Autowired
private SchoolRecruitStudentMapper recruitStudentMapper; private SchoolRecruitStudentMapper recruitStudentMapper;
...@@ -116,7 +119,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -116,7 +119,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
if (!regFlag) { if (!regFlag) {
msg = "注册失败,请联系系统管理人员"; msg = "注册失败,请联系系统管理人员";
} else { } else {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(studentName, Constants.REGISTER, MessageUtils.message("user.register.success"))); AsyncManager.me().execute(AsyncFactory.recordLogininfor(studentName, Constants.REGISTER,
MessageUtils.message("user.register.success")));
} }
} }
return msg; return msg;
...@@ -126,7 +130,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -126,7 +130,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
@Override @Override
public WebLoginBody login(WebRegisterBody webRegisterBody) { public WebLoginBody login(WebRegisterBody webRegisterBody) {
WebLoginBody loginBody = new WebLoginBody(); WebLoginBody loginBody = new WebLoginBody();
SchoolRecruitStudent student = recruitStudentMapper.getStudentByPhoneNumber(webRegisterBody.getPhoneNumber(), webRegisterBody.getIdCard()); SchoolRecruitStudent student = recruitStudentMapper.getStudentByPhoneNumber(
webRegisterBody.getPhoneNumber(), webRegisterBody.getIdCard());
if (StringUtils.isNull(student)) { if (StringUtils.isNull(student)) {
throw new ServiceException("登录用户:" + webRegisterBody.getIdCard() + "不存在"); throw new ServiceException("登录用户:" + webRegisterBody.getIdCard() + "不存在");
} }
...@@ -142,9 +147,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -142,9 +147,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
} }
/** /**
* 判断能不能点进去进入按钮 * 判断能不能点进去进入按钮 1能 0不能 当前状态(0=报名,1=待审核,2=通过,3=驳回,4=信息修改,5=准考证打印,6=成绩查询,7=审核)
* 1能 0不能
* 当前状态(0=报名,1=待审核,2=通过,3=驳回,4=信息修改,5=准考证打印,6=成绩查询,7=审核)
*/ */
@Override @Override
public int enterBtn(Long studentId, Long testId) { public int enterBtn(Long studentId, Long testId) {
...@@ -329,10 +332,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -329,10 +332,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
} }
/** /**
* 考生报名-暂存 * 考生报名-暂存 修改考生表 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据 此时存考试id,考生id,身份证,提交状态(0未提交)
* 修改考生表
* 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据
* 此时存考试id,考生id,身份证,提交状态(0未提交)
* 如果存在该考试考生关系数据,则对比身份证是否改变,修改了则修改关系表对应字段即可 * 如果存在该考试考生关系数据,则对比身份证是否改变,修改了则修改关系表对应字段即可
*/ */
@Override @Override
...@@ -372,8 +372,6 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -372,8 +372,6 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
s.setZhbysj(student.getZhbysj()); s.setZhbysj(student.getZhbysj());
recruitStudentMapper.updateById(s); recruitStudentMapper.updateById(s);
//从表信息的保存 //从表信息的保存
//简历 //简历
LambdaQueryWrapper<SchoolRecruitStudentJl> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitStudentJl> lqw = new LambdaQueryWrapper<>();
...@@ -381,7 +379,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -381,7 +379,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentJlMapper.delete(lqw); recruitStudentJlMapper.delete(lqw);
List<SchoolRecruitStudentJl> resumeData = student.getResumeData(); List<SchoolRecruitStudentJl> resumeData = student.getResumeData();
for(SchoolRecruitStudentJl j:resumeData){ for (SchoolRecruitStudentJl j : resumeData) {
j.setId(null); j.setId(null);
j.setStudentId(student.getId()); j.setStudentId(student.getId());
recruitStudentJlMapper.insert(j); recruitStudentJlMapper.insert(j);
...@@ -392,7 +390,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -392,7 +390,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentFamilyMapper.delete(lqw2); recruitStudentFamilyMapper.delete(lqw2);
List<SchoolRecruitStudentFamily> remeberData = student.getRemeberData(); List<SchoolRecruitStudentFamily> remeberData = student.getRemeberData();
for(SchoolRecruitStudentFamily j:remeberData){ for (SchoolRecruitStudentFamily j : remeberData) {
j.setId(null); j.setId(null);
j.setStudentId(student.getId()); j.setStudentId(student.getId());
recruitStudentFamilyMapper.insert(j); recruitStudentFamilyMapper.insert(j);
...@@ -403,16 +401,15 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -403,16 +401,15 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentFjbMapper.delete(lqw3); recruitStudentFjbMapper.delete(lqw3);
List<SchoolRecruitStudentFjb> fileList = student.getFileList(); List<SchoolRecruitStudentFjb> fileList = student.getFileList();
for(SchoolRecruitStudentFjb j:fileList){ for (SchoolRecruitStudentFjb j : fileList) {
j.setId(null); j.setId(null);
j.setStudentId(student.getId()); j.setStudentId(student.getId());
recruitStudentFjbMapper.insert(j); recruitStudentFjbMapper.insert(j);
} }
//获取考试考生关系 //获取考试考生关系
SchoolRecruitRelation relation = recruitRelationMapper.getRelationByIds(examId, student.getId()); SchoolRecruitRelation relation = recruitRelationMapper.getRelationByIds(examId,
student.getId());
//暂无关系,则一份关系 //暂无关系,则一份关系
if (StringUtils.isNull(relation)) { if (StringUtils.isNull(relation)) {
relation = new SchoolRecruitRelation(); relation = new SchoolRecruitRelation();
...@@ -434,10 +431,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -434,10 +431,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
} }
/** /**
* 考生报名-提交 * 考生报名-提交 修改考生表 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据 此时存考试id,考生id,身份证,提交状态(1已提交),审核状态为3=待审核
* 修改考生表
* 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据
* 此时存考试id,考生id,身份证,提交状态(1已提交),审核状态为3=待审核
* 如果存在该考试考生关系数据, 修改身份证号,提交状态(1已提交),审核状态为3=待审核,修改关系表即可 * 如果存在该考试考生关系数据, 修改身份证号,提交状态(1已提交),审核状态为3=待审核,修改关系表即可
*/ */
@Override @Override
...@@ -477,8 +471,6 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -477,8 +471,6 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
s.setZhbysj(student.getZhbysj()); s.setZhbysj(student.getZhbysj());
recruitStudentMapper.updateById(s); recruitStudentMapper.updateById(s);
//从表信息的保存 //从表信息的保存
//简历 //简历
LambdaQueryWrapper<SchoolRecruitStudentJl> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitStudentJl> lqw = new LambdaQueryWrapper<>();
...@@ -486,7 +478,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -486,7 +478,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentJlMapper.delete(lqw); recruitStudentJlMapper.delete(lqw);
List<SchoolRecruitStudentJl> resumeData = student.getResumeData(); List<SchoolRecruitStudentJl> resumeData = student.getResumeData();
for(SchoolRecruitStudentJl j:resumeData){ for (SchoolRecruitStudentJl j : resumeData) {
j.setStudentId(student.getId()); j.setStudentId(student.getId());
recruitStudentJlMapper.insert(j); recruitStudentJlMapper.insert(j);
} }
...@@ -496,7 +488,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -496,7 +488,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentFamilyMapper.delete(lqw2); recruitStudentFamilyMapper.delete(lqw2);
List<SchoolRecruitStudentFamily> remeberData = student.getRemeberData(); List<SchoolRecruitStudentFamily> remeberData = student.getRemeberData();
for(SchoolRecruitStudentFamily j:remeberData){ for (SchoolRecruitStudentFamily j : remeberData) {
j.setStudentId(student.getId()); j.setStudentId(student.getId());
recruitStudentFamilyMapper.insert(j); recruitStudentFamilyMapper.insert(j);
} }
...@@ -506,16 +498,15 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -506,16 +498,15 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentFjbMapper.delete(lqw3); recruitStudentFjbMapper.delete(lqw3);
List<SchoolRecruitStudentFjb> fileList = student.getFileList(); List<SchoolRecruitStudentFjb> fileList = student.getFileList();
for(SchoolRecruitStudentFjb j:fileList){ for (SchoolRecruitStudentFjb j : fileList) {
j.setId(null); j.setId(null);
j.setStudentId(student.getId()); j.setStudentId(student.getId());
recruitStudentFjbMapper.insert(j); recruitStudentFjbMapper.insert(j);
} }
//获取考试考生关系 //获取考试考生关系
SchoolRecruitRelation relation = recruitRelationMapper.getRelationByIds(examId, student.getId()); SchoolRecruitRelation relation = recruitRelationMapper.getRelationByIds(examId,
student.getId());
//暂无关系,则新增一份关系 //暂无关系,则新增一份关系
if (StringUtils.isNull(relation)) { if (StringUtils.isNull(relation)) {
relation = new SchoolRecruitRelation(); relation = new SchoolRecruitRelation();
...@@ -588,16 +579,22 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -588,16 +579,22 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
List<RecruitEduStudentVo> list = setState(voList); List<RecruitEduStudentVo> list = setState(voList);
//通过模糊查询过滤,匹配状态,审核状态,姓名(对应学生自己的报名信息),身份证号 //通过模糊查询过滤,匹配状态,审核状态,姓名(对应学生自己的报名信息),身份证号
if (StringUtils.isNotNull(vo.getMatchStatus())) { if (StringUtils.isNotNull(vo.getMatchStatus())) {
list = list.stream().filter(a -> a.getMatchStatus().equals(vo.getMatchStatus())).collect(Collectors.toList()); list = list.stream().filter(a -> a.getMatchStatus().equals(vo.getMatchStatus()))
.collect(Collectors.toList());
} }
if (StringUtils.isNotNull(vo.getAuditStatus())) { if (StringUtils.isNotNull(vo.getAuditStatus())) {
list = list.stream().filter(a -> a.getAuditStatus().equals(vo.getAuditStatus())).collect(Collectors.toList()); list = list.stream().filter(
a -> StringUtils.isNotNull(a.getAuditStatus()) && a.getAuditStatus()
.equals(vo.getAuditStatus())).collect(Collectors.toList());
} }
if (StringUtils.isNotNull(vo.getStudentName())) { if (StringUtils.isNotNull(vo.getStudentName())) {
list = list.stream().filter(a -> a.getStudentName().contains(vo.getStudentName())).collect(Collectors.toList()); list = list.stream().filter(
a -> StringUtils.isNotNull(a.getStudentName()) && a.getStudentName()
.contains(vo.getStudentName())).collect(Collectors.toList());
} }
if (StringUtils.isNotNull(vo.getInfoIdCard())) { if (StringUtils.isNotNull(vo.getInfoIdCard())) {
list = list.stream().filter(a -> a.getInfoIdCard().contains(vo.getInfoIdCard())).collect(Collectors.toList()); list = list.stream().filter(a -> a.getInfoIdCard().contains(vo.getInfoIdCard()))
.collect(Collectors.toList());
} }
return list; return list;
} }
...@@ -615,7 +612,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -615,7 +612,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentMapper.updateById(s); recruitStudentMapper.updateById(s);
//获取考试考生关系 //获取考试考生关系
SchoolRecruitRelation relation = recruitRelationMapper.getRelationByIds(examId, student.getId()); SchoolRecruitRelation relation = recruitRelationMapper.getRelationByIds(examId,
student.getId());
//身份证号改变 //身份证号改变
relation.setInfoIdCard(student.getIdCard()); relation.setInfoIdCard(student.getIdCard());
relation.setJuniorId(student.getJuniorId()); relation.setJuniorId(student.getJuniorId());
...@@ -625,10 +623,11 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -625,10 +623,11 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
//教育局信息修改 //教育局信息修改
LambdaQueryWrapper<EduRecruitStudent> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<EduRecruitStudent> lqw = new LambdaQueryWrapper<>();
lqw.eq(EduRecruitStudent::getExamId,examId).eq(EduRecruitStudent::getEduIdCard,student.getIdCard()); lqw.eq(EduRecruitStudent::getExamId, examId)
.eq(EduRecruitStudent::getEduIdCard, student.getIdCard());
List<EduRecruitStudent> list = eduRecruitStudentMapper.selectList(lqw); List<EduRecruitStudent> list = eduRecruitStudentMapper.selectList(lqw);
//存在 1条教育局信息 //存在 1条教育局信息
if(StringUtils.isNotNull(list) && list.size() > 0){ if (StringUtils.isNotNull(list) && list.size() > 0) {
//修改 //修改
EduRecruitStudent edu = list.get(0); EduRecruitStudent edu = list.get(0);
edu.setEduStudentName(student.getEduStudentName()); edu.setEduStudentName(student.getEduStudentName());
...@@ -640,7 +639,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -640,7 +639,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
edu.setEduSex(student.getEduSex()); edu.setEduSex(student.getEduSex());
edu.update(); edu.update();
return eduRecruitStudentMapper.updateById(edu); return eduRecruitStudentMapper.updateById(edu);
}else { } else {
//不存在,新增对应教育局信息 //不存在,新增对应教育局信息
EduRecruitStudent edu = new EduRecruitStudent(); EduRecruitStudent edu = new EduRecruitStudent();
edu.setExamId(examId); edu.setExamId(examId);
...@@ -674,7 +673,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -674,7 +673,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentMapper.updateById(s); recruitStudentMapper.updateById(s);
//获取考试考生关系 //获取考试考生关系
SchoolRecruitRelation relation = recruitRelationMapper.getRelationByIds(examId, student.getId()); SchoolRecruitRelation relation = recruitRelationMapper.getRelationByIds(examId,
student.getId());
//身份证号改变 //身份证号改变
relation.setInfoIdCard(student.getIdCard()); relation.setInfoIdCard(student.getIdCard());
relation.setJuniorId(student.getJuniorId()); relation.setJuniorId(student.getJuniorId());
...@@ -713,7 +713,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -713,7 +713,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
int allNum = list.size(); int allNum = list.size();
for (SchoolRecruitStudentVo student : list) { for (SchoolRecruitStudentVo student : list) {
//根据考试id,和学生身份证号查出教育局学生信息进行比对 //根据考试id,和学生身份证号查出教育局学生信息进行比对
EduRecruitStudent eduRecruitStudent = eduRecruitStudentMapper.getStudent(examId, student.getIdCard()); EduRecruitStudent eduRecruitStudent = eduRecruitStudentMapper.getStudent(examId,
student.getIdCard());
boolean flag = true; boolean flag = true;
if (StringUtils.isNotNull(eduRecruitStudent)) { if (StringUtils.isNotNull(eduRecruitStudent)) {
//匹配学生和教育局信息 //匹配学生和教育局信息
...@@ -736,17 +737,21 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -736,17 +737,21 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
//全部都匹配 //全部都匹配
//判断状态是否已是通过 //判断状态是否已是通过
LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolRecruitRelation::getExamId, examId).eq(SchoolRecruitRelation::getStudentId, student.getId()); lqw.eq(SchoolRecruitRelation::getExamId, examId)
.eq(SchoolRecruitRelation::getStudentId, student.getId());
SchoolRecruitRelation relation = recruitRelationMapper.selectList(lqw).get(0); SchoolRecruitRelation relation = recruitRelationMapper.selectList(lqw).get(0);
if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) { if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + student.getIdCard() + "的学生信息已驳回,无法通过;"); successMsg.append(
"<br/>" + "身份证号为" + student.getIdCard() + "的学生信息已驳回,无法通过;");
} else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + student.getIdCard() + "的学生信息已通过,无法再次通过;"); successMsg.append(
"<br/>" + "身份证号为" + student.getIdCard() + "的学生信息已通过,无法再次通过;");
} else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + student.getIdCard() + "的学生信息已退回修改,没有再次提交申请,无法通过;"); successMsg.append("<br/>" + "身份证号为" + student.getIdCard()
+ "的学生信息已退回修改,没有再次提交申请,无法通过;");
} else { } else {
relation.setAuditStatus(RecruitExamConstant.PASS); relation.setAuditStatus(RecruitExamConstant.PASS);
recruitRelationMapper.updateById(relation); recruitRelationMapper.updateById(relation);
...@@ -755,19 +760,28 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -755,19 +760,28 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
} else { } else {
//存在教育局信息,但是没有匹配上 //存在教育局信息,但是没有匹配上
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + student.getIdCard() + "的学生,信息不匹配,无法通过;"); successMsg.append(
"<br/>" + "身份证号为" + student.getIdCard() + "的学生,信息不匹配,无法通过;");
} }
} else { } else {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + student.getIdCard() + "的学生,无教育局信息,无法通过;"); successMsg.append(
"<br/>" + "身份证号为" + student.getIdCard() + "的学生,无教育局信息,无法通过;");
} }
} }
if(allNum != successNum){ if (allNum != successNum) {
//存在无法通过的数据 //存在无法通过的数据
successMsg.insert(0, "选中的有效数据共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum + "</span> 条(排除所有未报名的数据),已将选中数据中所有匹配的、待审核的 <span style='color: red;font-size: 20px; font-weight:bold'>"+ successNum +"</span> 条数据的状态改为通过!有 <span style='color: red;font-size: 20px; font-weight:bold'>" + failureNum + "</span> 条不符合条件的数据,不通过的理由如下:"); successMsg.insert(0,
"选中的有效数据共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum
+ "</span> 条(排除所有未报名的数据),已将选中数据中所有匹配的、待审核的 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ successNum
+ "</span> 条数据的状态改为通过!有 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ failureNum + "</span> 条不符合条件的数据,不通过的理由如下:");
return successMsg.toString(); return successMsg.toString();
}else { } else {
return "恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为通过!共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum + " </span> 条"; return
"恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为通过!共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ allNum + " </span> 条";
} }
} }
...@@ -778,7 +792,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -778,7 +792,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
WebSchoolRecruitStudentVo vo = recruitStudentMapper.getStuInfo(studentId, examId); WebSchoolRecruitStudentVo vo = recruitStudentMapper.getStuInfo(studentId, examId);
//根据考试id,和学生身份证号查出教育局学生信息进行比对 //根据考试id,和学生身份证号查出教育局学生信息进行比对
EduRecruitStudent eduRecruitStudent = eduRecruitStudentMapper.getStudent(examId, vo.getIdCard()); EduRecruitStudent eduRecruitStudent = eduRecruitStudentMapper.getStudent(examId,
vo.getIdCard());
boolean flag = true; boolean flag = true;
if (StringUtils.isNotNull(eduRecruitStudent)) { if (StringUtils.isNotNull(eduRecruitStudent)) {
//匹配学生和教育局信息 //匹配学生和教育局信息
...@@ -801,14 +816,17 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -801,14 +816,17 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
//全部都匹配 //全部都匹配
//判断状态是否已是通过 //判断状态是否已是通过
LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolRecruitRelation::getExamId, examId).eq(SchoolRecruitRelation::getStudentId, vo.getId()); lqw.eq(SchoolRecruitRelation::getExamId, examId)
.eq(SchoolRecruitRelation::getStudentId, vo.getId());
SchoolRecruitRelation relation = recruitRelationMapper.selectList(lqw).get(0); SchoolRecruitRelation relation = recruitRelationMapper.selectList(lqw).get(0);
if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) { if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + vo.getIdCard() + "的学生信息已驳回,无法通过"); throw new ServiceException("身份证号为" + vo.getIdCard() + "的学生信息已驳回,无法通过");
} else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + vo.getIdCard() + "的学生信息已通过,无法再次通过"); throw new ServiceException(
"身份证号为" + vo.getIdCard() + "的学生信息已通过,无法再次通过");
} else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + vo.getIdCard() + "的学生信息已退回修改,没有再次提交申请,无法通过"); throw new ServiceException(
"身份证号为" + vo.getIdCard() + "的学生信息已退回修改,没有再次提交申请,无法通过");
} else { } else {
relation.setAuditStatus(RecruitExamConstant.PASS); relation.setAuditStatus(RecruitExamConstant.PASS);
return recruitRelationMapper.updateById(relation); return recruitRelationMapper.updateById(relation);
...@@ -834,32 +852,43 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -834,32 +852,43 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
StringBuilder successMsg = new StringBuilder(); StringBuilder successMsg = new StringBuilder();
//查询出所有studentIds对应的学生信息 //查询出所有studentIds对应的学生信息
LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolRecruitRelation::getExamId, examId).in(SchoolRecruitRelation::getStudentId, studentIds); lqw.eq(SchoolRecruitRelation::getExamId, examId)
.in(SchoolRecruitRelation::getStudentId, studentIds);
List<SchoolRecruitRelation> list = recruitRelationMapper.selectList(lqw); List<SchoolRecruitRelation> list = recruitRelationMapper.selectList(lqw);
//选中的有效学生信息总数 //选中的有效学生信息总数
int allNum = list.size(); int allNum = list.size();
for (SchoolRecruitRelation relation : list) { for (SchoolRecruitRelation relation : list) {
if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) { if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已驳回,无法退回修改;"); successMsg.append(
"<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已驳回,无法退回修改;");
} else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已通过,无法退回修改;"); successMsg.append(
"<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已通过,无法退回修改;");
} else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已退回修改,没有再次提交申请,无法再次退回修改;"); successMsg.append("<br/>" + "身份证号为" + relation.getInfoIdCard()
+ "的学生信息已退回修改,没有再次提交申请,无法再次退回修改;");
} else { } else {
relation.setAuditStatus(RecruitExamConstant.EDIT); relation.setAuditStatus(RecruitExamConstant.EDIT);
recruitRelationMapper.updateById(relation); recruitRelationMapper.updateById(relation);
successNum++; successNum++;
} }
} }
if(allNum != successNum){ if (allNum != successNum) {
//存在无法退回修改的数据 //存在无法退回修改的数据
successMsg.insert(0, "选中的有效数据共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum + "</span> 条(排除所有未报名的数据),已将选中数据中所有匹配的、待审核的 <span style='color: red;font-size: 20px; font-weight:bold'>"+ successNum +"</span> 条数据的状态改为退回修改!有 <span style='color: red;font-size: 20px; font-weight:bold'>" + failureNum + "</span> 条不符合条件的数据,无法退回修改的理由如下:"); successMsg.insert(0,
"选中的有效数据共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum
+ "</span> 条(排除所有未报名的数据),已将选中数据中所有匹配的、待审核的 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ successNum
+ "</span> 条数据的状态改为退回修改!有 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ failureNum + "</span> 条不符合条件的数据,无法退回修改的理由如下:");
return successMsg.toString(); return successMsg.toString();
}else { } else {
return "恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为退回修改,共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum + "</span> 条!"; return
"恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为退回修改,共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ allNum + "</span> 条!";
} }
} }
...@@ -867,15 +896,19 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -867,15 +896,19 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
public int backOne(Long examId, Long studentId) { public int backOne(Long examId, Long studentId) {
//查询出studentId对应的学生考试信息 //查询出studentId对应的学生考试信息
LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolRecruitRelation::getExamId, examId).eq(SchoolRecruitRelation::getStudentId, studentId); lqw.eq(SchoolRecruitRelation::getExamId, examId)
.eq(SchoolRecruitRelation::getStudentId, studentId);
SchoolRecruitRelation relation = recruitRelationMapper.selectList(lqw).get(0); SchoolRecruitRelation relation = recruitRelationMapper.selectList(lqw).get(0);
if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) { if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + relation.getInfoIdCard() + "的学生信息已驳回,无法退回修改"); throw new ServiceException(
"身份证号为" + relation.getInfoIdCard() + "的学生信息已驳回,无法退回修改");
} else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + relation.getInfoIdCard() + "的学生信息已通过,无法退回修改"); throw new ServiceException(
"身份证号为" + relation.getInfoIdCard() + "的学生信息已通过,无法退回修改");
} else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + relation.getInfoIdCard() + "的学生信息已退回修改,没有再次提交申请,无法再次退回修改"); throw new ServiceException("身份证号为" + relation.getInfoIdCard()
+ "的学生信息已退回修改,没有再次提交申请,无法再次退回修改");
} else { } else {
relation.setAuditStatus(RecruitExamConstant.EDIT); relation.setAuditStatus(RecruitExamConstant.EDIT);
return recruitRelationMapper.updateById(relation); return recruitRelationMapper.updateById(relation);
...@@ -893,32 +926,43 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -893,32 +926,43 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
StringBuilder successMsg = new StringBuilder(); StringBuilder successMsg = new StringBuilder();
//查询出所有studentIds对应的学生信息 //查询出所有studentIds对应的学生信息
LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolRecruitRelation::getExamId, examId).in(SchoolRecruitRelation::getStudentId, studentIds); lqw.eq(SchoolRecruitRelation::getExamId, examId)
.in(SchoolRecruitRelation::getStudentId, studentIds);
List<SchoolRecruitRelation> list = recruitRelationMapper.selectList(lqw); List<SchoolRecruitRelation> list = recruitRelationMapper.selectList(lqw);
//选中的有效学生信息总数 //选中的有效学生信息总数
int allNum = list.size(); int allNum = list.size();
for (SchoolRecruitRelation relation : list) { for (SchoolRecruitRelation relation : list) {
if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) { if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已驳回,无法再次驳回;"); successMsg.append(
"<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已驳回,无法再次驳回;");
} else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已通过,无法驳回;"); successMsg.append(
"<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已通过,无法驳回;");
} else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) {
failureNum++; failureNum++;
successMsg.append("<br/>" + "身份证号为" + relation.getInfoIdCard() + "的学生信息已退回修改,没有再次提交申请,无法驳回;"); successMsg.append("<br/>" + "身份证号为" + relation.getInfoIdCard()
+ "的学生信息已退回修改,没有再次提交申请,无法驳回;");
} else { } else {
relation.setAuditStatus(RecruitExamConstant.REJECT); relation.setAuditStatus(RecruitExamConstant.REJECT);
recruitRelationMapper.updateById(relation); recruitRelationMapper.updateById(relation);
successNum++; successNum++;
} }
} }
if(allNum != successNum){ if (allNum != successNum) {
//存在无法通过的数据 //存在无法通过的数据
successMsg.insert(0, "选中的有效数据共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum + "</span> 条(排除所有未报名的数据),已将选中数据中所有待审核的 <span style='color: red;font-size: 20px; font-weight:bold'>"+ successNum +"</span> 条数据的状态改为驳回!有 <span style='color: red;font-size: 20px; font-weight:bold'>" + failureNum + "</span> 条不符合条件的数据,无法驳回的理由如下:"); successMsg.insert(0,
"选中的有效数据共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum
+ "</span> 条(排除所有未报名的数据),已将选中数据中所有待审核的 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ successNum
+ "</span> 条数据的状态改为驳回!有 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ failureNum + "</span> 条不符合条件的数据,无法驳回的理由如下:");
return successMsg.toString(); return successMsg.toString();
}else { } else {
return "恭喜您,已将选中的所有有效数据的数据(排除所有未报名的数据)的状态改为驳回,共 <span style='color: red;font-size: 20px; font-weight:bold'>" + allNum + "</span> 条!"; return
"恭喜您,已将选中的所有有效数据的数据(排除所有未报名的数据)的状态改为驳回,共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+ allNum + "</span> 条!";
} }
} }
...@@ -926,14 +970,18 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -926,14 +970,18 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
public int rejectOne(Long examId, Long studentId) { public int rejectOne(Long examId, Long studentId) {
//查询出studentId对应的学生信息 //查询出studentId对应的学生信息
LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitRelation> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolRecruitRelation::getExamId, examId).eq(SchoolRecruitRelation::getStudentId, studentId); lqw.eq(SchoolRecruitRelation::getExamId, examId)
.eq(SchoolRecruitRelation::getStudentId, studentId);
SchoolRecruitRelation relation = recruitRelationMapper.selectList(lqw).get(0); SchoolRecruitRelation relation = recruitRelationMapper.selectList(lqw).get(0);
if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) { if (RecruitExamConstant.REJECT.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + relation.getInfoIdCard() + "的学生信息已驳回,无法再次驳回"); throw new ServiceException(
"身份证号为" + relation.getInfoIdCard() + "的学生信息已驳回,无法再次驳回");
} else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.PASS.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + relation.getInfoIdCard() + "的学生信息已通过,无法驳回"); throw new ServiceException(
"身份证号为" + relation.getInfoIdCard() + "的学生信息已通过,无法驳回");
} else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) { } else if (RecruitExamConstant.EDIT.equals(relation.getAuditStatus())) {
throw new ServiceException("身份证号为" + relation.getInfoIdCard() + "的学生信息已退回修改,没有再次提交申请,无法驳回"); throw new ServiceException("身份证号为" + relation.getInfoIdCard()
+ "的学生信息已退回修改,没有再次提交申请,无法驳回");
} else { } else {
relation.setAuditStatus(RecruitExamConstant.REJECT); relation.setAuditStatus(RecruitExamConstant.REJECT);
return recruitRelationMapper.updateById(relation); return recruitRelationMapper.updateById(relation);
...@@ -947,8 +995,10 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt ...@@ -947,8 +995,10 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
public List<SchoolRecruitStudent> queryList(SchoolRecruitStudent student) { public List<SchoolRecruitStudent> queryList(SchoolRecruitStudent student) {
LambdaQueryWrapper<SchoolRecruitStudent> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolRecruitStudent> lqw = new LambdaQueryWrapper<>();
lqw lqw
.like(isNotNull(student.getStudentName()), SchoolRecruitStudent::getStudentName, student.getStudentName()) .like(isNotNull(student.getStudentName()), SchoolRecruitStudent::getStudentName,
.like(isNotNull(student.getPhoneNumber()), SchoolRecruitStudent::getPhoneNumber, student.getPhoneNumber()) student.getStudentName())
.like(isNotNull(student.getPhoneNumber()), SchoolRecruitStudent::getPhoneNumber,
student.getPhoneNumber())
.like(isNotNull(student.getIdCard()), SchoolRecruitStudent::getIdCard, student.getIdCard()) .like(isNotNull(student.getIdCard()), SchoolRecruitStudent::getIdCard, student.getIdCard())
.orderByDesc(SchoolRecruitStudent::getCreateTime) .orderByDesc(SchoolRecruitStudent::getCreateTime)
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment