package com.hdkj.lt.bf.controller;

import com.hdkj.lt.core.mvc.BaseController;
import com.hdkj.lt.core.sys.service.SwitchProtectionSettingsService;
import com.hdkj.hussar.ApiResponse;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author luorui
 * @date 2025/6/16 14:26
 *
 * 开关保护定值配置
 *
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/switchProtectionSettingsController")
public class FhzgSwitchProtectionSettingsController extends BaseController {

    private final SwitchProtectionSettingsService fhzgSwitchProtectionSettingsService;


    /**
     * 开关保护定值导入
     * @author luorui
     * @date 2025/6/16 14:31
     *
     **/
    @PostMapping("/importData")
    @ApiOperation(value = "开关保护定值导入")
    public ApiResponse<String> importData(@RequestParam("file")MultipartFile file) {

        fhzgSwitchProtectionSettingsService.importData(file);
        return ApiResponse.success("导入完成");
    }

}
