1.相序校验,增加相角校验
2.增加检测完成归档状态
This commit is contained in:
@@ -29,6 +29,8 @@ import com.njcn.gather.device.pojo.enums.*;
|
||||
import com.njcn.gather.device.type.entity.DevType;
|
||||
import com.njcn.gather.device.type.service.IDevTypeService;
|
||||
import com.njcn.gather.storage.service.DetectionDataDealService;
|
||||
import com.njcn.gather.system.config.pojo.po.SysTestConfig;
|
||||
import com.njcn.gather.system.config.service.ISysTestConfigService;
|
||||
import com.njcn.gather.system.dictionary.pojo.po.DictData;
|
||||
import com.njcn.gather.system.dictionary.service.IDictDataService;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
@@ -56,6 +58,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
private final IPqMonitorService pqMonitorService;
|
||||
private final DetectionDataDealService detectionDataDealService;
|
||||
private final IDevTypeService devTypeService;
|
||||
private final ISysTestConfigService sysTestConfigService;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -491,13 +494,20 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
@Override
|
||||
public boolean updateResult(List<String> ids,List<String> valueType, String code) {
|
||||
if (CollUtil.isNotEmpty(ids)) {
|
||||
SysTestConfig config = sysTestConfigService.getOneConfig();
|
||||
Map<String, Integer> result = detectionDataDealService.devResult(ids,valueType, code);
|
||||
List<PqDev> list = this.list(new LambdaQueryWrapper<PqDev>().in(PqDev::getId, ids));
|
||||
for (PqDev pqDev : list) {
|
||||
if (result.containsKey(pqDev.getId())) {
|
||||
Integer checkState;
|
||||
if (pqDev.getReCheckNum() >= config.getMaxTime()) {
|
||||
checkState = CheckStateEnum.DOCUMENTED.getValue();
|
||||
}else{
|
||||
checkState = CheckStateEnum.CHECKED.getValue();
|
||||
}
|
||||
this.update(new LambdaUpdateWrapper<PqDev>()
|
||||
.set(PqDev::getReCheckNum, pqDev.getReCheckNum() + 1)
|
||||
.set(PqDev::getCheckState, CheckStateEnum.CHECKED.getValue())
|
||||
.set(PqDev::getCheckState, checkState)
|
||||
.set(PqDev::getCheckResult, result.get(pqDev.getId()))
|
||||
.set(PqDev::getCheckTime, LocalDateTime.now())
|
||||
.set(PqDev::getReportState, DevReportStateEnum.NOT_GENERATED.getValue())
|
||||
|
||||
@@ -34,6 +34,8 @@ public class PqScriptCheckDataServiceImpl extends ServiceImpl<PqScriptCheckDataM
|
||||
|
||||
private final String V="real$V2-50";
|
||||
private final String SV="real$SV_1-49";
|
||||
private final String I="real$I2-50";
|
||||
private final String IV="real$SI_1-49";
|
||||
|
||||
private final DictTreeMapper dictTreeMapper;
|
||||
|
||||
@@ -52,8 +54,15 @@ public class PqScriptCheckDataServiceImpl extends ServiceImpl<PqScriptCheckDataM
|
||||
if(CollUtil.isNotEmpty(pqScriptCheckData)){
|
||||
if (param.getIsValueTypeName()) {
|
||||
List<String> checkData = pqScriptCheckData.stream().map(x -> x.getDataType() + "$" + x.getValueType()).distinct().collect(Collectors.toList());
|
||||
if(checkData.contains(V)||checkData.contains(SV)){
|
||||
checkData.add("real$U1");
|
||||
if(!checkData.contains("real$U1")){
|
||||
if(checkData.contains(V)||checkData.contains(SV)){
|
||||
checkData.add("real$U1");
|
||||
}
|
||||
}
|
||||
if(!checkData.contains("real$I1")){
|
||||
if(checkData.contains(I)||checkData.contains(IV)){
|
||||
checkData.add("real$I1");
|
||||
}
|
||||
}
|
||||
return checkData;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user