1.增加检测结果信息入库
2.优化代码,三相不平衡,闪变,暂态业务逻辑提交
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.njcn.gather.device.err.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -33,6 +34,12 @@ public class PqErrSysDtls implements Serializable {
|
||||
*/
|
||||
private String scriptType;
|
||||
|
||||
/**
|
||||
* 脚本项类型Code
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String scriptCode;
|
||||
|
||||
/**
|
||||
* 误差判断起始值
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ 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 com.njcn.gather.device.script.pojo.po.PqScriptDtls;
|
||||
import com.njcn.gather.device.script.pojo.param.PqScriptCheckDataParam;
|
||||
import com.njcn.gather.device.script.service.IPqScriptCheckDataService;
|
||||
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -18,7 +18,6 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -72,25 +71,18 @@ public class PqErrSysDtlsServiceImpl extends ServiceImpl<PqErrSysDtlsMapper, PqE
|
||||
|
||||
@Override
|
||||
public List<PqErrSysDtls> listPqErrSysDtlsByPqErrSysIdAndTypes(PqErrSysParam.DetectionParam param) {
|
||||
return this.list(new MPJLambdaWrapper<PqErrSysDtls>()
|
||||
.selectAs(DictTree::getCode, PqErrSysDtls::getScriptType)
|
||||
.leftJoin(DictTree.class, DictTree::getId, PqScriptDtls::getScriptType)
|
||||
.in(PqErrSysDtls::getId, Arrays.asList("ae86b657f37151d78b7c34ec64eefa10"))
|
||||
// .eq(PqErrSysDtls::getErrorSysId, param.getErrorSysId())
|
||||
// .in(PqErrSysDtls::getErrorSysId, param.getType())
|
||||
PqScriptCheckDataParam script = new PqScriptCheckDataParam();
|
||||
script.setScriptId(param.getScriptId());
|
||||
script.setIndex(param.getIndex());
|
||||
script.setIsValueTypeName(false);
|
||||
List<String> valueType = pqScriptCheckDataService.getValueType(script);
|
||||
//根据检测脚本id和检测序号,查询出检测子项目
|
||||
return this.list(new MPJLambdaWrapper<PqErrSysDtls>()
|
||||
.selectAs(DictTree::getCode, PqErrSysDtls::getScriptCode)
|
||||
.leftJoin(DictTree.class, DictTree::getId, PqErrSysDtls::getScriptType)
|
||||
.eq(PqErrSysDtls::getErrorSysId, param.getErrorSysId())
|
||||
.in(PqErrSysDtls::getScriptType, valueType)
|
||||
);
|
||||
// PqScriptCheckDataParam script = new PqScriptCheckDataParam();
|
||||
// script.setScriptId(param.getScriptId());
|
||||
// script.setIndex(param.getIndex());
|
||||
// script.setIsValueTypeName(false);
|
||||
// List<String> valueType = pqScriptCheckDataService.getValueType(script);
|
||||
// //根据检测脚本id和检测序号,查询出检测子项目
|
||||
// return this.list(new MPJLambdaWrapper<PqErrSysDtls>()
|
||||
// .selectAs(DictTree::getCode, PqScriptDtls::getScriptCode)
|
||||
// .leftJoin(DictTree.class, DictTree::getId, PqScriptDtls::getScriptType)
|
||||
// .eq(PqErrSysDtls::getErrorSysId, param.getErrorSysId())
|
||||
// .in(PqErrSysDtls::getScriptType, valueType)
|
||||
// );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user