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
731b52ae
Commit
731b52ae
authored
Apr 03, 2024
by
wangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-03 招聘 V0.2
parent
f36505ca
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
3690 additions
and
19 deletions
+3690
-19
ruoyi-admin/src/main/resources/application.yml
+20
-18
ruoyi-admin/src/main/resources/logback.xml
+2
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/constant/RecruitExamConstant.java
+62
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/EduRecruitStudent.java
+49
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitExam.java
+64
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitProject.java
+31
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitRelation.java
+76
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitStudent.java
+124
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitStudentJl.java
+44
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/EduRecruitStudentMapper.java
+12
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/SchoolRecruitExamMapper.java
+14
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/SchoolRecruitProjectMapper.java
+25
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/SchoolRecruitRelationMapper.java
+34
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/SchoolRecruitStudentMapper.java
+46
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/EduRecruitStudentServiceImpl.java
+129
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitExamServiceImpl.java
+170
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitProjectServiceImpl.java
+66
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitRelationServiceImpl.java
+260
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitStudentServiceImpl.java
+879
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/IEduRecruitStudentService.java
+15
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitExamService.java
+23
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitProjectService.java
+26
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitRelationService.java
+57
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitStudentService.java
+90
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitAndEduStudentVo.java
+91
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitEduExportVo.java
+41
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitEduStudentVo.java
+104
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitExamAddressVo.java
+64
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitExamScoreVo.java
+88
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/SchoolRecruitExamVo.java
+66
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/SchoolRecruitStudentVo.java
+57
-0
smart-campus/src/main/java/yangtz/cs/liu/webpage/controller/WebSchoolRecruitStudentController.java
+464
-0
smart-campus/src/main/java/yangtz/cs/liu/webpage/vo/RecruitAdmissionTicketVo.java
+61
-0
smart-campus/src/main/java/yangtz/cs/liu/webpage/vo/WebRecruitExamForStudentVo.java
+28
-0
smart-campus/src/main/java/yangtz/cs/liu/webpage/vo/WebSchoolRecruitStudentVo.java
+71
-0
smart-campus/src/main/resources/mapper/recruit/EduRecruitStudentMapper.xml
+33
-0
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitProjectMapper.xml
+33
-0
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitRelationMapper.xml
+95
-0
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitStudentMapper.xml
+76
-0
No files found.
ruoyi-admin/src/main/resources/application.yml
View file @
731b52ae
...
...
@@ -13,7 +13,8 @@ ruoyi:
# profile: /home/ruoyi/uploadPath
#指定上传文件到哪个服务器,读取文件(本地选localhost,测试选47.105.176.202,试运行选10.20.100.201)
# serverAddress: http://47.105.176.202:5112
serverAddress
:
http://47.105.176.202:5131
# serverAddress: http://47.105.176.202:5131
serverAddress
:
http://192.168.31.166:5131
# serverAddress: http://10.20.100.201:57321
# 获取ip地址开关
addressEnabled
:
false
...
...
@@ -26,8 +27,8 @@ server:
# port: 8137
#二中
# port: 11325
port
:
8848
#
port: 5131
#
port: 8848
port
:
5131
#学校内网PC端口
# port: 57321
#学校内网公众号端口
...
...
@@ -112,6 +113,7 @@ spring:
port
:
7789
# port: 16379
# port: 9121
# port: 34597
# 数据库索引
database
:
3
# 密码
...
...
@@ -213,25 +215,25 @@ wx:
# redirect-uri: y32025c600.goho.co:10087
dd
:
# 本地配置
appKey
:
dingclpf8qoxvinhksyh
appSecret
:
CrlRmzkaFMH00cbipSf3g0nc_xpFGCitTAPA_cphUXg1e-DSX1hFcyVpqgos29r9
# 钉钉接口 获取钉钉access_token 的uri
access-token-uri
:
https://oapi.dingtalk.com/gettoken?appkey=${dd.appKey}&appsecret=${dd.appSecret}
#企业id
corpId
:
dingaa3937ff8b7dd267f2c783f7214b6d69
#应用id
agentId
:
2730043705
# # 测试服务器配置
# appKey: ding5cbf7qhd55zun5jg
# appSecret: -er7LnIslFEJ2n8cJY9MdTCKiRDjoCZwQuA2XvU2Hr7fHw-cp_B2ZAhynVifqlL8
# # 本地配置
# appKey: dingclpf8qoxvinhksyh
# appSecret: CrlRmzkaFMH00cbipSf3g0nc_xpFGCitTAPA_cphUXg1e-DSX1hFcyVpqgos29r9
# # 钉钉接口 获取钉钉access_token 的uri
# access-token-uri: https://oapi.dingtalk.com/gettoken?appkey=${dd.appKey}&appsecret=${dd.appSecret}
# #企业id
# corpId: dingaa3937ff8b7dd267f2c783f7214b6d69
# #应用id
# agentId: 2760774127
# agentId: 2730043705
# 测试服务器配置
appKey
:
ding5cbf7qhd55zun5jg
appSecret
:
-er7LnIslFEJ2n8cJY9MdTCKiRDjoCZwQuA2XvU2Hr7fHw-cp_B2ZAhynVifqlL8
# 钉钉接口 获取钉钉access_token 的uri
access-token-uri
:
https://oapi.dingtalk.com/gettoken?appkey=${dd.appKey}&appsecret=${dd.appSecret}
#企业id
corpId
:
dingaa3937ff8b7dd267f2c783f7214b6d69
#应用id
agentId
:
2760774127
# 正式配置
# appKey: dingggqchzyvxm9e6e7v
...
...
@@ -246,7 +248,7 @@ dd:
#重定向地址
redirect-uri
:
www.dyzmxx.com
#应用首页地址
message-uri
:
http://47.105.176.202:51
13
/dd
message-uri
:
http://47.105.176.202:51
30
/dd
#PC端首页地址
pc-message-uri
:
http://47.105.176.202:5129/dd
...
...
ruoyi-admin/src/main/resources/logback.xml
View file @
731b52ae
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志存放路径 -->
<property
name=
"log.path"
value=
"/Users/muyecun/Desktop/schxh"
/>
<!--<property name="log.path" value="/Users/muyecun/Desktop/schxh" />-->
<property
name=
"log.path"
value=
"../home/ruoyi/logs"
/>
<!-- 日志输出格式 -->
<property
name=
"log.pattern"
value=
"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"
/>
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/constant/RecruitExamConstant.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
constant
;
public
class
RecruitExamConstant
{
//艺考状态
//未发布
public
static
final
String
NOPUB
=
"0"
;
//报名阶段(信息审核)
public
static
final
String
INFOCHECK
=
"1"
;
//考场分配
public
static
final
String
ADDRESS
=
"2"
;
//成绩发布
public
static
final
String
SCORE
=
"3"
;
//结束
public
static
final
String
END
=
"4"
;
//学生与考试关联
//审核状态-驳回 || 匹配状态-不匹配
public
static
final
String
REJECT
=
"0"
;
//审核状态-通过 || 匹配状态-匹配
public
static
final
String
PASS
=
"1"
;
//审核状态-退回修改 || 匹配状态-无教育局信息
public
static
final
String
EDIT
=
"2"
;
//审核状态-待审核 || 匹配状态-未报名
public
static
final
String
CHECK
=
"3"
;
public
static
final
String
APPLY
=
"4"
;
//报名
public
static
final
String
SH
=
"5"
;
//审核
public
static
final
String
PRINT
=
"6"
;
//打印准考证
public
static
final
String
QUERY
=
"7"
;
//成绩查询
//考生报名提交状态
public
static
final
String
NOSUBMIT
=
"0"
;
//未提交
public
static
final
String
SUBMIT
=
"1"
;
//已提交
//网页点击进入后的各节点node
//考前须知
public
static
final
String
PREEXAM
=
"0"
;
//报名
public
static
final
String
SIGN
=
"1"
;
//审核
public
static
final
String
AUDIT
=
"2"
;
//打印准考证
public
static
final
String
TICKET
=
"3"
;
//成绩查询
public
static
final
String
SEARCH
=
"4"
;
//网页考试状态
public
static
final
String
WEBBM
=
"0"
;
//报名
public
static
final
String
WEBDSH
=
"1"
;
//带审核
public
static
final
String
WEBTG
=
"2"
;
//通过
public
static
final
String
WEBBH
=
"3"
;
//驳回
public
static
final
String
WEBXXXG
=
"4"
;
//信息修改
public
static
final
String
WEBZKZDY
=
"5"
;
//准考证打印
public
static
final
String
WEBCJCX
=
"6"
;
//成绩查询
public
static
final
String
WEBSH
=
"7"
;
//审核
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/EduRecruitStudent.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
domain
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
/**
* @author xuten
*/
@Data
public
class
EduRecruitStudent
extends
OurBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 艺考主表id */
@Excel
(
name
=
"艺考主表id"
)
private
Long
examId
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
)
private
String
eduIdCard
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
eduStudentName
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
eduStudentNumber
;
/** 初中学校id */
@Excel
(
name
=
"初中学校id"
)
private
Long
eduJuniorId
;
/** 初中学校 */
@Excel
(
name
=
"初中学校"
)
private
String
eduSchoolName
;
/** 测试项目id */
@Excel
(
name
=
"测试项目id"
)
private
Long
eduTestId
;
/** 测试项目 */
@Excel
(
name
=
"测试项目"
)
private
String
eduProject
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0=男,1=女"
)
private
String
eduSex
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitExam.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
domain
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author xuten
*/
@Data
public
class
SchoolRecruitExam
extends
OurBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 考试名称
* */
private
String
examName
;
/**
* 年度
* */
private
Integer
examYear
;
/**
* 报名截止时间(具体到分钟)
* */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
deadline
;
/**
* 考试开始时间
* */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
startTime
;
/**
* 考试结束时间
* */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
endTime
;
/**
* 测试项目id(可多选,id之间用逗号隔开)
* */
private
String
projectIds
;
/**
* 考试安排
* */
private
String
examArrange
;
/**
* 考试注意事项
* */
private
String
notice
;
/**
* 状态(0=未发布,1=报名阶段(信息审核),2=考场分配,3=成绩发布,4=结束)
* */
private
String
status
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitProject.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
domain
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
/**
* 测试项目对象 school_test_project
*
* @author wengxiulin
* @date 2023-04-11
*/
@Data
public
class
SchoolRecruitProject
extends
OurBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 专业类别(0=体育,1=音乐,2=美术,3=书法) */
@Excel
(
name
=
"专业类别"
,
readConverterExp
=
"0==体育,1=音乐,2=美术,3=书法"
)
private
String
type
;
/** 测试项目 */
@Excel
(
name
=
"测试项目"
)
private
String
project
;
/** 排序 */
@Excel
(
name
=
"排序"
)
private
Long
schoolOrder
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitRelation.java
0 → 100644
View file @
731b52ae
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
;
@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
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitStudent.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
domain
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author xuten
*/
@Data
public
class
SchoolRecruitStudent
extends
OurBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
studentName
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
)
private
String
idCard
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
studentNumber
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0==男,1=女"
)
private
String
sex
;
/** 身高(单位厘米) */
@Excel
(
name
=
"身高"
,
readConverterExp
=
"单=位厘米"
)
private
double
height
;
/** 体重(单位千克) */
@Excel
(
name
=
"体重"
,
readConverterExp
=
"单=位千克"
)
private
double
weight
;
/** 联系方式1 */
@Excel
(
name
=
"联系方式1"
)
private
String
telephone1
;
/** 联系方式2 */
@Excel
(
name
=
"联系方式2"
)
private
String
telephone2
;
/** 照片 */
@Excel
(
name
=
"照片"
)
private
String
photo
;
/** 手机号 */
@Excel
(
name
=
"手机号"
)
private
String
phoneNumber
;
/** 密码 */
@Excel
(
name
=
"密码"
)
private
String
password
;
/** 民族 */
@Excel
(
name
=
"民族"
)
private
String
mz
;
/** 政治面貌 */
@Excel
(
name
=
"政治面貌"
)
private
String
zzmm
;
/** 出生日期 */
@Excel
(
name
=
"出生日期"
)
private
String
csrq
;
/** 婚姻状况 */
@Excel
(
name
=
"婚姻状况"
)
private
String
hyzk
;
/** 户籍所在地 */
@Excel
(
name
=
"户籍所在地"
)
private
String
hjszd
;
/** 生源地 */
@Excel
(
name
=
"生源地"
)
private
String
syd
;
/** 考生身份 */
@Excel
(
name
=
"考生身份"
)
private
String
kssf
;
/** 参加工作时间 */
@Excel
(
name
=
"参加工作时间"
)
private
String
cjgzsj
;
/** 现工作单位职务 */
@Excel
(
name
=
"现工作单位职务"
)
private
String
xgzdwzw
;
/** 报考学历是否全日制 */
@Excel
(
name
=
"报考学历是否全日制"
)
private
String
bkxlsfqrz
;
/** 学历 */
@Excel
(
name
=
"学历"
)
private
String
xl
;
/** 学位 */
@Excel
(
name
=
"学位"
)
private
String
xw
;
/** 毕业学校 */
@Excel
(
name
=
"毕业学校"
)
private
String
byxx
;
/** 所学专业 */
@Excel
(
name
=
"所学专业"
)
private
String
sxzz
;
/** 最后毕业时间 */
@Excel
(
name
=
"最后毕业时间"
)
private
String
zhbysj
;
// /** 教师招聘 教师账号 信息从简历信息 */
// private List<SchoolRecruitStudentJl> schoolRecruitStudentJlList;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/recruit/SchoolRecruitStudentJl.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
domain
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
/**
* 教师招聘 教师账号 信息从简历对象 school_recruit_student_jl
*
* @author ruoyi
* @date 2024-04-02
*/
@Data
public
class
SchoolRecruitStudentJl
extends
OurBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
;
/** 学生id */
@Excel
(
name
=
"学生id"
)
private
Long
studentId
;
/** 起止年月 */
@Excel
(
name
=
"起止年月"
)
private
String
ksny
;
/** 起止年月 */
@Excel
(
name
=
"起止年月"
)
private
String
jsny
;
/** 所在单位或学校 */
@Excel
(
name
=
"所在单位或学校"
)
private
String
szdwxx
;
/** 职务专业 */
@Excel
(
name
=
"职务专业"
)
private
String
zwzy
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/EduRecruitStudentMapper.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
mapper
.
recruit
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
yangtz.cs.liu.campus.domain.recruit.EduRecruitStudent
;
@Mapper
public
interface
EduRecruitStudentMapper
extends
BaseMapper
<
EduRecruitStudent
>
{
EduRecruitStudent
getStudent
(
@Param
(
"examId"
)
Long
examId
,
@Param
(
"eduIdCard"
)
String
eduIdCard
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/SchoolRecruitExamMapper.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
mapper
.
recruit
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitExam
;
/**
* @author xuten
*/
@Mapper
public
interface
SchoolRecruitExamMapper
extends
BaseMapper
<
SchoolRecruitExam
>
{
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/SchoolRecruitProjectMapper.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
mapper
.
recruit
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitProject
;
import
java.util.List
;
/**
* 测试项目Mapper接口
*
* @author wengxiulin
* @date 2023-04-11
*/
public
interface
SchoolRecruitProjectMapper
extends
BaseMapper
<
SchoolRecruitProject
>
{
/**
* 查询examination列表
*
* @param schoolRecruitProject examination
* @return examination集合
*/
public
List
<
SchoolRecruitProject
>
selectSchoolRecruitProjectList
(
SchoolRecruitProject
schoolRecruitProject
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/SchoolRecruitRelationMapper.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
mapper
.
recruit
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitRelation
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitEduStudentVo
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamAddressVo
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo
;
import
java.util.List
;
@Mapper
public
interface
SchoolRecruitRelationMapper
extends
BaseMapper
<
SchoolRecruitRelation
>
{
//通过考试id和考生id获取关系
SchoolRecruitRelation
getRelationByIds
(
@Param
(
"examId"
)
Long
examId
,
@Param
(
"studentId"
)
Long
studentId
);
/** 教务管理-考试管理-信息审核列表 */
List
<
RecruitEduStudentVo
>
getInfoCheck
(
RecruitEduStudentVo
vo
);
/**
* 考试管理-考场分配-列表
* */
List
<
RecruitExamAddressVo
>
getAddressList
(
RecruitExamAddressVo
vo
);
RecruitExamScoreVo
getAddressInfo
(
Long
id
);
/**
* 考试管理-成绩管理-列表
* */
List
<
RecruitExamScoreVo
>
getScoreList
(
RecruitExamScoreVo
vo
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/recruit/SchoolRecruitStudentMapper.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
mapper
.
recruit
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitStudent
;
import
yangtz.cs.liu.campus.vo.recruit.SchoolRecruitStudentVo
;
import
yangtz.cs.liu.webpage.vo.WebSchoolRecruitStudentVo
;
import
java.util.List
;
/**
* @author xuten
*/
@Mapper
public
interface
SchoolRecruitStudentMapper
extends
BaseMapper
<
SchoolRecruitStudent
>
{
/**
* 校验手机号码是否唯一
*/
public
SchoolRecruitStudent
checkPhoneUnique
(
String
phoneNumber
);
/**
* 校验身份证号码是否唯一
*/
public
SchoolRecruitStudent
checkIdCardUnique
(
String
idCard
);
/**
* 根据手机号查找艺考生信息
* */
public
SchoolRecruitStudent
getStudentByPhoneNumber
(
@Param
(
"phoneNumber"
)
String
phoneNumber
,
@Param
(
"idCard"
)
String
idCard
);
/**获取考生信息详情*/
WebSchoolRecruitStudentVo
getInfo
(
Long
id
);
/**
* 获取考试考生详情
* */
WebSchoolRecruitStudentVo
getStuInfo
(
@Param
(
"id"
)
Long
id
,
@Param
(
"examId"
)
Long
examId
);
/** 教务管理-考试管理-信息审核-导出报名信息 */
List
<
SchoolRecruitStudentVo
>
editExport
(
@Param
(
"idList"
)
List
<
Long
>
idList
,
@Param
(
"examId"
)
Long
examId
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/EduRecruitStudentServiceImpl.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
impl
.
recruit
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.core.utils.StringUtil
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
yangtz.cs.liu.campus.domain.examination.JuniorHighSchool
;
import
yangtz.cs.liu.campus.domain.recruit.EduRecruitStudent
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitProject
;
import
yangtz.cs.liu.campus.mapper.examination.JuniorHighSchoolMapper
;
import
yangtz.cs.liu.campus.mapper.recruit.EduRecruitStudentMapper
;
import
yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitProjectMapper
;
import
yangtz.cs.liu.campus.service.recruit.IEduRecruitStudentService
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitEduExportVo
;
import
java.util.List
;
@Service
public
class
EduRecruitStudentServiceImpl
extends
ServiceImpl
<
EduRecruitStudentMapper
,
EduRecruitStudent
>
implements
IEduRecruitStudentService
{
@Autowired
private
EduRecruitStudentMapper
eduRecruitStudentMapper
;
@Autowired
private
SchoolRecruitProjectMapper
projectMapper
;
@Autowired
private
JuniorHighSchoolMapper
schoolMapper
;
@Override
public
void
checkImport
(
List
<
RecruitEduExportVo
>
list
)
{
//检验是否为空
if
(
StringUtils
.
isNull
(
list
)
||
list
.
size
()
==
0
){
throw
new
ServiceException
(
"导入数据不能为空"
);
}
// 准备记录日志数据
int
failureNum
=
0
;
StringBuilder
failureMsg
=
new
StringBuilder
();
for
(
RecruitEduExportVo
vo
:
list
){
if
(
StringUtils
.
isEmpty
(
vo
.
getEduIdCard
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、身份证号为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getEduStudentName
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、姓名为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getEduStudentNumber
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、学籍号为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getEduSchoolName
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、初中学校为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getEduProject
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、测试项目为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getEduSex
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、性别为空,请您重新输入! "
);
}
}
if
(
failureNum
>
0
)
{
failureMsg
.
insert
(
0
,
"很抱歉,导入失败!共 "
+
failureNum
+
" 条数据格式不正确,错误如下:"
);
throw
new
ServiceException
(
failureMsg
.
toString
());
}
}
//数据导入
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
importData
(
List
<
RecruitEduExportVo
>
list
,
Long
examId
)
{
// 准备记录日志数据
int
successNum
=
0
;
StringBuilder
successMsg
=
new
StringBuilder
();
int
failureNum
=
0
;
StringBuilder
failureMsg
=
new
StringBuilder
();
for
(
RecruitEduExportVo
vo
:
list
){
LambdaQueryWrapper
<
EduRecruitStudent
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
EduRecruitStudent:
:
getEduIdCard
,
vo
.
getEduIdCard
()).
eq
(
EduRecruitStudent:
:
getExamId
,
examId
);
List
<
EduRecruitStudent
>
students
=
eduRecruitStudentMapper
.
selectList
(
lqw
);
if
(
StringUtils
.
isNotNull
(
students
)
&&
students
.
size
()
>
0
){
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、身份证号"
+
vo
.
getEduIdCard
()
+
"重复,请检查!"
);
}
else
{
EduRecruitStudent
student
=
new
EduRecruitStudent
();
student
.
setExamId
(
examId
);
//去除空格
student
.
setEduIdCard
(
StringUtil
.
clearSpace
(
vo
.
getEduIdCard
()));
student
.
setEduStudentName
(
StringUtil
.
clearSpace
(
vo
.
getEduStudentName
()));
student
.
setEduStudentNumber
(
StringUtil
.
clearSpace
(
vo
.
getEduStudentNumber
()));
student
.
setEduSchoolName
(
StringUtil
.
clearSpace
(
vo
.
getEduSchoolName
()));
student
.
setEduProject
(
StringUtil
.
clearSpace
(
vo
.
getEduProject
()));
student
.
setEduSex
(
vo
.
getEduSex
());
//设置测试项目id
LambdaQueryWrapper
<
SchoolRecruitProject
>
projectLqw
=
new
LambdaQueryWrapper
<>();
projectLqw
.
eq
(
SchoolRecruitProject:
:
getProject
,
StringUtil
.
clearSpace
(
vo
.
getEduProject
()));
List
<
SchoolRecruitProject
>
projects
=
projectMapper
.
selectList
(
projectLqw
);
if
(
StringUtils
.
isNotNull
(
projects
)
&&
projects
.
size
()
>
0
){
student
.
setEduTestId
(
projects
.
get
(
0
).
getId
());
}
//设置初中学校id
LambdaQueryWrapper
<
JuniorHighSchool
>
schoolLqw
=
new
LambdaQueryWrapper
<>();
schoolLqw
.
eq
(
JuniorHighSchool:
:
getSchoolName
,
StringUtil
.
clearSpace
(
vo
.
getEduSchoolName
()));
List
<
JuniorHighSchool
>
schools
=
schoolMapper
.
selectList
(
schoolLqw
);
if
(
StringUtils
.
isNotNull
(
schools
)
&&
schools
.
size
()
>
0
){
student
.
setEduJuniorId
(
schools
.
get
(
0
).
getId
());
}
student
.
insert
();
eduRecruitStudentMapper
.
insert
(
student
);
successNum
++;
}
}
if
(
failureNum
>
0
)
{
failureMsg
.
insert
(
0
,
"很抱歉,导入失败!共 "
+
failureNum
+
" 条数据格式不正确,错误如下:"
);
throw
new
ServiceException
(
failureMsg
.
toString
());
}
else
{
successMsg
.
insert
(
0
,
"恭喜您,数据已全部导入成功!共 "
+
successNum
+
" 条"
);
}
return
successMsg
.
toString
();
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitExamServiceImpl.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
impl
.
recruit
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
yangtz.cs.liu.campus.constant.RecruitExamConstant
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitExam
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitRelation
;
import
yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitExamMapper
;
import
yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitRelationMapper
;
import
yangtz.cs.liu.campus.service.recruit.ISchoolRecruitExamService
;
import
yangtz.cs.liu.webpage.vo.WebRecruitExamForStudentVo
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
static
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ObjectUtils
.
isNotNull
;
/**
* @author xuten
*/
@Service
public
class
SchoolRecruitExamServiceImpl
extends
ServiceImpl
<
SchoolRecruitExamMapper
,
SchoolRecruitExam
>
implements
ISchoolRecruitExamService
{
@Autowired
private
SchoolRecruitExamMapper
recruitExamMapper
;
@Autowired
private
SchoolRecruitRelationMapper
relationMapper
;
/**
* 考务管理-考试管理-列表
*/
@Override
public
List
<
SchoolRecruitExam
>
queryList
(
SchoolRecruitExam
exam
)
{
LambdaQueryWrapper
<
SchoolRecruitExam
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
like
(
isNotNull
(
exam
.
getExamName
()),
SchoolRecruitExam:
:
getExamName
,
exam
.
getExamName
())
.
eq
(
isNotNull
(
exam
.
getStatus
()),
SchoolRecruitExam:
:
getStatus
,
exam
.
getStatus
())
.
orderByDesc
(
SchoolRecruitExam:
:
getCreateTime
)
;
return
recruitExamMapper
.
selectList
(
lqw
);
}
/**
* 网页版-考试报名页面处理list
* */
@Override
public
List
<
WebRecruitExamForStudentVo
>
getRecruitExam
(
Long
studentId
)
{
//获取状态是报名状态的考试信息
LambdaQueryWrapper
<
SchoolRecruitExam
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
SchoolRecruitExam:
:
getStatus
,
RecruitExamConstant
.
INFOCHECK
)
.
orderByDesc
(
SchoolRecruitExam:
:
getCreateTime
)
;
List
<
SchoolRecruitExam
>
examList
=
recruitExamMapper
.
selectList
(
lqw
);
//获取考生报考的考试信息列表
LambdaQueryWrapper
<
SchoolRecruitRelation
>
relaLqw
=
new
LambdaQueryWrapper
<>();
relaLqw
.
eq
(
SchoolRecruitRelation:
:
getStudentId
,
studentId
)
.
eq
(
SchoolRecruitRelation:
:
getSubmit
,
RecruitExamConstant
.
SUBMIT
)
.
orderByDesc
(
SchoolRecruitRelation:
:
getCreateTime
)
;
List
<
SchoolRecruitRelation
>
relations
=
relationMapper
.
selectList
(
relaLqw
);
if
(
StringUtils
.
isNotNull
(
relations
)
&&
relations
.
size
()
>
0
){
List
<
Long
>
idList
=
relations
.
stream
().
map
(
SchoolRecruitRelation:
:
getExamId
).
distinct
().
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
SchoolRecruitExam
>
examLqw
=
new
LambdaQueryWrapper
<>();
examLqw
.
in
(
SchoolRecruitExam:
:
getId
,
idList
);
List
<
SchoolRecruitExam
>
exams
=
recruitExamMapper
.
selectList
(
examLqw
);
/*//去重
examList.removeAll(exams);
//合并list
examList.addAll(exams);*/
examList
=
Stream
.
of
(
examList
,
exams
)
.
flatMap
(
Collection:
:
stream
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
}
List
<
WebRecruitExamForStudentVo
>
list
=
new
ArrayList
<>();
for
(
SchoolRecruitExam
exam
:
examList
){
WebRecruitExamForStudentVo
vo
=
new
WebRecruitExamForStudentVo
();
vo
.
setId
(
exam
.
getId
());
vo
.
setExamName
(
exam
.
getExamName
());
vo
.
setDeadline
(
exam
.
getDeadline
());
/**
* 当前状态,,,分为未报名和已报名考生(其实也就第二个步骤显示的略有不同)
* ①当前学生未报名该考试,查不到考试与学生关系,或者可以查到考试与学生关系,提交状态为未提交, 并且考试状态为报名阶段(信息审核), 则此时当前状态为 报名 ,
* 若考试状态为其他,则根据考试的状态显示考生可看到的对应的当前状态
* 例如:考试状态为考场分配,,未报名考生显示报名;
* 考试状态为成绩发布-未报名考生显示准考证打印;
* 考试状态为结束-未报名考生显示成绩查询
* ③用户已完成提交报名,可以查到考试与学生关系,提交状态为已提交,并且此时的考试状态为报名阶段(信息审核),查不到审核状态, 则此时当前状态为 待审核; 如果可以查到审核状态,则显示对应审核状态;
* 若考试状态为其他,则根据考试的状态显示考生可看到的对应的当前状态
* 考试状态为考场分配,考生显示审核状态;
* 考试状态为成绩发布-考生显示准考证打印;
* 考试状态为结束-考生显示成绩查询
* */
SchoolRecruitRelation
relation
=
relationMapper
.
getRelationByIds
(
exam
.
getId
(),
studentId
);
if
(
StringUtils
.
isNull
(
relation
)){
//未报名,查询不到信息,且考试状态为报名阶段(信息审核)(显示报名)
if
(
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
())){
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBBM
);
}
else
if
(
RecruitExamConstant
.
ADDRESS
.
equals
(
exam
.
getStatus
()))
{
//未报名,查询不到信息,且考试状态为考场分配(显示审核)
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBSH
);
}
else
if
(
RecruitExamConstant
.
SCORE
.
equals
(
exam
.
getStatus
()))
{
//未报名,查询不到信息,且考试状态为成绩发布(显示打印准考证)
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBZKZDY
);
}
else
{
//未报名,查询不到信息,且考试状态为结束(显示成绩查询)
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBCJCX
);
}
}
else
{
//可以查到考生和考试的关系
//提交状态为未提交,也就是为报名
if
(
RecruitExamConstant
.
NOSUBMIT
.
equals
(
relation
.
getSubmit
())){
if
(
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
())){
//考试处于审核阶段,网页考试状态(显示报名)
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBBM
);
}
else
if
(
RecruitExamConstant
.
ADDRESS
.
equals
(
exam
.
getStatus
()))
{
//未报名,查询不到信息,且考试状态为考场分配(显示审核)
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBSH
);
}
else
if
(
RecruitExamConstant
.
SCORE
.
equals
(
exam
.
getStatus
()))
{
//未报名,查询不到信息,且考试状态为成绩发布(显示打印准考证)
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBZKZDY
);
}
else
{
//未报名,查询不到信息,且考试状态为结束(显示成绩查询)
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBCJCX
);
}
}
else
{
//已报名
if
(
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
())){
//在信息审核阶段,显示审核结果
/** 审核状态(只存在教育局信息时该字段没有值,0=驳回,1=通过,2 =退回修改,3=待审核) */
/**
* 考试当前状态(0=报名,1=待审核,2=通过,3=驳回,4=信息修改,5=准考证打印,6=成绩查询,7=审核)
* */
switch
(
relation
.
getAuditStatus
()){
case
"0"
:
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBBH
);
break
;
case
"1"
:
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBTG
);
break
;
case
"2"
:
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBXXXG
);
break
;
case
"3"
:
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBDSH
);
break
;
}
}
else
if
(
RecruitExamConstant
.
ADDRESS
.
equals
(
exam
.
getStatus
()))
{
//且考试状态为考场分配,显示审核结果
switch
(
relation
.
getAuditStatus
()){
case
"0"
:
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBBH
);
break
;
case
"1"
:
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBTG
);
break
;
case
"2"
:
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBXXXG
);
break
;
case
"3"
:
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBDSH
);
break
;
}
}
else
if
(
RecruitExamConstant
.
SCORE
.
equals
(
exam
.
getStatus
()))
{
//考试状态为成绩发布 显示准考证打印
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBZKZDY
);
}
else
{
//未报名,查询不到信息,且考试状态为结束 显示成绩查询
vo
.
setCurrentState
(
RecruitExamConstant
.
WEBCJCX
);
}
}
}
list
.
add
(
vo
);
}
return
list
;
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitProjectServiceImpl.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
impl
.
recruit
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitExam
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitProject
;
import
yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitExamMapper
;
import
yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitProjectMapper
;
import
yangtz.cs.liu.campus.service.recruit.ISchoolRecruitProjectService
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
static
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ObjectUtils
.
isNotNull
;
/**
* 测试项目Service业务层处理
*
* @author wengxiulin
* @date 2023-04-11
*/
@Service
public
class
SchoolRecruitProjectServiceImpl
extends
ServiceImpl
<
SchoolRecruitProjectMapper
,
SchoolRecruitProject
>
implements
ISchoolRecruitProjectService
{
@Autowired
private
SchoolRecruitProjectMapper
schoolRecruitProjectMapper
;
@Autowired
private
SchoolRecruitExamMapper
examMapper
;
/**
* 查询测试项目列表
*
* @param schoolRecruitProject recruit
* @return recruit
*/
@Override
public
List
<
SchoolRecruitProject
>
selectSchoolRecruitProjectList
(
SchoolRecruitProject
schoolRecruitProject
)
{
return
schoolRecruitProjectMapper
.
selectSchoolRecruitProjectList
(
schoolRecruitProject
);
}
//获取本次考试所能选择的测试项目
@Override
public
List
<
SchoolRecruitProject
>
getProjectList
(
Long
examId
,
SchoolRecruitProject
schoolRecruitProject
)
{
SchoolRecruitExam
exam
=
examMapper
.
selectById
(
examId
);
String
ids
=
exam
.
getProjectIds
();
List
<
String
>
result
=
Arrays
.
asList
(
ids
.
split
(
","
));
List
<
Long
>
idList
=
new
ArrayList
<>();
for
(
String
s
:
result
){
Long
l
=
Long
.
parseLong
(
s
);
idList
.
add
(
l
);
}
LambdaQueryWrapper
<
SchoolRecruitProject
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
in
(
SchoolRecruitProject:
:
getId
,
idList
)
.
like
(
isNotNull
(
schoolRecruitProject
.
getProject
()),
SchoolRecruitProject:
:
getProject
,
schoolRecruitProject
.
getProject
())
.
orderByAsc
(
SchoolRecruitProject:
:
getSchoolOrder
)
.
orderByDesc
(
SchoolRecruitProject:
:
getCreateTime
);
return
schoolRecruitProjectMapper
.
selectList
(
lqw
);
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitRelationServiceImpl.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
impl
.
recruit
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.core.utils.StringUtil
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
yangtz.cs.liu.campus.constant.RecruitExamConstant
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitExam
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitRelation
;
import
yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitExamMapper
;
import
yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitRelationMapper
;
import
yangtz.cs.liu.campus.service.recruit.ISchoolRecruitRelationService
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamAddressVo
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo
;
import
java.util.List
;
@Service
public
class
SchoolRecruitRelationServiceImpl
extends
ServiceImpl
<
SchoolRecruitRelationMapper
,
SchoolRecruitRelation
>
implements
ISchoolRecruitRelationService
{
@Autowired
private
SchoolRecruitRelationMapper
recruitRelationMapper
;
@Autowired
private
SchoolRecruitExamMapper
recruitExamMapper
;
@Override
public
SchoolRecruitRelation
getRelationByIds
(
Long
examId
,
Long
studentId
)
{
return
recruitRelationMapper
.
getRelationByIds
(
examId
,
studentId
);
}
@Override
public
List
<
RecruitExamAddressVo
>
getAddressList
(
RecruitExamAddressVo
vo
)
{
return
recruitRelationMapper
.
getAddressList
(
vo
);
}
@Override
public
RecruitExamScoreVo
getAddressInfo
(
Long
id
)
{
return
recruitRelationMapper
.
getAddressInfo
(
id
);
}
/**
* 考试管理-考试管理-列表
* */
@Override
public
List
<
RecruitExamScoreVo
>
getScoreList
(
RecruitExamScoreVo
vo
)
{
return
recruitRelationMapper
.
getScoreList
(
vo
);
}
//校验导入的数据
@Override
public
void
checkImportAddress
(
List
<
RecruitExamAddressVo
>
list
)
{
//检验是否为空
if
(
StringUtils
.
isNull
(
list
)
||
list
.
size
()
==
0
)
{
throw
new
ServiceException
(
"导入数据不能为空"
);
}
// 准备记录日志数据
int
failureNum
=
0
;
StringBuilder
failureMsg
=
new
StringBuilder
();
for
(
RecruitExamAddressVo
vo
:
list
)
{
if
(
StringUtils
.
isEmpty
(
vo
.
getIdCard
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、身份证号为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getExamNumber
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、准考证号为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getInGroup
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、分组为空,请您重新输入! "
);
}
if
(
StringUtils
.
isNull
(
vo
.
getExamDate
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、考试日期为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getExamTime
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、考试时间为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getExamAddress
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、考试地点为空,请您重新输入! "
);
}
}
if
(
failureNum
>
0
)
{
failureMsg
.
insert
(
0
,
"很抱歉,导入失败!共 "
+
failureNum
+
" 条数据格式不正确,错误如下:"
);
throw
new
ServiceException
(
failureMsg
.
toString
());
}
}
/**
* 导入考场数据
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
importDataAddress
(
List
<
RecruitExamAddressVo
>
list
,
Long
examId
)
{
// 准备记录日志数据
int
successNum
=
0
;
StringBuilder
successMsg
=
new
StringBuilder
();
for
(
RecruitExamAddressVo
vo
:
list
)
{
if
(
vo
.
getExamTime
().
contains
(
":"
))
{
String
t
=
vo
.
getExamTime
();
t
=
t
.
replace
(
":"
,
":"
);
vo
.
setExamTime
(
t
);
}
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
SchoolRecruitRelation:
:
getInfoIdCard
,
StringUtil
.
clearSpace
(
vo
.
getIdCard
())).
eq
(
SchoolRecruitRelation:
:
getExamId
,
examId
);
List
<
SchoolRecruitRelation
>
studentList
=
recruitRelationMapper
.
selectList
(
lqw
);
if
(
StringUtils
.
isNull
(
studentList
)
||
studentList
.
size
()
==
0
){
throw
new
ServiceException
(
"查不到身份证号为"
+
vo
.
getIdCard
()
+
"的学生信息,请检查后重新导入"
);
}
SchoolRecruitRelation
student
=
studentList
.
get
(
0
);
student
.
setExamNumber
(
vo
.
getExamNumber
());
student
.
setInGroup
(
vo
.
getInGroup
());
student
.
setExamDate
(
vo
.
getExamDate
());
student
.
setExamTime
(
vo
.
getExamTime
());
student
.
setExamAddress
(
vo
.
getExamAddress
());
student
.
update
();
recruitRelationMapper
.
updateById
(
student
);
successNum
++;
}
successMsg
.
insert
(
0
,
"恭喜您,数据已全部导入成功!共 "
+
successNum
+
" 条"
);
return
successMsg
.
toString
();
}
/**
* 考试管理-考场分配-结束
* 有考场分配信息为空的要进行提示
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
addressEnd
(
Long
examId
)
{
RecruitExamAddressVo
vo
=
new
RecruitExamAddressVo
();
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
List
<
RecruitExamAddressVo
>
list
=
recruitRelationMapper
.
getAddressList
(
vo
);
if
(
StringUtils
.
isNull
(
list
)
&&
list
.
size
()
==
0
){
throw
new
ServiceException
(
"考生信息为空,不允许结束"
);
}
else
{
for
(
RecruitExamAddressVo
addressVo
:
list
){
if
(
StringUtils
.
isEmpty
(
addressVo
.
getExamNumber
())){
throw
new
ServiceException
(
"身份证号为"
+
addressVo
.
getIdCard
()
+
"的考生的准考证号为空,请检查"
);
}
if
(
StringUtils
.
isEmpty
(
addressVo
.
getInGroup
())){
throw
new
ServiceException
(
"身份证号为"
+
addressVo
.
getIdCard
()
+
"的考生的分组为空,请检查"
);
}
if
(
StringUtils
.
isNull
(
addressVo
.
getExamDate
())){
throw
new
ServiceException
(
"身份证号为"
+
addressVo
.
getIdCard
()
+
"的考生的考试日期为空,请检查"
);
}
if
(
StringUtils
.
isEmpty
(
addressVo
.
getExamTime
())){
throw
new
ServiceException
(
"身份证号为"
+
addressVo
.
getIdCard
()
+
"的考生的考试时间为空,请检查"
);
}
if
(
StringUtils
.
isEmpty
(
addressVo
.
getExamAddress
())){
throw
new
ServiceException
(
"身份证号为"
+
addressVo
.
getIdCard
()
+
"的考生的考试地点为空,请检查"
);
}
}
SchoolRecruitExam
exam
=
recruitExamMapper
.
selectById
(
examId
);
exam
.
setStatus
(
RecruitExamConstant
.
SCORE
);
return
recruitExamMapper
.
updateById
(
exam
);
}
}
//校验导入的成绩信息
@Override
public
void
checkImportScore
(
List
<
RecruitExamScoreVo
>
list
)
{
//检验是否为空
if
(
StringUtils
.
isNull
(
list
)
||
list
.
size
()
==
0
)
{
throw
new
ServiceException
(
"导入数据不能为空"
);
}
// 准备记录日志数据
int
failureNum
=
0
;
StringBuilder
failureMsg
=
new
StringBuilder
();
for
(
RecruitExamScoreVo
vo
:
list
)
{
if
(
StringUtils
.
isEmpty
(
vo
.
getIdCard
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、身份证号为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getScore
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、成绩为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getResult
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、结果为空,请您重新输入! "
);
}
if
(
StringUtils
.
isEmpty
(
vo
.
getPassScore
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、资格线为空,请您重新输入! "
);
}
}
if
(
failureNum
>
0
)
{
failureMsg
.
insert
(
0
,
"很抱歉,导入失败!共 "
+
failureNum
+
" 条数据格式不正确,错误如下:"
);
throw
new
ServiceException
(
failureMsg
.
toString
());
}
}
/**
* 导入成绩数据
* */
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
importDataScore
(
List
<
RecruitExamScoreVo
>
list
,
Long
examId
)
{
// 准备记录日志数据
int
successNum
=
0
;
StringBuilder
successMsg
=
new
StringBuilder
();
for
(
RecruitExamScoreVo
vo
:
list
)
{
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
SchoolRecruitRelation:
:
getInfoIdCard
,
vo
.
getIdCard
()).
eq
(
SchoolRecruitRelation:
:
getExamId
,
examId
);
List
<
SchoolRecruitRelation
>
studentList
=
recruitRelationMapper
.
selectList
(
lqw
);
if
(
StringUtils
.
isNull
(
studentList
)
||
studentList
.
size
()
==
0
){
throw
new
ServiceException
(
"查不到身份证号为"
+
vo
.
getIdCard
()
+
"的学生信息,请检查后重新导入"
);
}
SchoolRecruitRelation
student
=
studentList
.
get
(
0
);
student
.
setScore
(
vo
.
getScore
());
student
.
setResult
(
vo
.
getResult
());
student
.
setPassScore
(
vo
.
getPassScore
());
student
.
update
();
recruitRelationMapper
.
updateById
(
student
);
successNum
++;
}
successMsg
.
insert
(
0
,
"恭喜您,数据已全部导入成功!共 "
+
successNum
+
" 条"
);
return
successMsg
.
toString
();
}
/**
* 考试管理-成绩发布-结束
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
scoreEnd
(
Long
examId
)
{
RecruitExamScoreVo
vo
=
new
RecruitExamScoreVo
();
vo
.
setExamId
(
examId
);
vo
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
List
<
RecruitExamScoreVo
>
list
=
recruitRelationMapper
.
getScoreList
(
vo
);
if
(
StringUtils
.
isNull
(
list
)
&&
list
.
size
()
==
0
){
throw
new
ServiceException
(
"考生信息为空,不允许结束"
);
}
else
{
for
(
RecruitExamScoreVo
addressVo
:
list
){
if
(
StringUtils
.
isEmpty
(
addressVo
.
getScore
())){
throw
new
ServiceException
(
"身份证号为"
+
addressVo
.
getIdCard
()
+
"的考生的成绩为空,请检查"
);
}
if
(
StringUtils
.
isEmpty
(
addressVo
.
getResult
())){
throw
new
ServiceException
(
"身份证号为"
+
addressVo
.
getIdCard
()
+
"的考生的结果为空,请检查"
);
}
if
(
StringUtils
.
isNull
(
addressVo
.
getPassScore
())){
throw
new
ServiceException
(
"身份证号为"
+
addressVo
.
getIdCard
()
+
"的考生的资格线为空,请检查"
);
}
}
SchoolRecruitExam
exam
=
recruitExamMapper
.
selectById
(
examId
);
exam
.
setStatus
(
RecruitExamConstant
.
END
);
return
recruitExamMapper
.
updateById
(
exam
);
}
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/recruit/SchoolRecruitStudentServiceImpl.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
impl
.
recruit
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.constant.Constants
;
import
com.ruoyi.common.constant.UserConstants
;
import
com.ruoyi.common.core.domain.model.WebLoginBody
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.MessageUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.framework.manager.AsyncManager
;
import
com.ruoyi.framework.manager.factory.AsyncFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
yangtz.cs.liu.campus.constant.RecruitExamConstant
;
import
yangtz.cs.liu.campus.domain.examination.JuniorHighSchool
;
import
yangtz.cs.liu.campus.domain.recruit.*
;
import
yangtz.cs.liu.campus.mapper.examination.JuniorHighSchoolMapper
;
import
yangtz.cs.liu.campus.mapper.recruit.*
;
import
yangtz.cs.liu.campus.service.recruit.ISchoolRecruitStudentService
;
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.WebSchoolRecruitStudentVo
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ObjectUtils
.
isNotNull
;
@Service
public
class
SchoolRecruitStudentServiceImpl
extends
ServiceImpl
<
SchoolRecruitStudentMapper
,
SchoolRecruitStudent
>
implements
ISchoolRecruitStudentService
{
@Autowired
private
SchoolRecruitStudentMapper
recruitStudentMapper
;
@Autowired
private
SchoolRecruitExamMapper
recruitExamMapper
;
@Autowired
private
SchoolRecruitRelationMapper
recruitRelationMapper
;
@Autowired
private
SchoolRecruitProjectMapper
projectMapper
;
@Autowired
private
JuniorHighSchoolMapper
schoolMapper
;
@Autowired
private
EduRecruitStudentMapper
eduRecruitStudentMapper
;
@Override
public
String
register
(
WebRegisterBody
registerBody
)
{
String
msg
=
""
,
studentName
=
registerBody
.
getStudentName
(),
idCard
=
registerBody
.
getIdCard
(),
phoneNumber
=
registerBody
.
getPhoneNumber
(),
password
=
registerBody
.
getPassword
();
SchoolRecruitStudent
student
=
new
SchoolRecruitStudent
();
student
.
setIdCard
(
idCard
);
student
.
setPhoneNumber
(
phoneNumber
);
if
(
StringUtils
.
isEmpty
(
studentName
))
{
msg
=
"姓名不能为空"
;
}
else
if
(
StringUtils
.
isEmpty
(
idCard
))
{
msg
=
"身份证号不能为空"
;
}
else
if
(
StringUtils
.
isEmpty
(
phoneNumber
))
{
msg
=
"手机号不能为空"
;
}
else
if
(
StringUtils
.
isEmpty
(
password
))
{
msg
=
"用户密码不能为空"
;
}
else
if
(
studentName
.
length
()
<
UserConstants
.
USERNAME_MIN_LENGTH
||
studentName
.
length
()
>
UserConstants
.
USERNAME_MAX_LENGTH
)
{
msg
=
"姓名长度必须在2到20个字符之间"
;
}
else
if
(
password
.
length
()
<
UserConstants
.
PASSWORD_MIN_LENGTH
||
password
.
length
()
>
UserConstants
.
PASSWORD_MAX_LENGTH
)
{
msg
=
"密码长度必须在5到20个字符之间"
;
}
else
if
(
idCard
.
length
()
!=
18
)
{
msg
=
"身份证号长度必须为18位"
;
}
else
if
(
phoneNumber
.
length
()
!=
11
)
{
msg
=
"手机号长度必须为11位"
;
}
/*else if (UserConstants.NOT_UNIQUE.equals(checkPhoneUnique(student)))
{
msg = "保存学生'" + studentName + "'失败,手机号已存在";
}*/
else
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
checkIdCardUnique
(
student
)))
{
msg
=
"保存学生'"
+
studentName
+
"'失败,身份证号已存在"
;
}
else
{
student
.
setStudentName
(
studentName
);
student
.
setPassword
(
SecurityUtils
.
encryptPassword
(
password
));
boolean
regFlag
=
recruitStudentMapper
.
insert
(
student
)
>
0
?
true
:
false
;
if
(!
regFlag
)
{
msg
=
"注册失败,请联系系统管理人员"
;
}
else
{
AsyncManager
.
me
().
execute
(
AsyncFactory
.
recordLogininfor
(
studentName
,
Constants
.
REGISTER
,
MessageUtils
.
message
(
"user.register.success"
)));
}
}
return
msg
;
}
//身份证唯一,手机号不唯一
@Override
public
WebLoginBody
login
(
WebRegisterBody
webRegisterBody
)
{
WebLoginBody
loginBody
=
new
WebLoginBody
();
SchoolRecruitStudent
student
=
recruitStudentMapper
.
getStudentByPhoneNumber
(
webRegisterBody
.
getPhoneNumber
(),
webRegisterBody
.
getIdCard
());
if
(
StringUtils
.
isNull
(
student
))
{
throw
new
ServiceException
(
"登录用户:"
+
webRegisterBody
.
getIdCard
()
+
"不存在"
);
}
if
(!
SecurityUtils
.
matchesPassword
(
webRegisterBody
.
getPassword
(),
student
.
getPassword
()))
{
throw
new
ServiceException
(
"密码错误"
);
}
loginBody
.
setId
(
student
.
getId
());
loginBody
.
setIdCard
(
student
.
getIdCard
());
loginBody
.
setPhoneNumber
(
student
.
getPhoneNumber
());
loginBody
.
setStudentName
(
student
.
getStudentName
());
loginBody
.
setPassword
(
student
.
getPassword
());
return
loginBody
;
}
/**
* 判断能不能点进去进入按钮
* 1能 0不能
* 当前状态(0=报名,1=待审核,2=通过,3=驳回,4=信息修改,5=准考证打印,6=成绩查询,7=审核)
*/
@Override
public
int
enterBtn
(
Long
studentId
,
Long
testId
)
{
//获取考试详情
SchoolRecruitExam
exam
=
recruitExamMapper
.
selectById
(
testId
);
//获取学生与考试关系,是否报名
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
testId
,
studentId
);
//未报名
if
(
StringUtils
.
isNull
(
relation
))
{
//未报名,查询不到信息,且考试状态为报名阶段(信息审核)可以进去报名
if
(
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
()))
{
return
1
;
}
else
if
(
RecruitExamConstant
.
ADDRESS
.
equals
(
exam
.
getStatus
()))
{
//未报名,查询不到信息,且考试状态为考场分配,不能进入,因为考试报名审核已截止
return
0
;
}
else
if
(
RecruitExamConstant
.
SCORE
.
equals
(
exam
.
getStatus
()))
{
//未报名,查询不到信息,且考试状态为成绩发布
return
0
;
}
else
{
//未报名,查询不到信息,且考试状态为结束
return
0
;
}
}
else
{
//可以查到考生和考试的关系
//提交状态为未提交,也就是未报名
if
(
RecruitExamConstant
.
NOSUBMIT
.
equals
(
relation
.
getSubmit
()))
{
if
(
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
()))
{
//未提交信息,考试状态为审核,可以进入
return
1
;
}
else
if
(
RecruitExamConstant
.
ADDRESS
.
equals
(
exam
.
getStatus
()))
{
//未报名,查询不到信息,且考试状态为考场分配,不可进入
return
0
;
}
else
if
(
RecruitExamConstant
.
SCORE
.
equals
(
exam
.
getStatus
()))
{
//未报名,查询不到信息,且考试状态为成绩发布
return
0
;
}
else
{
//未报名,查询不到信息,且考试状态为结束
return
0
;
}
}
else
{
//提交状态为已提交,
if
(
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
()))
{
//考试状态为信息审核阶段
return
1
;
}
else
if
(
RecruitExamConstant
.
ADDRESS
.
equals
(
exam
.
getStatus
()))
{
//考试状态为考场分配
return
1
;
}
else
if
(
RecruitExamConstant
.
SCORE
.
equals
(
exam
.
getStatus
()))
{
//考试状态为成绩发布
return
1
;
}
else
{
//考试状态为结束
return
1
;
}
}
}
}
@Override
public
WebSchoolRecruitStudentVo
getInfo
(
Long
id
)
{
return
recruitStudentMapper
.
getInfo
(
id
);
}
@Override
public
WebSchoolRecruitStudentVo
getStuInfo
(
Long
id
,
Long
examId
)
{
return
recruitStudentMapper
.
getStuInfo
(
id
,
examId
);
}
//根据考试id和考生id获取准考证信息(前提是当前学生已通过审核,且考试状态位于成绩发布)
@Override
public
RecruitAdmissionTicketVo
getTicket
(
Long
studentId
,
Long
examId
)
{
RecruitAdmissionTicketVo
vo
=
new
RecruitAdmissionTicketVo
();
//获取考试详情
SchoolRecruitExam
exam
=
recruitExamMapper
.
selectById
(
examId
);
//获取考生信息
SchoolRecruitStudent
student
=
recruitStudentMapper
.
selectById
(
studentId
);
//获取考试和考生关系(此表中包含考试时间地点等)
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
studentId
);
//测试项目
SchoolRecruitProject
project
=
projectMapper
.
selectById
(
relation
.
getTestId
());
//毕业学校
JuniorHighSchool
school
=
schoolMapper
.
selectById
(
relation
.
getJuniorId
());
vo
.
setExamName
(
exam
.
getExamName
());
vo
.
setNotice
(
exam
.
getNotice
());
vo
.
setStudentName
(
student
.
getStudentName
());
vo
.
setExamNumber
(
relation
.
getExamNumber
());
if
(
StringUtils
.
isNotNull
(
project
))
{
vo
.
setProject
(
project
.
getProject
());
}
vo
.
setInGroup
(
relation
.
getInGroup
());
vo
.
setPhoneNumber
(
student
.
getPhoneNumber
());
if
(
StringUtils
.
isNotNull
(
school
))
{
vo
.
setSchoolName
(
school
.
getSchoolName
());
}
vo
.
setPhoto
(
student
.
getPhoto
());
//"yyyy-MM-dd"考试日期
Date
d
=
relation
.
getExamDate
();
Calendar
ca
=
Calendar
.
getInstance
();
ca
.
setTime
(
d
);
vo
.
setExamYear
(
ca
.
get
(
Calendar
.
YEAR
));
int
day
=
ca
.
get
(
Calendar
.
DAY_OF_MONTH
);
int
month
=
ca
.
get
(
Calendar
.
MONTH
)
+
1
;
//第几个月 8
//考试时间 HH:mm
String
t
=
relation
.
getExamTime
();
int
hour
=
Integer
.
parseInt
(
StringUtils
.
substringBefore
(
t
,
":"
));
//判断是上午还是下午,小于12为上午,其余为下午
String
examDate
=
""
;
if
(
hour
<
12
)
{
examDate
=
month
+
"月"
+
day
+
"日上午"
;
}
else
{
examDate
=
month
+
"月"
+
day
+
"日下午"
;
}
vo
.
setExamDate
(
examDate
);
vo
.
setExamTime
(
t
+
"开始"
);
vo
.
setExamAddress
(
relation
.
getExamAddress
());
return
vo
;
}
@Override
public
QueryScoreVo
getScore
(
Long
studentId
,
Long
examId
)
{
QueryScoreVo
vo
=
new
QueryScoreVo
();
//获取考试详情
SchoolRecruitExam
exam
=
recruitExamMapper
.
selectById
(
examId
);
//获取考生信息
SchoolRecruitStudent
student
=
recruitStudentMapper
.
selectById
(
studentId
);
//获取考试和考生关系(此表中包含考试时间地点等)
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
studentId
);
//测试项目
SchoolRecruitProject
project
=
projectMapper
.
selectById
(
relation
.
getTestId
());
vo
.
setExamName
(
exam
.
getExamName
());
vo
.
setExamYear
(
exam
.
getExamYear
());
vo
.
setStudentName
(
student
.
getStudentName
());
vo
.
setStudentNumber
(
student
.
getStudentNumber
());
vo
.
setExamNumber
(
relation
.
getExamNumber
());
vo
.
setIdCard
(
student
.
getIdCard
());
if
(
StringUtils
.
isNotNull
(
project
))
{
//设置类别
String
type
=
""
;
switch
(
project
.
getType
())
{
case
"0"
:
type
=
"体育"
;
break
;
case
"1"
:
type
=
"音乐"
;
break
;
case
"2"
:
type
=
"美术"
;
break
;
case
"3"
:
type
=
"书法"
;
}
vo
.
setExamSort
(
type
);
vo
.
setExamProject
(
project
.
getProject
());
}
vo
.
setScore
(
relation
.
getScore
());
vo
.
setResult
(
relation
.
getResult
());
vo
.
setPassScore
(
relation
.
getPassScore
());
return
vo
;
}
/**
* 考生报名-暂存
* 修改考生表
* 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据
* 此时存考试id,考生id,身份证,提交状态(0未提交)
* 如果存在该考试考生关系数据,则对比身份证是否改变,修改了则修改关系表对应字段即可
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
webSave
(
Long
examId
,
WebSchoolRecruitStudentVo
student
)
{
//判断考试所在节点,如果不是审核阶段则不能暂存
SchoolRecruitExam
exam
=
recruitExamMapper
.
selectById
(
examId
);
if
(!
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
()))
{
throw
new
ServiceException
(
"报名、审核阶段已过,暂时无法暂存信息"
);
}
//修改学生信息
SchoolRecruitStudent
s
=
recruitStudentMapper
.
selectById
(
student
.
getId
());
//BeanUtils.copyProperties(student,s);
s
.
setStudentNumber
(
student
.
getStudentNumber
());
s
.
setSex
(
student
.
getSex
());
s
.
setHeight
(
student
.
getHeight
());
s
.
setWeight
(
student
.
getWeight
());
s
.
setTelephone1
(
student
.
getTelephone1
());
s
.
setTelephone2
(
student
.
getTelephone2
());
s
.
setPhoto
(
student
.
getPhoto
());
s
.
setUpdateTime
(
DateUtils
.
getNowDate
());
recruitStudentMapper
.
updateById
(
s
);
//获取考试考生关系
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
//暂无关系,则一份关系
if
(
StringUtils
.
isNull
(
relation
))
{
relation
=
new
SchoolRecruitRelation
();
relation
.
setExamId
(
examId
);
relation
.
setStudentId
(
student
.
getId
());
relation
.
setInfoIdCard
(
student
.
getIdCard
());
relation
.
setJuniorId
(
student
.
getJuniorId
());
relation
.
setTestId
(
student
.
getTestId
());
relation
.
setSubmit
(
RecruitExamConstant
.
NOSUBMIT
);
relation
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
recruitRelationMapper
.
insert
(
relation
);
}
//身份证号、初中学校、测试项目改变
relation
.
setInfoIdCard
(
student
.
getIdCard
());
relation
.
setJuniorId
(
student
.
getJuniorId
());
relation
.
setTestId
(
student
.
getTestId
());
relation
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
recruitRelationMapper
.
updateById
(
relation
);
}
/**
* 考生报名-提交
* 修改考生表
* 首先判断该考生和该考试是否有relation,没有的话则要新增一份该考试考生关系数据
* 此时存考试id,考生id,身份证,提交状态(1已提交),审核状态为3=待审核
* 如果存在该考试考生关系数据, 修改身份证号,提交状态(1已提交),审核状态为3=待审核,修改关系表即可
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
webSubmit
(
Long
examId
,
WebSchoolRecruitStudentVo
student
)
{
//判断考试所在节点,如果不是审核阶段则不能提交
SchoolRecruitExam
exam
=
recruitExamMapper
.
selectById
(
examId
);
if
(!
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
()))
{
throw
new
ServiceException
(
"报名、审核阶段已过,暂时无法提交信息"
);
}
//修改学生信息
SchoolRecruitStudent
s
=
recruitStudentMapper
.
selectById
(
student
.
getId
());
//BeanUtils.copyProperties(student,s);
s
.
setStudentNumber
(
student
.
getStudentNumber
());
s
.
setSex
(
student
.
getSex
());
s
.
setHeight
(
student
.
getHeight
());
s
.
setWeight
(
student
.
getWeight
());
s
.
setTelephone1
(
student
.
getTelephone1
());
s
.
setTelephone2
(
student
.
getTelephone2
());
s
.
setPhoto
(
student
.
getPhoto
());
s
.
setUpdateTime
(
DateUtils
.
getNowDate
());
recruitStudentMapper
.
updateById
(
s
);
//获取考试考生关系
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
//暂无关系,则新增一份关系
if
(
StringUtils
.
isNull
(
relation
))
{
relation
=
new
SchoolRecruitRelation
();
relation
.
setExamId
(
examId
);
relation
.
setStudentId
(
student
.
getId
());
relation
.
setInfoIdCard
(
student
.
getIdCard
());
relation
.
setJuniorId
(
student
.
getJuniorId
());
relation
.
setTestId
(
student
.
getTestId
());
relation
.
setSubmit
(
RecruitExamConstant
.
SUBMIT
);
relation
.
setAuditStatus
(
RecruitExamConstant
.
CHECK
);
relation
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
recruitRelationMapper
.
insert
(
relation
);
}
relation
.
setInfoIdCard
(
student
.
getIdCard
());
relation
.
setJuniorId
(
student
.
getJuniorId
());
relation
.
setTestId
(
student
.
getTestId
());
relation
.
setSubmit
(
RecruitExamConstant
.
SUBMIT
);
relation
.
setAuditStatus
(
RecruitExamConstant
.
CHECK
);
relation
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
recruitRelationMapper
.
updateById
(
relation
);
}
/**
* 教务管理-考试管理-信息审核列表
*/
@Override
public
List
<
RecruitEduStudentVo
>
getInfoCheck
(
RecruitEduStudentVo
vo
)
{
//结果集 ,获取到了所有考试考生关系及报名学生的信息
List
<
RecruitEduStudentVo
>
voList
=
recruitRelationMapper
.
getInfoCheck
(
vo
);
//获取教育局考生信息
LambdaQueryWrapper
<
EduRecruitStudent
>
eduLqw
=
new
LambdaQueryWrapper
<>();
eduLqw
.
eq
(
EduRecruitStudent:
:
getExamId
,
vo
.
getExamId
());
List
<
EduRecruitStudent
>
eduRecruitStudentList
=
eduRecruitStudentMapper
.
selectList
(
eduLqw
);
if
(
StringUtils
.
isNotNull
(
eduRecruitStudentList
)
&&
eduRecruitStudentList
.
size
()
>
0
)
{
//遍历教育局学生信息,将其值整到对应结果集对象信息,若根据身份证号匹配不到,就新建个对象放到结果集中
for
(
EduRecruitStudent
eduRecruitStudent
:
eduRecruitStudentList
)
{
//判断能否根据身份证号匹配上
boolean
flag
=
true
;
for
(
RecruitEduStudentVo
studentVo
:
voList
)
{
//若可以匹配上
if
(
eduRecruitStudent
.
getEduIdCard
().
equals
(
studentVo
.
getInfoIdCard
()))
{
flag
=
false
;
//设置结果集对应教育局信息
studentVo
.
setEduIdCard
(
eduRecruitStudent
.
getEduIdCard
());
studentVo
.
setEduStudentName
(
eduRecruitStudent
.
getEduStudentName
());
studentVo
.
setEduStudentNumber
(
eduRecruitStudent
.
getEduStudentNumber
());
studentVo
.
setEduSchoolName
(
eduRecruitStudent
.
getEduSchoolName
());
studentVo
.
setEduProject
(
eduRecruitStudent
.
getEduProject
());
studentVo
.
setEduSex
(
eduRecruitStudent
.
getEduSex
());
break
;
}
}
if
(
flag
)
{
//说明没有报名信息可以和教育局信息匹配上,需要新增一条数据
RecruitEduStudentVo
studentVo
=
new
RecruitEduStudentVo
();
studentVo
.
setExamId
(
vo
.
getExamId
());
studentVo
.
setInfoIdCard
(
eduRecruitStudent
.
getEduIdCard
());
studentVo
.
setEduIdCard
(
eduRecruitStudent
.
getEduIdCard
());
studentVo
.
setEduStudentName
(
eduRecruitStudent
.
getEduStudentName
());
studentVo
.
setEduStudentNumber
(
eduRecruitStudent
.
getEduStudentNumber
());
studentVo
.
setEduSchoolName
(
eduRecruitStudent
.
getEduSchoolName
());
studentVo
.
setEduProject
(
eduRecruitStudent
.
getEduProject
());
studentVo
.
setEduSex
(
eduRecruitStudent
.
getEduSex
());
voList
.
add
(
studentVo
);
}
}
}
//设置匹配状态
List
<
RecruitEduStudentVo
>
list
=
setState
(
voList
);
//通过模糊查询过滤,匹配状态,审核状态,姓名(对应学生自己的报名信息),身份证号
if
(
StringUtils
.
isNotNull
(
vo
.
getMatchStatus
()))
{
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
());
}
if
(
StringUtils
.
isNotNull
(
vo
.
getStudentName
()))
{
list
=
list
.
stream
().
filter
(
a
->
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
());
}
return
list
;
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
editRecruitAndEdu
(
Long
examId
,
RecruitAndEduStudentVo
student
)
{
//修改学生信息
SchoolRecruitStudent
s
=
new
SchoolRecruitStudent
();
BeanUtils
.
copyProperties
(
student
,
s
);
s
.
setId
(
student
.
getId
());
s
.
setCreateBy
(
student
.
getCreateBy
());
s
.
setCreateTime
(
student
.
getCreateTime
());
s
.
update
();
recruitStudentMapper
.
updateById
(
s
);
//获取考试考生关系
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
//身份证号改变
relation
.
setInfoIdCard
(
student
.
getIdCard
());
relation
.
setJuniorId
(
student
.
getJuniorId
());
relation
.
setTestId
(
student
.
getTestId
());
relation
.
update
();
recruitRelationMapper
.
updateById
(
relation
);
//教育局信息修改
LambdaQueryWrapper
<
EduRecruitStudent
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
EduRecruitStudent:
:
getExamId
,
examId
).
eq
(
EduRecruitStudent:
:
getEduIdCard
,
student
.
getIdCard
());
List
<
EduRecruitStudent
>
list
=
eduRecruitStudentMapper
.
selectList
(
lqw
);
//存在 1条教育局信息
if
(
StringUtils
.
isNotNull
(
list
)
&&
list
.
size
()
>
0
){
//修改
EduRecruitStudent
edu
=
list
.
get
(
0
);
edu
.
setEduStudentName
(
student
.
getEduStudentName
());
edu
.
setEduStudentNumber
(
student
.
getEduStudentNumber
());
edu
.
setEduJuniorId
(
student
.
getEduJuniorId
());
edu
.
setEduSchoolName
(
student
.
getEduSchoolName
());
edu
.
setEduTestId
(
student
.
getEduTestId
());
edu
.
setEduProject
(
student
.
getEduProject
());
edu
.
setEduSex
(
student
.
getEduSex
());
edu
.
update
();
return
eduRecruitStudentMapper
.
updateById
(
edu
);
}
else
{
//不存在,新增对应教育局信息
EduRecruitStudent
edu
=
new
EduRecruitStudent
();
edu
.
setExamId
(
examId
);
//赋值学生的身份证号
edu
.
setEduIdCard
(
student
.
getIdCard
());
edu
.
setEduStudentName
(
student
.
getEduStudentName
());
edu
.
setEduStudentNumber
(
student
.
getEduStudentNumber
());
edu
.
setEduJuniorId
(
student
.
getEduJuniorId
());
edu
.
setEduSchoolName
(
student
.
getEduSchoolName
());
edu
.
setEduTestId
(
student
.
getEduTestId
());
edu
.
setEduProject
(
student
.
getEduProject
());
edu
.
setEduSex
(
student
.
getEduSex
());
edu
.
insert
();
return
eduRecruitStudentMapper
.
insert
(
edu
);
}
}
/**
* 教务管理-考试管理-信息审核-修改
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
edit
(
Long
examId
,
WebSchoolRecruitStudentVo
student
)
{
//修改学生信息
SchoolRecruitStudent
s
=
new
SchoolRecruitStudent
();
BeanUtils
.
copyProperties
(
student
,
s
);
s
.
setId
(
student
.
getId
());
s
.
setCreateBy
(
student
.
getCreateBy
());
s
.
setCreateTime
(
student
.
getCreateTime
());
s
.
update
();
recruitStudentMapper
.
updateById
(
s
);
//获取考试考生关系
SchoolRecruitRelation
relation
=
recruitRelationMapper
.
getRelationByIds
(
examId
,
student
.
getId
());
//身份证号改变
relation
.
setInfoIdCard
(
student
.
getIdCard
());
relation
.
setJuniorId
(
student
.
getJuniorId
());
relation
.
setTestId
(
student
.
getTestId
());
return
recruitRelationMapper
.
updateById
(
relation
);
}
/**
* 教务管理-考试管理-信息审核-导出报名信息
*/
@Override
public
List
<
SchoolRecruitStudentVo
>
editExport
(
List
<
Long
>
idList
,
Long
examId
)
{
List
<
SchoolRecruitStudentVo
>
list
=
recruitStudentMapper
.
editExport
(
idList
,
examId
);
//序号
int
i
=
1
;
for
(
SchoolRecruitStudentVo
student
:
list
)
{
student
.
setXh
(
i
);
i
++;
}
return
list
;
}
/**
* 教务管理-考试管理-通过
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
pass
(
Long
examId
,
List
<
Long
>
studentIds
)
{
// 准备记录日志数据
int
successNum
=
0
;
int
failureNum
=
0
;
StringBuilder
successMsg
=
new
StringBuilder
();
//查询出所有studentIds对应的学生信息
List
<
SchoolRecruitStudentVo
>
list
=
recruitStudentMapper
.
editExport
(
studentIds
,
examId
);
//选中的有效学生信息总数
int
allNum
=
list
.
size
();
for
(
SchoolRecruitStudentVo
student
:
list
)
{
//根据考试id,和学生身份证号查出教育局学生信息进行比对
EduRecruitStudent
eduRecruitStudent
=
eduRecruitStudentMapper
.
getStudent
(
examId
,
student
.
getIdCard
());
boolean
flag
=
true
;
if
(
StringUtils
.
isNotNull
(
eduRecruitStudent
))
{
//匹配学生和教育局信息
if
(!
student
.
getStudentName
().
equals
(
eduRecruitStudent
.
getEduStudentName
()))
{
flag
=
false
;
}
if
(!
student
.
getStudentNumber
().
equals
(
eduRecruitStudent
.
getEduStudentNumber
()))
{
flag
=
false
;
}
if
(!
student
.
getSchoolName
().
equals
(
eduRecruitStudent
.
getEduSchoolName
()))
{
flag
=
false
;
}
if
(!
student
.
getProject
().
equals
(
eduRecruitStudent
.
getEduProject
()))
{
flag
=
false
;
}
if
(!
student
.
getSex
().
equals
(
eduRecruitStudent
.
getEduSex
()))
{
flag
=
false
;
}
if
(
flag
)
{
//全部都匹配
//判断状态是否已是通过
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
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
()
+
"的学生信息已驳回,无法通过;"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生信息已通过,无法再次通过;"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法通过;"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
recruitRelationMapper
.
updateById
(
relation
);
successNum
++;
}
}
else
{
//存在教育局信息,但是没有匹配上
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生,信息不匹配,无法通过;"
);
}
}
else
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
student
.
getIdCard
()
+
"的学生,无教育局信息,无法通过;"
);
}
}
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> 条不符合条件的数据,不通过的理由如下:"
);
return
successMsg
.
toString
();
}
else
{
return
"恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为通过!共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
" </span> 条"
;
}
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
passOne
(
Long
examId
,
Long
studentId
)
{
//查询出所有studentIds对应的学生信息
WebSchoolRecruitStudentVo
vo
=
recruitStudentMapper
.
getStuInfo
(
studentId
,
examId
);
//根据考试id,和学生身份证号查出教育局学生信息进行比对
EduRecruitStudent
eduRecruitStudent
=
eduRecruitStudentMapper
.
getStudent
(
examId
,
vo
.
getIdCard
());
boolean
flag
=
true
;
if
(
StringUtils
.
isNotNull
(
eduRecruitStudent
))
{
//匹配学生和教育局信息
if
(!
vo
.
getStudentName
().
equals
(
eduRecruitStudent
.
getEduStudentName
()))
{
flag
=
false
;
}
if
(!
vo
.
getStudentNumber
().
equals
(
eduRecruitStudent
.
getEduStudentNumber
()))
{
flag
=
false
;
}
if
(!
vo
.
getSchoolName
().
equals
(
eduRecruitStudent
.
getEduSchoolName
()))
{
flag
=
false
;
}
if
(!
vo
.
getProject
().
equals
(
eduRecruitStudent
.
getEduProject
()))
{
flag
=
false
;
}
if
(!
vo
.
getSex
().
equals
(
eduRecruitStudent
.
getEduSex
()))
{
flag
=
false
;
}
if
(
flag
)
{
//全部都匹配
//判断状态是否已是通过
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
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
()
+
"的学生信息已通过,无法再次通过"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
vo
.
getIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法通过"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
PASS
);
return
recruitRelationMapper
.
updateById
(
relation
);
}
}
else
{
//存在教育局信息,但是没有匹配上
throw
new
ServiceException
(
"身份证号为"
+
vo
.
getIdCard
()
+
"的学生,信息不匹配,无法通过"
);
}
}
else
{
throw
new
ServiceException
(
"身份证号为"
+
vo
.
getIdCard
()
+
"的学生,无教育局信息,无法通过"
);
}
}
/**
* 教务管理-考试管理-退回修改
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
back
(
Long
examId
,
List
<
Long
>
studentIds
)
{
// 准备记录日志数据
int
successNum
=
0
;
int
failureNum
=
0
;
StringBuilder
successMsg
=
new
StringBuilder
();
//查询出所有studentIds对应的学生信息
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
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
()
+
"的学生信息已驳回,无法退回修改;"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法退回修改;"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法再次退回修改;"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
EDIT
);
recruitRelationMapper
.
updateById
(
relation
);
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> 条不符合条件的数据,无法退回修改的理由如下:"
);
return
successMsg
.
toString
();
}
else
{
return
"恭喜您,已将选中的所有有效数据(排除所有未报名的数据)的状态改为退回修改,共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
"</span> 条!"
;
}
}
@Override
public
int
backOne
(
Long
examId
,
Long
studentId
)
{
//查询出studentId对应的学生考试信息
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
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
()
+
"的学生信息已驳回,无法退回修改"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法退回修改"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法再次退回修改"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
EDIT
);
return
recruitRelationMapper
.
updateById
(
relation
);
}
}
/**
* 教务管理-考试管理-驳回
*/
@Override
public
String
reject
(
Long
examId
,
List
<
Long
>
studentIds
)
{
// 准备记录日志数据
int
successNum
=
0
;
int
failureNum
=
0
;
StringBuilder
successMsg
=
new
StringBuilder
();
//查询出所有studentIds对应的学生信息
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
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
()
+
"的学生信息已驳回,无法再次驳回;"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法驳回;"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
failureNum
++;
successMsg
.
append
(
"<br/>"
+
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法驳回;"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
REJECT
);
recruitRelationMapper
.
updateById
(
relation
);
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> 条不符合条件的数据,无法驳回的理由如下:"
);
return
successMsg
.
toString
();
}
else
{
return
"恭喜您,已将选中的所有有效数据的数据(排除所有未报名的数据)的状态改为驳回,共 <span style='color: red;font-size: 20px; font-weight:bold'>"
+
allNum
+
"</span> 条!"
;
}
}
@Override
public
int
rejectOne
(
Long
examId
,
Long
studentId
)
{
//查询出studentId对应的学生信息
LambdaQueryWrapper
<
SchoolRecruitRelation
>
lqw
=
new
LambdaQueryWrapper
<>();
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
()
+
"的学生信息已驳回,无法再次驳回"
);
}
else
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已通过,无法驳回"
);
}
else
if
(
RecruitExamConstant
.
EDIT
.
equals
(
relation
.
getAuditStatus
()))
{
throw
new
ServiceException
(
"身份证号为"
+
relation
.
getInfoIdCard
()
+
"的学生信息已退回修改,没有再次提交申请,无法驳回"
);
}
else
{
relation
.
setAuditStatus
(
RecruitExamConstant
.
REJECT
);
return
recruitRelationMapper
.
updateById
(
relation
);
}
}
/**
* 考务管理-考生账号管理-列表
*/
@Override
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
.
getIdCard
()),
SchoolRecruitStudent:
:
getIdCard
,
student
.
getIdCard
())
.
orderByDesc
(
SchoolRecruitStudent:
:
getCreateTime
)
;
return
recruitStudentMapper
.
selectList
(
lqw
);
}
//设置匹配状态
public
List
<
RecruitEduStudentVo
>
setState
(
List
<
RecruitEduStudentVo
>
list
)
{
for
(
RecruitEduStudentVo
vo
:
list
)
{
//匹配时所有信息都匹配才算匹配(身份证号,姓名,学籍号,初中学校,报考的测试项目,性别)
//因为学生数据必填,
// 所以只需判断身份证号不为空,则可证明学生的其他字段都不为空,
// 教育局信息也是如此
if
(
StringUtils
.
isNotNull
(
vo
.
getIdCard
()))
{
//学生数据存在
//教育局信息存在
if
(
StringUtils
.
isNotNull
(
vo
.
getEduIdCard
()))
{
//匹配学生和教育局信息
boolean
flag
=
true
;
if
(!
vo
.
getStudentName
().
equals
(
vo
.
getEduStudentName
()))
{
flag
=
false
;
}
if
(!
vo
.
getStudentNumber
().
equals
(
vo
.
getEduStudentNumber
()))
{
flag
=
false
;
}
if
(!
vo
.
getSchoolName
().
equals
(
vo
.
getEduSchoolName
()))
{
flag
=
false
;
}
if
(!
vo
.
getProject
().
equals
(
vo
.
getEduProject
()))
{
flag
=
false
;
}
if
(!
vo
.
getSex
().
equals
(
vo
.
getEduSex
()))
{
flag
=
false
;
}
if
(
flag
)
{
//全部都匹配
vo
.
setMatchStatus
(
RecruitExamConstant
.
PASS
);
}
else
{
//不匹配
vo
.
setMatchStatus
(
RecruitExamConstant
.
REJECT
);
}
}
else
{
//不存在教育局信息
vo
.
setMatchStatus
(
RecruitExamConstant
.
EDIT
);
}
}
else
{
//学生信息不存在,也就是未报名
vo
.
setMatchStatus
(
RecruitExamConstant
.
CHECK
);
}
}
return
list
;
}
/**
* 校验手机号是否唯一
*/
public
String
checkPhoneUnique
(
SchoolRecruitStudent
student
)
{
Long
id
=
StringUtils
.
isNull
(
student
.
getId
())
?
-
1L
:
student
.
getId
();
SchoolRecruitStudent
info
=
recruitStudentMapper
.
checkPhoneUnique
(
student
.
getPhoneNumber
());
if
(
StringUtils
.
isNotNull
(
info
)
&&
info
.
getId
().
longValue
()
!=
id
.
longValue
())
{
return
UserConstants
.
NOT_UNIQUE
;
}
return
UserConstants
.
UNIQUE
;
}
/**
* 校验身份证号是否唯一
*/
public
String
checkIdCardUnique
(
SchoolRecruitStudent
student
)
{
Long
id
=
StringUtils
.
isNull
(
student
.
getId
())
?
-
1L
:
student
.
getId
();
SchoolRecruitStudent
info
=
recruitStudentMapper
.
checkIdCardUnique
(
student
.
getIdCard
());
if
(
StringUtils
.
isNotNull
(
info
)
&&
info
.
getId
().
longValue
()
!=
id
.
longValue
())
{
return
UserConstants
.
NOT_UNIQUE
;
}
return
UserConstants
.
UNIQUE
;
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/IEduRecruitStudentService.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
recruit
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
yangtz.cs.liu.campus.domain.recruit.EduRecruitStudent
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitEduExportVo
;
import
java.util.List
;
public
interface
IEduRecruitStudentService
extends
IService
<
EduRecruitStudent
>
{
//校验导入的数据
void
checkImport
(
List
<
RecruitEduExportVo
>
list
);
//数据导入
String
importData
(
List
<
RecruitEduExportVo
>
list
,
Long
examId
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitExamService.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
recruit
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitExam
;
import
yangtz.cs.liu.webpage.vo.WebRecruitExamForStudentVo
;
import
java.util.List
;
/**
* @author xuten
*/
public
interface
ISchoolRecruitExamService
extends
IService
<
SchoolRecruitExam
>
{
/**
* 考务管理-考试管理-列表
*/
public
List
<
SchoolRecruitExam
>
queryList
(
SchoolRecruitExam
exam
);
/**
* 网页版-考试报名页面处理list
* */
public
List
<
WebRecruitExamForStudentVo
>
getRecruitExam
(
Long
studentId
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitProjectService.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
recruit
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitProject
;
import
java.util.List
;
/**
* 测试项目Service接口
*
* @author wengxiulin
* @date 2023-04-11
*/
public
interface
ISchoolRecruitProjectService
extends
IService
<
SchoolRecruitProject
>
{
/**
* 查询测试项目列表
*
* @param schoolRecruitProject examination
* @return examination集合
*/
public
List
<
SchoolRecruitProject
>
selectSchoolRecruitProjectList
(
SchoolRecruitProject
schoolRecruitProject
);
List
<
SchoolRecruitProject
>
getProjectList
(
Long
examId
,
SchoolRecruitProject
schoolRecruitProject
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitRelationService.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
recruit
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
yangtz.cs.liu.campus.domain.recruit.SchoolRecruitRelation
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamAddressVo
;
import
yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo
;
import
java.util.List
;
public
interface
ISchoolRecruitRelationService
extends
IService
<
SchoolRecruitRelation
>
{
//通过考试id和考生id获取关系
SchoolRecruitRelation
getRelationByIds
(
Long
examId
,
Long
studentId
);
/**
* 考试管理-考场分配-列表
* */
List
<
RecruitExamAddressVo
>
getAddressList
(
RecruitExamAddressVo
vo
);
RecruitExamScoreVo
getAddressInfo
(
Long
id
);
/**
* 考试管理-考试管理-列表
* */
List
<
RecruitExamScoreVo
>
getScoreList
(
RecruitExamScoreVo
vo
);
/**
* 校验导入的考场数据
* */
void
checkImportAddress
(
List
<
RecruitExamAddressVo
>
list
);
/**
* 导入考场数据
* */
String
importDataAddress
(
List
<
RecruitExamAddressVo
>
list
,
Long
examId
);
/**
* 考试管理-考场分配-结束
*/
int
addressEnd
(
Long
examId
);
/**
* 校验导入的成绩数据
* */
void
checkImportScore
(
List
<
RecruitExamScoreVo
>
list
);
/**
* 导入成绩数据
* */
String
importDataScore
(
List
<
RecruitExamScoreVo
>
list
,
Long
examId
);
/**
* 考试管理-成绩发布-结束
*/
int
scoreEnd
(
Long
examId
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/recruit/ISchoolRecruitStudentService.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
service
.
recruit
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.common.core.domain.model.WebLoginBody
;
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.WebSchoolRecruitStudentVo
;
import
java.util.List
;
/**
* @author xuten
*/
public
interface
ISchoolRecruitStudentService
extends
IService
<
SchoolRecruitStudent
>
{
/**
* 艺考生网页注册
* */
public
String
register
(
WebRegisterBody
registerBody
);
/**
* 艺考生网页登录
* */
public
WebLoginBody
login
(
WebRegisterBody
webRegisterBody
);
/**
* 判断能不能点进去进入按钮
* 1能 0不能
* 当前状态(0=报名,1=待审核,2=通过,3=驳回,4=信息修改,5=准考证打印,6=成绩查询,7=审核)
* */
public
int
enterBtn
(
Long
studentId
,
Long
testId
);
/**获取考生信息详情*/
WebSchoolRecruitStudentVo
getInfo
(
Long
id
);
/**
* 获取考试考生详情
* */
WebSchoolRecruitStudentVo
getStuInfo
(
Long
id
,
Long
examId
);
//根据考试id和考生id获取准考证信息(前提是当前学生已通过审核,且考试状态位于成绩发布)
RecruitAdmissionTicketVo
getTicket
(
Long
studentId
,
Long
examId
);
//根据考试id和考生id获取考试成绩信息(前提是当前学生已通过审核,且考试状态位于成绩发布)
QueryScoreVo
getScore
(
Long
studentId
,
Long
examId
);
//考生报名界面-暂存
public
int
webSave
(
Long
examId
,
WebSchoolRecruitStudentVo
student
);
//考生报名界面-提交
public
int
webSubmit
(
Long
examId
,
WebSchoolRecruitStudentVo
student
);
/** 教务管理-考试管理-信息审核列表 */
List
<
RecruitEduStudentVo
>
getInfoCheck
(
RecruitEduStudentVo
vo
);
/** 教务管理-考试管理-信息审核-修改 */
int
editRecruitAndEdu
(
Long
examId
,
RecruitAndEduStudentVo
student
);
int
edit
(
Long
examId
,
WebSchoolRecruitStudentVo
student
);
/** 教务管理-考试管理-信息审核-导出报名信息 */
List
<
SchoolRecruitStudentVo
>
editExport
(
List
<
Long
>
idList
,
Long
examId
);
/** 教务管理-考试管理-通过 */
String
pass
(
Long
examId
,
List
<
Long
>
studentIds
);
/** 教务管理-考试管理-单个通过 */
int
passOne
(
Long
examId
,
Long
studentId
);
/** 教务管理-考试管理-退回修改 */
String
back
(
Long
examId
,
List
<
Long
>
studentIds
);
/** 教务管理-考试管理-单个退回修改 */
int
backOne
(
Long
examId
,
Long
studentId
);
/** 教务管理-考试管理-驳回 */
String
reject
(
Long
examId
,
List
<
Long
>
studentIds
);
/** 教务管理-考试管理-单个驳回 */
int
rejectOne
(
Long
examId
,
Long
studentId
);
/**
* 考务管理-考生账号管理-列表
* */
List
<
SchoolRecruitStudent
>
queryList
(
SchoolRecruitStudent
student
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitAndEduStudentVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
vo
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
@Data
public
class
RecruitAndEduStudentVo
extends
OurBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
studentName
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
)
private
String
idCard
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
studentNumber
;
/** 初中学校id */
@Excel
(
name
=
"初中学校id"
)
private
Long
juniorId
;
private
String
schoolName
;
/** 测试项目id */
@Excel
(
name
=
"测试项目id"
)
private
Long
testId
;
private
String
project
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0==男,1=女"
)
private
String
sex
;
/** 身高(单位厘米) */
@Excel
(
name
=
"身高"
,
readConverterExp
=
"单=位厘米"
)
private
double
height
;
/** 体重(单位千克) */
@Excel
(
name
=
"体重"
,
readConverterExp
=
"单=位千克"
)
private
double
weight
;
/** 联系方式1 */
@Excel
(
name
=
"联系方式1"
)
private
String
telephone1
;
/** 联系方式2 */
@Excel
(
name
=
"联系方式2"
)
private
String
telephone2
;
/** 照片 */
@Excel
(
name
=
"照片"
)
private
String
photo
;
/***************教育局信息***************/
/** 身份证号 */
@Excel
(
name
=
"身份证号"
)
private
String
eduIdCard
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
eduStudentName
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
eduStudentNumber
;
/** 初中学校id */
@Excel
(
name
=
"初中学校id"
)
private
Long
eduJuniorId
;
/** 初中学校 */
@Excel
(
name
=
"初中学校"
)
private
String
eduSchoolName
;
/** 测试项目id */
@Excel
(
name
=
"测试项目id"
)
private
Long
eduTestId
;
/** 测试项目 */
@Excel
(
name
=
"测试项目"
)
private
String
eduProject
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0=男,1=女"
)
private
String
eduSex
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitEduExportVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
vo
.
recruit
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
/**
* @author xuten
*/
@Data
public
class
RecruitEduExportVo
{
/**
* 序号
* */
@Excel
(
name
=
"序号"
)
private
int
xh
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
,
width
=
25
)
private
String
eduIdCard
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
eduStudentName
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
eduStudentNumber
;
/** 初中学校 */
@Excel
(
name
=
"初中学校"
)
private
String
eduSchoolName
;
/** 测试项目 */
@Excel
(
name
=
"测试项目"
)
private
String
eduProject
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
combo
=
{
"男"
,
"女"
},
readConverterExp
=
"0=男,1=女"
)
private
String
eduSex
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitEduStudentVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
vo
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
@Data
public
class
RecruitEduStudentVo
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
;
/***********学生自己的报名信息***********/
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
studentName
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
)
private
String
idCard
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
studentNumber
;
/** 初中学校id */
@Excel
(
name
=
"初中学校id"
)
private
Long
juniorId
;
private
String
schoolName
;
/** 测试项目id */
@Excel
(
name
=
"测试项目id"
)
private
Long
testId
;
private
String
project
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0==男,1=女"
)
private
String
sex
;
/** 照片 */
@Excel
(
name
=
"照片"
)
private
String
photo
;
/***************教育局信息***************/
/** 身份证号 */
@Excel
(
name
=
"身份证号"
)
private
String
eduIdCard
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
eduStudentName
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
eduStudentNumber
;
/** 初中学校id */
@Excel
(
name
=
"初中学校id"
)
private
Long
eduJuniorId
;
/** 初中学校 */
@Excel
(
name
=
"初中学校"
)
private
String
eduSchoolName
;
/** 测试项目id */
@Excel
(
name
=
"测试项目id"
)
private
Long
eduTestId
;
/** 测试项目 */
@Excel
(
name
=
"测试项目"
)
private
String
eduProject
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0=男,1=女"
)
private
String
eduSex
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitExamAddressVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
vo
.
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
;
@Data
public
class
RecruitExamAddressVo
extends
OurBaseEntity
{
private
Long
examId
;
private
String
auditStatus
;
@Excel
(
name
=
"序号"
)
private
int
xh
;
private
String
photo
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
,
width
=
25
)
private
String
idCard
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
studentName
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
,
width
=
25
)
private
String
studentNumber
;
/** 初中学校id */
private
Long
juniorId
;
@Excel
(
name
=
"初中学校"
,
width
=
25
)
private
String
schoolName
;
/** 测试项目id */
private
Long
testId
;
@Excel
(
name
=
"测试项目"
)
private
String
project
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0=男,1=女"
,
combo
=
{
"男"
,
"女"
})
private
String
sex
;
/** 准考证号 */
@Excel
(
name
=
"准考证号"
,
width
=
25
)
private
String
examNumber
;
/** 分组 */
@Excel
(
name
=
"分组"
)
private
String
inGroup
;
/** 考试日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"考试日期"
,
width
=
25
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
examDate
;
/** 考试时间 */
@Excel
(
name
=
"考试时间"
,
dateFormat
=
"HH:mm"
)
private
String
examTime
;
/** 考试地点 */
@Excel
(
name
=
"考试地点"
)
private
String
examAddress
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/RecruitExamScoreVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
vo
.
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
;
@Data
public
class
RecruitExamScoreVo
extends
OurBaseEntity
{
private
Long
examId
;
private
String
auditStatus
;
@Excel
(
name
=
"序号"
)
private
int
xh
;
private
String
photo
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
)
private
String
idCard
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
studentName
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
studentNumber
;
/** 初中学校id */
private
Long
juniorId
;
@Excel
(
name
=
"初中学校"
)
private
String
schoolName
;
/** 测试项目id */
private
Long
testId
;
@Excel
(
name
=
"测试项目"
)
private
String
project
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0=男,1=女"
)
private
String
sex
;
/** 身高(单位厘米) */
private
double
height
;
/** 体重(单位千克) */
private
double
weight
;
/** 联系方式1 */
private
String
telephone1
;
/** 联系方式2 */
private
String
telephone2
;
/** 准考证号 */
@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
=
"考试时间"
,
dateFormat
=
"HH:mm"
)
private
String
examTime
;
/** 考试地点 */
@Excel
(
name
=
"考试地点"
)
private
String
examAddress
;
/** 成绩 */
@Excel
(
name
=
"成绩"
)
private
String
score
;
/** 结果 */
@Excel
(
name
=
"结果"
)
private
String
result
;
/** 资格线 */
@Excel
(
name
=
"资格线"
)
private
String
passScore
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/SchoolRecruitExamVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
vo
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
SchoolRecruitExamVo
extends
OurBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 考试名称
* */
private
String
examName
;
/**
* 年度
* */
private
Integer
examYear
;
/**
* 报名截止时间(具体到分钟)
* */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
deadline
;
/**
* 考试开始时间
* */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
startTime
;
/**
* 考试结束时间
* */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
endTime
;
/**
* 测试项目id(可多选,id之间用逗号隔开)(存库里)
* */
private
String
projectIds
;
//返回给前端数组
private
List
<
Long
>
projectIdList
;
//展示的选自动的测试项目名称
private
String
projectName
;
/**
* 考试安排
* */
private
String
examArrange
;
/**
* 考试注意事项
* */
private
String
notice
;
/**
* 状态(0=未发布,1=报名阶段(信息审核),2=考场分配,3=成绩发布,4=结束)
* */
private
String
status
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/recruit/SchoolRecruitStudentVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
campus
.
vo
.
recruit
;
import
com.core.domain.OurBaseEntity
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
/**
* @author xuten
*/
@Data
public
class
SchoolRecruitStudentVo
extends
OurBaseEntity
{
/**序号*/
@Excel
(
name
=
"序号"
)
private
int
xh
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
,
width
=
30
)
private
String
idCard
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
studentName
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
,
width
=
30
)
private
String
studentNumber
;
/** 初中学校id */
private
Long
juniorId
;
@Excel
(
name
=
"初中学校"
,
width
=
30
)
private
String
schoolName
;
/** 测试项目id */
private
Long
testId
;
@Excel
(
name
=
"测试项目"
)
private
String
project
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0=男,1=女"
)
private
String
sex
;
/** 身高(单位厘米) */
@Excel
(
name
=
"身高"
)
private
double
height
;
/** 体重(单位千克) */
@Excel
(
name
=
"体重"
)
private
double
weight
;
/** 联系方式1 */
@Excel
(
name
=
"联系方式1"
)
private
String
telephone1
;
/** 联系方式2 */
@Excel
(
name
=
"联系方式2"
)
private
String
telephone2
;
}
smart-campus/src/main/java/yangtz/cs/liu/webpage/controller/WebSchoolRecruitStudentController.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
webpage
.
controller
;
import
com.core.utils.UploadToServer
;
import
com.ruoyi.common.constant.Constants
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.model.WebLoginBody
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.MessageUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.framework.manager.AsyncManager
;
import
com.ruoyi.framework.manager.factory.AsyncFactory
;
import
com.ruoyi.framework.util.WebStudentInfoUtil
;
import
com.ruoyi.framework.web.service.WebTokenService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
yangtz.cs.liu.campus.constant.RecruitExamConstant
;
import
yangtz.cs.liu.campus.domain.examination.*
;
import
yangtz.cs.liu.campus.domain.recruit.*
;
import
yangtz.cs.liu.campus.service.examination.IJuniorHighSchoolService
;
import
yangtz.cs.liu.campus.service.recruit.*
;
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.WebSchoolRecruitStudentVo
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.UnsupportedEncodingException
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author xuten
*/
@RestController
@RequestMapping
(
"/web/recruitStudent"
)
public
class
WebSchoolRecruitStudentController
extends
BaseController
{
@Autowired
private
ISchoolRecruitStudentService
recruitStudentService
;
@Autowired
private
WebTokenService
webTokenService
;
@Autowired
WebStudentInfoUtil
studentInfoUtil
;
@Autowired
private
ISchoolRecruitExamService
recruitExamService
;
@Autowired
private
ISchoolRecruitRelationService
recruitRelationService
;
@Autowired
private
ISchoolRecruitProjectService
projectService
;
@Autowired
private
IJuniorHighSchoolService
schoolService
;
@Value
(
"${ruoyi.profile}"
)
private
String
profile
;
@Value
(
"${ruoyi.serverAddress}"
)
private
String
serverAddress
;
/******------------以下是网页端登录注册等接口----------------***********/
@PostMapping
(
"/register"
)
public
AjaxResult
register
(
@RequestBody
WebRegisterBody
webRegisterBody
)
{
String
msg
=
recruitStudentService
.
register
(
webRegisterBody
);
return
StringUtils
.
isEmpty
(
msg
)
?
success
()
:
error
(
msg
);
}
/**
* 登录方法
*/
@PostMapping
(
"/login"
)
public
AjaxResult
login
(
@RequestBody
WebRegisterBody
registerBody
)
{
if
(
StringUtils
.
isEmpty
(
registerBody
.
getPhoneNumber
())){
throw
new
ServiceException
(
"手机号不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
registerBody
.
getIdCard
())){
throw
new
ServiceException
(
"身份证号不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
registerBody
.
getPassword
())){
throw
new
ServiceException
(
"密码不能为空"
);
}
WebLoginBody
loginBody
=
recruitStudentService
.
login
(
registerBody
);
if
(
StringUtils
.
isNull
(
loginBody
))
{
return
AjaxResult
.
error
(
"login error"
);
}
AsyncManager
.
me
().
execute
(
AsyncFactory
.
recordLogininfor
(
loginBody
.
getStudentName
(),
Constants
.
LOGIN_SUCCESS
,
MessageUtils
.
message
(
"user.login.success"
)));
String
token
=
webTokenService
.
createToken
(
loginBody
);
return
AjaxResult
.
success
().
put
(
Constants
.
TOKEN
,
token
);
}
/**
*获取当前登录考生信息
*/
@GetMapping
(
"/getInfo"
)
public
AjaxResult
getInfo
()
throws
UnsupportedEncodingException
{
WebLoginBody
loginBody
=
studentInfoUtil
.
getLoginBody
();
SchoolRecruitStudent
student
=
recruitStudentService
.
getById
(
loginBody
.
getId
());
//获取PC所在服务器端的图片资源
if
(
StringUtils
.
isNotNull
(
student
.
getPhoto
())
&&
!
""
.
equals
(
student
.
getPhoto
())){
loginBody
.
setPhoto
(
student
.
getPhoto
());
loginBody
.
setPhotoData
(
UploadToServer
.
getPicFromServer
(
serverAddress
,
student
.
getPhoto
()));
}
//SchoolRecruitStudent student = recruitStudentService.getById(loginBody.getId());
return
AjaxResult
.
success
().
put
(
"info"
,
loginBody
);
}
/**
* 自定义退出逻辑
*/
@GetMapping
(
"/logout"
)
public
AjaxResult
logout
(
HttpServletRequest
request
)
{
String
webToken
=
webTokenService
.
getToken
(
request
);
WebLoginBody
loginUser
=
webTokenService
.
getWebLoginBody
(
webToken
);
if
(
StringUtils
.
isNotNull
(
loginUser
))
{
String
userName
=
loginUser
.
getStudentName
();
// 删除用户缓存记录
webTokenService
.
delWebLoginBody
(
loginUser
.
getWebToken
());
// 记录用户退出日志
AsyncManager
.
me
().
execute
(
AsyncFactory
.
recordLogininfor
(
userName
,
Constants
.
LOGOUT
,
"退出成功"
));
}
return
AjaxResult
.
success
(
"退出成功"
);
}
/******------------以下是网页端考生可看考试列表以及考试进入后的各tab页面等接口----------------***********/
/**
* 网页版-考试报名页面list
* studentId 为网页登录的艺考生的id
* 显示在报名阶段的,和已报名的考试
* */
@GetMapping
(
"/list/{studentId}"
)
public
TableDataInfo
list
(
@PathVariable
Long
studentId
)
{
startPage
();
return
getDataTable
(
recruitExamService
.
getRecruitExam
(
studentId
));
}
/**
* 判断能不能点进去进入按钮
* 1能 0不能
*
* 当前状态(0=报名,1=待审核,2=通过,3=驳回,4=信息修改,5=准考证打印,6=成绩查询,7=审核)
* */
@GetMapping
(
"/enterBtn/{testId}/{studentId}"
)
public
AjaxResult
enterBtn
(
@PathVariable
Long
studentId
,
@PathVariable
Long
testId
)
{
return
AjaxResult
.
success
().
put
(
"data"
,
recruitStudentService
.
enterBtn
(
studentId
,
testId
));
}
/**
* 点击进入,进入考试须知等主页面,返回值:当前所处节点,及页面的值
* */
@GetMapping
(
"/enter/all/{testId}/{studentId}"
)
public
AjaxResult
enterAll
(
@PathVariable
Long
studentId
,
@PathVariable
Long
testId
)
throws
UnsupportedEncodingException
{
AjaxResult
result
=
AjaxResult
.
success
();
//获取考生与考试关系
SchoolRecruitRelation
relation
=
recruitRelationService
.
getRelationByIds
(
testId
,
studentId
);
if
(
StringUtils
.
isNull
(
relation
)){
//暂无关系,则应默认展示 考前须知模块,,,返回考试安排和考试注意事项
SchoolRecruitExam
exam
=
recruitExamService
.
getById
(
testId
);
result
.
put
(
"node"
,
RecruitExamConstant
.
PREEXAM
);
result
.
put
(
"data"
,
exam
);
return
result
;
}
else
{
//有关联关系,判断关系提交状态是否提交
WebSchoolRecruitStudentVo
student
=
recruitStudentService
.
getStuInfo
(
studentId
,
testId
);
//获取PC所在服务器端的图片资源
if
(
StringUtils
.
isNotNull
(
student
.
getPhoto
())
&&
!
""
.
equals
(
student
.
getPhoto
())){
student
.
setPhotoData
(
UploadToServer
.
getPicFromServer
(
serverAddress
,
student
.
getPhoto
()));
}
//若未提交,则进入报名阶段,返回学生信息
if
(
RecruitExamConstant
.
NOSUBMIT
.
equals
(
relation
.
getSubmit
())){
result
.
put
(
"node"
,
RecruitExamConstant
.
SIGN
);
result
.
put
(
"data"
,
student
);
return
result
;
}
else
{
//已提交,
//判断考试在什么阶段
SchoolRecruitExam
exam
=
recruitExamService
.
getById
(
testId
);
if
(
RecruitExamConstant
.
INFOCHECK
.
equals
(
exam
.
getStatus
())
||
RecruitExamConstant
.
ADDRESS
.
equals
(
exam
.
getStatus
())){
//在信息审核阶段或考场分配阶段
//返回值节点为 审核 节点 ,返回学生信息
result
.
put
(
"node"
,
RecruitExamConstant
.
AUDIT
);
result
.
put
(
"data"
,
student
);
return
result
;
}
else
if
(
RecruitExamConstant
.
SCORE
.
equals
(
exam
.
getStatus
()))
{
//考试状态为成绩发布,判断考生有没有通过审核,通过的进入打印准考证节点,审核状态不为通过的,则返回审核节点,及学生信息
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
())){
//此时返回 打印准考证 节点 ,准考证有关信息
//获取准考证信息
result
.
put
(
"node"
,
RecruitExamConstant
.
TICKET
);
RecruitAdmissionTicketVo
ticketVo
=
recruitStudentService
.
getTicket
(
studentId
,
testId
);
//获取PC所在服务器端的图片资源
if
(
StringUtils
.
isNotNull
(
ticketVo
.
getPhoto
())
&&
!
""
.
equals
(
ticketVo
.
getPhoto
())){
ticketVo
.
setPhotoData
(
UploadToServer
.
getPicFromServer
(
serverAddress
,
ticketVo
.
getPhoto
()));
}
result
.
put
(
"data"
,
ticketVo
);
return
result
;
}
else
{
//审核状态不为通过的,则返回审核节点,及学生信息
result
.
put
(
"node"
,
RecruitExamConstant
.
AUDIT
);
result
.
put
(
"data"
,
student
);
return
result
;
}
}
else
{
//考试状态为结束 判断考生有没有通过审核,通过的进入成绩查询节点,审核状态不为通过的,则返回审核节点,及学生信息
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
())){
//此时返回 成绩查询 节点 ,考试成绩有关信息
//获取考试成绩有关信息
result
.
put
(
"node"
,
RecruitExamConstant
.
SEARCH
);
result
.
put
(
"data"
,
recruitStudentService
.
getScore
(
studentId
,
testId
));
return
result
;
}
else
{
//审核状态不为通过的,则返回审核节点,及学生信息
result
.
put
(
"node"
,
RecruitExamConstant
.
AUDIT
);
result
.
put
(
"data"
,
student
);
return
result
;
}
}
}
}
}
/**
* 网页进入按钮点击后的界面-点击考前须知
* examId 当前考试id
* 返回:所处节点node;返回数据data
* */
@GetMapping
(
"/enterPreExam/{examId}"
)
public
AjaxResult
enterPreExam
(
@PathVariable
Long
examId
)
{
AjaxResult
result
=
AjaxResult
.
success
();
SchoolRecruitExam
exam
=
recruitExamService
.
getById
(
examId
);
result
.
put
(
"node"
,
RecruitExamConstant
.
PREEXAM
);
result
.
put
(
"data"
,
exam
);
return
result
;
}
/**
* 网页进入按钮点击后的界面-点击考生报名或审核
* examId 当前考试id,studentId考生id
* 返回:所处节点node;能否展示view(1能 0不能),返回数据data
* */
@GetMapping
(
"/enterEnroll/{examId}/{studentId}"
)
public
AjaxResult
enterEnroll
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
)
throws
UnsupportedEncodingException
{
AjaxResult
result
=
AjaxResult
.
success
();
//获取考生与考试关系
SchoolRecruitRelation
relation
=
recruitRelationService
.
getRelationByIds
(
examId
,
studentId
);
WebSchoolRecruitStudentVo
student
=
recruitStudentService
.
getStuInfo
(
studentId
,
examId
);
//获取PC所在服务器端的图片资源
if
(
StringUtils
.
isNotNull
(
student
.
getPhoto
())
&&
!
""
.
equals
(
student
.
getPhoto
())){
student
.
setPhotoData
(
UploadToServer
.
getPicFromServer
(
serverAddress
,
student
.
getPhoto
()));
}
if
(
StringUtils
.
isNull
(
relation
)){
//throw new ServiceException("请先阅读考前须知");
result
.
put
(
"node"
,
RecruitExamConstant
.
SIGN
);
result
.
put
(
"view"
,
RecruitExamConstant
.
SUBMIT
);
result
.
put
(
"data"
,
student
);
return
result
;
}
else
{
//有关联关系,判断关系提交状态是否提交
//若未提交,则进入报名阶段,返回学生信息
if
(
RecruitExamConstant
.
NOSUBMIT
.
equals
(
relation
.
getSubmit
())){
result
.
put
(
"node"
,
RecruitExamConstant
.
SIGN
);
result
.
put
(
"view"
,
RecruitExamConstant
.
SUBMIT
);
result
.
put
(
"data"
,
student
);
return
result
;
}
else
{
result
.
put
(
"node"
,
RecruitExamConstant
.
AUDIT
);
result
.
put
(
"view"
,
RecruitExamConstant
.
SUBMIT
);
result
.
put
(
"data"
,
student
);
return
result
;
}
}
}
/**
* 网页进入按钮点击后的界面-点击打印准考证
* examId 当前考试id,studentId考生id
* 返回:所处节点node;能否展示view(1能 0不能),返回数据data
* */
@GetMapping
(
"/enterPrint/{examId}/{studentId}"
)
public
AjaxResult
enterPrint
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
)
throws
UnsupportedEncodingException
{
AjaxResult
result
=
AjaxResult
.
success
();
//获取考生与考试关系
SchoolRecruitRelation
relation
=
recruitRelationService
.
getRelationByIds
(
examId
,
studentId
);
//未报名的
if
(
StringUtils
.
isNull
(
relation
)){
result
.
put
(
"node"
,
RecruitExamConstant
.
TICKET
);
result
.
put
(
"view"
,
RecruitExamConstant
.
NOSUBMIT
);
result
.
put
(
"data"
,
new
RecruitAdmissionTicketVo
());
return
result
;
}
else
{
//有关联关系,判断关系提交状态是否提交
//若未提交,不能显示该页面的信息
if
(
RecruitExamConstant
.
NOSUBMIT
.
equals
(
relation
.
getSubmit
())){
result
.
put
(
"node"
,
RecruitExamConstant
.
TICKET
);
result
.
put
(
"view"
,
RecruitExamConstant
.
NOSUBMIT
);
result
.
put
(
"data"
,
new
RecruitAdmissionTicketVo
());
return
result
;
}
else
{
//已提交,判断审核状态,审核状态为通过的才能显示本界面,
// 审核状态为通过的,要判断当前考试状态是否是成绩发布,只有是此状态才可以返回数据data,
// 不然则data为空,前端应显示准卡证打印时间未开放
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
())){
SchoolRecruitExam
exam
=
recruitExamService
.
getById
(
examId
);
//审核状态为通过,且考试状态为成绩发布阶段,返回
if
(
RecruitExamConstant
.
SCORE
.
equals
(
exam
.
getStatus
()))
{
result
.
put
(
"node"
,
RecruitExamConstant
.
TICKET
);
result
.
put
(
"view"
,
RecruitExamConstant
.
SUBMIT
);
RecruitAdmissionTicketVo
ticketVo
=
recruitStudentService
.
getTicket
(
studentId
,
examId
);
//获取PC所在服务器端的图片资源
if
(
StringUtils
.
isNotNull
(
ticketVo
.
getPhoto
())
&&
!
""
.
equals
(
ticketVo
.
getPhoto
())){
ticketVo
.
setPhotoData
(
UploadToServer
.
getPicFromServer
(
serverAddress
,
ticketVo
.
getPhoto
()));
}
result
.
put
(
"data"
,
ticketVo
);
return
result
;
}
else
{
result
.
put
(
"node"
,
RecruitExamConstant
.
TICKET
);
result
.
put
(
"view"
,
RecruitExamConstant
.
SUBMIT
);
result
.
put
(
"data"
,
null
);
return
result
;
}
}
else
{
//审核状态不为通过的,则不要展示本页面
result
.
put
(
"node"
,
RecruitExamConstant
.
TICKET
);
result
.
put
(
"view"
,
RecruitExamConstant
.
NOSUBMIT
);
result
.
put
(
"data"
,
new
RecruitAdmissionTicketVo
());
return
result
;
}
}
}
}
/**
* 网页进入按钮点击后的界面-点击考试查询
* examId 当前考试id,studentId考生id
* 返回:所处节点node;能否展示view(1能 0不能),返回数据data
* */
@GetMapping
(
"/enterScore/{examId}/{studentId}"
)
public
AjaxResult
enterScore
(
@PathVariable
Long
examId
,
@PathVariable
Long
studentId
)
{
AjaxResult
result
=
AjaxResult
.
success
();
//获取考生与考试关系
SchoolRecruitRelation
relation
=
recruitRelationService
.
getRelationByIds
(
examId
,
studentId
);
//未报名的,此页面不展示
if
(
StringUtils
.
isNull
(
relation
)){
result
.
put
(
"node"
,
RecruitExamConstant
.
SEARCH
);
result
.
put
(
"view"
,
RecruitExamConstant
.
NOSUBMIT
);
result
.
put
(
"data"
,
new
QueryScoreVo
());
return
result
;
}
else
{
//有关联关系,判断关系提交状态是否提交
//若未提交,不能显示该页面的信息
if
(
RecruitExamConstant
.
NOSUBMIT
.
equals
(
relation
.
getSubmit
())){
result
.
put
(
"node"
,
RecruitExamConstant
.
SEARCH
);
result
.
put
(
"view"
,
RecruitExamConstant
.
NOSUBMIT
);
result
.
put
(
"data"
,
new
QueryScoreVo
());
return
result
;
}
else
{
//已提交,判断审核状态,审核状态为通过的才能显示本界面,
// 审核状态为通过的,要判断当前考试状态是否是结束,只有是此状态才可以返回数据data,
// 不然则data为空,前端应显示成绩暂未发布
if
(
RecruitExamConstant
.
PASS
.
equals
(
relation
.
getAuditStatus
())){
SchoolRecruitExam
exam
=
recruitExamService
.
getById
(
examId
);
//审核状态为通过,且考试状态为成绩发布阶段,返回
if
(
RecruitExamConstant
.
END
.
equals
(
exam
.
getStatus
()))
{
result
.
put
(
"node"
,
RecruitExamConstant
.
SEARCH
);
result
.
put
(
"view"
,
RecruitExamConstant
.
SUBMIT
);
result
.
put
(
"data"
,
recruitStudentService
.
getScore
(
studentId
,
examId
));
return
result
;
}
else
{
result
.
put
(
"node"
,
RecruitExamConstant
.
SEARCH
);
result
.
put
(
"view"
,
RecruitExamConstant
.
SUBMIT
);
result
.
put
(
"data"
,
null
);
return
result
;
}
}
else
{
//审核状态不为通过的,则不要展示本页面
result
.
put
(
"node"
,
RecruitExamConstant
.
SEARCH
);
result
.
put
(
"view"
,
RecruitExamConstant
.
NOSUBMIT
);
result
.
put
(
"data"
,
new
QueryScoreVo
());
return
result
;
}
}
}
}
/******------------以下是网页端各tab页涉及的接口----------------***********/
/**
* 考生报名-暂存
* */
@PutMapping
(
"/webSave/{examId}"
)
public
AjaxResult
webSave
(
@PathVariable
Long
examId
,
@RequestBody
WebSchoolRecruitStudentVo
student
)
{
if
(
StringUtils
.
isNull
(
student
.
getId
())){
throw
new
ServiceException
(
"id为空,请检查"
);
}
return
toAjax
(
recruitStudentService
.
webSave
(
examId
,
student
));
}
/**
* 考生报名-提交
* */
@PutMapping
(
"/webSubmit/{examId}"
)
public
AjaxResult
webSubmit
(
@PathVariable
Long
examId
,
@RequestBody
WebSchoolRecruitStudentVo
student
)
{
if
(
StringUtils
.
isNull
(
student
.
getId
())){
throw
new
ServiceException
(
"id为空,请检查"
);
}
return
toAjax
(
recruitStudentService
.
webSubmit
(
examId
,
student
));
}
/**
* 本次考试下所能选择的测试项目
* */
@GetMapping
(
"/getProjectList/{examId}"
)
public
TableDataInfo
getProjectList
(
@PathVariable
Long
examId
,
SchoolRecruitProject
schoolRecruitProject
)
{
return
getDataTable
(
projectService
.
getProjectList
(
examId
,
schoolRecruitProject
));
}
/**
* 查询初中学校列表
*/
@GetMapping
(
"/schoolList"
)
public
TableDataInfo
schoolList
(
JuniorHighSchool
juniorHighSchool
)
{
List
<
JuniorHighSchool
>
list
=
schoolService
.
selectJuniorHighSchoolList
(
juniorHighSchool
);
return
getDataTable
(
list
);
}
/**
* 头像上传
* 将图片上传至PC端所在服务器
* */
@PostMapping
(
"/avatar"
)
public
AjaxResult
avatar
(
MultipartFile
file
)
throws
Exception
{
if
(!
file
.
isEmpty
())
{
Map
map
=
UploadToServer
.
uploadAvatar
(
serverAddress
,
file
);
String
avatar
=
map
.
get
(
"url"
).
toString
();
AjaxResult
ajax
=
AjaxResult
.
success
();
ajax
.
put
(
"url"
,
avatar
);
return
ajax
;
}
return
AjaxResult
.
error
(
"上传图片异常,请联系管理员"
);
}
}
smart-campus/src/main/java/yangtz/cs/liu/webpage/vo/RecruitAdmissionTicketVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
webpage
.
vo
;
import
lombok.Data
;
@Data
public
class
RecruitAdmissionTicketVo
{
/**
* 考试名称
* */
private
String
examName
;
/**
* 考试注意事项
* */
private
String
notice
;
/**
* 姓名
* */
private
String
studentName
;
/** 准考证号 */
private
String
examNumber
;
/**
* 测试项目
* */
private
String
project
;
/** 分组(座号) */
private
String
inGroup
;
/** 手机号 */
private
String
phoneNumber
;
/** 学校名称 */
private
String
schoolName
;
/** 照片 */
private
String
photo
;
//存放网页图片的base64 数据
private
String
photoData
;
/**
* 考试年份
* */
private
Integer
examYear
;
/**
* 考试月份
* */
private
String
examDate
;
/**
* 考试时间
* */
private
String
examTime
;
/** 考试地点 */
private
String
examAddress
;
}
smart-campus/src/main/java/yangtz/cs/liu/webpage/vo/WebRecruitExamForStudentVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
webpage
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
WebRecruitExamForStudentVo
{
//主表考试id
Long
id
;
/**
* 考试名称
* */
private
String
examName
;
/**
* 报名截止时间(具体到分钟)
* */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
deadline
;
/**
* 当前状态(0=报名,1=待审核,2=通过,3=驳回,4=信息修改,5=准考证打印,6=成绩查询,7=审核)
* */
private
String
currentState
;
}
smart-campus/src/main/java/yangtz/cs/liu/webpage/vo/WebSchoolRecruitStudentVo.java
0 → 100644
View file @
731b52ae
package
yangtz
.
cs
.
liu
.
webpage
.
vo
;
import
com.core.domain.OurBaseEntity
;
import
com.ruoyi.common.annotation.Excel
;
import
lombok.Data
;
/**
* @author xuten
*/
@Data
public
class
WebSchoolRecruitStudentVo
extends
OurBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 姓名 */
@Excel
(
name
=
"姓名"
)
private
String
studentName
;
/** 身份证号 */
@Excel
(
name
=
"身份证号"
)
private
String
idCard
;
/** 学籍号 */
@Excel
(
name
=
"学籍号"
)
private
String
studentNumber
;
/** 初中学校id */
@Excel
(
name
=
"初中学校id"
)
private
Long
juniorId
;
private
String
schoolName
;
/** 测试项目id */
@Excel
(
name
=
"测试项目id"
)
private
Long
testId
;
private
String
project
;
/** 性别(0=男,1=女) */
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0==男,1=女"
)
private
String
sex
;
/** 身高(单位厘米) */
@Excel
(
name
=
"身高"
,
readConverterExp
=
"单=位厘米"
)
private
double
height
;
/** 体重(单位千克) */
@Excel
(
name
=
"体重"
,
readConverterExp
=
"单=位千克"
)
private
double
weight
;
/** 联系方式1 */
@Excel
(
name
=
"联系方式1"
)
private
String
telephone1
;
/** 联系方式2 */
@Excel
(
name
=
"联系方式2"
)
private
String
telephone2
;
/** 照片 */
@Excel
(
name
=
"照片"
)
private
String
photo
;
//存放网页图片的base64 数据
private
String
photoData
;
/** 手机号 */
@Excel
(
name
=
"手机号"
)
private
String
phoneNumber
;
/** 密码 */
@Excel
(
name
=
"密码"
)
private
String
password
;
private
String
auditStatus
;
}
smart-campus/src/main/resources/mapper/recruit/EduRecruitStudentMapper.xml
0 → 100644
View file @
731b52ae
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"yangtz.cs.liu.campus.mapper.recruit.EduRecruitStudentMapper"
>
<!--namespace根据自己需要创建的的mapper的路径和名称填写-->
<resultMap
type=
"EduRecruitStudent"
id=
"EduRecruitStudentResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"examId"
column=
"exam_id"
/>
<result
property=
"eduIdCard"
column=
"edu_id_card"
/>
<result
property=
"eduStudentName"
column=
"edu_student_name"
/>
<result
property=
"eduStudentNumber"
column=
"edu_student_number"
/>
<result
property=
"eduJuniorId"
column=
"edu_junior_id"
/>
<result
property=
"eduSchoolName"
column=
"edu_school_name"
/>
<result
property=
"eduTestId"
column=
"edu_test_id"
/>
<result
property=
"eduProject"
column=
"edu_project"
/>
<result
property=
"eduSex"
column=
"edu_sex"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
</resultMap>
<sql
id=
"selectEduRecruitStudentVo"
>
select id, exam_id, edu_id_card, edu_student_name, edu_student_number, edu_junior_id, edu_school_name, edu_test_id, edu_project, edu_sex, create_time, create_by, update_time, update_by, del_flag from edu_recruit_student
</sql>
<select
id=
"getStudent"
resultType=
"yangtz.cs.liu.campus.domain.recruit.EduRecruitStudent"
>
<include
refid=
"selectEduRecruitStudentVo"
/>
where del_flag = '0' and exam_id = #{examId} and edu_id_card = #{eduIdCard}
</select>
</mapper>
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitProjectMapper.xml
0 → 100644
View file @
731b52ae
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitProjectMapper"
>
<resultMap
type=
"SchoolRecruitProject"
id=
"SchoolRecruitProjectResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"project"
column=
"project"
/>
<result
property=
"schoolOrder"
column=
"school_order"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
</resultMap>
<sql
id=
"selectSchoolRecruitProjectVo"
>
select id, type, project, school_order, create_time, create_by, update_time, update_by, del_flag from school_recruit_project
</sql>
<select
id=
"selectSchoolRecruitProjectList"
parameterType=
"SchoolRecruitProject"
resultMap=
"SchoolRecruitProjectResult"
>
select id, type, project, school_order, create_time from school_recruit_project
<where>
del_flag = '0'
<if
test=
"type != null and type != ''"
>
and type = #{type}
</if>
<if
test=
"project != null and project != ''"
>
and project like concat('%', #{project}, '%')
</if>
<if
test=
"schoolOrder != null and schoolOrder != ''"
>
and school_order = #{schoolOrder}
</if>
</where>
order by school_order asc, create_time desc
</select>
</mapper>
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitRelationMapper.xml
0 → 100644
View file @
731b52ae
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitRelationMapper"
>
<!--namespace根据自己需要创建的的mapper的路径和名称填写-->
<resultMap
type=
"SchoolRecruitRelation"
id=
"SchoolRecruitRelationResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"examId"
column=
"exam_id"
/>
<result
property=
"studentId"
column=
"student_id"
/>
<result
property=
"juniorId"
column=
"junior_id"
/>
<result
property=
"testId"
column=
"test_id"
/>
<result
property=
"auditStatus"
column=
"audit_status"
/>
<result
property=
"matchStatus"
column=
"match_status"
/>
<result
property=
"infoIdCard"
column=
"info_id_card"
/>
<result
property=
"submit"
column=
"submit"
/>
<result
property=
"examNumber"
column=
"exam_number"
/>
<result
property=
"inGroup"
column=
"in_group"
/>
<result
property=
"examDate"
column=
"exam_date"
/>
<result
property=
"examTime"
column=
"exam_time"
/>
<result
property=
"examAddress"
column=
"exam_address"
/>
<result
property=
"score"
column=
"score"
/>
<result
property=
"result"
column=
"result"
/>
<result
property=
"passScore"
column=
"pass_score"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
</resultMap>
<sql
id=
"selectSchoolRecruitRelationVo"
>
select id, exam_id, student_id, audit_status, match_status , junior_id, test_id, info_id_card, submit, exam_number, in_group, exam_date, exam_time, exam_address, score, result, pass_score, create_time, create_by, update_time, update_by, del_flag from school_recruit_relation
</sql>
<select
id=
"getRelationByIds"
resultType=
"yangtz.cs.liu.campus.domain.recruit.SchoolRecruitRelation"
>
<include
refid=
"selectSchoolRecruitRelationVo"
/>
where del_flag = '0' and exam_id = #{examId} and student_id = #{studentId}
</select>
<select
id=
"getInfoCheck"
resultType=
"yangtz.cs.liu.campus.vo.recruit.RecruitEduStudentVo"
>
select sar.id, sar.exam_id, sar.student_id, sar.audit_status, sar.info_id_card,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.exam_id = #{examId}
order by sar.create_time desc
</select>
<select
id=
"getAddressList"
resultType=
"yangtz.cs.liu.campus.vo.recruit.RecruitExamAddressVo"
>
select sar.id, sar.exam_id, sar.student_id, sar.exam_number, sar.in_group, sar.exam_date, sar.exam_time, sar.exam_address,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.exam_id = #{examId} and sar.audit_status = #{auditStatus}
<if
test=
"studentName != null and studentName != ''"
>
and sas.student_name like concat('%', #{studentName}, '%')
</if>
<if
test=
"idCard != null and idCard != ''"
>
and sas.id_card like concat('%', #{idCard}, '%')
</if>
<if
test=
"project != null and project != ''"
>
and stp.project like concat('%', #{project}, '%')
</if>
order by sar.create_time desc
</select>
<select
id=
"getAddressInfo"
resultType=
"yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo"
>
select sar.id, sar.exam_id, sar.student_id, sar.exam_number, sar.in_group, sar.exam_date, sar.exam_time, sar.exam_address,
sar.score, sar.result, sar.pass_score,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo, sas.height, sas.weight, sas.telephone1, sas.telephone2
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.id = #{id}
</select>
<select
id=
"getScoreList"
resultType=
"yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo"
>
select sar.id, sar.exam_id, sar.student_id, sar.exam_number, sar.in_group, sar.exam_date, sar.exam_time, sar.exam_address,
sar.score, sar.result, sar.pass_score,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.exam_id = #{examId} and sar.audit_status = #{auditStatus}
<if
test=
"studentName != null and studentName != ''"
>
and sas.student_name like concat('%', #{studentName}, '%')
</if>
<if
test=
"idCard != null and idCard != ''"
>
and sas.id_card like concat('%', #{idCard}, '%')
</if>
<if
test=
"project != null and project != ''"
>
and stp.project like concat('%', #{project}, '%')
</if>
order by sar.create_time desc
</select>
</mapper>
smart-campus/src/main/resources/mapper/recruit/SchoolRecruitStudentMapper.xml
0 → 100644
View file @
731b52ae
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitStudentMapper"
>
<!--namespace根据自己需要创建的的mapper的路径和名称填写-->
<resultMap
type=
"SchoolRecruitStudent"
id=
"SchoolRecruitStudentResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"studentName"
column=
"student_name"
/>
<result
property=
"idCard"
column=
"id_card"
/>
<result
property=
"studentNumber"
column=
"student_number"
/>
<result
property=
"sex"
column=
"sex"
/>
<result
property=
"height"
column=
"height"
/>
<result
property=
"weight"
column=
"weight"
/>
<result
property=
"telephone1"
column=
"telephone1"
/>
<result
property=
"telephone2"
column=
"telephone2"
/>
<result
property=
"photo"
column=
"photo"
/>
<result
property=
"phoneNumber"
column=
"phone_number"
/>
<result
property=
"password"
column=
"password"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
</resultMap>
<sql
id=
"selectSchoolRecruitStudentVo"
>
select id, student_name, id_card, student_number, sex, height, weight, telephone1, telephone2, photo, phone_number, password, create_time, create_by, update_time, update_by, del_flag from school_recruit_student
</sql>
<select
id=
"checkPhoneUnique"
resultType=
"yangtz.cs.liu.campus.domain.recruit.SchoolRecruitStudent"
>
select id, phone_number from school_recruit_student where phone_number = #{phoneNumber} and del_flag = '0' limit 1
</select>
<select
id=
"checkIdCardUnique"
resultType=
"yangtz.cs.liu.campus.domain.recruit.SchoolRecruitStudent"
>
select id, id_card from school_recruit_student where id_card = #{idcard} and del_flag = '0' limit 1
</select>
<select
id=
"getStudentByPhoneNumber"
resultType=
"yangtz.cs.liu.campus.domain.recruit.SchoolRecruitStudent"
>
<include
refid=
"selectSchoolRecruitStudentVo"
/>
<where>
del_flag = '0' and phone_number = #{phoneNumber} and id_card = #{idCard}
</where>
</select>
<select
id=
"getInfo"
resultType=
"yangtz.cs.liu.webpage.vo.WebSchoolRecruitStudentVo"
>
select sas.id, sas.student_name, sas.id_card, sas.student_number, sar.junior_id, jhs.school_name, sar.test_id, stp.project, sas.sex, sas.height, sas.weight, sas.telephone1, sas.telephone2,
sas.photo, sas.phone_number, sas.password from school_recruit_student sas
left join school_recruit_relation sar on sar.student_id = sas.id
left join junior_high_school jhs on jhs.id = sar.junior_id
left join school_recruit_project stp on stp.id = sar.test_id
where sas.del_flag = '0' and sar.del_flag = '0' and sas.id = #{id}
</select>
<select
id=
"editExport"
resultType=
"yangtz.cs.liu.campus.vo.recruit.SchoolRecruitStudentVo"
>
select sas.id, sas.student_name, sas.id_card, sas.student_number, sar.junior_id, jhs.school_name, sar.test_id, stp.project, sas.sex, sas.height, sas.weight, sas.telephone1, sas.telephone2,
sas.photo from school_recruit_student sas
left join school_recruit_relation sar on sar.student_id = sas.id
left join junior_high_school jhs on jhs.id = sar.junior_id
left join school_recruit_project stp on stp.id = sar.test_id
where sas.del_flag = '0' and sar.del_flag = '0' and sar.exam_id = #{examId}
<if
test=
"idList != null and idList.size() > 0"
>
and sas.id in
<foreach
collection=
"idList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
order by sar.create_time desc
</select>
<select
id=
"getStuInfo"
resultType=
"yangtz.cs.liu.webpage.vo.WebSchoolRecruitStudentVo"
>
select sas.id, sas.student_name, sas.id_card, sas.student_number, sar.junior_id, jhs.school_name, sar.test_id, stp.project, sas.sex, sas.height, sas.weight, sas.telephone1, sas.telephone2,
sas.photo, sas.phone_number, sas.password, sar.audit_status from school_recruit_student sas
left join school_recruit_relation sar on sar.student_id = sas.id
left join junior_high_school jhs on jhs.id = sar.junior_id
left join school_recruit_project stp on stp.id = sar.test_id
where sas.del_flag = '0' and sar.del_flag = '0' and sas.id = #{id} and sar.exam_id = #{examId}
</select>
</mapper>
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