parent
ef440833a8
commit
e82a902acd
|
@ -26,7 +26,7 @@ public class AreaInfoDetail {
|
||||||
/**
|
/**
|
||||||
* The Total netflow.
|
* The Total netflow.
|
||||||
*/
|
*/
|
||||||
private Integer totalNetflow;
|
private Long totalNetflow;
|
||||||
/**
|
/**
|
||||||
* The Capacity type.
|
* The Capacity type.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -57,5 +57,5 @@ public class AddCapacityInfo {
|
||||||
/**
|
/**
|
||||||
* The Reserve netflow.
|
* The Reserve netflow.
|
||||||
*/
|
*/
|
||||||
private Integer reserveNetflow;
|
private Long reserveNetflow;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,5 +70,5 @@ public class DisposeCapacity implements Serializable {
|
||||||
/**
|
/**
|
||||||
* The Reserve netflow.
|
* The Reserve netflow.
|
||||||
*/
|
*/
|
||||||
private Integer reserveNetflow;
|
private Long reserveNetflow;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ public interface AreaCodeManagerService {
|
||||||
* @param areaCode the area code
|
* @param areaCode the area code
|
||||||
* @return the area code group reserve netflow
|
* @return the area code group reserve netflow
|
||||||
*/
|
*/
|
||||||
int getAreaCodeGroupReserveNetflow(Integer areaCode);
|
long getAreaCodeGroupReserveNetflow(Integer areaCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets area code online device num.
|
* Gets area code online device num.
|
||||||
|
|
|
@ -57,13 +57,13 @@ public class AreaCodeManagerServiceImpl implements AreaCodeManagerService {
|
||||||
* @return the area code group reserve netflow
|
* @return the area code group reserve netflow
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getAreaCodeGroupReserveNetflow(Integer areaCode) {
|
public long getAreaCodeGroupReserveNetflow(Integer areaCode) {
|
||||||
List<DisposeDevice> disposeDevices = disposeDeviceManagerService.getAllDisposeDevice();
|
List<DisposeDevice> disposeDevices = disposeDeviceManagerService.getAllDisposeDevice();
|
||||||
return disposeDevices.stream()
|
return disposeDevices.stream()
|
||||||
.filter(v -> v.getAreaCode().equals(areaCode) && v.getStatus() == ObjectStatus.NORMAL)
|
.filter(v -> v.getAreaCode().equals(areaCode) && v.getStatus() == ObjectStatus.NORMAL)
|
||||||
.mapToInt(v -> v.getDevCapacity().stream()
|
.mapToLong(v -> v.getDevCapacity().stream()
|
||||||
.filter(k -> k.getCapacityType() == DisposeCapacityType.CLEANUP)
|
.filter(k -> k.getCapacityType() == DisposeCapacityType.CLEANUP)
|
||||||
.mapToInt(m -> Optional.ofNullable(m.getReserveNetflow()).orElse(0))
|
.mapToLong(m -> Optional.ofNullable(m.getReserveNetflow()).orElse(0L))
|
||||||
.sum())
|
.sum())
|
||||||
.sum();
|
.sum();
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,7 +351,7 @@ public class P2Info {
|
||||||
.objectType(DisposeObjectType.IP)
|
.objectType(DisposeObjectType.IP)
|
||||||
.ipType(IpAddrType.IPV4_IPV6)
|
.ipType(IpAddrType.IPV4_IPV6)
|
||||||
.protectIp("0.0.0.0")
|
.protectIp("0.0.0.0")
|
||||||
.reserveNetflow(30)
|
.reserveNetflow(30L)
|
||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue