Browse Source

服务项目

feature/teamB_zz_wgh
sunyuchao 3 years ago
parent
commit
39e63ea06f
  1. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java
  2. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java

4
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 serviceType;
/**
* 服务类别,多个值顿号分隔
*/
private String serviceTypeName;
/** /**
* 服务组织名称 * 服务组织名称
*/ */

7
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<IcServiceOrgDao, Ic
Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>();
List<IcServiceOrgListResultDTO.ServiceType> stList = null; List<IcServiceOrgListResultDTO.ServiceType> stList = null;
IcServiceOrgListResultDTO.ServiceType st = null; IcServiceOrgListResultDTO.ServiceType st = null;
StringBuffer buffer = null;
for (IcServiceOrgListResultDTO dto : list) { for (IcServiceOrgListResultDTO dto : list) {
stList = new ArrayList<>(); stList = new ArrayList<>();
buffer = new StringBuffer("");
for (String str : dto.getServiceType().split(",")) { for (String str : dto.getServiceType().split(",")) {
st = new IcServiceOrgListResultDTO.ServiceType(); st = new IcServiceOrgListResultDTO.ServiceType();
st.setValue(str); st.setValue(str);
st.setName(null != statusMap.get(str) ? statusMap.get(str) : ""); st.setName(null != statusMap.get(str) ? statusMap.get(str) : "");
stList.add(st); stList.add(st);
buffer.append(buffer.length() > NumConstant.ZERO ? "、" : "").append(st.getName());
} }
dto.setServiceTypeList(stList); dto.setServiceTypeList(stList);
dto.setServiceTypeName(buffer.toString());
} }
} }
@ -167,13 +171,16 @@ public class IcServiceOrgServiceImpl extends BaseServiceImpl<IcServiceOrgDao, Ic
Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>();
List<IcServiceOrgListResultDTO.ServiceType> stList = new ArrayList<>(); List<IcServiceOrgListResultDTO.ServiceType> stList = new ArrayList<>();
IcServiceOrgListResultDTO.ServiceType st = null; IcServiceOrgListResultDTO.ServiceType st = null;
StringBuffer buffer = new StringBuffer("");
for (String str : resultDTO.getServiceType().split(",")) { for (String str : resultDTO.getServiceType().split(",")) {
st = new IcServiceOrgListResultDTO.ServiceType(); st = new IcServiceOrgListResultDTO.ServiceType();
st.setValue(str); st.setValue(str);
st.setName(null != statusMap.get(str) ? statusMap.get(str) : ""); st.setName(null != statusMap.get(str) ? statusMap.get(str) : "");
stList.add(st); stList.add(st);
buffer.append(buffer.length() > NumConstant.ZERO ? "、" : "").append(st.getName());
} }
resultDTO.setServiceTypeList(stList); resultDTO.setServiceTypeList(stList);
resultDTO.setServiceTypeName(buffer.toString());
} }
return resultDTO; return resultDTO;

Loading…
Cancel
Save