parent
b522f17b18
commit
8466081cac
|
@ -99,6 +99,7 @@ public class DisposeInfoController {
|
||||||
.nodeId(areaCode.toString())
|
.nodeId(areaCode.toString())
|
||||||
.totalNetflow(areaCodeManagerService.getAreaCodeGroupReserveNetflow(areaCode))
|
.totalNetflow(areaCodeManagerService.getAreaCodeGroupReserveNetflow(areaCode))
|
||||||
.onlineDevices(areaCodeManagerService.getAreaCodeOnlineDeviceNum(areaCode))
|
.onlineDevices(areaCodeManagerService.getAreaCodeOnlineDeviceNum(areaCode))
|
||||||
|
.totalDevices(areaCodeManagerService.getAreaCodeTotalDeviceNum(areaCode))
|
||||||
.capacityType(Arrays.stream(areaCodeManagerService.getAreaCodeSupportCapacity(areaCode))
|
.capacityType(Arrays.stream(areaCodeManagerService.getAreaCodeSupportCapacity(areaCode))
|
||||||
.map(DisposeCapacityType::getValue)
|
.map(DisposeCapacityType::getValue)
|
||||||
.toArray(Integer[]::new))
|
.toArray(Integer[]::new))
|
||||||
|
|
|
@ -35,4 +35,8 @@ public class AreaInfoDetail {
|
||||||
* The Online devices.
|
* The Online devices.
|
||||||
*/
|
*/
|
||||||
private Integer onlineDevices;
|
private Integer onlineDevices;
|
||||||
|
/**
|
||||||
|
* The Total devices.
|
||||||
|
*/
|
||||||
|
private Integer totalDevices;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,14 @@ public interface AreaCodeManagerService {
|
||||||
*/
|
*/
|
||||||
int getAreaCodeOnlineDeviceNum(Integer areaCode);
|
int getAreaCodeOnlineDeviceNum(Integer areaCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets area code total device num.
|
||||||
|
*
|
||||||
|
* @param areaCode the area code
|
||||||
|
* @return the area code total device num
|
||||||
|
*/
|
||||||
|
int getAreaCodeTotalDeviceNum(Integer areaCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets area code support capacity.
|
* Gets area code support capacity.
|
||||||
*
|
*
|
||||||
|
|
|
@ -82,6 +82,20 @@ public class AreaCodeManagerServiceImpl implements AreaCodeManagerService {
|
||||||
.count();
|
.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets area code total device num.
|
||||||
|
*
|
||||||
|
* @param areaCode the area code
|
||||||
|
* @return the area code total device num
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int getAreaCodeTotalDeviceNum(Integer areaCode) {
|
||||||
|
List<DisposeDevice> disposeDevices = disposeDeviceManagerService.getAllDisposeDevice();
|
||||||
|
return (int) disposeDevices.stream()
|
||||||
|
.filter(v -> v.getAreaCode().equals(areaCode))
|
||||||
|
.count();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get area code support capacity dispose capacity type [ ].
|
* Get area code support capacity dispose capacity type [ ].
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue