package com.fjhx.mes.controller.work;

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

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

    @Autowired
    private WorkOrderProductionProcessesService workOrderProductionProcessesService;

    /**
     * 工单工序明细
     */
    @PostMapping("/detail")
    public WorkOrderVo list(@RequestBody WorkOrderProductionProcesses dto) {
        return workOrderProductionProcessesService.detail(dto);
    }

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

}
