package com.jjt.emp.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import com.jjt.emp.mapper.TwinEmpDetailMapper;
import com.jjt.emp.domain.TwinEmpDetail;
import com.jjt.emp.service.ITwinEmpDetailService;
import javax.annotation.Resource;

/**
 * 员工排班明细Service业务层处理
 *
 * @author wukai
 * @date 2025-01-18
 */
@Service
public class TwinEmpDetailServiceImpl implements ITwinEmpDetailService {
    @Resource
    private TwinEmpDetailMapper twinEmpDetailMapper;

    /**
     * 查询员工排班明细
     *
     * @param detailId 员工排班明细主键
     * @return 员工排班明细
     */
    @Override
    public TwinEmpDetail selectTwinEmpDetailByDetailId(Long detailId) {
        return twinEmpDetailMapper.selectTwinEmpDetailByDetailId(detailId);
    }

    /**
     * 查询员工排班明细列表
     *
     * @param twinEmpDetail 员工排班明细
     * @return 员工排班明细
     */
    @Override
    public List<TwinEmpDetail> selectTwinEmpDetailList(TwinEmpDetail twinEmpDetail) {
        return twinEmpDetailMapper.selectTwinEmpDetailList(twinEmpDetail);
    }

    /**
     * 新增员工排班明细
     *
     * @param twinEmpDetail 员工排班明细
     * @return 结果
     */
    @Override
    public int insertTwinEmpDetail(TwinEmpDetail twinEmpDetail) {
            return twinEmpDetailMapper.insertTwinEmpDetail(twinEmpDetail);
    }

    /**
     * 修改员工排班明细
     *
     * @param twinEmpDetail 员工排班明细
     * @return 结果
     */
    @Override
    public int updateTwinEmpDetail(TwinEmpDetail twinEmpDetail) {
        return twinEmpDetailMapper.updateTwinEmpDetail(twinEmpDetail);
    }

    /**
     * 批量删除员工排班明细
     *
     * @param detailIds 需要删除的员工排班明细主键
     * @return 结果
     */
    @Override
    public int deleteTwinEmpDetailByDetailIds(Long[] detailIds) {
        return twinEmpDetailMapper.deleteTwinEmpDetailByDetailIds(detailIds);
    }

    /**
     * 删除员工排班明细信息
     *
     * @param detailId 员工排班明细主键
     * @return 结果
     */
    @Override
    public int deleteTwinEmpDetailByDetailId(Long detailId) {
        return twinEmpDetailMapper.deleteTwinEmpDetailByDetailId(detailId);
    }
}
