iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/influxdb/service/impl/InfluxDBServiceImpl.java
@@ -53,7 +53,7 @@ String start = startTime.toInstant().toString(); if (startTime.getTime() == endTime.getTime()) { // 如果相等,则engTime加1毫秒,负责influxdb报错(因为influxdb的range函数是左闭右开区间,所以将engTime加一毫秒,才可以查到startTime时间点的数据) // 如果相等,则engTime加1毫秒,否则influxdb报错(因为influxdb的range函数是左闭右开区间,所以将engTime加一毫秒,才可以查到startTime时间点的数据) endTime.setTime(endTime.getTime() + 1); } String stop = endTime.toInstant().toString(); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmItemResultJsonService.java
@@ -15,7 +15,5 @@ List<Object[]> getData(String outputId, Date predictTime, String timeFormat); String getDoubleData(String outputId, Date predictTime); void insert(List<MmItemResultJsonEntity> resultJsonList); } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemResultJsonServiceImpl.java
@@ -50,15 +50,6 @@ } @Override public String getDoubleData(String outputId, Date predictTime) { QueryWrapper<MmItemResultJsonEntity> wrapper = new QueryWrapper<>(); wrapper.eq("outputid", outputId) .eq("predicttime", predictTime); MmItemResultJsonEntity mmItemResultJsonEntity = baseDao.selectOne(wrapper); return null == mmItemResultJsonEntity ? null : mmItemResultJsonEntity.getCumulant(); } @Override public void insert(List<MmItemResultJsonEntity> resultJsonList) { baseDao.insertBatch(resultJsonList); } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java
@@ -147,23 +147,7 @@ break; case NORMALITEM: case MERGEITEM: MmItemOutputEntity outPut = mmItemOutputService.getOutPutById(columnItem.getParamId()); OutResultType outResultType = OutResultType.getEumByCode(outPut.getResultType()); List<DataValueVO> predictValue = new ArrayList<>(); // double类型特殊处理 if (OutResultType.D.equals(outResultType)) { // columnItem.getStartTime()就是预测时间 String doubleData = mmItemResultJsonService.getDoubleData(outPut.getId(), columnItem.getStartTime()); if (StringUtils.isNotBlank(doubleData)) { DataValueVO dataValueVO = new DataValueVO(); dataValueVO.setDataTime(columnItem.getStartTime()); dataValueVO.setDataValue(Double.valueOf(doubleData)); predictValue.add(dataValueVO); } } else { predictValue = mmItemResultService.getPredictValue(outPut.getId(), columnItem.getStartTime(), columnItem.getEndTime()); } List<DataValueVO> predictValue = mmItemResultService.getPredictValue(columnItem.getParamId(), columnItem.getStartTime(), columnItem.getEndTime()); if (CollectionUtils.isEmpty(predictValue)) { break; iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleInfoConstructor.java
@@ -187,7 +187,7 @@ if (backward) { timeLength = (-1) * dataLength; } else { timeLength = dataLength - 1; timeLength = dataLength; } Date desTime = originalTime; Calendar calendar = Calendar.getInstance();