package com.gyee.runeconomy.controller.WindDirection; import com.alibaba.fastjson.JSONObject; import com.gyee.runeconomy.dto.result.JsonResult; import com.gyee.runeconomy.dto.result.ResultCode; import com.gyee.runeconomy.service.WindDirection.WindDirectionService; import com.gyee.runeconomy.service.WindDirection.WindMachineService; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.text.ParseException; @RestController @CrossOrigin @RequestMapping("/winddirecton") public class WindDirectionController { @Resource private WindDirectionService windDirectionService; @Resource private WindMachineService windMachineService; /*** * 风速风向频次玫瑰图 * @return */ @GetMapping("/roses") public JSONObject fsRoses(String wtid,String kssj,String jssj) throws Exception { Object o = windDirectionService.fxRoses(wtid, kssj, jssj); return JsonResult.successData(ResultCode.SUCCESS, o); } /** * 对风偏差分析 * @return */ @GetMapping("/deviation/ratio") public JSONObject fsDeviationRatio(String wtid,String kssj,String jssj) throws ParseException { Object o = windDirectionService.windDeviationRatio(wtid, kssj, jssj); return JsonResult.successData(ResultCode.SUCCESS, o); } /** * 单机偏差分析 * @return */ @GetMapping("/machine") public JSONObject Deviationmachine(String wpid) throws Exception { Object o = windMachineService.machine(wpid); return JsonResult.successData(ResultCode.SUCCESS, o); } }