package com.goldenwater.slgc.controller.proxy;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.goldenwater.common.core.controller.BaseController;
import com.goldenwater.common.core.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;

@Tag(name = "19. 预警管理")
@RestController
@RequestMapping("/slgc/earlywarning")
public class EarlyWarningController extends BaseController {

    private static final String API = "http://10.8.11.110:20080/outApi";

    @Operation(summary = "19.01 查询预警列表")
    @GetMapping("/list")
    public AjaxResult list() {
        return success(ProxyHelper.fetchJson(API + "/getStation"));
    }

    @Operation(summary = "19.02 查询预警历史")
    @GetMapping("/history")
    public AjaxResult history() {
        return success(ProxyHelper.fetchJson(API + "/swflow/listForTable"));
    }
}
