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 57bd5af7
authored
Jan 19, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化后版本,跑数据脚本
1 parent
9725e0f9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/java/com/subsidy/service/impl/OprAdmDictServiceImpl.java
src/main/java/com/subsidy/vo/opr/GetHistoryVO.java
src/main/resources/mapper/VodPlayHistoryMapper.xml
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
57bd5af
...
@@ -901,7 +901,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
...
@@ -901,7 +901,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
// 表头
// 表头
List
<
String
>
title
=
new
ArrayList
<>();
List
<
String
>
title
=
new
ArrayList
<>();
title
.
add
(
"姓名"
);
title
.
add
(
"姓名"
);
title
.
add
(
"合计
总时长
"
);
title
.
add
(
"合计
完成率
"
);
for
(
VodDictDO
vodDictDO
:
vodDictDOS
){
for
(
VodDictDO
vodDictDO
:
vodDictDOS
){
title
.
add
(
vodDictDO
.
getVodName
());
title
.
add
(
vodDictDO
.
getVodName
());
}
}
...
@@ -961,7 +961,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
...
@@ -961,7 +961,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
namecell
.
setCellValue
(
memberMapper
.
selectById
(
data
).
getUserName
());
namecell
.
setCellValue
(
memberMapper
.
selectById
(
data
).
getUserName
());
int
total
=
0
;
int
total
=
0
;
for
(
String
date
:
dates
)
{
for
(
String
date
:
dates
)
{
if
(!
date
.
equals
(
"姓名"
)
&&
!
"合计
总时长
"
.
equals
(
date
))
{
if
(!
date
.
equals
(
"姓名"
)
&&
!
"合计
完成率
"
.
equals
(
date
))
{
Cell
cell1
=
r
.
createCell
(
a
.
getAndIncrement
());
Cell
cell1
=
r
.
createCell
(
a
.
getAndIncrement
());
if
(
null
!=
hashMap1
)
{
if
(
null
!=
hashMap1
)
{
total
+=
null
==
hashMap1
.
get
(
date
)
?
0
:
hashMap1
.
get
(
date
);
total
+=
null
==
hashMap1
.
get
(
date
)
?
0
:
hashMap1
.
get
(
date
);
...
...
src/main/java/com/subsidy/service/impl/OprAdmDictServiceImpl.java
View file @
57bd5af
...
@@ -55,8 +55,8 @@ public class OprAdmDictServiceImpl extends ServiceImpl<OprAdmDictMapper, OprAdmD
...
@@ -55,8 +55,8 @@ public class OprAdmDictServiceImpl extends ServiceImpl<OprAdmDictMapper, OprAdmD
//可累加条件
//可累加条件
Query
query
=
new
Query
(
Criteria
.
where
(
"userName"
).
regex
(
getHistoryDTO
.
getUserName
())
Query
query
=
new
Query
(
Criteria
.
where
(
"userName"
).
regex
(
getHistoryDTO
.
getUserName
())
.
and
(
"loginDateFormat"
).
gte
(
getHistoryDTO
.
getStartDate
())
.
and
Operator
(
Criteria
.
where
(
"loginDateFormat"
).
gte
(
getHistoryDTO
.
getStartDate
()),
.
and
(
"loginDateFormat"
).
lte
(
getHistoryDTO
.
getEndDate
(
)));
Criteria
.
where
(
"loginDateFormat"
).
lte
(
getHistoryDTO
.
getEndDate
()
)));
Long
count
=
mongoTemplate
.
count
(
query
,
OprAdmDictDO
.
class
);
Long
count
=
mongoTemplate
.
count
(
query
,
OprAdmDictDO
.
class
);
mongoUtil
.
start
(
getHistoryDTO
.
getPageNum
(),
getHistoryDTO
.
getPageSize
(),
query
);
mongoUtil
.
start
(
getHistoryDTO
.
getPageNum
(),
getHistoryDTO
.
getPageSize
(),
query
);
List
<
OprAdmDictDO
>
oprAdmDictDOS
=
mongoTemplate
.
find
(
query
,
OprAdmDictDO
.
class
);
List
<
OprAdmDictDO
>
oprAdmDictDOS
=
mongoTemplate
.
find
(
query
,
OprAdmDictDO
.
class
);
...
...
src/main/java/com/subsidy/vo/opr/GetHistoryVO.java
View file @
57bd5af
...
@@ -5,7 +5,7 @@ import lombok.Data;
...
@@ -5,7 +5,7 @@ import lombok.Data;
@Data
@Data
public
class
GetHistoryVO
{
public
class
GetHistoryVO
{
private
Integer
id
;
private
String
_
id
;
private
String
userName
;
private
String
userName
;
...
@@ -15,6 +15,6 @@ public class GetHistoryVO {
...
@@ -15,6 +15,6 @@ public class GetHistoryVO {
private
String
createDate
;
private
String
createDate
;
private
String
result
;
private
Integer
result
;
}
}
src/main/resources/mapper/VodPlayHistoryMapper.xml
View file @
57bd5af
...
@@ -331,7 +331,6 @@
...
@@ -331,7 +331,6 @@
LEFT JOIN class_member_mapping t2 ON t.member_id = t2.id
LEFT JOIN class_member_mapping t2 ON t.member_id = t2.id
WHERE
WHERE
t.delete_date IS NULL
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.class_id = #{classId}
AND t.class_id = #{classId}
GROUP BY
GROUP BY
t.class_id,
t.class_id,
...
...
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