Browse Source

修改交换机查询接口

develop
Mr.Wang 7 months ago
parent
commit
c79b4523e1
  1. 2
      zc-business/src/main/java/com/zc/business/domain/DcSwitch.java
  2. 5
      zc-business/src/main/java/com/zc/business/service/impl/DcSwitchServiceImpl.java

2
zc-business/src/main/java/com/zc/business/domain/DcSwitch.java

@ -117,6 +117,6 @@ public class DcSwitch {
* 故障数量
*/
private int numberOfFaults;
private Map<String, List<DcDevice>> dcDeviceList;
private List<DcDevice> dcDeviceList;
}

5
zc-business/src/main/java/com/zc/business/service/impl/DcSwitchServiceImpl.java

@ -98,10 +98,7 @@ public class DcSwitchServiceImpl extends ServiceImpl<DcSwitchMapper, DcSwitch> i
if (StringUtils.isNotEmpty(dcSwitch.getDeviceList())) {
// 说明是设备交换机
List<DcDevice> deviceList = getDeviceList(dcSwitch.getDeviceList());
if (deviceList.size() > 0) {
Map<String, List<DcDevice>> collect = deviceList.stream().collect(Collectors.groupingBy(DcDevice::getDeviceType));
dcSwitch.setDcDeviceList(collect);
}
dcSwitch.setDcDeviceList(deviceList);
}
}catch (Exception e) {
e.printStackTrace();

Loading…
Cancel
Save