From 413bc98526eebfb8bf426b063bf2af69f0c3e0f1 Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Thu, 26 Dec 2024 11:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gather/device/err/pojo/param/PqErrSysParam.java | 11 +++++++++++ .../device/err/service/IPqErrSysDtlsService.java | 8 ++++++++ .../err/service/impl/PqErrSysDtlsServiceImpl.java | 10 ++++++++++ 3 files changed, 29 insertions(+) diff --git a/device/src/main/java/com/njcn/gather/device/err/pojo/param/PqErrSysParam.java b/device/src/main/java/com/njcn/gather/device/err/pojo/param/PqErrSysParam.java index b45c292e..ea239a14 100644 --- a/device/src/main/java/com/njcn/gather/device/err/pojo/param/PqErrSysParam.java +++ b/device/src/main/java/com/njcn/gather/device/err/pojo/param/PqErrSysParam.java @@ -64,4 +64,15 @@ public class PqErrSysParam { @Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.ID_FORMAT_ERROR) private String id; } + + @Data + @EqualsAndHashCode(callSuper = false) + public static class DetectionParam{ + @ApiModelProperty("所属误差体系ID") + private String errorSysId; + + @ApiModelProperty("检测脚本类型") + private List type; + } + } diff --git a/device/src/main/java/com/njcn/gather/device/err/service/IPqErrSysDtlsService.java b/device/src/main/java/com/njcn/gather/device/err/service/IPqErrSysDtlsService.java index 2b0566cd..7848c7af 100644 --- a/device/src/main/java/com/njcn/gather/device/err/service/IPqErrSysDtlsService.java +++ b/device/src/main/java/com/njcn/gather/device/err/service/IPqErrSysDtlsService.java @@ -2,6 +2,7 @@ package com.njcn.gather.device.err.service; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.gather.device.err.pojo.param.PqErrSysDtlsParam; +import com.njcn.gather.device.err.pojo.param.PqErrSysParam; import com.njcn.gather.device.err.pojo.po.PqErrSysDtls; import java.util.List; @@ -41,4 +42,11 @@ public interface IPqErrSysDtlsService extends IService { * @return 成功返回true,失败返回false */ boolean deletePqErrSysDtlsByPqErrSysId(List pqErrSysIds); + + /** + * 根据误差体系id查询误差详情 + * @param param 误差体系id + * @return + */ + List listPqErrSysDtlsByPqErrSysIdAndTypes(PqErrSysParam.DetectionParam param); } diff --git a/device/src/main/java/com/njcn/gather/device/err/service/impl/PqErrSysDtlsServiceImpl.java b/device/src/main/java/com/njcn/gather/device/err/service/impl/PqErrSysDtlsServiceImpl.java index 7d756c37..607020d0 100644 --- a/device/src/main/java/com/njcn/gather/device/err/service/impl/PqErrSysDtlsServiceImpl.java +++ b/device/src/main/java/com/njcn/gather/device/err/service/impl/PqErrSysDtlsServiceImpl.java @@ -1,9 +1,11 @@ package com.njcn.gather.device.err.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.gather.device.err.mapper.PqErrSysDtlsMapper; import com.njcn.gather.device.err.pojo.param.PqErrSysDtlsParam; +import com.njcn.gather.device.err.pojo.param.PqErrSysParam; import com.njcn.gather.device.err.pojo.po.PqErrSysDtls; import com.njcn.gather.device.err.service.IPqErrSysDtlsService; import lombok.RequiredArgsConstructor; @@ -60,4 +62,12 @@ public class PqErrSysDtlsServiceImpl extends ServiceImpl listPqErrSysDtlsByPqErrSysIdAndTypes(PqErrSysParam.DetectionParam param) { + return this.list(new LambdaQueryWrapper() + .eq(PqErrSysDtls::getErrorSysId, param.getErrorSysId()) + .in(PqErrSysDtls::getErrorSysId, param.getType()) + ); + } }