tangxiangan преди 8 месеца
родител
ревизия
11b7ace283
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      pdf-tech-core/src/main/java/cn/kdan/pdf/tech/core/service/impl/VppDashboardServiceImpl.java

+ 1 - 1
pdf-tech-core/src/main/java/cn/kdan/pdf/tech/core/service/impl/VppDashboardServiceImpl.java

@@ -52,7 +52,7 @@ public class VppDashboardServiceImpl implements VppDashboardService {
         int assignedLicenses = (int) vppLicenseCodeList.stream().filter(c -> c.getValidFlag().equals(LicenseCodeStatusEnum.ASSIGNED.code()) || c.getValidFlag().equals(LicenseCodeStatusEnum.ACTIVE.code())).count();
         // 可分配
         int availableLicenses = (int) vppLicenseCodeList.stream().filter(c -> c.getValidFlag().equals(LicenseCodeStatusEnum.UNASSIGNED.code()) || c.getValidFlag().equals(LicenseCodeStatusEnum.CANCELED.code())).count();
-        List<LicenseCodes> collect = vppLicenseCodeList.stream().filter(c -> !c.getValidFlag().equals(LicenseCodeStatusEnum.Refunded.code())).collect(Collectors.toList());
+        List<LicenseCodes> collect = vppLicenseCodeList.stream().filter(c -> !c.getValidFlag().equals(LicenseCodeStatusEnum.Refunded.code())&& !c.getValidFlag().equals(LicenseCodeStatusEnum.EXPIRED.code())).collect(Collectors.toList());
         // 已激活
         int activatedDevices = collect.stream().mapToInt(o -> Objects.isNull(o.getUsedTimes()) ? 0 : o.getUsedTimes()).sum();