diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java index 94de3be56c..30164b69c4 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java @@ -29,6 +29,10 @@ public class IcServiceOrgListResultDTO implements Serializable { * 服务类别,多个值逗号分隔 */ private String serviceType; + /** + * 服务类别,多个值顿号分隔 + */ + private String serviceTypeName; /** * 服务组织名称 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java index eacf96586e..6697510040 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java @@ -68,15 +68,19 @@ public class IcServiceOrgServiceImpl extends BaseServiceImpl statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); List stList = null; IcServiceOrgListResultDTO.ServiceType st = null; + StringBuffer buffer = null; for (IcServiceOrgListResultDTO dto : list) { stList = new ArrayList<>(); + buffer = new StringBuffer(""); for (String str : dto.getServiceType().split(",")) { st = new IcServiceOrgListResultDTO.ServiceType(); st.setValue(str); st.setName(null != statusMap.get(str) ? statusMap.get(str) : ""); stList.add(st); + buffer.append(buffer.length() > NumConstant.ZERO ? "、" : "").append(st.getName()); } dto.setServiceTypeList(stList); + dto.setServiceTypeName(buffer.toString()); } } @@ -167,13 +171,16 @@ public class IcServiceOrgServiceImpl extends BaseServiceImpl statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); List stList = new ArrayList<>(); IcServiceOrgListResultDTO.ServiceType st = null; + StringBuffer buffer = new StringBuffer(""); for (String str : resultDTO.getServiceType().split(",")) { st = new IcServiceOrgListResultDTO.ServiceType(); st.setValue(str); st.setName(null != statusMap.get(str) ? statusMap.get(str) : ""); stList.add(st); + buffer.append(buffer.length() > NumConstant.ZERO ? "、" : "").append(st.getName()); } resultDTO.setServiceTypeList(stList); + resultDTO.setServiceTypeName(buffer.toString()); } return resultDTO;