package cn.ezhizao.project.business.service.impl;

import cn.ezhizao.project.business.domain.BizTechnologicalProcessDetail;
import cn.ezhizao.project.business.mapper.BizTechnologicalProcessDetailMapper;
import cn.ezhizao.project.business.service.IBizTechnologicalProcessDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 工艺从表Service业务层处理
 *
 * @author ezhizao
 * @date 2023-11-14
 */
@Service
public class BizTechnologicalProcessDetailServiceImpl  extends ServiceImpl<BizTechnologicalProcessDetailMapper, BizTechnologicalProcessDetail> implements IBizTechnologicalProcessDetailService
{
    @Resource
    private BizTechnologicalProcessDetailMapper bizTechnologicalProcessDetailMapper;

    /**
     * 查询工艺从表列表
     *
     * @param bizTechnologicalProcessDetail 工艺从表
     * @return 工艺从表
     */
    @Override
    public List<BizTechnologicalProcessDetail> getList(BizTechnologicalProcessDetail bizTechnologicalProcessDetail)
    {
        return bizTechnologicalProcessDetailMapper.getList(bizTechnologicalProcessDetail);
    }

    /**
     * 物理删除
     * @param bizTechnologicalProcessDetail
     * @return 删除结果
     */
    @Override
    public int physicalDelete(BizTechnologicalProcessDetail bizTechnologicalProcessDetail){ return bizTechnologicalProcessDetailMapper.physicalDelete(bizTechnologicalProcessDetail); }

    @Override
    public BizTechnologicalProcessDetail getById(Long id) {
        return bizTechnologicalProcessDetailMapper.getById(id);
    }

    ;


    /**
     * 根据技术工序id获取工艺从表
     *
     * @param technicalProcessId 工艺从表
     * @return 工艺从表集合
     */
    @Override
    public List<BizTechnologicalProcessDetail> getProcessDetailsByTechnicalProcessId(Long technicalProcessId) {
        return bizTechnologicalProcessDetailMapper.getProcessDetailsByTechnicalProcessId(technicalProcessId);
    }
}
