From 19e99fda9eefb0f32c9a9a7d62ed3d2df8629d17 Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Thu, 27 Feb 2025 10:26:51 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=A7=A3=E5=86=B3=E7=9B=B8=E5=AF=B9=E5=80=BC?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E7=94=B5=E5=8E=8B=E7=94=B5=E6=B5=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gather/err/pojo/param/PqErrSysParam.java | 8 +++++++ .../service/impl/PqErrSysDtlsServiceImpl.java | 21 ++++++++++++++++++- .../service/impl/PqScriptDtlsServiceImpl.java | 4 ++-- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/err/pojo/param/PqErrSysParam.java b/detection/src/main/java/com/njcn/gather/err/pojo/param/PqErrSysParam.java index f12e5e25..72563919 100644 --- a/detection/src/main/java/com/njcn/gather/err/pojo/param/PqErrSysParam.java +++ b/detection/src/main/java/com/njcn/gather/err/pojo/param/PqErrSysParam.java @@ -76,6 +76,14 @@ public class PqErrSysParam { @ApiModelProperty("所属检测脚本") private String scriptId; + + + @ApiModelProperty("电压") + private Double un; + + @ApiModelProperty("电流") + private Double in; + } } diff --git a/detection/src/main/java/com/njcn/gather/err/service/impl/PqErrSysDtlsServiceImpl.java b/detection/src/main/java/com/njcn/gather/err/service/impl/PqErrSysDtlsServiceImpl.java index cd465007..03b1651a 100644 --- a/detection/src/main/java/com/njcn/gather/err/service/impl/PqErrSysDtlsServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/err/service/impl/PqErrSysDtlsServiceImpl.java @@ -4,12 +4,14 @@ import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.njcn.gather.detection.pojo.enums.DetectionCodeEnum; import com.njcn.gather.err.mapper.PqErrSysDtlsMapper; import com.njcn.gather.err.pojo.param.PqErrSysDtlsParam; import com.njcn.gather.err.pojo.param.PqErrSysParam; import com.njcn.gather.err.pojo.po.PqErrSysDtls; import com.njcn.gather.err.pojo.vo.ErrDtlsCheckDataVO; import com.njcn.gather.err.service.IPqErrSysDtlsService; +import com.njcn.gather.script.mapper.PqScriptMapper; import com.njcn.gather.script.pojo.param.PqScriptCheckDataParam; import com.njcn.gather.script.pojo.po.PqScriptCheckData; import com.njcn.gather.script.service.IPqScriptCheckDataService; @@ -20,6 +22,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; @@ -33,7 +36,7 @@ import java.util.stream.Collectors; public class PqErrSysDtlsServiceImpl extends ServiceImpl implements IPqErrSysDtlsService { private final IPqScriptCheckDataService pqScriptCheckDataService; - + private final PqScriptMapper pqScriptMapper; @Override public List listPqErrSysDtlsByPqErrSysId(String pqErrSysId) { @@ -96,6 +99,7 @@ public class PqErrSysDtlsServiceImpl extends ServiceImpl list = pqScriptCheckDataService.listCheckDataCode(checkDataParam); + Boolean isValueType = pqScriptMapper.selectScriptIsValueType(param.getScriptId()); List valueType = list.stream().filter(x->x.getErrorFlag()!=0).map(PqScriptCheckData::getValueType).collect(Collectors.toList()); Map> errMap =new HashMap<>(3); @@ -117,6 +121,21 @@ public class PqErrSysDtlsServiceImpl extends ServiceImpl