From 491abdd18e1fbbfb6218049b7a91da1cd5970526 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 21 Jan 2025 11:08:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E7=BB=93=E6=9E=9C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE-=E9=80=9A=E9=81=93=E4=B8=8B=E6=8B=89=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gather/result/service/impl/ResultServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java b/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java index d1536bde..dffde8cd 100644 --- a/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java @@ -1,6 +1,5 @@ package com.njcn.gather.result.service.impl; -import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; @@ -8,7 +7,6 @@ import cn.hutool.core.util.StrUtil; import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.njcn.common.pojo.enums.common.DataStateEnum; import com.njcn.common.pojo.exception.BusinessException; -import com.njcn.gather.device.device.pojo.vo.CNDevExcel; import com.njcn.gather.device.device.service.IPqDevService; import com.njcn.gather.device.script.mapper.PqScriptMapper; import com.njcn.gather.device.script.pojo.po.PqScriptCheckData; @@ -100,6 +98,7 @@ public class ResultServiceImpl implements IResultService { allResultList.addAll(adNonHarmonicService.get(scriptId, null, queryParam.getDeviceId(), queryParam.getChnNum(), plan.getCode())); } + if (ObjectUtil.isNotEmpty(allResultList)) { Map> chnMap = allResultList.stream().collect( Collectors.groupingBy(obj -> obj.getMonitorId().substring(obj.getMonitorId().lastIndexOf("_") + 1)) @@ -107,8 +106,9 @@ public class ResultServiceImpl implements IResultService { chnMap.forEach((chn, list) -> { Map map = new HashMap<>(); map.put("value", chn); - long count = list.stream().filter(obj -> obj.getResultFlag() == 0).count(); - map.put("label", count > 0 ? "0" : "1"); + Set collect = list.stream().filter(obj -> obj.getResultFlag() != 4).map(AdBaseResult::getResultFlag).collect(Collectors.toSet()); + map.put("label", conform(collect) + ""); + chnList.add(map); }); }