package com.nantian.cloud.dbcapp.controller;


import com.nantian.cloud.dbcapp.dto.ResponseBo;
import com.nantian.cloud.dbcapp.service.DictEnergyTypeService;
import com.nantian.sc.cloud.common.core.util.R;
import com.nantian.sc.cloud.common.log.annotation.SysLog;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 能源品种编码、计量单位及精度 前端控制器
 * </p>
 *
 * @author suixin
 * @since 2022-05-09
 */
@RestController
@RequestMapping("/dictEnergyType")
public class DictEnergyTypeController {

    @Autowired
    private DictEnergyTypeService dictEnergyTypeService;

    @GetMapping("/getList")
    @SysLog("字典表-查询能源类型及能源种类列表")
    @ApiOperation(value = "查询能源类型及能源种类列表", notes = "查询能源类型及能源种类列表")
    @ApiImplicitParam(name = "epc", value = "企业信用编码", required = true, dataType = "string", paramType = "path")
    public R getEnergyTypeList(String epc){
        List<ResponseBo> responseBoList = dictEnergyTypeService.getEnergyTypeList(epc);
        return R.ok(responseBoList,"查询成功");
    }
}

