package com.ruoyi.oa.service.impl;

import java.util.List;

import com.ruoyi.oa.domain.CmcCheckPrice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcCheckPriceMapper;
import com.ruoyi.oa.service.ICmcCheckPriceService;

/**
 * cmc核算单价Service业务层处理
 * 
 * @author cmc
 * @date 2025-05-14
 */
@Service
public class CmcCheckPriceServiceImpl implements ICmcCheckPriceService 
{
    @Autowired
    private CmcCheckPriceMapper cmcCheckPriceMapper;

    /**
     * 查询cmc核算单价
     * 
     * @param id cmc核算单价主键
     * @return cmc核算单价
     */
    @Override
    public CmcCheckPrice selectCmcCheckPriceById(Long id)
    {
        return cmcCheckPriceMapper.selectCmcCheckPriceById(id);
    }

    /**
     * 查询cmc核算单价列表
     * 
     * @param cmcCheckPrice cmc核算单价
     * @return cmc核算单价
     */
    @Override
    public List<CmcCheckPrice> selectCmcCheckPriceList(CmcCheckPrice cmcCheckPrice)
    {
        return cmcCheckPriceMapper.selectCmcCheckPriceList(cmcCheckPrice);
    }

    /**
     * 根据工作类别查询单价表
     *
     * @param workType 工作类别
     * @return 单价表
     */
    @Override
    public List<CmcCheckPrice> selectCmcCheckPriceByWorkType(String workType) { return cmcCheckPriceMapper.selectCmcCheckPriceByWorkType(workType); }

    /**
     * 根据工作内容查询单价表
     *
     * @param workItem 工作内容
     * @return 单价表
     */
    @Override
    public List<CmcCheckPrice> selectCmcCheckPriceByWorkItem(String workItem) { return cmcCheckPriceMapper.selectCmcCheckPriceByWorkItem(workItem); }

    /**
     * 根据比例等级查询出单位、一般地类、复杂地类
     *
     * @param workItem 工作内容
     * @param subItem 内容细项
     * @param scaleGrade 比例等级
     * @return 单价表
     */
    @Override
    public List<CmcCheckPrice> selectCmcCheckPriceByScaleGrade(String workItem, String subItem, String scaleGrade) { return cmcCheckPriceMapper.selectCmcCheckPriceByScaleGrade(workItem, subItem, scaleGrade); }

    /**
     * 新增cmc核算单价
     * 
     * @param cmcCheckPrice cmc核算单价
     * @return 结果
     */
    @Override
    public int insertCmcCheckPrice(CmcCheckPrice cmcCheckPrice)
    {
        return cmcCheckPriceMapper.insertCmcCheckPrice(cmcCheckPrice);
    }

    /**
     * 修改cmc核算单价
     * 
     * @param cmcCheckPrice cmc核算单价
     * @return 结果
     */
    @Override
    public int updateCmcCheckPrice(CmcCheckPrice cmcCheckPrice)
    {
        return cmcCheckPriceMapper.updateCmcCheckPrice(cmcCheckPrice);
    }

    /**
     * 批量删除cmc核算单价
     * 
     * @param ids 需要删除的cmc核算单价主键
     * @return 结果
     */
    @Override
    public int deleteCmcCheckPriceByIds(Long[] ids)
    {
        return cmcCheckPriceMapper.deleteCmcCheckPriceByIds(ids);
    }

    /**
     * 删除cmc核算单价信息
     * 
     * @param id cmc核算单价主键
     * @return 结果
     */
    @Override
    public int deleteCmcCheckPriceById(Long id)
    {
        return cmcCheckPriceMapper.deleteCmcCheckPriceById(id);
    }
}
