原始数据入库bug
This commit is contained in:
@@ -55,6 +55,8 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.njcn.gather.detection.util.socket.FormalTestManager.harmonicRelationMap;
|
||||
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@@ -1613,6 +1615,9 @@ public class SocketDevResponseService {
|
||||
if (param.getOperateType().equals(SourceOperateCodeEnum.COEFFICIENT_TEST.getValue())) {
|
||||
initXiManager(param);
|
||||
}
|
||||
|
||||
harmonicRelationMap.put(DetectionCodeEnum.V2_50.getCode(),DetectionCodeEnum.U1.getCode());
|
||||
harmonicRelationMap.put(DetectionCodeEnum.I2_50.getCode(),DetectionCodeEnum.I1.getCode());
|
||||
}
|
||||
|
||||
//初始化系数校验参数
|
||||
@@ -1692,6 +1697,7 @@ public class SocketDevResponseService {
|
||||
adNonHarmonicResult.setMonitorId(temId);
|
||||
adNonHarmonicResult.setScriptId(param.getScriptId());
|
||||
adNonHarmonicResult.setSort(sourceIssue.getIndex());
|
||||
|
||||
adNonHarmonicResult.setAdType(checkDataMap.get(sqlDataDTO.getDesc()));
|
||||
adNonHarmonicResult.setDataType("avg");
|
||||
|
||||
@@ -1714,9 +1720,10 @@ public class SocketDevResponseService {
|
||||
adNonHarmonicResultList.add(adNonHarmonicResult);
|
||||
}
|
||||
} else {
|
||||
|
||||
for(int j=0;j<data.getSqlDataHarm().size();j++){
|
||||
DevData.SqlDataHarmDTO sqlDataDTO = data.getSqlDataHarm().get(j);
|
||||
|
||||
String dui = harmonicRelationMap.get(sqlDataDTO.getDesc());
|
||||
AdHarmonicResult adHarmonicResult = new AdHarmonicResult();
|
||||
adHarmonicResult.setTimeId(localDateTime);
|
||||
|
||||
@@ -1728,7 +1735,7 @@ public class SocketDevResponseService {
|
||||
|
||||
if (!DicDataEnum.HSV.getCode().equals(sourceIssue.getType()) && !DicDataEnum.HSI.getCode().equals(sourceIssue.getType()) && !DicDataEnum.HP.getCode().equals(sourceIssue.getType())) {
|
||||
if (CollUtil.isNotEmpty(data.getSqlData())) {
|
||||
DevData.SqlDataDTO.ListDTO vvv = data.getSqlData().get(j).getList();
|
||||
DevData.SqlDataDTO.ListDTO vvv = data.getSqlData().stream().filter(it->it.getDesc().equals(dui)).collect(Collectors.toList()).get(0).getList();
|
||||
Double aV = vvv.getA();
|
||||
Double bV = vvv.getB();
|
||||
Double cV = vvv.getC();
|
||||
|
||||
@@ -66,4 +66,10 @@ public class FormalTestManager {
|
||||
public static Integer stopTime = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 强行赋值关系
|
||||
*/
|
||||
public static Map<String,String> harmonicRelationMap = new HashMap<>();
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user