|
|
|
@ -76,7 +76,7 @@ public class InstantServiceImpl implements InstantService { |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@LogRecord(type = SYSTEM_INSTANT_TYPE, subType = SYSTEM_INSTANT_CREATE_SUB_TYPE, bizNo = "{{#role.id}}", |
|
|
|
success = SYSTEM_INSTANT_CREATE_SUCCESS) |
|
|
|
public List<String> createInstant(InstantSaveReqVO createReqVO, Integer type) throws IOException { |
|
|
|
public List<String> createInstant(InstantSaveReqVO createReqVO) throws IOException { |
|
|
|
|
|
|
|
try { |
|
|
|
// 1. 校验角色
|
|
|
|
@ -118,7 +118,9 @@ public class InstantServiceImpl implements InstantService { |
|
|
|
inputInfoList.add(pointInfoList.get(i).getPointId()); |
|
|
|
inputNameList.add(pointInfoList.get(i).getDescription()); |
|
|
|
unitList.add(pointInfoList.get(i).getUnit()); |
|
|
|
if (Objects.isNull(pointInfoList.get(i).getType()) || pointInfoList.get(i).getType().equals("1")) { |
|
|
|
// 如果pointInfoList.get(i)有type字段,或者createReqVO对象中的算法是PCA就加一些重构值、时间值、偏差值
|
|
|
|
if (pointInfoList.get(i).getType() != null || Objects.equals(createReqVO.getAlgorithmId(), "1") |
|
|
|
|| createReqVO.getAlgorithmId().equals(1L)) { |
|
|
|
//构建重构值对象
|
|
|
|
outpoint = HEAD + "M" + String.format("%04d", insertId) + String.format("%04d", i + 1) + "R"; |
|
|
|
point = new Point(); |
|
|
|
@ -162,12 +164,6 @@ public class InstantServiceImpl implements InstantService { |
|
|
|
point.setEngUnits(pointInfoList.get(i).getUnit()); |
|
|
|
point.setItemType(5); |
|
|
|
InstantPointList.add(point); |
|
|
|
} else { |
|
|
|
outpoint = ""; |
|
|
|
outPointInfoList.add(outpoint); |
|
|
|
timePointInfoList.add(outpoint); |
|
|
|
biasPointInfoList.add(outpoint); |
|
|
|
faultVariablePointList.add(outpoint); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -226,6 +222,7 @@ public class InstantServiceImpl implements InstantService { |
|
|
|
String ss = exaUtils.setPoint(EXA_IP, item); |
|
|
|
resultList.add(ss); |
|
|
|
} |
|
|
|
//插入预警表
|
|
|
|
createWarn1(instant, createReqVO); |
|
|
|
log.info("模型实例创建成功,实例ID: {}", instant.getMpId()); |
|
|
|
return resultList; |
|
|
|
|