This commit is contained in:
wr
2024-12-26 11:35:44 +08:00
parent 8c85e6c70b
commit 413bc98526
3 changed files with 29 additions and 0 deletions

View File

@@ -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<String> type;
}
}

View File

@@ -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<PqErrSysDtls> {
* @return 成功返回true失败返回false
*/
boolean deletePqErrSysDtlsByPqErrSysId(List<String> pqErrSysIds);
/**
* 根据误差体系id查询误差详情
* @param param 误差体系id
* @return
*/
List<PqErrSysDtls> listPqErrSysDtlsByPqErrSysIdAndTypes(PqErrSysParam.DetectionParam param);
}

View File

@@ -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<PqErrSysDtlsMapper, PqE
queryWrapper.in("pq_err_sys_dtls.Error_Sys_Id", pqErrSysIds);
return this.remove(queryWrapper);
}
@Override
public List<PqErrSysDtls> listPqErrSysDtlsByPqErrSysIdAndTypes(PqErrSysParam.DetectionParam param) {
return this.list(new LambdaQueryWrapper<PqErrSysDtls>()
.eq(PqErrSysDtls::getErrorSysId, param.getErrorSysId())
.in(PqErrSysDtls::getErrorSysId, param.getType())
);
}
}