| | |
| | | package cn.gistack.nky.controller; |
| | | |
| | | import cn.gistack.nky.entity.ArimaPredict; |
| | | import cn.gistack.nky.entity.HstPredict; |
| | | import cn.gistack.nky.service.IArimaPredictService; |
| | | import cn.gistack.nky.service.IHstPredictService; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | @RequestMapping("/arimaPredict/arimaPredict") |
| | | public class ArimaPredictController extends BladeController { |
| | | |
| | | private final IArimaPredictService arimaPredictService; |
| | | private final IHstPredictService hstPredictService; |
| | | |
| | | /** |
| | | * 获取预测数据 |
| | | * @param resCd 水库id |
| | | * @param type 1:渗压,2:渗流,3:位移 |
| | | * @param predictFlag 预测方式 |
| | | * @return |
| | | */ |
| | | @GetMapping("/futureData") |
| | | public R futureData(String resCd,String type,String predictFlag){ |
| | | if (predictFlag.equals("Arima")){ |
| | | List<ArimaPredict> list = arimaPredictService.getFutureData(resCd,type); |
| | | return R.data(list); |
| | | }else if (predictFlag.equals("Hst")){ |
| | | List<HstPredict> list = hstPredictService.getFutureData(resCd,type); |
| | | return R.data(list); |
| | | }else { |
| | | return R.fail("无该预测方式"); |
| | | } |
| | | } |
| | | |
| | | } |