package com.hdkj.lt.bf.controller;

import com.hdkj.lt.bf.entity.dto.LineSwitchSectionRequest;
import com.hdkj.lt.bf.entity.vo.FhzgDistLineSwitchSectionVO;
import com.hdkj.lt.bf.service.FhzgDistLineSwitchSectionService;
import com.hdkj.hussar.ApiResponse;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author rj
 * @date 2025/7/2 8:53
 * @description
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/lineSwitchSection")
@Slf4j
public class LineSwitchSectionController {

    private final FhzgDistLineSwitchSectionService fhzgDistLineSwitchSectionService;

    @PostMapping("/getLineSwitchSection")
    @ApiOperation(value = "缩略图开关段用户数、配变数、附件、用户列表查询")
    public ApiResponse<List<FhzgDistLineSwitchSectionVO>> getLineSwitchSection(@RequestBody LineSwitchSectionRequest lineRateCapacityDTO) {
        List<FhzgDistLineSwitchSectionVO> result = fhzgDistLineSwitchSectionService.getLineSwitchSection(lineRateCapacityDTO);
        return ApiResponse.success(result);
    }
}
