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
c2dc08ae
Commit
c2dc08ae
authored
Jun 16, 2025
by
法拉51246
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e4cafd89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
12 deletions
+26
-12
ApiExamController.java
...in/java/com/ruoyi/hezhi/api/kaoshi/ApiExamController.java
+13
-10
TbExamRegistrationServiceImpl.java
...oyi/hezhi/service/impl/TbExamRegistrationServiceImpl.java
+7
-2
TbExamNoticeMapper.xml
...em/src/main/resources/mapper/hezhi/TbExamNoticeMapper.xml
+6
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/hezhi/api/kaoshi/ApiExamController.java
View file @
c2dc08ae
...
...
@@ -198,18 +198,21 @@ public class ApiExamController {
}
}
}
else
{
statisticsTrueRate
=
"33.33"
;
statisticsFalseRate
=
"33.33"
;
statisticsUnRate
=
"33.33"
;
}
HashMap
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"statisticsTrue"
,
statisticsTrue
);
map
.
put
(
"statisticsTrueRate"
,
statisticsTrueRate
);
map
.
put
(
"statisticsFalse"
,
statisticsFalse
);
map
.
put
(
"statisticsFalseRate"
,
statisticsFalseRate
);
map
.
put
(
"statisticsUn"
,
statisticsUn
);
map
.
put
(
"statisticsUnRate"
,
statisticsUnRate
);
map
.
put
(
"accuracyRate"
,
accuracyRate
);
map
.
put
(
"doneNum"
,
doneNum
);
map
.
put
(
"allNum"
,
allNum
);
map
.
put
(
"statisticsTrue"
,
statisticsTrue
);
//做对数
map
.
put
(
"statisticsTrueRate"
,
statisticsTrueRate
);
//做对比例
map
.
put
(
"statisticsFalse"
,
statisticsFalse
);
//做错数
map
.
put
(
"statisticsFalseRate"
,
statisticsFalseRate
);
//做错比例
map
.
put
(
"statisticsUn"
,
statisticsUn
);
//未做数
map
.
put
(
"statisticsUnRate"
,
statisticsUnRate
);
//未做比例
map
.
put
(
"accuracyRate"
,
accuracyRate
);
//正确率
map
.
put
(
"doneNum"
,
doneNum
);
//已做题目
map
.
put
(
"allNum"
,
allNum
);
//题目总数
return
AjaxResult
.
success
().
put
(
"data"
,
map
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbExamRegistrationServiceImpl.java
View file @
c2dc08ae
...
...
@@ -418,8 +418,13 @@ public class TbExamRegistrationServiceImpl implements ITbExamRegistrationService
}
TbExamBatch
tbExamBatch
=
tbExamBatchList
.
get
(
0
);
TbExamRegistration
tbExamRegistration
=
tbExamRegistrationMapper
.
selectTbExamRegistrationByUserIdExamId
(
examRegistrationDTO
.
getMemberUserId
(),
tbExam
.
getExamId
());
if
(
ObjectUtils
.
isNotEmpty
(
tbExamRegistration
)
&&
tbExamRegistration
.
getIsPay
()
==
1
)
{
// TbExamRegistration tbExamRegistration = tbExamRegistrationMapper.selectTbExamRegistrationByUserIdExamId(examRegistrationDTO.getMemberUserId(), tbExam.getExamId());
TbExamRegistration
registrationParam
=
new
TbExamRegistration
();
registrationParam
.
setMemberUserId
(
examRegistrationDTO
.
getMemberUserId
());
registrationParam
.
setExamId
(
tbExam
.
getExamId
());
registrationParam
.
setExamBatchIndex
(
tbExamBatch
.
getBatchIndex
().
intValue
());
TbExamRegistration
tbExamRegistration
=
tbExamRegistrationMapper
.
selectTbExamRegistrationByBatchIndex
(
registrationParam
);
if
(
ObjectUtils
.
isNotEmpty
(
tbExamRegistration
))
{
return
AjaxResult
.
error
(
"已报名,请勿重复提交"
);
}
else
{
TbExamRegistration
registration
=
new
TbExamRegistration
();
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbExamNoticeMapper.xml
View file @
c2dc08ae
...
...
@@ -316,6 +316,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tb_exam te
LEFT JOIN tb_exam_notice ten ON ten.exam_id = te.exam_id
LEFT JOIN tb_exam_registration ter ON ter.exam_id = te.exam_id AND ter.is_pay = 1 AND ter.member_user_id = #{memberUserId}
<if
test=
"examBatchIndex != null and examBatchIndex !=''"
>
and ter.exam_batch_index = #{examBatchIndex}
</if>
<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
...
...
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