package com.fjhx.mes.controller.production;

import com.fjhx.mes.entity.production.dto.ProductionTaskDetailRecordDto;
import com.fjhx.mes.entity.production.po.ProductionTaskDetailRecord;
import com.fjhx.mes.service.production.ProductionTaskDetailRecordService;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.List;


/**
 * <p>
 * 任务明细记录 前端控制器
 * </p>
 *
 * @author
 * @since 2023-05-18
 */
@RestController
@RequestMapping("/productionTaskDetailRecord")
public class ProductionTaskDetailRecordController {

    @Autowired
    private ProductionTaskDetailRecordService productionTaskDetailRecordService;

    /**
     * 根据任务明细id 或者任务工序操作记录
     */
    @PostMapping("/listByTaskDetailId")
    List<ProductionTaskDetailRecord> listByTaskDetailId(@RequestBody ProductionTaskDetailRecordDto dto) {
        return productionTaskDetailRecordService.listByTaskDetailId(dto.getId());
    }

}
