鞍钢鲅鱼圈能源管控系统后端代码
dongyukun
6 天以前 ee1a24782c037d04739e712478252a5b3f34b3cb
ansteel-biz/src/main/java/com/iailab/module/ansteel/api/service/impl/DataServiceImpl.java
@@ -113,9 +113,9 @@
    @Override
    public List<MainProcessIndexDTO> getIndexList(Map<String, Object> params) {
        List<MainProcessIndexDTO> list = new ArrayList<>();
        if("day".equals(params.get("type"))) {
        if ("day".equals(params.get("type"))) {
            list = ConvertUtils.sourceToTarget(mainProcessIndexDayDao.selectList(new QueryWrapper<>()), MainProcessIndexDTO.class);
        }else if("team".equals(params.get("type"))){
        } else if ("team".equals(params.get("type"))) {
            list = ConvertUtils.sourceToTarget(mainProcessIndexTeamDao.selectList(new QueryWrapper<>()), MainProcessIndexDTO.class);
        }
        if (!CollectionUtils.isEmpty(list)) {
@@ -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;
    }
@@ -252,7 +257,7 @@
    }
    /**
     *  查询原始计划、修正计划数据
     * 查询原始计划、修正计划数据
     */
    @Override
    public Map<String, Object> getPlanDataChart(PlanDataChartReqVO reqVO) {
@@ -438,4 +443,18 @@
        }
        return dataList;
    }
    @Override
    public List<PreDataViewDTO> getPreDataByOutIds(PreDataBarLineReqVO reqVO) {
        PreDataBarLineRespVO preDataBarLineRespVO = mcsApi.getPreDataCharts(reqVO);
        List<PreDataViewDTO> preDataViewDTOList = new ArrayList<>();
        preDataBarLineRespVO.getDataViewList().forEach(item -> {
            PreDataViewDTO dataViewDTO = new PreDataViewDTO();
            dataViewDTO.setCurData(item.getCurData());
            dataViewDTO.setRealData(item.getRealData());
            dataViewDTO.setPredictTime(item.getPredictTime());
            preDataViewDTOList.add(dataViewDTO);
        });
        return preDataViewDTOList;
    }
}