package com.ruoyi.system.service.impl.projectV2;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.projectV2.XmConstructionRate;
import com.ruoyi.system.mapper.projectV2.XmConstructionRateMapper;
import com.ruoyi.system.service.projectV2.IXmConstructionRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 项目施工进度Service业务层处理
 * 
 * @author boman
 * @date 2023-02-23
 */
@Service
public class XmConstructionRateServiceImpl implements IXmConstructionRateService
{
    @Autowired
    private XmConstructionRateMapper xmConstructionRateMapper;

    /**
     * 查询项目施工进度
     * 
     * @param id 项目施工进度ID
     * @return 项目施工进度
     */
    @Override
    public XmConstructionRate selectXmConstructionRateById(Long id)
    {
        return xmConstructionRateMapper.selectXmConstructionRateById(id);
    }

    /**
     * 查询项目施工进度列表
     * 
     * @param xmConstructionRate 项目施工进度
     * @return 项目施工进度
     */
    @Override
    public List<XmConstructionRate> selectXmConstructionRateList(XmConstructionRate xmConstructionRate)
    {
        return xmConstructionRateMapper.selectXmConstructionRateList(xmConstructionRate);
    }

    /**
     * 新增项目施工进度
     * 
     * @param xmConstructionRate 项目施工进度
     * @return 结果
     */
    @Override
    public int insertXmConstructionRate(XmConstructionRate xmConstructionRate)
    {
        xmConstructionRate.setCreateTime(DateUtils.getNowDate());
        return xmConstructionRateMapper.insertXmConstructionRate(xmConstructionRate);
    }

    /**
     * 修改项目施工进度
     * 
     * @param xmConstructionRate 项目施工进度
     * @return 结果
     */
    @Override
    public int updateXmConstructionRate(XmConstructionRate xmConstructionRate)
    {
        xmConstructionRate.setUpdateTime(DateUtils.getNowDate());
        return xmConstructionRateMapper.updateXmConstructionRate(xmConstructionRate);
    }

    /**
     * 批量删除项目施工进度
     * 
     * @param ids 需要删除的项目施工进度ID
     * @return 结果
     */
    @Override
    public int deleteXmConstructionRateByIds(Long[] ids)
    {
        return xmConstructionRateMapper.deleteXmConstructionRateByIds(ids);
    }

    /**
     * 删除项目施工进度信息
     * 
     * @param id 项目施工进度ID
     * @return 结果
     */
    @Override
    public int deleteXmConstructionRateById(Long id)
    {
        return xmConstructionRateMapper.deleteXmConstructionRateById(id);
    }
}
