package com.jiayue.ipfcst.dataexchange.controller;

import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
import com.jiayue.ipfcst.dataexchange.service.equipmentstatusdata.WindTowerStatusDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("windTowerStatusData")
public class WindTowerStatusDataController {

  @Autowired
  WindTowerStatusDataService windTowerStatusDataService;


  /**
   * 获取测风塔数据是否是异常的数据
   *
   * @return {@link ResponseVO}
   */
  @RequestMapping("/isAbnormal")
  public Map<String,Object> isAbnormal(){
    Map<String,Object> map = new HashMap<>();
    Boolean isAbnormalData = windTowerStatusDataService.getIsAbnormalData();
    String isAbnormalInfo = windTowerStatusDataService.getIsAbnormalInfo();
    map.put("isAbnormalData",isAbnormalData);
    map.put("isAbnormalInfo",isAbnormalInfo);
    return map;
  }
}
