package com.ruoyi.baseinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.baseinfo.mapper.BaseShiftmasterInfoMapper;
import com.ruoyi.baseinfo.domain.BaseShiftmasterInfo;
import com.ruoyi.baseinfo.service.IBaseShiftmasterInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 交接班基础信息Service业务层处理
 * 
 * @author CaesarBao
 * @date 2020-10-28
 */
@Service
public class BaseShiftmasterInfoServiceImpl implements IBaseShiftmasterInfoService 
{
    @Autowired
    private BaseShiftmasterInfoMapper baseShiftmasterInfoMapper;

    /**
     * 查询交接班基础信息
     * 
     * @param shiftNo 交接班基础信息ID
     * @return 交接班基础信息
     */
    @Override
    public BaseShiftmasterInfo selectBaseShiftmasterInfoById(String shiftNo)
    {
        return baseShiftmasterInfoMapper.selectBaseShiftmasterInfoById(shiftNo);
    }

    /**
     * 查询交接班基础信息列表
     * 
     * @param baseShiftmasterInfo 交接班基础信息
     * @return 交接班基础信息
     */
    @Override
    public List<BaseShiftmasterInfo> selectBaseShiftmasterInfoList(BaseShiftmasterInfo baseShiftmasterInfo)
    {
        return baseShiftmasterInfoMapper.selectBaseShiftmasterInfoList(baseShiftmasterInfo);
    }

    /**
     * 新增交接班基础信息
     * 
     * @param baseShiftmasterInfo 交接班基础信息
     * @return 结果
     */
    @Override
    public int insertBaseShiftmasterInfo(BaseShiftmasterInfo baseShiftmasterInfo)
    {
        baseShiftmasterInfo.setCreateTime(DateUtils.getNowDate());
        return baseShiftmasterInfoMapper.insertBaseShiftmasterInfo(baseShiftmasterInfo);
    }

    /**
     * 修改交接班基础信息
     * 
     * @param baseShiftmasterInfo 交接班基础信息
     * @return 结果
     */
    @Override
    public int updateBaseShiftmasterInfo(BaseShiftmasterInfo baseShiftmasterInfo)
    {
        baseShiftmasterInfo.setUpdateTime(DateUtils.getNowDate());
        return baseShiftmasterInfoMapper.updateBaseShiftmasterInfo(baseShiftmasterInfo);
    }

    /**
     * 删除交接班基础信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBaseShiftmasterInfoByIds(String ids)
    {
        return baseShiftmasterInfoMapper.deleteBaseShiftmasterInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除交接班基础信息信息
     * 
     * @param shiftNo 交接班基础信息ID
     * @return 结果
     */
    @Override
    public int deleteBaseShiftmasterInfoById(String shiftNo)
    {
        return baseShiftmasterInfoMapper.deleteBaseShiftmasterInfoById(shiftNo);
    }
}
