Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
9bce135b
Commit
9bce135b
authored
Apr 09, 2024
by
jsy672
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改公开招聘报名列表查询接口
parent
43f4ee33
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
130 additions
and
80 deletions
+130
-80
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitStudentServiceImpl.java
+130
-80
No files found.
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitStudentServiceImpl.java
View file @
9bce135b
...
...
@@ -51,7 +51,10 @@ import yangtz.cs.liu.webpage.vo.RecruitAdmissionTicketVo;
import
yangtz.cs.liu.webpage.vo.WebSchoolRecruitStudentVo
;
@Service
public
class
SchoolRecruitStudentServiceImpl
extends
ServiceImpl
<
SchoolRecruitStudentMapper
,
SchoolRecruitStudent
>
implements
ISchoolRecruitStudentService
{
public
class
SchoolRecruitStudentServiceImpl
extends
ServiceImpl
<
SchoolRecruitStudentMapper
,
SchoolRecruitStudent
>
implements
ISchoolRecruitStudentService
{
@Autowired
private
SchoolRecruitStudentMapper
recruitStudentMapper
;
...
...
@@ -116,7 +119,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
if
(!
regFlag
)
{
msg
=
"注册失败,请联系系统管理人员"
;
}
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
;
...
...
@@ -126,7 +130,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
@Override
public
WebLoginBody
login
(
WebRegisterBody
webRegisterBody
)
{
WebLoginBody
loginBody
=
new
WebLoginBody
();
SchoolRecruitStudent
student
=
recruitStudentMapper
.
getStudentByPhoneNumber
(
webRegisterBody
.
getPhoneNumber
(),
webRegisterBody
.
getIdCard
());
SchoolRecruitStudent
student
=
recruitStudentMapper
.
getStudentByPhoneNumber
(
webRegisterBody
.
getPhoneNumber
(),
webRegisterBody
.
getIdCard
());
if
(
StringUtils
.
isNull
(
student
))
{
throw
new
ServiceException
(
"登录用户:"
+
webRegisterBody
.
getIdCard
()
+
"不存在"
);
}
...
...
@@ -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
public
int
enterBtn
(
Long
studentId
,
Long
testId
)
{
...
...
@@ -329,10 +332,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
}
/**
* 考生报名-暂存
* 修改考生表
* 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据
* 此时存考试id,考生id,身份证,提交状态(0未提交)
* 考生报名-暂存 修改考生表 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据 此时存考试id,考生id,身份证,提交状态(0未提交)
* 如果存在该考试考生关系数据,则对比身份证是否改变,修改了则修改关系表对应字段即可
*/
@Override
...
...
@@ -372,8 +372,6 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
s
.
setZhbysj
(
student
.
getZhbysj
());
recruitStudentMapper
.
updateById
(
s
);
//从表信息的保存
//简历
LambdaQueryWrapper
<
SchoolRecruitStudentJl
>
lqw
=
new
LambdaQueryWrapper
<>();
...
...
@@ -381,7 +379,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentJlMapper
.
delete
(
lqw
);
List
<
SchoolRecruitStudentJl
>
resumeData
=
student
.
getResumeData
();
for
(
SchoolRecruitStudentJl
j:
resumeData
)
{
for
(
SchoolRecruitStudentJl
j
:
resumeData
)
{
j
.
setId
(
null
);
j
.
setStudentId
(
student
.
getId
());
recruitStudentJlMapper
.
insert
(
j
);
...
...
@@ -392,7 +390,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentFamilyMapper
.
delete
(
lqw2
);
List
<
SchoolRecruitStudentFamily
>
remeberData
=
student
.
getRemeberData
();
for
(
SchoolRecruitStudentFamily
j:
remeberData
)
{
for
(
SchoolRecruitStudentFamily
j
:
remeberData
)
{
j
.
setId
(
null
);
j
.
setStudentId
(
student
.
getId
());
recruitStudentFamilyMapper
.
insert
(
j
);
...
...
@@ -403,16 +401,15 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentFjbMapper
.
delete
(
lqw3
);
List
<
SchoolRecruitStudentFjb
>
fileList
=
student
.
getFileList
();
for
(
SchoolRecruitStudentFjb
j:
fileList
)
{
for
(
SchoolRecruitStudentFjb
j
:
fileList
)
{
j
.
setId
(
null
);
j
.
setStudentId
(
student
.
getId
());
recruitStudentFjbMapper
.
insert
(
j
);
}
//获取考试考生关系
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
//暂无关系,则一份关系
if
(
StringUtils
.
isNull
(
relation
))
{
relation
=
new
SchoolRecruitRelation
();
...
...
@@ -434,10 +431,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
}
/**
* 考生报名-提交
* 修改考生表
* 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据
* 此时存考试id,考生id,身份证,提交状态(1已提交),审核状态为3=待审核
* 考生报名-提交 修改考生表 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据 此时存考试id,考生id,身份证,提交状态(1已提交),审核状态为3=待审核
* 如果存在该考试考生关系数据, 修改身份证号,提交状态(1已提交),审核状态为3=待审核,修改关系表即可
*/
@Override
...
...
@@ -477,8 +471,6 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
s
.
setZhbysj
(
student
.
getZhbysj
());
recruitStudentMapper
.
updateById
(
s
);
//从表信息的保存
//简历
LambdaQueryWrapper
<
SchoolRecruitStudentJl
>
lqw
=
new
LambdaQueryWrapper
<>();
...
...
@@ -486,7 +478,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentJlMapper
.
delete
(
lqw
);
List
<
SchoolRecruitStudentJl
>
resumeData
=
student
.
getResumeData
();
for
(
SchoolRecruitStudentJl
j:
resumeData
)
{
for
(
SchoolRecruitStudentJl
j
:
resumeData
)
{
j
.
setStudentId
(
student
.
getId
());
recruitStudentJlMapper
.
insert
(
j
);
}
...
...
@@ -496,7 +488,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentFamilyMapper
.
delete
(
lqw2
);
List
<
SchoolRecruitStudentFamily
>
remeberData
=
student
.
getRemeberData
();
for
(
SchoolRecruitStudentFamily
j:
remeberData
)
{
for
(
SchoolRecruitStudentFamily
j
:
remeberData
)
{
j
.
setStudentId
(
student
.
getId
());
recruitStudentFamilyMapper
.
insert
(
j
);
}
...
...
@@ -506,16 +498,15 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentFjbMapper
.
delete
(
lqw3
);
List
<
SchoolRecruitStudentFjb
>
fileList
=
student
.
getFileList
();
for
(
SchoolRecruitStudentFjb
j:
fileList
)
{
for
(
SchoolRecruitStudentFjb
j
:
fileList
)
{
j
.
setId
(
null
);
j
.
setStudentId
(
student
.
getId
());
recruitStudentFjbMapper
.
insert
(
j
);
}
//获取考试考生关系
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
//暂无关系,则新增一份关系
if
(
StringUtils
.
isNull
(
relation
))
{
relation
=
new
SchoolRecruitRelation
();
...
...
@@ -588,16 +579,22 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
List
<
RecruitEduStudentVo
>
list
=
setState
(
voList
);
//通过模糊查询过滤,匹配状态,审核状态,姓名(对应学生自己的报名信息),身份证号
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
()))
{
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
()))
{
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
()))
{
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
;
}
...
...
@@ -615,7 +612,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentMapper
.
updateById
(
s
);
//获取考试考生关系
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
//身份证号改变
relation
.
setInfoIdCard
(
student
.
getIdCard
());
relation
.
setJuniorId
(
student
.
getJuniorId
());
...
...
@@ -625,10 +623,11 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
//教育局信息修改
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
);
//存在 1条教育局信息
if
(
StringUtils
.
isNotNull
(
list
)
&&
list
.
size
()
>
0
)
{
if
(
StringUtils
.
isNotNull
(
list
)
&&
list
.
size
()
>
0
)
{
//修改
EduRecruitStudent
edu
=
list
.
get
(
0
);
edu
.
setEduStudentName
(
student
.
getEduStudentName
());
...
...
@@ -640,7 +639,7 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
edu
.
setEduSex
(
student
.
getEduSex
());
edu
.
update
();
return
eduRecruitStudentMapper
.
updateById
(
edu
);
}
else
{
}
else
{
//不存在,新增对应教育局信息
EduRecruitStudent
edu
=
new
EduRecruitStudent
();
edu
.
setExamId
(
examId
);
...
...
@@ -674,7 +673,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
recruitStudentMapper
.
updateById
(
s
);
//获取考试考生关系
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
//身份证号改变
relation
.
setInfoIdCard
(
student
.
getIdCard
());
relation
.
setJuniorId
(
student
.
getJuniorId
());
...
...
@@ -713,7 +713,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
int
allNum
=
list
.
size
();
for
(
SchoolRecruitStudentVo
student
:
list
)
{
//根据考试id,和学生身份证号查出教育局学生信息进行比对
EduRecruitStudent
eduRecruitStudent
=
eduRecruitStudentMapper
.
getStudent
(
examId
,
student
.
getIdCard
());
EduRecruitStudent
eduRecruitStudent
=
eduRecruitStudentMapper
.
getStudent
(
examId
,
student
.
getIdCard
());
boolean
flag
=
true
;
if
(
StringUtils
.
isNotNull
(
eduRecruitStudent
))
{
//匹配学生和教育局信息
...
...
@@ -736,17 +737,21 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
//全部都匹配
//判断状态是否已是通过
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
);
if
(
RecruitExamConstant
.
REJECT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生信息已驳回,无法通过;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生信息已驳回,无法通过;"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生信息已通过,无法再次通过;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生信息已通过,无法再次通过;"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法通过;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法通过;"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
recruitRelationMapper
.
updateById
(
relation
);
...
...
@@ -755,19 +760,28 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
}
else
{
//存在教育局信息,但是没有匹配上
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生,信息不匹配,无法通过;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生,信息不匹配,无法通过;"
);
}
}
else
{
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
();
}
else
{
return
"恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为通过!共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
" </span> 条"
;
}
else
{
return
"恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为通过!共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
" </span> 条"
;
}
}
...
...
@@ -778,7 +792,8 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
WebSchoolRecruitStudentVo
vo
=
recruitStudentMapper
.
getStuInfo
(
studentId
,
examId
);
//根据考试id,和学生身份证号查出教育局学生信息进行比对
EduRecruitStudent
eduRecruitStudent
=
eduRecruitStudentMapper
.
getStudent
(
examId
,
vo
.
getIdCard
());
EduRecruitStudent
eduRecruitStudent
=
eduRecruitStudentMapper
.
getStudent
(
examId
,
vo
.
getIdCard
());
boolean
flag
=
true
;
if
(
StringUtils
.
isNotNull
(
eduRecruitStudent
))
{
//匹配学生和教育局信息
...
...
@@ -801,14 +816,17 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
//全部都匹配
//判断状态是否已是通过
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
);
if
(
RecruitExamConstant
.
REJECT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
vo
.
getIdCard
()
+
"的学生信息已驳回,无法通过"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
vo
.
getIdCard
()
+
"的学生信息已通过,无法再次通过"
);
throw
new
ServiceException
(
"身份证号为"
+
vo
.
getIdCard
()
+
"的学生信息已通过,无法再次通过"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
vo
.
getIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法通过"
);
throw
new
ServiceException
(
"身份证号为"
+
vo
.
getIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法通过"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
return
recruitRelationMapper
.
updateById
(
relation
);
...
...
@@ -834,32 +852,43 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
StringBuilder
successMsg
=
new
StringBuilder
();
//查询出所有studentIds对应的学生信息
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
);
//选中的有效学生信息总数
int
allNum
=
list
.
size
();
for
(
SchoolRecruitRelation
relation
:
list
)
{
if
(
RecruitExamConstant
.
REJECT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已驳回,无法退回修改;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已驳回,无法退回修改;"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法退回修改;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法退回修改;"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法再次退回修改;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法再次退回修改;"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
EDIT
);
recruitRelationMapper
.
updateById
(
relation
);
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
();
}
else
{
return
"恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为退回修改,共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
"</span> 条!"
;
}
else
{
return
"恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为退回修改,共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
"</span> 条!"
;
}
}
...
...
@@ -867,15 +896,19 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
public
int
backOne
(
Long
examId
,
Long
studentId
)
{
//查询出studentId对应的学生考试信息
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
);
if
(
RecruitExamConstant
.
REJECT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已驳回,无法退回修改"
);
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已驳回,无法退回修改"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法退回修改"
);
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法退回修改"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法再次退回修改"
);
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法再次退回修改"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
EDIT
);
return
recruitRelationMapper
.
updateById
(
relation
);
...
...
@@ -893,32 +926,43 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
StringBuilder
successMsg
=
new
StringBuilder
();
//查询出所有studentIds对应的学生信息
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
);
//选中的有效学生信息总数
int
allNum
=
list
.
size
();
for
(
SchoolRecruitRelation
relation
:
list
)
{
if
(
RecruitExamConstant
.
REJECT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已驳回,无法再次驳回;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已驳回,无法再次驳回;"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法驳回;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法驳回;"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法驳回;"
);
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法驳回;"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
REJECT
);
recruitRelationMapper
.
updateById
(
relation
);
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
();
}
else
{
return
"恭喜您,已将选中的所有有效数据的数据(排除所有未报名的数据)的状态改为驳回,共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
"</span> 条!"
;
}
else
{
return
"恭喜您,已将选中的所有有效数据的数据(排除所有未报名的数据)的状态改为驳回,共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
"</span> 条!"
;
}
}
...
...
@@ -926,14 +970,18 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
public
int
rejectOne
(
Long
examId
,
Long
studentId
)
{
//查询出studentId对应的学生信息
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
);
if
(
RecruitExamConstant
.
REJECT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已驳回,无法再次驳回"
);
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已驳回,无法再次驳回"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法驳回"
);
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法驳回"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法驳回"
);
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法驳回"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
REJECT
);
return
recruitRelationMapper
.
updateById
(
relation
);
...
...
@@ -947,8 +995,10 @@ public class SchoolRecruitStudentServiceImpl extends ServiceImpl<SchoolRecruitSt
public
List
<
SchoolRecruitStudent
>
queryList
(
SchoolRecruitStudent
student
)
{
LambdaQueryWrapper
<
SchoolRecruitStudent
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
like
(
isNotNull
(
student
.
getStudentName
()),
SchoolRecruitStudent:
:
getStudentName
,
student
.
getStudentName
())
.
like
(
isNotNull
(
student
.
getPhoneNumber
()),
SchoolRecruitStudent:
:
getPhoneNumber
,
student
.
getPhoneNumber
())
.
like
(
isNotNull
(
student
.
getStudentName
()),
SchoolRecruitStudent:
:
getStudentName
,
student
.
getStudentName
())
.
like
(
isNotNull
(
student
.
getPhoneNumber
()),
SchoolRecruitStudent:
:
getPhoneNumber
,
student
.
getPhoneNumber
())
.
like
(
isNotNull
(
student
.
getIdCard
()),
SchoolRecruitStudent:
:
getIdCard
,
student
.
getIdCard
())
.
orderByDesc
(
SchoolRecruitStudent:
:
getCreateTime
)
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment