/*
 * @Author: ysh
 * @Date: 2026-07-01 09:46:14
 * @LastEditors: 
 * @LastEditTime: 2026-07-01 10:55:02
 */
package com.ruoyi.oa.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcRepairMapper;
import com.ruoyi.oa.domain.CmcRepair;
import com.ruoyi.oa.service.impl.ICmcRepairService;

/**
 * 维修审批Service业务层处理
 * 
 * @author cmc
 * @date 2026-07-01
 */
@Service
public class CmcRepairServiceImpl implements ICmcRepairService 
{
    @Autowired
    private CmcRepairMapper cmcRepairMapper;

    /**
     * 查询维修审批
     * 
     * @param repairId 维修审批主键
     * @return 维修审批
     */
    @Override
    public CmcRepair selectCmcRepairByRepairId(String repairId)
    {
        return cmcRepairMapper.selectCmcRepairByRepairId(repairId);
    }

    /**
     * 查询维修审批列表
     * 
     * @param cmcRepair 维修审批
     * @return 维修审批
     */
    @Override
    public List<CmcRepair> selectCmcRepairList(CmcRepair cmcRepair)
    {
        return cmcRepairMapper.selectCmcRepairList(cmcRepair);
    }

    /**
     * 新增维修审批
     * 
     * @param cmcRepair 维修审批
     * @return 结果
     */
    @Override
    public int insertCmcRepair(CmcRepair cmcRepair)
    {
        return cmcRepairMapper.insertCmcRepair(cmcRepair);
    }

    /**
     * 修改维修审批
     * 
     * @param cmcRepair 维修审批
     * @return 结果
     */
    @Override
    public int updateCmcRepair(CmcRepair cmcRepair)
    {
        return cmcRepairMapper.updateCmcRepair(cmcRepair);
    }

    /**
     * 批量删除维修审批
     * 
     * @param repairIds 需要删除的维修审批主键
     * @return 结果
     */
    @Override
    public int deleteCmcRepairByRepairIds(String[] repairIds)
    {
        return cmcRepairMapper.deleteCmcRepairByRepairIds(repairIds);
    }

    /**
     * 删除维修审批信息
     * 
     * @param repairId 维修审批主键
     * @return 结果
     */
    @Override
    public int deleteCmcRepairByRepairId(String repairId)
    {
        return cmcRepairMapper.deleteCmcRepairByRepairId(repairId);
    }

    @Override
    public Integer selectMinApplyYear()
    {
        return cmcRepairMapper.selectMinApplyYear();
    }
}
