package cn.cslg.report.controller;

import cn.cslg.report.common.core.base.Constants;
import cn.cslg.report.common.model.vo.CompareScenariosVO;
import cn.cslg.report.service.business.CompareScenariosService;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;


@Tag(name = "对比方案")
@RestController
@RequestMapping(Constants.REPORT_API + "/CompareScenariosController")
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class CompareScenariosController {
    private final CompareScenariosService compareScenariosService;

    @PostMapping("/addCompareScenarios")
    @Operation(summary = "增加对比方案")
    public String add(@RequestBody CompareScenariosVO compareScenariosVO) throws IOException{
        return compareScenariosService.add(compareScenariosVO);
    }
    @GetMapping("/select")
    @Operation(summary = "查询对比方案")
    public String select(int reportID)throws IOException{
        return compareScenariosService.select(reportID);
    }


}
