微调
This commit is contained in:
@@ -13,7 +13,6 @@ import com.njcn.gather.detection.pojo.param.PreDetectionParam;
|
||||
import com.njcn.gather.detection.pojo.po.DevData;
|
||||
import com.njcn.gather.detection.service.impl.DetectionServiceImpl;
|
||||
import com.njcn.gather.detection.util.socket.MsgUtil;
|
||||
import com.njcn.gather.device.pojo.po.PqDev;
|
||||
import com.njcn.gather.device.service.IPqDevService;
|
||||
import com.njcn.gather.plan.pojo.po.AdPlan;
|
||||
import com.njcn.gather.plan.service.IAdPlanService;
|
||||
@@ -36,6 +35,7 @@ import com.njcn.gather.script.util.ScriptDtlsDesc;
|
||||
import com.njcn.gather.storage.mapper.TableGenMapper;
|
||||
import com.njcn.gather.storage.pojo.param.StorageParam;
|
||||
import com.njcn.gather.storage.pojo.po.AdBaseResult;
|
||||
import com.njcn.gather.storage.pojo.po.AdHarmonicResult;
|
||||
import com.njcn.gather.storage.pojo.po.AdNonHarmonicResult;
|
||||
import com.njcn.gather.storage.pojo.vo.RawDataVO;
|
||||
import com.njcn.gather.storage.service.AdHarmonicService;
|
||||
@@ -202,7 +202,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
dtlType.setIndex(index);
|
||||
dtlType.setScriptType(scriptDtlIndexList.get(0).getScriptType());
|
||||
ratedScriptTypeName(scriptDtlIndexList, isValueType, dtlType, dictTree);
|
||||
dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList,false, isValueType).toString());
|
||||
dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, false, isValueType).toString());
|
||||
if (finalResultMap.containsKey(index)) {
|
||||
dtlType.setFly(conform(finalResultMap.get(index)));
|
||||
}
|
||||
@@ -253,7 +253,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
if ("Freq".equals(subKey)) {
|
||||
freqScriptTypeName(scriptDtlIndexList, dictTree, isValueType, dtlType);
|
||||
}
|
||||
dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList,false, isValueType).toString());
|
||||
dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, false, isValueType).toString());
|
||||
if (finalResultMap.containsKey(index)) {
|
||||
dtlType.setFly(conform(finalResultMap.get(index)));
|
||||
}
|
||||
@@ -296,7 +296,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
dlt.setScriptTypeName("特征幅值=" + dtls.getTransValue() + "%Un,持续时间=" + dtls.getRetainTime().intValue() + "周波");
|
||||
dlt.setIndex(dtls.getScriptIndex());
|
||||
dlt.setScriptType(scriptDtlIndexList.get(0).getScriptType());
|
||||
dlt.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList,false, isValueType).toString());
|
||||
dlt.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, false, isValueType).toString());
|
||||
if (finalResultMap.containsKey(dtls.getScriptIndex())) {
|
||||
dlt.setFly(conform(finalResultMap.get(dtls.getScriptIndex())));
|
||||
}
|
||||
@@ -932,11 +932,11 @@ public class ResultServiceImpl implements IResultService {
|
||||
param.setCode(code);
|
||||
param.setErrorSysId(errorSysId);
|
||||
param.setDevIds(Arrays.asList(devId));
|
||||
param.setCode(code+"_temp");
|
||||
param.setCode(code + "_temp");
|
||||
|
||||
Map<String, String> devIdMapComm = new HashMap<>();
|
||||
PqDev dev = pqDevService.getById(devId);
|
||||
devIdMapComm.put(devId,devId);
|
||||
// PqDev dev = pqDevService.getById(devId);
|
||||
devIdMapComm.put(devId, devId);
|
||||
|
||||
SysTestConfig oneConfig = sysTestConfigService.getOneConfig();
|
||||
DictDataEnum dataRule;
|
||||
@@ -947,8 +947,11 @@ public class ResultServiceImpl implements IResultService {
|
||||
}
|
||||
|
||||
List<AdNonHarmonicResult> allNonHarmonicRawData = adNonHarmonicService.listAll(code, devId);
|
||||
LinkedHashMap<Integer, List<AdNonHarmonicResult>> map = allNonHarmonicRawData.stream().sorted(Comparator.comparing(AdNonHarmonicResult::getSort))
|
||||
LinkedHashMap<Integer, List<AdNonHarmonicResult>> nonHarmonicMap = allNonHarmonicRawData.stream().sorted(Comparator.comparing(AdNonHarmonicResult::getSort))
|
||||
.collect(Collectors.groupingBy(AdNonHarmonicResult::getSort, LinkedHashMap::new, Collectors.toList()));
|
||||
List<AdHarmonicResult> allHarmonicRawData = adHarmonicService.lisAll(code, devId);
|
||||
LinkedHashMap<Integer, List<AdHarmonicResult>> harmonicMap = allHarmonicRawData.stream().sorted(Comparator.comparing(AdHarmonicResult::getSort))
|
||||
.collect(Collectors.groupingBy(AdHarmonicResult::getSort, LinkedHashMap::new, Collectors.toList()));
|
||||
|
||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||
issueParam.setPlanId(planId);
|
||||
@@ -962,15 +965,29 @@ public class ResultServiceImpl implements IResultService {
|
||||
List<SourceIssue> sourceIssues = pqScriptDtlsService.listSourceIssue(issueParam);
|
||||
|
||||
sourceIssues.forEach(sourceIssue -> {
|
||||
List<DevData> realDataXiList = MsgUtil.toList(map.get(sourceIssue.getIndex()), null);
|
||||
List<DevData> realDataXiList = MsgUtil.toList(nonHarmonicMap.get(sourceIssue.getIndex()), harmonicMap.get(sourceIssue.getIndex()));
|
||||
for (int i = 0; i < realDataXiList.size(); i++) {
|
||||
DevData devData = realDataXiList.get(i);
|
||||
List<DevData.SqlDataDTO> sqlData = devData.getSqlData();
|
||||
if(CollUtil.isNotEmpty(sqlData)){
|
||||
if (CollUtil.isNotEmpty(sqlData)) {
|
||||
for (int j = 0; j < sqlData.size(); j++) {
|
||||
DevData.SqlDataDTO sqlDataDTO = sqlData.get(j);
|
||||
String desc = sqlDataDTO.getDesc();
|
||||
if(StrUtil.isNotBlank(desc)){
|
||||
if (StrUtil.isNotBlank(desc)) {
|
||||
DictTree dictTree = dictTreeService.getById(desc);
|
||||
if (ObjectUtil.isNotNull(dictTree)) {
|
||||
sqlDataDTO.setDesc(dictTree.getCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<DevData.SqlDataHarmDTO> sqlDataHarm = devData.getSqlDataHarm();
|
||||
if (CollUtil.isNotEmpty(sqlDataHarm)) {
|
||||
for (int j = 0; j < sqlDataHarm.size(); j++) {
|
||||
DevData.SqlDataHarmDTO sqlDataDTO = sqlDataHarm.get(j);
|
||||
String desc = sqlDataDTO.getDesc();
|
||||
if (StrUtil.isNotBlank(desc)) {
|
||||
DictTree dictTree = dictTreeService.getById(desc);
|
||||
if (ObjectUtil.isNotNull(dictTree)) {
|
||||
sqlDataDTO.setDesc(dictTree.getCode());
|
||||
|
||||
Reference in New Issue
Block a user