From 5b088ce1463d187ca3889e8ff500f9da7cc191d4 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 18 May 2022 09:17:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=8F=B8/=E5=88=86=E9=83=A8=20=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/entity/comp/bo/CompBO.java | 4 +- .../organization/mapper/comp/CompMapper.xml | 55 --------------- .../service/impl/CompServiceImpl.java | 67 ++++++++++++++++--- 3 files changed, 60 insertions(+), 66 deletions(-) diff --git a/src/com/engine/organization/entity/comp/bo/CompBO.java b/src/com/engine/organization/entity/comp/bo/CompBO.java index 635c6892..23b8ceda 100644 --- a/src/com/engine/organization/entity/comp/bo/CompBO.java +++ b/src/com/engine/organization/entity/comp/bo/CompBO.java @@ -32,10 +32,10 @@ public class CompBO { .build() ).collect(Collectors.toList()); Map> collects = dtoList.stream().filter(item -> null != item.getParentCompany() && 0 != item.getParentCompany()).collect(Collectors.groupingBy(CompListDTO::getParentCompany)); - return dtoList.stream().filter(item -> null == item.getParentCompany() || 0 == item.getParentCompany()).map(e -> { + return dtoList.stream().map(e -> { e.setChildren(collects.get(e.getId())); return e; - }).collect(Collectors.toList()); + }).filter(item -> null == item.getParentCompany() || 0 == item.getParentCompany()).collect(Collectors.toList()); } public static CompPO convertParamToPO(CompSearchParam param, Long employeeId) { diff --git a/src/com/engine/organization/mapper/comp/CompMapper.xml b/src/com/engine/organization/mapper/comp/CompMapper.xml index e6556bab..f299610f 100644 --- a/src/com/engine/organization/mapper/comp/CompMapper.xml +++ b/src/com/engine/organization/mapper/comp/CompMapper.xml @@ -38,48 +38,6 @@ , t.update_time - - - and comp_no like CONCAT('%',#{compNo},'%') - - - and comp_name like CONCAT('%',#{compName},'%') - - - and comp_name_short like CONCAT('%',#{compNameShort},'%') - - - and org_code like CONCAT('%',#{orgCode},'%') - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -