From 82fab6cf688cde14fe70956a43d6c6b2b93a85f2 Mon Sep 17 00:00:00 2001 From: aikai Date: Thu, 15 Aug 2024 23:30:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E8=AE=B0=E5=BD=95-=E6=8C=89=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=88=86=E7=BB=84=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=AE=B0=E5=BD=95=E7=9A=84=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E6=8C=89=E7=94=A8=E6=88=B7=E5=88=86?= =?UTF-8?q?=E7=BB=84=E6=97=B6=E4=B8=8D=E5=86=8D=E4=BE=9D=E8=B5=96=E7=89=B9?= =?UTF-8?q?=E5=AE=9A=E7=9A=84=E5=A7=93=E5=90=8D=E5=92=8C=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=AD=97=E6=AE=B5=E3=80=82=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E4=BA=86=E6=95=B0=E6=8D=AE=E5=BA=93=E6=98=A0=E5=B0=84=EF=BC=8C?= =?UTF-8?q?=20=E5=B0=86=E6=9F=A5=E8=AF=A2=E7=BB=93=E6=9E=9C=E6=98=A0?= =?UTF-8?q?=E5=B0=84=E4=B8=BA=E6=9B=B4=E9=80=9A=E7=94=A8=E7=9A=84LogStatis?= =?UTF-8?q?ticsDetailsVO=E5=AF=B9=E8=B1=A1=EF=BC=8C=E4=BB=8E=E8=80=8C?= =?UTF-8?q?=E6=8F=90=E9=AB=98=E4=BA=86=E4=BB=A3=E7=A0=81=E7=9A=84=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E6=80=A7=E5=92=8C=E7=BB=B4=E6=8A=A4=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/statisticsrecord/LogStatisticsGroupByUserVO.java | 6 ------ .../system/dal/mysql/worklog/LogStatisticsMapper.java | 2 +- .../system/service/worklog/LogStatisticsServiceImpl.java | 8 ++++---- .../main/resources/mapper/worklog/LogStatisticsMapper.xml | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/worklog/vo/statisticsrecord/LogStatisticsGroupByUserVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/worklog/vo/statisticsrecord/LogStatisticsGroupByUserVO.java index c209e320..0c15940d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/worklog/vo/statisticsrecord/LogStatisticsGroupByUserVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/worklog/vo/statisticsrecord/LogStatisticsGroupByUserVO.java @@ -7,10 +7,4 @@ import lombok.Data; @Data public class LogStatisticsGroupByUserVO extends LogStatisticsDetailsVO { - @Schema(description = "姓名") - private String nickName; - - @Schema(description = "部门名称") - private String deptName; - } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/worklog/LogStatisticsMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/worklog/LogStatisticsMapper.java index a932c4e5..264b56de 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/worklog/LogStatisticsMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/worklog/LogStatisticsMapper.java @@ -91,5 +91,5 @@ public interface LogStatisticsMapper extends BaseMapperX { * @param dto * @return */ - List getStatisticsGroupByUser(@Param("dto") LogStatisticsDetailsListGroupByUserDTO dto); + List getStatisticsGroupByUser(@Param("dto") LogStatisticsDetailsListGroupByUserDTO dto); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/worklog/LogStatisticsServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/worklog/LogStatisticsServiceImpl.java index 9e3df9d4..4a9f4124 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/worklog/LogStatisticsServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/worklog/LogStatisticsServiceImpl.java @@ -407,12 +407,12 @@ public class LogStatisticsServiceImpl implements LogStatisticsService { } dto.setDateList(dateList); // 获取到所有数据 然后在java代码中分组 - List vos = logStatisticsMapper.getStatisticsGroupByUser(dto); + List vos = logStatisticsMapper.getStatisticsGroupByUser(dto); // 根据用户id/部门id分组 - Map> map = vos.stream().collect(Collectors.groupingBy(a -> a.getUserId() + "_" + a.getDeptId() + "_" + a.getType())); - for (Map.Entry> entry : map.entrySet()) { + Map> map = vos.stream().collect(Collectors.groupingBy(a -> a.getUserId() + "_" + a.getDeptId() + "_" + a.getType())); + for (Map.Entry> entry : map.entrySet()) { LogStatisticsDetailsListGroupByUserVO vo = new LogStatisticsDetailsListGroupByUserVO(); - vo.setNickName(entry.getValue().get(0).getNickName()); + vo.setNickName(entry.getValue().get(0).getNickname()); vo.setDeptName(entry.getValue().get(0).getDeptName()); vo.setType(entry.getValue().get(0).getType()); vo.setShould(entry.getValue().size()); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/worklog/LogStatisticsMapper.xml b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/worklog/LogStatisticsMapper.xml index 812e2ef4..6e4c9d3d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/worklog/LogStatisticsMapper.xml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/worklog/LogStatisticsMapper.xml @@ -152,7 +152,7 @@