package com.fjhx.mes.controller.work;

import com.fjhx.mes.entity.work.po.WorkOrderProductionProcesses;
import org.springframework.web.bind.annotation.*;
import com.fjhx.mes.entity.work.vo.WorkOrderProductionProcessesVo;
import com.fjhx.mes.entity.work.dto.WorkOrderProductionProcessesDto;
import com.fjhx.mes.service.work.WorkOrderProductionProcessesService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

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

    @Autowired
    private WorkOrderProductionProcessesService workOrderProductionProcessesService;

    /**
     * 工单工序列表
     */
    @PostMapping("/list")
    public List<WorkOrderProductionProcessesVo> list(@RequestBody WorkOrderProductionProcesses dto) {
        return workOrderProductionProcessesService.getList(dto);
    }

    /**
     * 工单工序编辑
     */
    @PostMapping("/edit")
    public void edit(@RequestBody WorkOrderProductionProcessesDto workOrderProductionProcessesDto) {
        workOrderProductionProcessesService.edit(workOrderProductionProcessesDto);
    }

}
