package com.ruoyi.oa.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcDeclareMapper;
import com.ruoyi.oa.domain.CmcDeclare;
import com.ruoyi.oa.service.ICmcDeclareService;

/**
 * 工作填报Service业务层处理
 * 
 * @author cmc
 * @date 2024-08-14
 */
@Service
public class CmcDeclareServiceImpl implements ICmcDeclareService 
{
    @Autowired
    private CmcDeclareMapper cmcDeclareMapper;

    /**
     * 查询工作填报
     * 
     * @param formId 工作填报主键
     * @return 工作填报
     */
    @Override
    public CmcDeclare selectCmcDeclareByFormId(String formId)
    {
        return cmcDeclareMapper.selectCmcDeclareByFormId(formId);
    }

    /**
     * 查询工作填报列表
     * 
     * @param cmcDeclare 工作填报
     * @return 工作填报
     */
    @Override
    public List<CmcDeclare> selectCmcDeclareList(CmcDeclare cmcDeclare)
    {
        return cmcDeclareMapper.selectCmcDeclareList(cmcDeclare);
    }

    /**
     * 新增工作填报
     * 
     * @param cmcDeclare 工作填报
     * @return 结果
     */
    @Override
    public int insertCmcDeclare(CmcDeclare cmcDeclare)
    {
        return cmcDeclareMapper.insertCmcDeclare(cmcDeclare);
    }

    /**
     * 修改工作填报
     * 
     * @param cmcDeclare 工作填报
     * @return 结果
     */
    @Override
    public int updateCmcDeclare(CmcDeclare cmcDeclare)
    {
        return cmcDeclareMapper.updateCmcDeclare(cmcDeclare);
    }

    /**
     * 批量删除工作填报
     * 
     * @param formIds 需要删除的工作填报主键
     * @return 结果
     */
    @Override
    public int deleteCmcDeclareByFormIds(String[] formIds)
    {
        return cmcDeclareMapper.deleteCmcDeclareByFormIds(formIds);
    }

    /**
     * 删除工作填报信息
     * 
     * @param formId 工作填报主键
     * @return 结果
     */
    @Override
    public int deleteCmcDeclareByFormId(String formId)
    {
        return cmcDeclareMapper.deleteCmcDeclareByFormId(formId);
    }
}
