| | |
| | | package com.iailab.module.ansteel.api.controller.admin; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.iailab.framework.common.exception.enums.GlobalErrorCodeConstants; |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | |
| | | Map<String, Object> pointsRealValue = dataPointApi.queryPointsRealValue(points); |
| | | if (pointsRealValue.get(dto.getCurP()) != null) { |
| | | dto.setCurP(pointsRealValue.get(dto.getCurP()).toString()); |
| | | } else { |
| | | dto.setCurP(""); |
| | | } |
| | | if (pointsRealValue.get(dto.getCurQ()) != null) { |
| | | dto.setCurQ(pointsRealValue.get(dto.getCurQ()).toString()); |
| | | } else { |
| | | dto.setCurQ(""); |
| | | } |
| | | if (pointsRealValue.get(dto.getCurCos()) != null) { |
| | | dto.setCurCos(pointsRealValue.get(dto.getCurCos()).toString()); |
| | | } else { |
| | | dto.setCurCos(""); |
| | | } |
| | | } else { |
| | | dto.setCurP(""); |
| | | dto.setCurQ(""); |
| | | dto.setCurCos(""); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info(dto.getNodeName() + "获取当前值异常"); |
| | | e.printStackTrace(); |
| | | } catch (Exception ex) { |
| | | log.info(dto.getNodeName() + "获取当前值异常" + ex.getMessage()); |
| | | } |
| | | |
| | | try { |
| | |
| | | } |
| | | if (!CollectionUtils.isEmpty(itemNos)) { |
| | | reqVO.setItemNos(itemNos); |
| | | log.info("reqVO=" + JSONObject.toJSONString(reqVO)); |
| | | Map<String, BigDecimal> preValues = mcsApi.getPredictValueByTime(reqVO); |
| | | if (StringUtils.isNotBlank(dto.getPreP()) && preValues.get(dto.getPreP()) != null) { |
| | | dto.setPreP(preValues.get(dto.getPreP()).toString()); |
| | |
| | | if (StringUtils.isNotBlank(dto.getPreCos()) && preValues.get(dto.getPreCos()) != null) { |
| | | dto.setPreCos(preValues.get(dto.getPreCos()).toString()); |
| | | } |
| | | } else { |
| | | dto.setPreP(""); |
| | | dto.setPreQ(""); |
| | | dto.setPreCos(""); |
| | | } |
| | | } catch (Exception ex) { |
| | | log.info(dto.getNodeName() + "获取预测值异常"); |
| | | ex.printStackTrace(); |
| | | log.info(dto.getNodeName() + "获取预测值异常," + ex.getMessage()); |
| | | } |
| | | } |
| | | return success(result); |