| | |
| | | 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()); |
| | |
| | | |
| | | List<MmItemOutputEntity> getByItemid(String itemId); |
| | | |
| | | MmItemOutputEntity getByItemid(String itemid, String resultstr, Integer resultIndex); |
| | | MmItemOutputEntity getByItemid(String itemid, String resultstr, String resultIndex); |
| | | |
| | | void deleteByItemId(String itemId); |
| | | } |
| | |
| | | import com.iailab.module.model.mcs.pre.dto.MmItemOutputDTO; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; |
| | | import com.iailab.module.model.mcs.pre.service.MmItemOutputService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public MmItemOutputEntity getByItemid(String itemid, String resultstr, Integer resultIndex) { |
| | | public MmItemOutputEntity getByItemid(String itemid, String resultstr, String resultIndex) { |
| | | QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("itemid", itemid) |
| | | .eq("resultstr", resultstr) |
| | | .eq("result_index", resultIndex); |
| | | .eq(StringUtils.isNotBlank(resultIndex), "result_index", resultIndex); |
| | | return mmItemOutputDao.selectOne(queryWrapper); |
| | | } |
| | | |