package com.fjhx.mes.controller.work;

import com.fjhx.mes.entity.work.po.WorkOrderBom;
import org.springframework.web.bind.annotation.*;
import com.fjhx.mes.entity.work.vo.WorkOrderBomVo;
import com.fjhx.mes.entity.work.dto.WorkOrderBomDto;
import com.fjhx.mes.service.work.WorkOrderBomService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * <p>
 * 工单bom 前端控制器
 * </p>
 *
 * @author 
 * @since 2023-05-17
 */
@RestController
@RequestMapping("/workOrderBom")
public class WorkOrderBomController {

    @Autowired
    private WorkOrderBomService workOrderBomService;

    /**
     * 工单bom列表
     */
    @PostMapping("/list")
    public List<WorkOrderBomVo> list(@RequestBody WorkOrderBom dto) {
        return workOrderBomService.getList(dto);
    }

    /**
     * 工单bom编辑
     */
    @PostMapping("/edit")
    public void edit(@RequestBody WorkOrderBomDto workOrderBomDto) {
        workOrderBomService.edit(workOrderBomDto);
    }

}
