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
bb77f5d4
Commit
bb77f5d4
authored
Sep 02, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.bug修复
parent
e22c4a4e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
14 deletions
+43
-14
ApiExamController.java
...in/java/com/ruoyi/hezhi/api/kaoshi/ApiExamController.java
+6
-6
TbExamSimulateInfoServiceImpl.java
...oyi/hezhi/service/impl/TbExamSimulateInfoServiceImpl.java
+1
-1
TbExamNoticeMapper.xml
...em/src/main/resources/mapper/hezhi/TbExamNoticeMapper.xml
+1
-0
TbExamRegistrationMapper.xml
.../main/resources/mapper/hezhi/TbExamRegistrationMapper.xml
+28
-7
TbExamSimulateInfoMapper.xml
.../main/resources/mapper/hezhi/TbExamSimulateInfoMapper.xml
+1
-0
TbMemberMajorMapper.xml
...m/src/main/resources/mapper/hezhi/TbMemberMajorMapper.xml
+6
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/hezhi/api/kaoshi/ApiExamController.java
View file @
bb77f5d4
...
...
@@ -644,12 +644,12 @@ public class ApiExamController {
Date
currentTime
=
new
Date
();
// 比较时间
if
(
currentTime
.
after
(
examEndTime
))
{
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
())
+
"】,考试未开始"
);
}
//
if (currentTime.after(examEndTime)) {
//
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()) + "】,考试未开始");
//
}
}
// 正式考试考生及考试信息
Map
<
String
,
Object
>
simulateInfo
=
examSimulateInfoService
.
getFormalSubjectAllInfo
(
params
);
...
...
ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbExamSimulateInfoServiceImpl.java
View file @
bb77f5d4
...
...
@@ -428,7 +428,7 @@ public class TbExamSimulateInfoServiceImpl implements ITbExamSimulateInfoService
if
(
formalSubjectAllInfo
==
null
)
{
return
AjaxResult
.
error
(
"未进行考试,不允许补考"
);
}
if
(!
"2"
.
equals
(
formalSubjectAllInfo
.
get
(
"passStatus"
).
toString
()))
{
if
(!
"2"
.
equals
(
formalSubjectAllInfo
.
get
(
"passStatus"
).
toString
())
&&
!
"0"
.
equals
(
formalSubjectAllInfo
.
get
(
"passStatus"
).
toString
())
)
{
return
AjaxResult
.
error
(
"您已通过,无需补考"
);
}
if
(
"1"
.
equals
(
formalSubjectAllInfo
.
get
(
"isAgain"
).
toString
()))
{
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbExamNoticeMapper.xml
View file @
bb77f5d4
...
...
@@ -236,6 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</otherwise>
</choose>
CONVERT ( IFNULL( teb.exam_batch, '' ), CHAR ) AS examBatch,
CONVERT ( IFNULL( teb.batch_index, '' ), CHAR ) AS examBatchIndex,
CASE
WHEN DATE_FORMAT( teb.exam_start_time, '%Y-%m-%d %H:%i' ) > DATE_FORMAT( now(), '%Y-%m-%d %H:%i' ) THEN
0
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbExamRegistrationMapper.xml
View file @
bb77f5d4
...
...
@@ -882,6 +882,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tmo.order_id as orderId,
ter.exam_registration_id AS examRegistrationId,
ter.exam_id AS examId,
MAX(ter.create_time) AS createTime,
ter.exam_batch_index AS examBatchIndex,
ter.member_user_id AS memberUserId,
ter.is_pay AS isPay,
...
...
@@ -918,7 +919,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE tsc.member_user_id = ter.member_user_id
AND tsc.course_id = ter.course_id) AS total
from tb_exam_registration ter
left join tb_course tc on tc.course_id = ter.course_id
INNER JOIN (
SELECT exam_id, MAX(create_time) as create_time
FROM tb_exam_registration
WHERE STATUS = 0 AND del_flag = 0
<if
test=
"memberUserId != null and memberUserId != ''"
>
and member_user_id = #{memberUserId}
</if>
<if
test=
"isPay != null and isPay != ''"
>
and is_pay = #{isPay}
</if>
GROUP BY exam_id
) AS ter2 ON ter.create_time = ter2.create_time and ter.exam_id = ter2.exam_id
left join tb_course tc on tc.course_id = ter.course_id
left join tb_member_order tmo on tmo.data_id = ter.exam_registration_id
left join tb_exam te on ter.exam_id = te.exam_id
left join tb_exam_notice ten on ten.exam_id = ter.exam_id
...
...
@@ -954,11 +967,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ter.status = 0
and ter.del_flag = 0
<if
test=
"examStatus != null and examStatus != '' and examStatus != 1"
>
and ter.is_pay = 1
and ter.is_pay = 1
</if>
<if
test=
"isPay != null and isPay != ''"
>
and ter.is_pay = #{isPay}
</if>
</where>
GROUP BY
ter.exam_
registration_
id
ter.exam_id
order by ter.create_time desc
</select>
...
...
@@ -1031,11 +1047,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
CONVERT(IFNULL(tc.course_name, ''), CHAR) AS courseName,
CONVERT(IFNULL(tc.cover_image, ''), CHAR) AS coverImage,
'15' AS courseSpeed
from tb_exam_registration ter
left join tb_exam te on ter.exam_id = te.exam_id
left join tb_course tc on ter.course_id = tc.course_id
INNER JOIN (
SELECT course_id, MAX(create_time) as max_create_time
FROM tb_exam_registration
WHERE STATUS = 0 AND del_flag = 0 AND is_pay = 1
<if
test=
"memberUserId != null and memberUserId != ''"
>
and member_user_id = #{memberUserId}
</if>
GROUP BY course_id
) latest ON ter.course_id = latest.course_id AND ter.create_time = latest.max_create_time
<where>
<if
test=
"memberUserId == null or memberUserId == ''"
>
and ter.member_user_id = 0
</if>
<if
test=
"memberUserId != null and memberUserId != ''"
>
and ter.member_user_id = #{memberUserId}
</if>
...
...
@@ -1274,8 +1295,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectCourseIsPay"
resultType=
"com.ruoyi.hezhi.domain.TbExamRegistration"
>
select ter.exam_registration_id as examRegistrationId, ter.course_id as courseId,ter.is_pay as isPay,
case when ter.is_pay = 1 then '已报名'
when ter.is_pay
!=1
then '未报名'
ELSE '
未报名
' END isEnroll
when ter.is_pay
= 0
then '未报名'
ELSE '
已取消
' END isEnroll
from tb_exam_registration ter
where ter.member_user_id = #{memberUserId} and ter.course_id in
<foreach
item=
"item"
collection=
"courseIdList"
separator=
","
open=
"("
close=
")"
index=
""
>
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbExamSimulateInfoMapper.xml
View file @
bb77f5d4
...
...
@@ -320,6 +320,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"examSimulateInfoId != null and examSimulateInfoId != ''"
>
and tesi.exam_simulate_info_id = #{examSimulateInfoId}
</if>
<if
test=
"memberUserId != null and memberUserId != ''"
>
and tesi.member_user_id = #{memberUserId}
</if>
<if
test=
"examId != null and examId != '' "
>
and tesi.exam_id = #{examId}
</if>
<if
test=
"examBatchIndex != null and examBatchIndex != '' "
>
and tesi.exam_platform_number = #{examBatchIndex}
</if>
and tesi.status = 0
and tesi.del_flag = 0
and tesi.exam_type = 1
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbMemberMajorMapper.xml
View file @
bb77f5d4
...
...
@@ -131,6 +131,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
IF(count(ter.exam_registration_id)>0,1,0) as status
from
tb_exam_registration ter
INNER JOIN(
SELECT course_id, MAX(create_time) as max_create_time
FROM tb_exam_registration
WHERE member_user_id = #{memberUserId} AND is_pay = '1'
GROUP BY course_id
) latest ON ter.course_id = latest.course_id AND ter.create_time = latest.max_create_time
left join tb_course tc on tc.course_id = ter.course_id
<where>
and ter.member_user_id = #{memberUserId}
...
...
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