Commit 57bd5af7 by 涂亚平

优化后版本,跑数据脚本

1 parent 9725e0f9
...@@ -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);
......
...@@ -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()) .andOperator(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);
......
...@@ -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;
} }
...@@ -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,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!