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
945d5eb7
Commit
945d5eb7
authored
Apr 16, 2024
by
jsy672
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加报名审批退回信息
parent
dc554805
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
436 additions
and
382 deletions
+436
-382
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/examination/SchoolRecruitExamController.java
+311
-309
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitRelation.java
+103
-66
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitStudentServiceImpl.java
+3
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitStudentService.java
+3
-4
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitExamBackVo.java
+12
-0
smart-campus/src/main/java/yangtz/cs/liu/webpage/vo/WebSchoolRecruitStudentVo.java
+2
-2
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitRelationMapper.xml
+1
-0
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitStudentMapper.xml
+1
-0
No files found.
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/examination/SchoolRecruitExamController.java
View file @
945d5eb7
...
...
@@ -35,6 +35,7 @@ import yangtz.cs.liu.campus.service.recruit.ISchoolRecruitRelationService;
import
yangtz.cs.liu.campus.service.recruit.ISchoolRecruitStudentService
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitEduStudentVo
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamAddressVo
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamBackVo
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo
;
import
yangtz.cs.liu.campus.vo.recruit.SchoolRecruitExamVo
;
...
...
@@ -44,324 +45,325 @@ import yangtz.cs.liu.campus.vo.recruit.SchoolRecruitExamVo;
@RestController
@RequestMapping
(
"/recruitExam"
)
public
class
SchoolRecruitExamController
extends
BaseController
{
@Autowired
private
ISchoolRecruitExamService
recruitExamService
;
@Autowired
private
ISchoolRecruitStudentService
recruitStudentService
;
@Autowired
private
ISchoolRecruitRelationService
recruitRelationService
;
@Autowired
private
IEduRecruitStudentService
eduRecruitStudentService
;
@Autowired
private
ISchoolRecruitProjectService
projectService
;
/**
* 考务管理-考试管理-列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SchoolRecruitExam
exam
)
{
startPage
();
return
getDataTable
(
recruitExamService
.
queryList
(
exam
));
@Autowired
private
ISchoolRecruitExamService
recruitExamService
;
@Autowired
private
ISchoolRecruitStudentService
recruitStudentService
;
@Autowired
private
ISchoolRecruitRelationService
recruitRelationService
;
@Autowired
private
IEduRecruitStudentService
eduRecruitStudentService
;
@Autowired
private
ISchoolRecruitProjectService
projectService
;
/**
* 考务管理-考试管理-列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SchoolRecruitExam
exam
)
{
startPage
();
return
getDataTable
(
recruitExamService
.
queryList
(
exam
));
}
/**
* 考务管理-考试管理-新增时点击保存
*/
@PostMapping
(
"/add"
)
public
AjaxResult
add
(
@RequestBody
SchoolRecruitExamVo
exam
)
{
SchoolRecruitExam
entity
=
new
SchoolRecruitExam
();
BeanUtils
.
copyProperties
(
exam
,
entity
);
entity
.
setStatus
(
RecruitExamConstant
.
NOPUB
);
//将测试项目ids,整成id之间用逗号隔开的字符串
String
projectIds
=
StringUtils
.
join
(
exam
.
getProjectIdList
(),
","
);
entity
.
setProjectIds
(
projectIds
);
entity
.
insert
();
return
toAjax
(
recruitExamService
.
save
(
entity
));
}
/**
* 考务管理-考试管理-新增时点击发布
*/
@PostMapping
(
"/addPub"
)
public
AjaxResult
addPub
(
@RequestBody
SchoolRecruitExamVo
exam
)
{
SchoolRecruitExam
entity
=
new
SchoolRecruitExam
();
BeanUtils
.
copyProperties
(
exam
,
entity
);
entity
.
setStatus
(
RecruitExamConstant
.
INFOCHECK
);
//将测试项目ids,整成id之间用逗号隔开的字符串
String
projectIds
=
StringUtils
.
join
(
exam
.
getProjectIdList
(),
","
);
entity
.
setProjectIds
(
projectIds
);
entity
.
insert
();
return
toAjax
(
recruitExamService
.
save
(
entity
));
}
/**
* 考务管理-考试管理-获取详情
*/
@GetMapping
(
"/getInfo/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
Long
id
)
{
SchoolRecruitExam
entity
=
recruitExamService
.
getById
(
id
);
SchoolRecruitExamVo
exam
=
new
SchoolRecruitExamVo
();
BeanUtils
.
copyProperties
(
entity
,
exam
);
//id之间用逗号隔开的字符串 整成Long数组
String
[]
strArr
=
entity
.
getProjectIds
().
split
(
","
);
List
<
Long
>
projectIdList
=
new
ArrayList
<>();
for
(
String
str
:
strArr
)
{
projectIdList
.
add
(
Long
.
parseLong
(
str
));
}
/**
* 考务管理-考试管理-新增时点击保存
*/
@PostMapping
(
"/add"
)
public
AjaxResult
add
(
@RequestBody
SchoolRecruitExamVo
exam
)
{
SchoolRecruitExam
entity
=
new
SchoolRecruitExam
();
BeanUtils
.
copyProperties
(
exam
,
entity
);
entity
.
setStatus
(
RecruitExamConstant
.
NOPUB
);
//将测试项目ids,整成id之间用逗号隔开的字符串
String
projectIds
=
StringUtils
.
join
(
exam
.
getProjectIdList
(),
","
);
entity
.
setProjectIds
(
projectIds
);
entity
.
insert
();
return
toAjax
(
recruitExamService
.
save
(
entity
));
//获取测试项目名
LambdaQueryWrapper
<
SchoolRecruitProject
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
in
(
SchoolRecruitProject:
:
getId
,
projectIdList
)
.
orderByDesc
(
SchoolRecruitProject:
:
getCreateTime
);
List
<
SchoolRecruitProject
>
projects
=
projectService
.
list
(
lqw
);
exam
.
setProjectName
(
projects
.
stream
().
map
(
SchoolRecruitProject:
:
getProject
).
collect
(
Collectors
.
joining
(
","
)));
exam
.
setProjectIdList
(
projectIdList
);
return
AjaxResult
.
success
(
exam
);
}
/**
* 考务管理-考试管理-修改时点击保存
*/
@PutMapping
(
"/edit"
)
public
AjaxResult
edit
(
@RequestBody
SchoolRecruitExamVo
exam
)
{
if
(
StringUtils
.
isNull
(
exam
.
getId
()))
{
throw
new
ServiceException
(
"id为空,请检查"
);
}
/**
* 考务管理-考试管理-新增时点击发布
*/
@PostMapping
(
"/addPub"
)
public
AjaxResult
addPub
(
@RequestBody
SchoolRecruitExamVo
exam
)
{
SchoolRecruitExam
entity
=
new
SchoolRecruitExam
();
BeanUtils
.
copyProperties
(
exam
,
entity
);
entity
.
setStatus
(
RecruitExamConstant
.
INFOCHECK
);
//将测试项目ids,整成id之间用逗号隔开的字符串
String
projectIds
=
StringUtils
.
join
(
exam
.
getProjectIdList
(),
","
);
entity
.
setProjectIds
(
projectIds
);
entity
.
insert
();
return
toAjax
(
recruitExamService
.
save
(
entity
));
SchoolRecruitExam
entity
=
new
SchoolRecruitExam
();
BeanUtils
.
copyProperties
(
exam
,
entity
);
//将测试项目ids,整成id之间用逗号隔开的字符串
String
projectIds
=
StringUtils
.
join
(
exam
.
getProjectIdList
(),
","
);
entity
.
setProjectIds
(
projectIds
);
entity
.
update
();
return
toAjax
(
recruitExamService
.
updateById
(
entity
));
}
/**
* 考务管理-考试管理-修改时点击发布(考试管理-点击未发布进入考试信息tab页的发布按钮也是这个按钮)
*/
@PutMapping
(
"/editPub"
)
public
AjaxResult
editPub
(
@RequestBody
SchoolRecruitExamVo
exam
)
{
if
(
StringUtils
.
isNull
(
exam
.
getId
()))
{
throw
new
ServiceException
(
"id为空,请检查"
);
}
/**
* 考务管理-考试管理-获取详情
*/
@GetMapping
(
"/getInfo/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
Long
id
)
{
SchoolRecruitExam
entity
=
recruitExamService
.
getById
(
id
);
SchoolRecruitExamVo
exam
=
new
SchoolRecruitExamVo
();
BeanUtils
.
copyProperties
(
entity
,
exam
);
//id之间用逗号隔开的字符串 整成Long数组
String
[]
strArr
=
entity
.
getProjectIds
().
split
(
","
);
List
<
Long
>
projectIdList
=
new
ArrayList
<>();
for
(
String
str
:
strArr
){
projectIdList
.
add
(
Long
.
parseLong
(
str
));
}
//获取测试项目名
LambdaQueryWrapper
<
SchoolRecruitProject
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
in
(
SchoolRecruitProject:
:
getId
,
projectIdList
).
orderByDesc
(
SchoolRecruitProject:
:
getCreateTime
);
List
<
SchoolRecruitProject
>
projects
=
projectService
.
list
(
lqw
);
exam
.
setProjectName
(
projects
.
stream
().
map
(
SchoolRecruitProject:
:
getProject
).
collect
(
Collectors
.
joining
(
","
)));
exam
.
setProjectIdList
(
projectIdList
);
return
AjaxResult
.
success
(
exam
);
SchoolRecruitExam
entity
=
new
SchoolRecruitExam
();
BeanUtils
.
copyProperties
(
exam
,
entity
);
entity
.
setStatus
(
RecruitExamConstant
.
INFOCHECK
);
//将测试项目ids,整成id之间用逗号隔开的字符串
String
projectIds
=
StringUtils
.
join
(
exam
.
getProjectIdList
(),
","
);
entity
.
setProjectIds
(
projectIds
);
entity
.
update
();
return
toAjax
(
recruitExamService
.
updateById
(
entity
));
}
/**
* 考务管理-考试管理-单个删除 删除考试与考生关系 删除该考试对应的教育局信息
*/
@DeleteMapping
(
"/delete/{id}"
)
public
AjaxResult
delete
(
@PathVariable
Long
id
)
{
//删考试与考生关系
LambdaQueryWrapper
<
SchoolRecruitRelation
>
relatonLqw
=
new
LambdaQueryWrapper
<>();
relatonLqw
.
eq
(
SchoolRecruitRelation:
:
getExamId
,
id
);
recruitRelationService
.
remove
(
relatonLqw
);
//删除该考试对应的教育局信息
LambdaQueryWrapper
<
EduRecruitStudent
>
eduLqw
=
new
LambdaQueryWrapper
<>();
eduLqw
.
eq
(
EduRecruitStudent:
:
getExamId
,
id
);
eduRecruitStudentService
.
remove
(
eduLqw
);
return
AjaxResult
.
success
(
recruitExamService
.
removeById
(
id
));
}
/**
* 考试管理-信息审核-列表
*/
@GetMapping
(
"/checkList/{examId}"
)
public
TableDataInfo
checkList
(
@PathVariable
Long
examId
,
RecruitEduStudentVo
vo
)
{
vo
.
setExamId
(
examId
);
return
getDataTable
(
recruitStudentService
.
getInfoCheck
(
vo
));
}
/**
* 考试管理-信息审核-通过 所有信息都匹配才能将审核状态改为通过
*/
@PutMapping
(
value
=
{
"/pass/{examId}/{studentIds}"
,
"/pass/{examId}/"
})
public
AjaxResult
pass
(
@PathVariable
Long
examId
,
@PathVariable
(
value
=
"studentIds"
,
required
=
false
)
List
<
Long
>
studentIds
)
{
if
(
StringUtils
.
isNull
(
studentIds
)
||
studentIds
.
size
()
==
0
)
{
throw
new
ServiceException
(
"所选数据都为未报名数据,无法通过"
);
}
/**
* 考务管理-考试管理-修改时点击保存
*/
@PutMapping
(
"/edit"
)
public
AjaxResult
edit
(
@RequestBody
SchoolRecruitExamVo
exam
)
{
if
(
StringUtils
.
isNull
(
exam
.
getId
()))
{
throw
new
ServiceException
(
"id为空,请检查"
);
}
SchoolRecruitExam
entity
=
new
SchoolRecruitExam
();
BeanUtils
.
copyProperties
(
exam
,
entity
);
//将测试项目ids,整成id之间用逗号隔开的字符串
String
projectIds
=
StringUtils
.
join
(
exam
.
getProjectIdList
(),
","
);
entity
.
setProjectIds
(
projectIds
);
entity
.
update
();
return
toAjax
(
recruitExamService
.
updateById
(
entity
));
return
AjaxResult
.
success
(
recruitStudentService
.
pass
(
examId
,
studentIds
));
}
/**
* 考试管理-信息审核-单个通过 所有信息都匹配才能将审核状态改为通过
*/
@PutMapping
(
"/passOne/{examId}/{studentId}"
)
public
AjaxResult
passOne
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
)
{
return
toAjax
(
recruitStudentService
.
passOne
(
examId
,
studentId
));
}
/**
* 考试管理-信息审核-退回修改 只有待审核状态擦可以退回修改
*/
@PutMapping
(
value
=
{
"/back/{examId}/{studentIds}"
,
"/back/{examId}/"
})
public
AjaxResult
back
(
@PathVariable
Long
examId
,
@PathVariable
(
value
=
"studentIds"
,
required
=
false
)
List
<
Long
>
studentIds
)
{
if
(
StringUtils
.
isNull
(
studentIds
)
||
studentIds
.
size
()
==
0
)
{
throw
new
ServiceException
(
"所选数据都为未报名数据,无法退回修改"
);
}
/**
* 考务管理-考试管理-修改时点击发布(考试管理-点击未发布进入考试信息tab页的发布按钮也是这个按钮)
*/
@PutMapping
(
"/editPub"
)
public
AjaxResult
editPub
(
@RequestBody
SchoolRecruitExamVo
exam
)
{
if
(
StringUtils
.
isNull
(
exam
.
getId
()))
{
throw
new
ServiceException
(
"id为空,请检查"
);
}
SchoolRecruitExam
entity
=
new
SchoolRecruitExam
();
BeanUtils
.
copyProperties
(
exam
,
entity
);
entity
.
setStatus
(
RecruitExamConstant
.
INFOCHECK
);
//将测试项目ids,整成id之间用逗号隔开的字符串
String
projectIds
=
StringUtils
.
join
(
exam
.
getProjectIdList
(),
","
);
entity
.
setProjectIds
(
projectIds
);
entity
.
update
();
return
toAjax
(
recruitExamService
.
updateById
(
entity
));
return
AjaxResult
.
success
(
recruitStudentService
.
back
(
examId
,
studentIds
));
}
/**
* 考试管理-信息审核-单个退回修改 只有待审核状态擦可以退回修改
*/
@PutMapping
(
"/backOne/{examId}/{studentId}"
)
public
AjaxResult
backOne
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
,
@RequestBody
(
required
=
false
)
RecruitExamBackVo
recruitExamBackVo
)
{
return
toAjax
(
recruitStudentService
.
backOne
(
examId
,
studentId
,
recruitExamBackVo
==
null
?
""
:
recruitExamBackVo
.
getMessage
()));
}
/**
* 考试管理-信息审核-驳回 只有待审核状态才能驳回
*/
@PutMapping
(
value
=
{
"/reject/{examId}/{studentIds}"
,
"/reject/{examId}/"
})
public
AjaxResult
reject
(
@PathVariable
Long
examId
,
@PathVariable
(
value
=
"studentIds"
,
required
=
false
)
List
<
Long
>
studentIds
)
{
if
(
StringUtils
.
isNull
(
studentIds
)
||
studentIds
.
size
()
==
0
)
{
throw
new
ServiceException
(
"所选数据都为未报名数据,无法驳回"
);
}
/**
* 考务管理-考试管理-单个删除
* 删除考试与考生关系
* 删除该考试对应的教育局信息
*/
@DeleteMapping
(
"/delete/{id}"
)
public
AjaxResult
delete
(
@PathVariable
Long
id
)
{
//删考试与考生关系
LambdaQueryWrapper
<
SchoolRecruitRelation
>
relatonLqw
=
new
LambdaQueryWrapper
<>();
relatonLqw
.
eq
(
SchoolRecruitRelation:
:
getExamId
,
id
);
recruitRelationService
.
remove
(
relatonLqw
);
//删除该考试对应的教育局信息
LambdaQueryWrapper
<
EduRecruitStudent
>
eduLqw
=
new
LambdaQueryWrapper
<>();
eduLqw
.
eq
(
EduRecruitStudent:
:
getExamId
,
id
);
eduRecruitStudentService
.
remove
(
eduLqw
);
return
AjaxResult
.
success
(
recruitExamService
.
removeById
(
id
));
return
AjaxResult
.
success
(
recruitStudentService
.
reject
(
examId
,
studentIds
));
}
/**
* 考试管理-信息审核-单个驳回 只有待审核状态才能驳回
*/
@PutMapping
(
"/rejectOne/{examId}/{studentId}"
)
public
AjaxResult
reject
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
)
{
return
toAjax
(
recruitStudentService
.
rejectOne
(
examId
,
studentId
));
}
/**
* 考试管理-信息审核-结束 没有到报名截止时间,这里不能结束
*/
@PutMapping
(
"/checkEnd/{examId}"
)
public
AjaxResult
checkEnd
(
@PathVariable
Long
examId
)
{
SchoolRecruitExam
exam
=
recruitExamService
.
getById
(
examId
);
if
(
DateUtils
.
getNowDate
().
before
(
exam
.
getDeadline
()))
{
//未到报名截止时间
throw
new
ServiceException
(
"没有到报名截止时间,不能结束此环节"
);
}
/**
* 考试管理-信息审核-列表
*/
@GetMapping
(
"/checkList/{examId}"
)
public
TableDataInfo
checkList
(
@PathVariable
Long
examId
,
RecruitEduStudentVo
vo
)
{
vo
.
setExamId
(
examId
);
return
getDataTable
(
recruitStudentService
.
getInfoCheck
(
vo
));
}
/**
* 考试管理-信息审核-通过
* 所有信息都匹配才能将审核状态改为通过
*/
@PutMapping
(
value
=
{
"/pass/{examId}/{studentIds}"
,
"/pass/{examId}/"
})
public
AjaxResult
pass
(
@PathVariable
Long
examId
,
@PathVariable
(
value
=
"studentIds"
,
required
=
false
)
List
<
Long
>
studentIds
)
{
if
(
StringUtils
.
isNull
(
studentIds
)
||
studentIds
.
size
()
==
0
)
{
throw
new
ServiceException
(
"所选数据都为未报名数据,无法通过"
);
}
return
AjaxResult
.
success
(
recruitStudentService
.
pass
(
examId
,
studentIds
));
}
/**
* 考试管理-信息审核-单个通过
* 所有信息都匹配才能将审核状态改为通过
*/
@PutMapping
(
"/passOne/{examId}/{studentId}"
)
public
AjaxResult
passOne
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
)
{
return
toAjax
(
recruitStudentService
.
passOne
(
examId
,
studentId
));
}
/**
* 考试管理-信息审核-退回修改
* 只有待审核状态擦可以退回修改
*/
@PutMapping
(
value
=
{
"/back/{examId}/{studentIds}"
,
"/back/{examId}/"
})
public
AjaxResult
back
(
@PathVariable
Long
examId
,
@PathVariable
(
value
=
"studentIds"
,
required
=
false
)
List
<
Long
>
studentIds
)
{
if
(
StringUtils
.
isNull
(
studentIds
)
||
studentIds
.
size
()
==
0
)
{
throw
new
ServiceException
(
"所选数据都为未报名数据,无法退回修改"
);
}
return
AjaxResult
.
success
(
recruitStudentService
.
back
(
examId
,
studentIds
));
}
/**
* 考试管理-信息审核-单个退回修改
* 只有待审核状态擦可以退回修改
*/
@PutMapping
(
"/backOne/{examId}/{studentId}"
)
public
AjaxResult
backOne
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
)
{
return
toAjax
(
recruitStudentService
.
backOne
(
examId
,
studentId
));
}
/**
* 考试管理-信息审核-驳回
* 只有待审核状态才能驳回
*/
@PutMapping
(
value
=
{
"/reject/{examId}/{studentIds}"
,
"/reject/{examId}/"
})
public
AjaxResult
reject
(
@PathVariable
Long
examId
,
@PathVariable
(
value
=
"studentIds"
,
required
=
false
)
List
<
Long
>
studentIds
)
{
if
(
StringUtils
.
isNull
(
studentIds
)
||
studentIds
.
size
()
==
0
)
{
throw
new
ServiceException
(
"所选数据都为未报名数据,无法驳回"
);
}
return
AjaxResult
.
success
(
recruitStudentService
.
reject
(
examId
,
studentIds
));
exam
.
setStatus
(
RecruitExamConstant
.
ADDRESS
);
return
toAjax
(
recruitExamService
.
updateById
(
exam
));
}
/**
* 考试管理-考场分配-列表
*/
@GetMapping
(
"/addressList/{examId}"
)
public
TableDataInfo
addressList
(
@PathVariable
Long
examId
,
RecruitExamAddressVo
vo
)
{
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
return
getDataTable
(
recruitRelationService
.
getAddressList
(
vo
));
}
/**
* 考试管理-考场分配-导出
*/
@PostMapping
(
"/exportAddress/{examId}"
)
public
void
exportAddress
(
HttpServletResponse
response
,
RecruitExamAddressVo
vo
,
@PathVariable
Long
examId
)
{
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
List
<
RecruitExamAddressVo
>
list
=
recruitRelationService
.
getAddressList
(
vo
);
int
i
=
1
;
for
(
RecruitExamAddressVo
addressVo
:
list
)
{
addressVo
.
setXh
(
i
);
i
++;
}
/**
* 考试管理-信息审核-单个驳回
* 只有待审核状态才能驳回
*/
@PutMapping
(
"/rejectOne/{examId}/{studentId}"
)
public
AjaxResult
reject
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
)
{
return
toAjax
(
recruitStudentService
.
rejectOne
(
examId
,
studentId
));
}
/**
* 考试管理-信息审核-结束
* 没有到报名截止时间,这里不能结束
*/
@PutMapping
(
"/checkEnd/{examId}"
)
public
AjaxResult
checkEnd
(
@PathVariable
Long
examId
)
{
SchoolRecruitExam
exam
=
recruitExamService
.
getById
(
examId
);
if
(
DateUtils
.
getNowDate
().
before
(
exam
.
getDeadline
()))
{
//未到报名截止时间
throw
new
ServiceException
(
"没有到报名截止时间,不能结束此环节"
);
}
exam
.
setStatus
(
RecruitExamConstant
.
ADDRESS
);
return
toAjax
(
recruitExamService
.
updateById
(
exam
));
}
/**
* 考试管理-考场分配-列表
*/
@GetMapping
(
"/addressList/{examId}"
)
public
TableDataInfo
addressList
(
@PathVariable
Long
examId
,
RecruitExamAddressVo
vo
)
{
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
return
getDataTable
(
recruitRelationService
.
getAddressList
(
vo
));
}
/**
* 考试管理-考场分配-导出
*/
@PostMapping
(
"/exportAddress/{examId}"
)
public
void
exportAddress
(
HttpServletResponse
response
,
RecruitExamAddressVo
vo
,
@PathVariable
Long
examId
)
{
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
List
<
RecruitExamAddressVo
>
list
=
recruitRelationService
.
getAddressList
(
vo
);
int
i
=
1
;
for
(
RecruitExamAddressVo
addressVo
:
list
){
addressVo
.
setXh
(
i
);
i
++;
}
ExcelUtil
<
RecruitExamAddressVo
>
util
=
new
ExcelUtil
<>(
RecruitExamAddressVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"考场分配表"
);
}
/**
* 考试管理-考场分配-导入
*/
@PostMapping
(
"/importAddressData/{examId}"
)
public
AjaxResult
importAddressData
(
@PathVariable
Long
examId
,
MultipartFile
file
)
throws
Exception
{
ExcelUtil
<
RecruitExamAddressVo
>
util
=
new
ExcelUtil
<>(
RecruitExamAddressVo
.
class
);
List
<
RecruitExamAddressVo
>
list
=
util
.
importExcel
(
file
.
getInputStream
());
//校验数据
recruitRelationService
.
checkImportAddress
(
list
);
//数据导入
return
AjaxResult
.
success
(
recruitRelationService
.
importDataAddress
(
list
,
examId
));
}
/**
* 考试管理-考场分配-结束
* 有考场分配信息为空的要进行提示
*/
@PutMapping
(
"/addressEnd/{examId}"
)
public
AjaxResult
addressEnd
(
@PathVariable
Long
examId
)
{
return
toAjax
(
recruitRelationService
.
addressEnd
(
examId
));
}
/**
* 考试管理-成绩管理-列表
*/
@GetMapping
(
"/scoreList/{examId}"
)
public
TableDataInfo
scoreList
(
@PathVariable
Long
examId
,
RecruitExamScoreVo
vo
)
{
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
return
getDataTable
(
recruitRelationService
.
getScoreList
(
vo
));
}
/**
* 考试管理-成绩发布-导出
*/
@PostMapping
(
"/exportScore/{examId}"
)
public
void
exportScore
(
HttpServletResponse
response
,
RecruitExamScoreVo
vo
,
@PathVariable
Long
examId
)
{
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
List
<
RecruitExamScoreVo
>
list
=
recruitRelationService
.
getScoreList
(
vo
);
int
i
=
1
;
for
(
RecruitExamScoreVo
scoreVo
:
list
){
scoreVo
.
setXh
(
i
);
i
++;
}
ExcelUtil
<
RecruitExamScoreVo
>
util
=
new
ExcelUtil
<>(
RecruitExamScoreVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"成绩发布信息表"
);
}
/**
* 考试管理-成绩发布-导入
*/
@PostMapping
(
"/importScoreData/{examId}"
)
public
AjaxResult
importScoreData
(
@PathVariable
Long
examId
,
MultipartFile
file
)
throws
Exception
{
ExcelUtil
<
RecruitExamScoreVo
>
util
=
new
ExcelUtil
<>(
RecruitExamScoreVo
.
class
);
List
<
RecruitExamScoreVo
>
list
=
util
.
importExcel
(
file
.
getInputStream
());
//校验数据
recruitRelationService
.
checkImportScore
(
list
);
//数据导入
return
AjaxResult
.
success
(
recruitRelationService
.
importDataScore
(
list
,
examId
));
}
/**
* 考试管理-成绩发布-结束
* 有成绩信息为空的要进行提示
*/
@PutMapping
(
"/scoreEnd/{examId}"
)
public
AjaxResult
scoreEnd
(
@PathVariable
Long
examId
)
{
return
toAjax
(
recruitRelationService
.
scoreEnd
(
examId
));
ExcelUtil
<
RecruitExamAddressVo
>
util
=
new
ExcelUtil
<>(
RecruitExamAddressVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"考场分配表"
);
}
/**
* 考试管理-考场分配-导入
*/
@PostMapping
(
"/importAddressData/{examId}"
)
public
AjaxResult
importAddressData
(
@PathVariable
Long
examId
,
MultipartFile
file
)
throws
Exception
{
ExcelUtil
<
RecruitExamAddressVo
>
util
=
new
ExcelUtil
<>(
RecruitExamAddressVo
.
class
);
List
<
RecruitExamAddressVo
>
list
=
util
.
importExcel
(
file
.
getInputStream
());
//校验数据
recruitRelationService
.
checkImportAddress
(
list
);
//数据导入
return
AjaxResult
.
success
(
recruitRelationService
.
importDataAddress
(
list
,
examId
));
}
/**
* 考试管理-考场分配-结束 有考场分配信息为空的要进行提示
*/
@PutMapping
(
"/addressEnd/{examId}"
)
public
AjaxResult
addressEnd
(
@PathVariable
Long
examId
)
{
return
toAjax
(
recruitRelationService
.
addressEnd
(
examId
));
}
/**
* 考试管理-成绩管理-列表
*/
@GetMapping
(
"/scoreList/{examId}"
)
public
TableDataInfo
scoreList
(
@PathVariable
Long
examId
,
RecruitExamScoreVo
vo
)
{
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
return
getDataTable
(
recruitRelationService
.
getScoreList
(
vo
));
}
/**
* 考试管理-成绩发布-导出
*/
@PostMapping
(
"/exportScore/{examId}"
)
public
void
exportScore
(
HttpServletResponse
response
,
RecruitExamScoreVo
vo
,
@PathVariable
Long
examId
)
{
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
List
<
RecruitExamScoreVo
>
list
=
recruitRelationService
.
getScoreList
(
vo
);
int
i
=
1
;
for
(
RecruitExamScoreVo
scoreVo
:
list
)
{
scoreVo
.
setXh
(
i
);
i
++;
}
ExcelUtil
<
RecruitExamScoreVo
>
util
=
new
ExcelUtil
<>(
RecruitExamScoreVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"成绩发布信息表"
);
}
/**
* 考试管理-成绩发布-导入
*/
@PostMapping
(
"/importScoreData/{examId}"
)
public
AjaxResult
importScoreData
(
@PathVariable
Long
examId
,
MultipartFile
file
)
throws
Exception
{
ExcelUtil
<
RecruitExamScoreVo
>
util
=
new
ExcelUtil
<>(
RecruitExamScoreVo
.
class
);
List
<
RecruitExamScoreVo
>
list
=
util
.
importExcel
(
file
.
getInputStream
());
//校验数据
recruitRelationService
.
checkImportScore
(
list
);
//数据导入
return
AjaxResult
.
success
(
recruitRelationService
.
importDataScore
(
list
,
examId
));
}
/**
* 考试管理-成绩发布-结束 有成绩信息为空的要进行提示
*/
@PutMapping
(
"/scoreEnd/{examId}"
)
public
AjaxResult
scoreEnd
(
@PathVariable
Long
examId
)
{
return
toAjax
(
recruitRelationService
.
scoreEnd
(
examId
));
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitRelation.java
View file @
945d5eb7
...
...
@@ -3,74 +3,111 @@ package yangtz.cs.liu.campus.domain.recruit;
import
com.core.domain.OurBaseEntity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
import
java.util.Date
;
import
lombok.Data
;
@Data
public
class
SchoolRecruitRelation
extends
OurBaseEntity
{
/** 考试id */
@Excel
(
name
=
"考试id"
)
private
Long
examId
;
/** 学生id */
@Excel
(
name
=
"学生id"
)
private
Long
studentId
;
/** 审核状态(只存在教育局信息时该字段没有值,0=驳回,1=通过,2 =退回修改,3=待审核) */
@Excel
(
name
=
"审核状态"
,
readConverterExp
=
"只=存在教育局信息时该字段没有值,0=驳回,1=通过,2,==退回修改,3=待审核"
)
private
String
auditStatus
;
/** 匹配状态(0=不匹配,1= 匹配,2=无教育局信息,3=未报名) */
@Excel
(
name
=
"匹配状态"
,
readConverterExp
=
"0==不匹配,1=,匹=配,2=无教育局信息,3=未报名"
)
private
String
matchStatus
;
/** 身份证号码 */
@Excel
(
name
=
"身份证号码"
)
private
String
infoIdCard
;
/** 初中学校id */
@Excel
(
name
=
"初中学校id"
)
private
Long
juniorId
;
/** 测试项目id */
@Excel
(
name
=
"测试项目id"
)
private
Long
testId
;
/** 提交状态(0=未提交,1=已提交) */
@Excel
(
name
=
"提交状态(0=未提交,1=已提交)"
)
private
String
submit
;
/** 准考证号 */
@Excel
(
name
=
"准考证号"
)
private
String
examNumber
;
/** 分组 */
@Excel
(
name
=
"分组"
)
private
String
inGroup
;
/** 考试日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"考试日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
examDate
;
/** 考试时间 */
@Excel
(
name
=
"考试时间"
)
private
String
examTime
;
/** 考试地点 */
@Excel
(
name
=
"考试地点"
)
private
String
examAddress
;
/** 成绩 */
@Excel
(
name
=
"成绩"
)
private
String
score
;
/** 结果 */
@Excel
(
name
=
"结果"
)
private
String
result
;
/** 资格线 */
@Excel
(
name
=
"资格线"
)
private
String
passScore
;
/**
* 考试id
*/
@Excel
(
name
=
"考试id"
)
private
Long
examId
;
/**
* 学生id
*/
@Excel
(
name
=
"学生id"
)
private
Long
studentId
;
/**
* 审核状态(只存在教育局信息时该字段没有值,0=驳回,1=通过,2 =退回修改,3=待审核)
*/
@Excel
(
name
=
"审核状态"
,
readConverterExp
=
"只=存在教育局信息时该字段没有值,0=驳回,1=通过,2,==退回修改,3=待审核"
)
private
String
auditStatus
;
/**
* 匹配状态(0=不匹配,1= 匹配,2=无教育局信息,3=未报名)
*/
@Excel
(
name
=
"匹配状态"
,
readConverterExp
=
"0==不匹配,1=,匹=配,2=无教育局信息,3=未报名"
)
private
String
matchStatus
;
/**
* 身份证号码
*/
@Excel
(
name
=
"身份证号码"
)
private
String
infoIdCard
;
/**
* 初中学校id
*/
@Excel
(
name
=
"初中学校id"
)
private
Long
juniorId
;
/**
* 测试项目id
*/
@Excel
(
name
=
"测试项目id"
)
private
Long
testId
;
/**
* 提交状态(0=未提交,1=已提交)
*/
@Excel
(
name
=
"提交状态(0=未提交,1=已提交)"
)
private
String
submit
;
/**
* 准考证号
*/
@Excel
(
name
=
"准考证号"
)
private
String
examNumber
;
/**
* 分组
*/
@Excel
(
name
=
"分组"
)
private
String
inGroup
;
/**
* 考试日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"考试日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
examDate
;
/**
* 考试时间
*/
@Excel
(
name
=
"考试时间"
)
private
String
examTime
;
/**
* 考试地点
*/
@Excel
(
name
=
"考试地点"
)
private
String
examAddress
;
/**
* 成绩
*/
@Excel
(
name
=
"成绩"
)
private
String
score
;
/**
* 结果
*/
@Excel
(
name
=
"结果"
)
private
String
result
;
/**
* 资格线
*/
@Excel
(
name
=
"资格线"
)
private
String
passScore
;
/**
* 驳回意见
*/
private
String
backMessage
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitStudentServiceImpl.java
View file @
945d5eb7
...
...
@@ -525,6 +525,7 @@ public class SchoolRecruitStudentServiceImpl extends
relation
.
setTestId
(
student
.
getTestId
());
relation
.
setSubmit
(
RecruitExamConstant
.
SUBMIT
);
relation
.
setAuditStatus
(
RecruitExamConstant
.
CHECK
);
relation
.
setBackMessage
(
""
);
relation
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
recruitRelationMapper
.
updateById
(
relation
);
}
...
...
@@ -893,7 +894,7 @@ public class SchoolRecruitStudentServiceImpl extends
}
@Override
public
int
backOne
(
Long
examId
,
Long
studentId
)
{
public
int
backOne
(
Long
examId
,
Long
studentId
,
String
backMessage
)
{
//查询出studentId对应的学生考试信息
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
SchoolRecruitRelation:
:
getExamId
,
examId
)
...
...
@@ -911,6 +912,7 @@ public class SchoolRecruitStudentServiceImpl extends
+
"的学生信息已退回修改,没有再次提交申请,无法再次退回修改"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
EDIT
);
relation
.
setBackMessage
(
backMessage
);
return
recruitRelationMapper
.
updateById
(
relation
);
}
}
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitStudentService.java
View file @
945d5eb7
...
...
@@ -2,17 +2,16 @@ package yangtz.cs.liu.campus.service.recruit;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.common.core.domain.model.WebLoginBody
;
import
java.util.List
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitStudent
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitAndEduStudentVo
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitEduStudentVo
;
import
yangtz.cs.liu.campus.vo.recruit.SchoolRecruitStudentVo
;
import
yangtz.cs.liu.webpage.domain.WebRegisterBody
;
import
yangtz.cs.liu.webpage.vo.RecruitAdmissionTicketVo
;
import
yangtz.cs.liu.webpage.vo.QueryScoreVo
;
import
yangtz.cs.liu.webpage.vo.RecruitAdmissionTicketVo
;
import
yangtz.cs.liu.webpage.vo.WebSchoolRecruitStudentVo
;
import
java.util.List
;
/**
* @author xuten
*/
...
...
@@ -75,7 +74,7 @@ public interface ISchoolRecruitStudentService extends IService<SchoolRecruitStud
String
back
(
Long
examId
,
List
<
Long
>
studentIds
);
/** 教务管理-考试管理-单个退回修改 */
int
backOne
(
Long
examId
,
Long
studentId
);
int
backOne
(
Long
examId
,
Long
studentId
,
String
backMessage
);
/** 教务管理-考试管理-驳回 */
String
reject
(
Long
examId
,
List
<
Long
>
studentIds
);
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitExamBackVo.java
0 → 100644
View file @
945d5eb7
package
yangtz
.
cs
.
liu
.
campus
.
vo
.
recruit
;
import
lombok.Data
;
/**
* 报名驳回
*/
@Data
public
class
RecruitExamBackVo
{
private
String
message
;
}
smart-campus/src/main/java/yangtz/cs/liu/webpage/vo/WebSchoolRecruitStudentVo.java
View file @
945d5eb7
...
...
@@ -2,13 +2,12 @@ package yangtz.cs.liu.webpage.vo;
import
com.core.domain.OurBaseEntity
;
import
com.ruoyi.common.annotation.Excel
;
import
java.util.List
;
import
lombok.Data
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitStudentFamily
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitStudentFjb
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitStudentJl
;
import
java.util.List
;
/**
* @author xuten
*/
...
...
@@ -73,6 +72,7 @@ public class WebSchoolRecruitStudentVo extends OurBaseEntity {
private
String
password
;
private
String
auditStatus
;
private
String
backMessage
;
private
List
<
SchoolRecruitStudentJl
>
resumeData
;
private
List
<
SchoolRecruitStudentFamily
>
remeberData
;
...
...
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitRelationMapper.xml
View file @
945d5eb7
...
...
@@ -33,6 +33,7 @@
exam_id,
student_id,
audit_status,
back_message,
match_status,
junior_id,
test_id,
...
...
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitStudentMapper.xml
View file @
945d5eb7
...
...
@@ -145,6 +145,7 @@
sas.phone_number,
sas.password,
sar.audit_status,
sar.back_message,
sas.mz,
sas.zzmm,
sas.csrq,
...
...
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