package vip.xiaonuo.production.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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 vip.xiaonuo.common.pojo.CommonResult;
import vip.xiaonuo.production.entity.ProductionConsume;
import vip.xiaonuo.production.entity.ProductionEnergy;
import vip.xiaonuo.production.param.ProductionConsumeParam;
import vip.xiaonuo.production.param.ProductionEnergyParam;
import vip.xiaonuo.production.service.IProductionEnergyService;

import java.util.List;

/**
 * <p>
 * 生成管控能耗分析 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-12
 */
@RestController
@RequestMapping("/production-energy")
@Api(tags = "生成管控能耗分析")
@ApiSupport(author = "wang", order = 1)
@Validated
public class ProductionEnergyController {

    @Autowired
    private IProductionEnergyService energyService;


    @PostMapping("/production-energy/getList")
    @ApiOperationSupport(order = 1)
    @ApiOperation("生成管控能耗分析列表")
    public CommonResult<List<ProductionEnergy>> getList(@RequestBody ProductionEnergyParam energyParam) {
        return CommonResult.data(energyService.getList(energyParam));
    }
}
