package com.cpp.web.controller.configManager;

import com.cpp.common.core.domain.R;
import com.cpp.web.domain.datafactory.BaseParsing;
import com.cpp.web.service.datafactory.BaseParsingService;
import com.cpp.web.service.station.ElectricFieldService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequiredArgsConstructor
@RequestMapping("/parsingInfo")
public class ParsingInfoController {

    private final ElectricFieldService electricFieldService;

    private final BaseParsingService baseParsingService;

    @ApiOperation(value = "获取场站", notes = "获取场站")
    @GetMapping("/getElectricField")
    public R getElectricField(){
        return R.ok(electricFieldService.list());
    }

    @ApiOperation(value = "获取解析文件类型", notes = "获取解析文件类型")
    @GetMapping("/getFileTypes")
    public R getFileTypes(){
        return R.ok(baseParsingService.getFileTypes());
    }
}
