REM:
1. 清洗设备支持带宽数据类型改为Long,保存单位为MByte
This commit is contained in:
HuangXin 2020-09-25 15:22:57 +08:00
parent ef440833a8
commit e82a902acd
6 changed files with 8 additions and 8 deletions

View File

@ -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.
*/ */

View File

@ -57,5 +57,5 @@ public class AddCapacityInfo {
/** /**
* The Reserve netflow. * The Reserve netflow.
*/ */
private Integer reserveNetflow; private Long reserveNetflow;
} }

View File

@ -70,5 +70,5 @@ public class DisposeCapacity implements Serializable {
/** /**
* The Reserve netflow. * The Reserve netflow.
*/ */
private Integer reserveNetflow; private Long reserveNetflow;
} }

View File

@ -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.

View File

@ -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();
} }

View File

@ -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()
); );