| | |
| | | Date predictTime = reqVO.getPredictTime(); |
| | | if (predictTime == null) { |
| | | MmItemOutputEntity output = mmItemOutputService.getOutPutById(reqVO.getOutIds().get(0)); |
| | | ItemVO predictItem = mmPredictItemService.getItemById(output.getItemid()); |
| | | ItemVO predictItem = mmPredictItemService.getItemByIdFromCache(output.getItemid()); |
| | | if (predictItem.getLastTime() != null) { |
| | | predictTime = predictItem.getLastTime(); |
| | | } else { |
| | |
| | | for (MmItemOutputEntity out : outs) { |
| | | legend.add(out.getResultName()); |
| | | PreDataSampleViewRespDTO viewDto = new PreDataSampleViewRespDTO(); |
| | | viewDto.setRealData(getHisData(out.getPointid(), startTime, endTime)); |
| | | if (StringUtils.isNotBlank(out.getPointid())) { |
| | | viewDto.setRealData(getHisData(out.getPointid(), startTime, endTime)); |
| | | } |
| | | viewDto.setPreDataN(mmItemResultService.getData(out.getId(), startTime, endTime, DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); |
| | | viewMap.put(out.getResultName(), viewDto); |
| | | } |
| | |
| | | return result; |
| | | } |
| | | String resultIndex = chartParams.get(CommonConstant.RESULT_INDEX); |
| | | if (resultIndex == null) { |
| | | return result; |
| | | } |
| | | |
| | | ItemVO predictItem = mmPredictItemService.getItemByItemNo(itemCode); |
| | | if (predictItem == null || predictItem.getLastTime() == null) { |
| | |
| | | |
| | | List<String> categories = DateUtils.getTimeScale(startTime, endTime, predictItem.getGranularity(), timeFormat); |
| | | List<String> legend = new ArrayList<>(); |
| | | MmItemOutputEntity outPut = mmItemOutputService.getByItemid(predictItem.getId(), resultStr, Integer.parseInt(resultIndex)); |
| | | MmItemOutputEntity outPut = mmItemOutputService.getByItemid(predictItem.getId(), resultStr, resultIndex); |
| | | PreDataViewRespDTO dataView = new PreDataViewRespDTO(); |
| | | dataView.setItemId(predictItem.getId()); |
| | | dataView.setItemName(predictItem.getItemName()); |