package com.hdkj.lt.bf.controller;

import com.hdkj.lt.bf.entity.vo.FinalStateCheckVO;
import com.hdkj.lt.bf.service.FhzgFaultProcessStateCheckService;
import com.hdkj.lt.core.bizms.modle.dto.SchemeQueryDTO;
import com.hdkj.lt.core.mvc.BaseController;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 停电计划转供方案检查查询
 *
 * @author zhuzhe
 * @since 2025-05-15
 */
@RestController
@RequestMapping("/fhzgFaultProcessStateCheck")
@RequiredArgsConstructor
public class FhzgFaultProcessStateCheckController extends BaseController {

    private final FhzgFaultProcessStateCheckService faultProcessStateCheckService;

    /**
     * 终态校验明细查询
     * @param dto
     * @return
     */
    @PostMapping("/getFinalStateCheckDetail")
    @ApiOperation(value = "终态校验明细查询")
    public ApiResponse<FinalStateCheckVO> getFinalStateCheckDetail(@RequestBody SchemeQueryDTO dto) {
        if (dto == null) {
            return fail("参数不能为空");
        }
        if (dto.getSwitchingId() == null) {
            return fail("开关动作ID不能为空");
        }
        return ApiResponse.success(faultProcessStateCheckService.getFinalStateCheckDetail(dto));
    }

}
