| | |
| | | PreDataSingleChartRespVO resultOld = mcsApi.getPreDataSingleChart(reqVO); |
| | | PreDataChartRespVO result = ConvertUtils.sourceToTarget(resultOld, PreDataChartRespVO.class); |
| | | PreDataViewDTO preDataView = ConvertUtils.sourceToTarget(resultOld.getDataView(), PreDataViewDTO.class); |
| | | if(trendsDataH != null) { |
| | | if (StringUtils.isNotBlank(trendsDataH)) { |
| | | // 动态上限 |
| | | ApiPointValueQueryDTO pointValueQueryDTO = new ApiPointValueQueryDTO(); |
| | | pointValueQueryDTO.setPointNo(trendsDataH); |
| | | pointValueQueryDTO.setStart(startTime); |
| | | pointValueQueryDTO.setEnd(endTime); |
| | | List<ApiPointValueDTO> trendsDataHList = ConvertUtils.sourceToTarget(dataPointApi.queryPointHistoryValue(pointValueQueryDTO), ApiPointValueDTO.class); |
| | | List<Object[]> newList = new ArrayList<>(); |
| | | trendsDataHList.forEach(item -> { |
| | |
| | | }); |
| | | preDataView.setTrendsDataH(newList); |
| | | } |
| | | if(trendsDataL != null) { |
| | | if (StringUtils.isNotBlank(trendsDataL)) { |
| | | // 动态下限 |
| | | ApiPointValueQueryDTO pointValueQueryDTO = new ApiPointValueQueryDTO(); |
| | | pointValueQueryDTO.setPointNo(trendsDataL); |
| | | pointValueQueryDTO.setStart(startTime); |
| | | pointValueQueryDTO.setEnd(endTime); |
| | | List<ApiPointValueDTO> trendsDataLList = ConvertUtils.sourceToTarget(dataPointApi.queryPointHistoryValue(pointValueQueryDTO), ApiPointValueDTO.class); |
| | | List<Object[]> newList = new ArrayList<>(); |
| | | trendsDataLList.forEach(item -> { |
| | |
| | | } |
| | | |
| | | preDataView.setPreData(resultOld.getDataView().getPreDataL()); |
| | | |
| | | result.setPreDataView(preDataView); |
| | | return result; |
| | | } |