package com.njcn.cssystem.controller.zutai;


import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.cssystem.pojo.vo.EleEpdTreeVO;
import com.njcn.cssystem.service.IEleEpdPqdService;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xuyang
 * @since 2023-05-24
 */
@Slf4j
@RestController
@RequestMapping("/csDictData")
@Api(tags = "指标数据字典")
@AllArgsConstructor
public class EleEpdPqdController extends BaseController {

    private final IEleEpdPqdService eleEpdPqdService;

    /**
     * 获取电能质量指标模板树
     * @author cdf
     * @date 2022/8/16
     */
    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @GetMapping("/eleEpdChooseTree")
    @ApiOperation("获取电能质量指标模板树")
    public HttpResult<List<EleEpdTreeVO>> eleEpdChooseTree(){
        String methodDescribe = getMethodDescribe("eleEpdChooseTree");
        List<EleEpdTreeVO> res = eleEpdPqdService.eleEpdChooseTree();
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
    }

}

