package vip.xiaonuo.production.controller;


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.ProductionReceive;
import vip.xiaonuo.production.entity.vo.ProductionPlanVo;
import vip.xiaonuo.production.param.ProductionPlanParam;
import vip.xiaonuo.production.param.ProductionReceiveParam;
import vip.xiaonuo.production.service.IProductionWorkstopPlanService;

import java.util.List;

/**
 * <p>
 * 生成管控车间计划 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-12
 */
@RestController
@RequestMapping("/production-workstop-plan")
@Api(tags = "生成管控车间计划")
@ApiSupport(author = "wang", order = 1)
@Validated
public class ProductionWorkstopPlanController {

    @Autowired
    private IProductionWorkstopPlanService workstopPlanService;

    @PostMapping("/production-workstop-plan/getList")
    @ApiOperationSupport(order = 1)
    @ApiOperation("生成管控车间计划列表")
    public CommonResult<List<ProductionPlanVo>> getList(@RequestBody ProductionPlanParam planParam) {
        return CommonResult.data(workstopPlanService.getList(planParam));
    }
}
