cjl
2025-01-06 27e6bc3df3e39e0d0b147b155a89ad6837ea972b
screen-api/src/main/java/com/moral/api/controller/HistoryFiveMinutelyController.java
@@ -1,10 +1,12 @@
package com.moral.api.controller;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.moral.api.pojo.dto.historyAqi.HistoryAqiDto;
import com.moral.api.pojo.dto.historyFiveMinutely.DeviceAndFiveMinuteDataDTO;
import com.moral.api.pojo.form.historyFiveMinutely.QueryDeviceAndFiveMinuteDataForm;
import com.moral.api.pojo.vo.historyFiveMinutely.DeviceAndFiveMinuteDataVO;
import com.moral.api.pojo.vo.historyFiveMinutely.QueryFiveDataByMacVO;
import com.moral.api.service.HistoryAqiService;
import com.moral.api.service.HistoryFiveMinutelyService;
import com.moral.constant.ResponseCodeEnum;
import com.moral.constant.ResultMessage;
@@ -45,6 +47,8 @@
    @Autowired
    HistoryFiveMinutelyService historyFiveMinutelyService;
    @Autowired
    private HistoryAqiService historyAqiService;
    /**
    * @Description: 查询组织区域对应的设备以及对应因子的五分钟数据
@@ -94,8 +98,22 @@
                                            @RequestParam @ApiParam(value = "chooseTime",name = "选取历史数据") String chooseTime,
                                            @RequestParam @ApiParam(value = "time",name = "时间") String time){
        QueryFiveDataByMacVO queryFiveDataByMacVO = historyFiveMinutelyService.queryFiveDataByMac(mac, chooseTime, time);
        return ResultMessage.ok(ObjectUtils.isEmpty(queryFiveDataByMacVO)?"0":queryFiveDataByMacVO);
        if (ObjectUtils.isEmpty(queryFiveDataByMacVO)){
            return ResultMessage.fail(ResponseCodeEnum.TARGET_IS_NULL.getCode(), ResponseCodeEnum.TARGET_IS_NULL.getMsg());
        }
        return  ResultMessage.ok(queryFiveDataByMacVO);
    }
    @GetMapping("historyAqi")
    @ApiOperation("显示国控站设备")
    public ResultMessage historyAqiQuery(String guid){
        List<HistoryAqiDto> reveal = historyAqiService.reveal(guid);
        return ResultMessage.ok(reveal);
    }
}