Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 857b0be9
authored
Oct 26, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排序逻辑修改
excel测试样式修改
1 parent
a3e75d12
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
21 deletions
src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/resources/mapper/AdministerMapper.xml
src/main/resources/mapper/ClassMemberMappingMapper.xml
src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java
View file @
857b0be
...
...
@@ -60,14 +60,14 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
HandlerMethod
handlerMethod
=
(
HandlerMethod
)
handler
;
Method
method
=
handlerMethod
.
getMethod
();
//
TimeRequired timeRequired = method.getAnnotation(TimeRequired.class);
//
if (timeRequired !=null){
//
Calendar calendar = Calendar.getInstance();
//
int hour = calendar.get(Calendar.HOUR_OF_DAY);
//
if (hour<6){
//
throw new HttpException(17001);
//
}
//
}
TimeRequired
timeRequired
=
method
.
getAnnotation
(
TimeRequired
.
class
);
if
(
timeRequired
!=
null
){
Calendar
calendar
=
Calendar
.
getInstance
();
int
hour
=
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
);
if
(
hour
<
6
){
throw
new
HttpException
(
17001
);
}
}
LoginRequired
methodAnnotation
=
method
.
getAnnotation
(
LoginRequired
.
class
);
if
(
methodAnnotation
!=
null
)
{
...
...
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
857b0be
...
...
@@ -745,10 +745,11 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//学生测试完成情况
//查看课程卷子
TestScoreInfoVO
testScoreInfoVO
=
exerciseDoneResultMapper
.
testScoreInfo
(
classDetailDTO
.
getPaperId
(),
exerciseTestVO
.
getId
(),
classDetailDTO
.
getId
());
exerciseTestVO
.
setPaperId
(
exerciseTestVO
.
getPaperId
());
exerciseTestVO
.
setStartDate
(
testScoreInfoVO
.
getStartDate
());
exerciseTestVO
.
setEndDate
(
testScoreInfoVO
.
getEndDate
());
if
(
null
!=
testScoreInfoVO
)
{
exerciseTestVO
.
setPaperId
(
exerciseTestVO
.
getPaperId
());
exerciseTestVO
.
setStartDate
(
testScoreInfoVO
.
getStartDate
());
exerciseTestVO
.
setEndDate
(
testScoreInfoVO
.
getEndDate
());
exerciseTestVO
.
setScore
(
testScoreInfoVO
.
getScore
());
exerciseTestVO
.
setResult
(
testScoreInfoVO
.
getResult
());
//测评次数
...
...
@@ -1973,11 +1974,11 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//第三行 2
SXSSFRow
thirdRow
=
sheet
.
createRow
(
2
);
//第二行 rowIndex =1
CellRangeAddress
cellRangeAddress31
=
new
CellRangeAddress
(
2
,
2
,
0
,
3
);
CellRangeAddress
cellRangeAddress31
=
new
CellRangeAddress
(
2
,
2
,
0
,
4
);
sheet
.
addMergedRegion
(
cellRangeAddress31
);
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress31
,
sheet
,
workbook
);
//给合并过的单元格加边框
CellRangeAddress
cellRangeAddress32
=
new
CellRangeAddress
(
2
,
2
,
4
,
6
);
CellRangeAddress
cellRangeAddress32
=
new
CellRangeAddress
(
2
,
2
,
5
,
8
);
sheet
.
addMergedRegion
(
cellRangeAddress32
);
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress32
,
sheet
,
workbook
);
//给合并过的单元格加边框
thirdRow
.
createCell
(
0
).
setCellValue
(
thirdHead
[
0
]);
...
...
@@ -2036,9 +2037,22 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
newCell
.
setCellStyle
(
cellStyle
);
newCell
.
setCellValue
(
exerciseTestVO
.
getCount
());
//次数
newCell
=
dataRow
.
createCell
(
6
);
newCell
.
setCellStyle
(
cellStyle
);
if
(
exerciseTestVO
.
getScore
()
!=
0
)
{
newCell
.
setCellValue
(
exerciseTestVO
.
getStartDate
());
}
//次数
newCell
=
dataRow
.
createCell
(
7
);
newCell
.
setCellStyle
(
cellStyle
);
if
(
exerciseTestVO
.
getScore
()
!=
0
)
{
newCell
.
setCellValue
(
exerciseTestVO
.
getEndDate
());
}
newCell
=
dataRow
.
createCell
(
8
);
newCell
.
setCellStyle
(
cellStyle
);
newCell
.
setCellValue
(
exerciseTestVO
.
getScore
()
>=
60
?
"合格"
:
"不合格"
);
rowIndex
++;
...
...
src/main/resources/mapper/AdministerMapper.xml
View file @
857b0be
...
...
@@ -61,7 +61,7 @@
<if
test=
"userName != null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
</if>
order by
t2.account_name
order by
CONVERT(t2.user_name USING gbk) ASC
</select>
<select
id=
"classSign"
resultType=
"com.subsidy.vo.member.ClassSignVO"
>
...
...
@@ -80,7 +80,7 @@
<if
test=
"userName != null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
</if>
order by
t2.account_name
order by
CONVERT(t2.user_name USING gbk) ASC
</select>
<select
id=
"exerciseTest"
resultType=
"com.subsidy.vo.administer.ExerciseTestVO"
>
...
...
@@ -99,7 +99,7 @@
<if
test=
"userName != null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
</if>
order by
t2.account_name
order by
CONVERT(t2.user_name USING gbk) ASC
</select>
<select
id=
"answerRecord"
resultType=
"com.subsidy.vo.sign.AnswerRecordVO"
>
...
...
@@ -119,7 +119,7 @@
<if
test=
"userName !=null and userName !=''"
>
AND t2.user_name LIKE concat('%',#{userName} ,'%')
</if>
order by
t2.account_name
order by
CONVERT(t2.user_name USING gbk) ASC
</select>
<select
id=
"classActivityDetection"
resultType=
"com.subsidy.vo.administer.MemberDetectionRecordVO"
>
...
...
@@ -143,7 +143,7 @@
</if>
GROUP BY
t.member_id
order by
t2.account_name
order by
CONVERT(t2.user_name USING gbk) ASC
</select>
<select
id=
"imageCheckDetail"
resultType=
"com.subsidy.vo.administer.ImageCheckDetailVO"
>
...
...
@@ -193,7 +193,7 @@
t2.member_id,
t2.class_id
) t2 ON t1.id = t2.member_id
order by
t1.account_name
order by
CONVERT(t1.user_name USING gbk) ASC
</select>
<select
id=
"operators"
parameterType=
"string"
resultType=
"com.subsidy.vo.administer.OperatorsVO"
>
...
...
src/main/resources/mapper/ClassMemberMappingMapper.xml
View file @
857b0be
...
...
@@ -59,7 +59,7 @@
<if
test=
"userName !=null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
</if>
order by
t2.account_name
order by
CONVERT(t2.user_name USING gbk) ASC
</select>
<select
id=
"getMemberClassCount"
parameterType=
"long"
resultType=
"long"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment