From 4e391c5f7c5ba41059a4b9757b8fccd13bb6cad7 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Fri, 20 May 2022 18:03:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=8F=B8/=E5=88=86=E9=83=A8=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=20=E5=AD=97=E6=AE=B5=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/entity/comp/bo/CompBO.java | 18 +++++++++++++++--- .../entity/comp/dto/CompListDTO.java | 4 ++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/com/engine/organization/entity/comp/bo/CompBO.java b/src/com/engine/organization/entity/comp/bo/CompBO.java index 05302028..c23e8dee 100644 --- a/src/com/engine/organization/entity/comp/bo/CompBO.java +++ b/src/com/engine/organization/entity/comp/bo/CompBO.java @@ -4,6 +4,9 @@ import com.engine.organization.entity.comp.dto.CompListDTO; import com.engine.organization.entity.comp.param.CompSearchParam; import com.engine.organization.entity.comp.po.CompPO; import org.apache.commons.collections.CollectionUtils; +import weaver.crm.Maint.SectorInfoComInfo; +import weaver.general.StringUtil; +import weaver.hrm.resource.ResourceComInfo; import java.util.*; import java.util.stream.Collectors; @@ -35,8 +38,8 @@ public class CompBO { .parentCompany(e.getParentCompany()) .parentCompName(null == poMaps.get(e.getParentCompany()) ? "" : poMaps.get(e.getParentCompany()).getCompName()) .orgCode(e.getOrgCode()) - .industry(e.getIndustry()) - .compPrincipal(e.getCompPrincipal()) + .industry(new SectorInfoComInfo().getSectorInfoname(e.getIndustry() + "")) + .compPrincipal(getUserNameById(e.getCompPrincipal() + "")) .forbiddenTag(e.getForbiddenTag()) .build() ).collect(Collectors.toList()); @@ -87,5 +90,14 @@ public class CompBO { } } - + private static String getUserNameById(String userId) { + try { + if (StringUtil.isEmpty(userId)) { + return ""; + } + return new ResourceComInfo().getLastname(userId); + } catch (Exception e) { + throw new RuntimeException(e); + } + } } diff --git a/src/com/engine/organization/entity/comp/dto/CompListDTO.java b/src/com/engine/organization/entity/comp/dto/CompListDTO.java index 56fe61bb..1c1892b0 100644 --- a/src/com/engine/organization/entity/comp/dto/CompListDTO.java +++ b/src/com/engine/organization/entity/comp/dto/CompListDTO.java @@ -71,13 +71,13 @@ public class CompListDTO { * 行业 */ @TableTitle(title = "行业", dataIndex = "industry", key = "industry") - private Integer industry; + private String industry; /** * 负责人 */ @TableTitle(title = "负责人", dataIndex = "compPrincipal", key = "compPrincipal") - private Integer compPrincipal; + private String compPrincipal; /** * 禁用标记