Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kaoshi-java
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
单欣鑫
kaoshi-java
Commits
3af75154
Commit
3af75154
authored
Aug 25, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.bug修复
parent
7fe0d011
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
70 additions
and
58 deletions
+70
-58
ApiExamController.java
...in/java/com/ruoyi/hezhi/api/kaoshi/ApiExamController.java
+1
-1
TbCourseController.java
...n/java/com/ruoyi/hezhi/controller/TbCourseController.java
+13
-3
TbExamBatchMapper.java
...c/main/java/com/ruoyi/hezhi/mapper/TbExamBatchMapper.java
+7
-0
TbExamRegistrationServiceImpl.java
...oyi/hezhi/service/impl/TbExamRegistrationServiceImpl.java
+7
-8
TbExamServiceImpl.java
.../java/com/ruoyi/hezhi/service/impl/TbExamServiceImpl.java
+8
-25
TbCourseMapper.xml
...system/src/main/resources/mapper/hezhi/TbCourseMapper.xml
+2
-1
TbExamBatchMapper.xml
...tem/src/main/resources/mapper/hezhi/TbExamBatchMapper.xml
+8
-0
TbExamNoticeMapper.xml
...em/src/main/resources/mapper/hezhi/TbExamNoticeMapper.xml
+1
-9
TbMemberOrderMapper.xml
...m/src/main/resources/mapper/hezhi/TbMemberOrderMapper.xml
+1
-1
link.js
ruoyi-ui/src/api/hezhi/link.js
+9
-0
index.vue
ruoyi-ui/src/views/hezhi/conferenceNotice/index.vue
+11
-8
index.vue
ruoyi-ui/src/views/hezhi/exam/index.vue
+2
-2
No files found.
ruoyi-admin/src/main/java/com/ruoyi/hezhi/api/kaoshi/ApiExamController.java
View file @
3af75154
...
...
@@ -636,7 +636,7 @@ public class ApiExamController {
// 比较时间
if
(
currentTime
.
after
(
examEndTime
))
{
return
AjaxResult
.
error
(
"考试时间【"
+
DateUtils
.
parseDateToStr
(
"yyyy-MM-dd HH:mm:ss"
,
tbExamBatch
.
getExamStartTime
())
+
"至"
+
DateUtils
.
parseDateToStr
(
""
,
tbExamBatch
.
getExamEndTime
())
+
"】,考试已结束"
);
return
AjaxResult
.
error
(
"考试时间【"
+
DateUtils
.
parseDateToStr
(
"yyyy-MM-dd HH:mm:ss"
,
tbExamBatch
.
getExamStartTime
())
+
"至"
+
DateUtils
.
parseDateToStr
(
"
yyyy-MM-dd HH:mm:ss
"
,
tbExamBatch
.
getExamEndTime
())
+
"】,考试已结束"
);
}
if
(
currentTime
.
before
(
examStartTime
))
{
return
AjaxResult
.
error
(
"考试时间【"
+
DateUtils
.
parseDateToStr
(
"yyyy-MM-dd HH:mm:ss"
,
tbExamBatch
.
getExamStartTime
())
+
"至"
+
DateUtils
.
parseDateToStr
(
"yyyy-MM-dd HH:mm:ss"
,
tbExamBatch
.
getExamEndTime
())
+
"】,考试未开始"
);
...
...
ruoyi-admin/src/main/java/com/ruoyi/hezhi/controller/TbCourseController.java
View file @
3af75154
...
...
@@ -143,11 +143,11 @@ public class TbCourseController extends BaseController
}
/**
* 所有课程列表
* 所有课程列表
(排除以被选择课程)
* @return
*/
@GetMapping
(
"/getAllCourseList"
)
public
AjaxResult
getAllCourseList
(
TbCourse
tbCourse
)
{
@GetMapping
(
"/getAllCourseList
ByQuery
"
)
public
AjaxResult
getAllCourseList
ByQuery
(
TbCourse
tbCourse
)
{
List
<
TbCourse
>
courseList
=
tbCourseService
.
getAllCourseList
();
if
(
courseList
==
null
||
courseList
.
isEmpty
())
{
return
AjaxResult
.
success
(
new
ArrayList
<>());
...
...
@@ -171,4 +171,14 @@ public class TbCourseController extends BaseController
return
AjaxResult
.
success
(
result
);
}
/**
* 所有课程列表
* @return
*/
@GetMapping
(
"/getAllCourseList"
)
public
AjaxResult
getAllCourseList
()
{
List
<
TbCourse
>
courseList
=
tbCourseService
.
getAllCourseList
();
return
AjaxResult
.
success
(
courseList
);
}
}
ruoyi-system/src/main/java/com/ruoyi/hezhi/mapper/TbExamBatchMapper.java
View file @
3af75154
...
...
@@ -89,6 +89,13 @@ public interface TbExamBatchMapper
*/
public
TbExamBatch
getByexamBatch
(
@Param
(
"examBatch"
)
String
examBatch
);
/**
* 根据考试ID和当前时间获取考试批次
* @param examId 考试ID
* @return 结果
*/
public
TbExamBatch
selectCurrentExamBatch
(
@Param
(
"examId"
)
Long
examId
);
/**
* 考试批次
* @param examId 考试ID
...
...
ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbExamRegistrationServiceImpl.java
View file @
3af75154
...
...
@@ -401,22 +401,21 @@ public class TbExamRegistrationServiceImpl implements ITbExamRegistrationService
throw
new
ServiceException
(
"请选择课程"
);
}
// 根据课程ID 获取考试ID
Tb
ExamCourse
tbExamCourse
=
tbExamCourseMapper
.
getExamId
ByCourseId
(
examRegistrationDTO
.
getCourseId
());
if
(
ObjectUtils
.
isEmpty
(
tbExamC
ourse
)){
throw
new
ServiceException
(
"未查询到
考试
信息"
);
Tb
Course
course
=
tbCourseMapper
.
selectTbCourse
ByCourseId
(
examRegistrationDTO
.
getCourseId
());
if
(
ObjectUtils
.
isEmpty
(
c
ourse
)){
throw
new
ServiceException
(
"未查询到
课程
信息"
);
}
TbExam
tbExam
=
examService
.
selectTbExamByExamId
(
tbExamC
ourse
.
getExamId
());
TbExam
tbExam
=
examService
.
selectTbExamByExamId
(
c
ourse
.
getExamId
());
if
(
ObjectUtils
.
isEmpty
(
tbExam
))
{
return
AjaxResult
.
error
(
"
考试信息异常
,请联系管理员!!!"
);
return
AjaxResult
.
error
(
"
未查询到考试信息
,请联系管理员!!!"
);
}
// 查询考试批次
List
<
TbExamBatch
>
tbExamBatchList
=
tbExamBatchMapper
.
getEnableByExamId
(
tbExam
.
getExamId
(),
tbExam
.
getExamBatchEarly
());
if
(
tbExamBatchList
.
isEmpty
()
){
TbExamBatch
tbExamBatch
=
tbExamBatchMapper
.
selectCurrentExamBatch
(
tbExam
.
getExamId
());
if
(
null
==
tbExamBatch
){
throw
new
ServiceException
(
"无可报名批次"
);
}
TbExamBatch
tbExamBatch
=
tbExamBatchList
.
get
(
0
);
// TbExamRegistration tbExamRegistration = tbExamRegistrationMapper.selectTbExamRegistrationByUserIdExamId(examRegistrationDTO.getMemberUserId(), tbExam.getExamId());
TbExamRegistration
registrationParam
=
new
TbExamRegistration
();
...
...
ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbExamServiceImpl.java
View file @
3af75154
...
...
@@ -372,32 +372,15 @@ public class TbExamServiceImpl implements ITbExamService
public
List
<
CourseListVO
>
getCourseListByEvaluateAgency
(
Long
evaluateAgencyId
)
{
List
<
CourseListVO
>
courseListByEvaluateAgency
=
tbCourseMapper
.
getCourseListByEvaluateAgency
(
evaluateAgencyId
);
if
(!
courseListByEvaluateAgency
.
isEmpty
()){
try
{
CountDownLatch
countDownLatch
=
new
CountDownLatch
(
courseListByEvaluateAgency
.
size
());
for
(
CourseListVO
courseListVO
:
courseListByEvaluateAgency
)
{
threadPoolTaskExecutor
.
execute
(()->{
Long
courseId
=
courseListVO
.
getCourseId
();
TbExamCourse
tbExamCourse
=
tbExamCourseMapper
.
getExamIdByCourseId
(
courseId
);
if
(
ObjectUtils
.
isNotEmpty
(
tbExamCourse
)){
Long
examId
=
tbExamCourse
.
getExamId
();
TbExam
tbExam
=
tbExamMapper
.
selectTbExamByExamId
(
examId
);
if
(
tbExam
!=
null
)
{
List
<
TbExamBatch
>
enableByExamId
=
tbExamBatchMapper
.
getEnableByExamId
(
examId
,
tbExam
.
getExamBatchEarly
());
if
(!
enableByExamId
.
isEmpty
()){
TbExamBatch
tbExamBatch
=
enableByExamId
.
get
(
0
);
courseListVO
.
setExamBatch
(
tbExamBatch
.
getExamBatch
());
courseListVO
.
setExamId
(
tbExam
.
getExamId
());
courseListVO
.
setLevel
(
getLevel
(
tbExam
.
getLevel
()));
//等级也查出来
}
}
TbExamBatch
examBatch
=
tbExamBatchMapper
.
selectCurrentExamBatch
(
courseListVO
.
getExamId
());
if
(
null
!=
examBatch
)
{
courseListVO
.
setExamBatch
(
examBatch
.
getExamBatch
());
}
countDownLatch
.
countDown
();
});
TbExam
exam
=
tbExamMapper
.
selectTbExamByExamId
(
courseListVO
.
getExamId
());
if
(
null
!=
exam
)
{
courseListVO
.
setLevel
(
getLevel
(
exam
.
getLevel
()));
}
countDownLatch
.
await
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
return
courseListByEvaluateAgency
;
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbCourseMapper.xml
View file @
3af75154
...
...
@@ -346,7 +346,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
course_id as courseId,
evaluate_agency_id as evaluateAgencyId,
course_name as courseName,
course_title as courseTitle
course_title as courseTitle,
exam_id as examId
FROM
tb_course
WHERE del_flag=0
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbExamBatchMapper.xml
View file @
3af75154
...
...
@@ -168,5 +168,13 @@
where ter.exam_id=#{examId} and ter.member_user_id=#{memberUserId}
order by create_time desc limit 1
</select>
<select
id=
"selectCurrentExamBatch"
resultMap=
"TbExamBatchResult"
>
SELECT *
FROM tb_exam_batch
WHERE exam_id = #{examId}
AND exam_end_time >= NOW()
ORDER BY exam_start_time ASC
LIMIT 1;
</select>
</mapper>
ruoyi-system/src/main/resources/mapper/hezhi/TbExamNoticeMapper.xml
View file @
3af75154
...
...
@@ -322,15 +322,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"examNoticeId != null and examNoticeId !=''"
>
and ter.exam_batch_index = ten.batch_index
</if>
<choose>
<when
test=
"examId != null and examId !=''"
>
INNER JOIN tb_exam_batch teb on te.exam_id = teb.exam_id and teb.batch_index = ter.exam_batch_index
</when>
<otherwise>
INNER JOIN tb_exam_batch teb on ten.exam_id = teb.exam_id and teb.batch_index = ten.batch_index
</otherwise>
</choose>
INNER JOIN tb_exam_batch teb on te.exam_id = teb.exam_id
<where>
<if
test=
"examNoticeId != null and examNoticeId !=''"
>
and ten.exam_notice_id = #{examNoticeId}
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbMemberOrderMapper.xml
View file @
3af75154
...
...
@@ -177,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
JOIN tb_member_order mo ON mo.data_id = t1.exam_registration_id
JOIN tb_exam_batch t2 ON t2.exam_id = t1.exam_id AND t2.batch_index = t1.exam_batch_index
JOIN tb_exam t3 ON t3.exam_id = t1.exam_id
WHERE NOW() > DATE_SUB(t2.exam_
start
_time, INTERVAL t3.exam_batch_early DAY)
WHERE NOW() > DATE_SUB(t2.exam_
end
_time, INTERVAL t3.exam_batch_early DAY)
AND mo.pay_status = 0
AND t1.is_pay = 0
</select>
...
...
ruoyi-ui/src/api/hezhi/link.js
View file @
3af75154
...
...
@@ -69,3 +69,12 @@ export function getAllCourseList(query) {
params
:
query
})
}
// 所有课程列表(排除已被选择课程)
export
function
getAllCourseListByQuery
(
query
)
{
return
request
({
url
:
'
/hezhi/course/getAllCourseListByQuery
'
,
method
:
'
get
'
,
params
:
query
})
}
ruoyi-ui/src/views/hezhi/conferenceNotice/index.vue
View file @
3af75154
...
...
@@ -232,6 +232,14 @@
dict
.
label
}}
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
发布时间
"
prop
=
"
publicationTime
"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"
form.publicationTime
"
type
=
"
date
"
value
-
format
=
"
yyyy-MM-dd
"
placeholder
=
"
请选择发布时间
"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
发布人
"
prop
=
"
publisher
"
>
<
el
-
input
v
-
model
=
"
form.publisher
"
placeholder
=
"
请输入发布人
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
会议开始时间
"
prop
=
"
conferenceStartTime
"
v
-
if
=
"
form.type === 3
"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"
form.conferenceStartTime
"
type
=
"
date
"
value
-
format
=
"
yyyy-MM-dd
"
placeholder
=
"
请选择会议开始时间
"
>
...
...
@@ -279,14 +287,6 @@
}}
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
发布时间
"
prop
=
"
publicationTime
"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"
form.publicationTime
"
type
=
"
date
"
value
-
format
=
"
yyyy-MM-dd
"
placeholder
=
"
请选择发布时间
"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
发布人
"
prop
=
"
publisher
"
>
<
el
-
input
v
-
model
=
"
form.publisher
"
placeholder
=
"
请输入发布人
"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
submitForm
"
>
确
定
<
/el-button
>
...
...
@@ -388,6 +388,9 @@ export default {
type
:
[
{
required
:
true
,
message
:
"
通知类型不能为空
"
,
trigger
:
"
blur
"
}
],
publicationTime
:
[
{
required
:
true
,
message
:
"
发布时间不能为空
"
,
trigger
:
"
blur
"
}
],
}
}
;
}
,
...
...
ruoyi-ui/src/views/hezhi/exam/index.vue
View file @
3af75154
...
...
@@ -496,7 +496,7 @@ import {addExam, delExam, getExam, listExam, updateExam, updateExamConfig} from
import
ExamCourse
from
"
@/components/ExamCourse/index.vue
"
;
import
ExamBatch
from
"
@/views/hezhi/exam/examBatch.vue
"
;
import
{
getSelectList
}
from
"
@/api/hezhi/evaluateAgency
"
;
import
{
getAllCourseList
}
from
"
@/api/hezhi/link
"
;
import
{
getAllCourseList
,
getAllCourseListByQuery
}
from
"
@/api/hezhi/link
"
;
export
default
{
name
:
"
Exam
"
,
...
...
@@ -628,7 +628,7 @@ export default {
},
methods
:
{
getAllCourse
(
careerId
)
{
getAllCourseList
({
careerId
}).
then
(
response
=>
{
getAllCourseList
ByQuery
({
careerId
}).
then
(
response
=>
{
this
.
courseOptions
=
response
.
data
;
})
},
...
...
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