鞍钢鲅鱼圈能源管控系统后端代码
潘志宝
8 天以前 2cef9ed5c0e582e415274bc1bf2f1b00c9426915
ansteel-biz/src/main/java/com/iailab/module/ansteel/api/service/impl/DataServiceImpl.java
@@ -188,9 +188,12 @@
        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 -> {
@@ -201,9 +204,12 @@
            });
            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 -> {
@@ -216,7 +222,6 @@
        }
        preDataView.setPreData(resultOld.getDataView().getPreDataL());
        result.setPreDataView(preDataView);
        return result;
    }