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.ProductionCheck;
import vip.xiaonuo.production.entity.ProductionConsume;
import vip.xiaonuo.production.param.ProductionCheckParam;
import vip.xiaonuo.production.param.ProductionConsumeParam;
import vip.xiaonuo.production.service.IProductionConsumeService;

/**
 * <p>
 * 生产管控单耗 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-12
 */
@RestController
@Api(tags = "生产管控单耗")
@ApiSupport(author = "wang", order = 1)
@Validated
public class ProductionConsumeController {

    @Autowired
    private IProductionConsumeService consumeService;

    @PostMapping("/production-consume/getList")
    @ApiOperationSupport(order = 1)
    @ApiOperation("生产管控单耗列表")
    public CommonResult<Page<ProductionConsume>> getList(@RequestBody ProductionConsumeParam consumeParam) {
        return CommonResult.data(consumeService.getList(consumeParam));
    }
}
