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.BaseShiftdetailInfoMapper;
import com.ruoyi.baseinfo.domain.BaseShiftdetailInfo;
import com.ruoyi.baseinfo.service.IBaseShiftdetailInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 交接班详情信息Service业务层处理
 * 
 * @author CaesarBao
 * @date 2020-10-28
 */
@Service
public class BaseShiftdetailInfoServiceImpl implements IBaseShiftdetailInfoService 
{
    @Autowired
    private BaseShiftdetailInfoMapper baseShiftdetailInfoMapper;

    /**
     * 查询交接班详情信息
     * 
     * @param shiftNo 交接班详情信息ID
     * @return 交接班详情信息
     */
    @Override
    public BaseShiftdetailInfo selectBaseShiftdetailInfoById(String shiftNo)
    {
        return baseShiftdetailInfoMapper.selectBaseShiftdetailInfoById(shiftNo);
    }

    /**
     * 查询交接班详情信息列表
     * 
     * @param baseShiftdetailInfo 交接班详情信息
     * @return 交接班详情信息
     */
    @Override
    public List<BaseShiftdetailInfo> selectBaseShiftdetailInfoList(BaseShiftdetailInfo baseShiftdetailInfo)
    {
        return baseShiftdetailInfoMapper.selectBaseShiftdetailInfoList(baseShiftdetailInfo);
    }

    /**
     * 新增交接班详情信息
     * 
     * @param baseShiftdetailInfo 交接班详情信息
     * @return 结果
     */
    @Override
    public int insertBaseShiftdetailInfo(BaseShiftdetailInfo baseShiftdetailInfo)
    {
        baseShiftdetailInfo.setCreateTime(DateUtils.getNowDate());
        return baseShiftdetailInfoMapper.insertBaseShiftdetailInfo(baseShiftdetailInfo);
    }

    /**
     * 修改交接班详情信息
     * 
     * @param baseShiftdetailInfo 交接班详情信息
     * @return 结果
     */
    @Override
    public int updateBaseShiftdetailInfo(BaseShiftdetailInfo baseShiftdetailInfo)
    {
        baseShiftdetailInfo.setUpdateTime(DateUtils.getNowDate());
        return baseShiftdetailInfoMapper.updateBaseShiftdetailInfo(baseShiftdetailInfo);
    }

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

    /**
     * 删除交接班详情信息信息
     * 
     * @param shiftNo 交接班详情信息ID
     * @return 结果
     */
    @Override
    public int deleteBaseShiftdetailInfoById(String shiftNo)
    {
        return baseShiftdetailInfoMapper.deleteBaseShiftdetailInfoById(shiftNo);
    }
}
