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; /** * 禁用标记