package com.hw.mes.service.impl;

import java.util.List;
import com.hw.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.mes.mapper.MesBaseRouteProcessMapper;
import com.hw.mes.domain.MesBaseRouteProcess;
import com.hw.mes.service.IMesBaseRouteProcessService;

/**
 * 工艺路线组成信息Service业务层处理
 * 
 * @author Yinq
 * @date 2024-01-25
 */
@Service
public class MesBaseRouteProcessServiceImpl implements IMesBaseRouteProcessService 
{
    @Autowired
    private MesBaseRouteProcessMapper mesBaseRouteProcessMapper;

    /**
     * 查询工艺路线组成信息
     * 
     * @param routeProcessId 工艺路线组成信息主键
     * @return 工艺路线组成信息
     */
    @Override
    public MesBaseRouteProcess selectMesBaseRouteProcessByRouteProcessId(Long routeProcessId)
    {
        return mesBaseRouteProcessMapper.selectMesBaseRouteProcessByRouteProcessId(routeProcessId);
    }

    /**
     * 查询工艺路线组成信息列表
     * 
     * @param mesBaseRouteProcess 工艺路线组成信息
     * @return 工艺路线组成信息
     */
    @Override
    public List<MesBaseRouteProcess> selectMesBaseRouteProcessList(MesBaseRouteProcess mesBaseRouteProcess)
    {
        return mesBaseRouteProcessMapper.selectMesBaseRouteProcessList(mesBaseRouteProcess);
    }

    /**
     * 新增工艺路线组成信息
     * 
     * @param mesBaseRouteProcess 工艺路线组成信息
     * @return 结果
     */
    @Override
    public int insertMesBaseRouteProcess(MesBaseRouteProcess mesBaseRouteProcess)
    {
        mesBaseRouteProcess.setCreateTime(DateUtils.getNowDate());
        return mesBaseRouteProcessMapper.insertMesBaseRouteProcess(mesBaseRouteProcess);
    }

    /**
     * 修改工艺路线组成信息
     * 
     * @param mesBaseRouteProcess 工艺路线组成信息
     * @return 结果
     */
    @Override
    public int updateMesBaseRouteProcess(MesBaseRouteProcess mesBaseRouteProcess)
    {
        mesBaseRouteProcess.setUpdateTime(DateUtils.getNowDate());
        return mesBaseRouteProcessMapper.updateMesBaseRouteProcess(mesBaseRouteProcess);
    }

    /**
     * 批量删除工艺路线组成信息
     * 
     * @param routeProcessIds 需要删除的工艺路线组成信息主键
     * @return 结果
     */
    @Override
    public int deleteMesBaseRouteProcessByRouteProcessIds(Long[] routeProcessIds)
    {
        return mesBaseRouteProcessMapper.deleteMesBaseRouteProcessByRouteProcessIds(routeProcessIds);
    }

    /**
     * 删除工艺路线组成信息信息
     * 
     * @param routeProcessId 工艺路线组成信息主键
     * @return 结果
     */
    @Override
    public int deleteMesBaseRouteProcessByRouteProcessId(Long routeProcessId)
    {
        return mesBaseRouteProcessMapper.deleteMesBaseRouteProcessByRouteProcessId(routeProcessId);
    }
}
