From 79e991f240d21cae34284d2a3ea49f448c6f5e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?niohe=C2=B7erbao?= Date: Thu, 30 Mar 2023 09:12:25 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E5=8C=96=E9=80=BB=E8=BE=91=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/manage/OrganizationManage.java | 63 ++++++++++++++-------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java index cdd3bb1..214615d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java @@ -166,32 +166,49 @@ public class OrganizationManage { return keyTreeVO; }).collect(Collectors.toList()); - if (needMember && orgKeyTreeVOList.size() > 0) { - List organizationCodeList = orgKeyTreeVOList.stream() - .map(KeyTreeVO::getKey).collect(Collectors.toList()); - List dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class) - .eq(DingEmployeeInfo::getMainJob, "true") - .in(DingEmployeeInfo::getOrganizationCode, organizationCodeList)); - - Map> organizationCodeGroupMap = dingEmployeeInfoList.stream() - .collect(Collectors.groupingBy(DingEmployeeInfo::getOrganizationCode)); + List dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class) + .eq(DingEmployeeInfo::getMainJob, "true") + .eq(DingEmployeeInfo::getOrganizationCode, parentCode)); + + List memberChildren = dingEmployeeInfoList.stream().map(r -> { + KeyTreeVO child = new KeyTreeVO(); + child.setKey(r.getEmployeeCode()); + child.setTitle(r.getEmployeeName()); + child.setType("MEMBER"); + return child; + }).collect(Collectors.toList()); - for (KeyTreeVO keyTreeVO : orgKeyTreeVOList) { - String organizationCode = keyTreeVO.getKey(); - List dingEmployeeInfoGroupList = organizationCodeGroupMap.get(organizationCode); - if (CollUtil.isNotEmpty(dingEmployeeInfoGroupList)) { - List memberChildren = dingEmployeeInfoGroupList.stream().map(r -> { - KeyTreeVO child = new KeyTreeVO(); - child.setKey(r.getEmployeeCode()); - child.setTitle(r.getEmployeeName()); - child.setType("MEMBER"); - return child; - }).collect(Collectors.toList()); - keyTreeVO.setChildren(memberChildren); - } - } + if (CollUtil.isNotEmpty(memberChildren)) { + orgKeyTreeVOList.addAll(memberChildren); } + +// if (needMember && orgKeyTreeVOList.size() > 0) { +// List organizationCodeList = orgKeyTreeVOList.stream() +// .map(KeyTreeVO::getKey).collect(Collectors.toList()); +// List dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class) +// .eq(DingEmployeeInfo::getMainJob, "true") +// .in(DingEmployeeInfo::getOrganizationCode, organizationCodeList)); +// +// Map> organizationCodeGroupMap = dingEmployeeInfoList.stream() +// .collect(Collectors.groupingBy(DingEmployeeInfo::getOrganizationCode)); +// +// for (KeyTreeVO keyTreeVO : orgKeyTreeVOList) { +// String organizationCode = keyTreeVO.getKey(); +// List dingEmployeeInfoGroupList = organizationCodeGroupMap.get(organizationCode); +// if (CollUtil.isNotEmpty(dingEmployeeInfoGroupList)) { +// List memberChildren = dingEmployeeInfoGroupList.stream().map(r -> { +// KeyTreeVO child = new KeyTreeVO(); +// child.setKey(r.getEmployeeCode()); +// child.setTitle(r.getEmployeeName()); +// child.setType("MEMBER"); +// return child; +// }).collect(Collectors.toList()); +// keyTreeVO.setChildren(memberChildren); +// } +// } +// } + return orgKeyTreeVOList; } } From b96bf71ff49f3d426d64666696c364bbe3cdd104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?niohe=C2=B7erbao?= Date: Thu, 30 Mar 2023 09:19:23 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E5=8C=96=E9=80=BB=E8=BE=91=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/manage/OrganizationManage.java | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java index 214615d..27842f6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java @@ -166,23 +166,24 @@ public class OrganizationManage { return keyTreeVO; }).collect(Collectors.toList()); - List dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class) - .eq(DingEmployeeInfo::getMainJob, "true") - .eq(DingEmployeeInfo::getOrganizationCode, parentCode)); - - List memberChildren = dingEmployeeInfoList.stream().map(r -> { - KeyTreeVO child = new KeyTreeVO(); - child.setKey(r.getEmployeeCode()); - child.setTitle(r.getEmployeeName()); - child.setType("MEMBER"); - return child; - }).collect(Collectors.toList()); + if (StringUtils.isNotBlank(parentCode) && !needMember){ + List dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class) + .eq(DingEmployeeInfo::getMainJob, "true") + .eq(DingEmployeeInfo::getOrganizationCode, parentCode)); + + List memberChildren = dingEmployeeInfoList.stream().map(r -> { + KeyTreeVO child = new KeyTreeVO(); + child.setKey(r.getEmployeeCode()); + child.setTitle(r.getEmployeeName()); + child.setType("MEMBER"); + return child; + }).collect(Collectors.toList()); - if (CollUtil.isNotEmpty(memberChildren)) { - orgKeyTreeVOList.addAll(memberChildren); + if (CollUtil.isNotEmpty(memberChildren)) { + orgKeyTreeVOList.addAll(memberChildren); + } } - // if (needMember && orgKeyTreeVOList.size() > 0) { // List organizationCodeList = orgKeyTreeVOList.stream() // .map(KeyTreeVO::getKey).collect(Collectors.toList()); From bea3a3e4f3a50a7cce851266bc84457989ff191c Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Thu, 30 Mar 2023 09:20:58 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=94=B9=E5=8F=98userId=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 4 +--- .../com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java | 8 ++++---- .../com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml | 8 ++++---- .../pmapi/todocenter/service/impl/StatisticsServiceImpl.java | 6 +++--- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index a953e83..c1a9136 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -3,8 +3,6 @@ package com.ningdatech.pmapi.todocenter.manage; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.codec.Base64; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.DatePattern; -import cn.hutool.core.date.StopWatch; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -1032,7 +1030,7 @@ public class TodoCenterManage { Integer pageSize = param.getPageSize(); req.setProcessDefId(param.getProcessDefId()); req.setUserId(String.valueOf(userId)); - req.setInstCodes(instCodes); +// req.setInstCodes(instCodes); BeanUtils.copyProperties(param,req); List ccMeList = processInstanceService.getCcMeList(req); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java index fe78d59..61967c9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java @@ -7,11 +7,11 @@ import org.apache.ibatis.annotations.Param; public interface StatisticsMapper extends BaseMapper { - TodoCenterStatisticsPO getStatistics(@Param("userId") Long userId); + TodoCenterStatisticsPO getStatistics(@Param("userId") String userId); - TodoCenterStatisticsPO getTodoOrIdo(@Param("userId") Long userId); + TodoCenterStatisticsPO getTodoOrIdo(@Param("userId") String userId); - TodoCenterStatisticsPO mysubmitNum(@Param("userId") Long userId); + TodoCenterStatisticsPO mysubmitNum(@Param("userId") String userId); - TodoCenterStatisticsPO ccNums(@Param("userId") Long userId); + TodoCenterStatisticsPO ccNums(@Param("userId") String userId); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml index f8033c3..3425561 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml @@ -1,7 +1,7 @@ - - - -