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