1、手动检测根据检测内容不同动态决定是否进行初始化操作

2、检测结果原始数据时间展示毫秒值
This commit is contained in:
caozehui
2025-06-26 13:18:01 +08:00
parent 31a2311698
commit ef4c4a0a17
7 changed files with 146 additions and 76 deletions

View File

@@ -104,7 +104,7 @@ public class AdHarmonicServiceImpl extends ServiceImpl<AdHarmonicMappper, AdHarm
Field timeId = harmonicResult.getClass().getDeclaredField("timeId");
timeId.setAccessible(true);
LocalDateTime localDateTime = (LocalDateTime) timeId.get(harmonicResult);
dataVO.setTime(localDateTime.format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)));
dataVO.setTime(localDateTime.format(DateTimeFormatter.ofPattern(DatePattern.ISO8601_PATTERN)));
Field fieldA = harmonicResult.getClass().getDeclaredField("aValue" + isHarmOrInHarm(i).intValue());
fieldA.setAccessible(true);
@@ -209,6 +209,7 @@ public class AdHarmonicServiceImpl extends ServiceImpl<AdHarmonicMappper, AdHarm
lambdaQueryWrapper.select(AdHarmonicResult::getSort)
.likeRight(StrUtil.isNotBlank(param.getDevId()), AdHarmonicResult::getMonitorId, param.getDevId())
.ne(AdHarmonicResult::getResultFlag, 1)
.ne(AdHarmonicResult::getResultFlag, 4)
.ne(AdHarmonicResult::getResultFlag, 5)
.eq(AdHarmonicResult::getScriptId, param.getScriptId());
List<AdHarmonicResult> adHarmonicResultList = this.list(lambdaQueryWrapper);
@@ -219,6 +220,7 @@ public class AdHarmonicServiceImpl extends ServiceImpl<AdHarmonicMappper, AdHarm
resultLambdaQueryWrapper.select(AdNonHarmonicResult::getSort)
.likeRight(StrUtil.isNotBlank(param.getDevId()), AdNonHarmonicResult::getMonitorId, param.getDevId())
.ne(AdNonHarmonicResult::getResultFlag, 1)
.ne(AdNonHarmonicResult::getResultFlag, 4)
.ne(AdNonHarmonicResult::getResultFlag, 5)
.eq(AdNonHarmonicResult::getScriptId, param.getScriptId());
List<AdNonHarmonicResult> nonHarmonicResults = adNonHarmonicMapper.selectList(resultLambdaQueryWrapper);

View File

@@ -76,7 +76,7 @@ public class AdNonHarmonicServiceImpl extends ServiceImpl<AdNonHarmonicMapper, A
for (AdNonHarmonicResult result : value) {
RawDataVO dataVO = new RawDataVO();
dataVO.setUnit(dictTree.getCode().equals("MAG")?"%":unit(dictTree.getCode()));
dataVO.setTime(result.getTimeId().format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)));
dataVO.setTime(result.getTimeId().format(DateTimeFormatter.ofPattern(DatePattern.ISO8601_PATTERN)));
dataVO.setDataA(StrUtil.isNotBlank(result.getAValue()) ? new BigDecimal(result.getAValue()).toPlainString() : null);
dataVO.setDataB(StrUtil.isNotBlank(result.getBValue()) ? new BigDecimal(result.getBValue()).toPlainString() : null);
dataVO.setDataC(StrUtil.isNotBlank(result.getCValue()) ? new BigDecimal(result.getCValue()).toPlainString() : null);