| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | HistoryFiveMinutelyService historyFiveMinutelyService; |
| | | @Autowired |
| | | private HistoryAqiService historyAqiService; |
| | | |
| | | /** |
| | | * @Description: 查询组织区域对应的设备以及对应因子的五分钟数据 |
| | |
| | | @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); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |