package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TCkOrderdetailMapper;
import com.ruoyi.business.domain.TCkOrderdetail;
import com.ruoyi.business.service.ITCkOrderdetailService;
import com.ruoyi.common.core.text.Convert;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 出库物料明细Service业务层处理
 * 
 * @author wms
 * @date 2022-06-11
 */
@Service
public class TCkOrderdetailServiceImpl extends ServiceImpl<TCkOrderdetailMapper, TCkOrderdetail> implements ITCkOrderdetailService
{
    @Autowired
    private TCkOrderdetailMapper tCkOrderdetailMapper;

    /**
     * 查询出库物料明细
     * 
     * @param ckId 出库物料明细主键
     * @return 出库物料明细
     */
    @Override
    public TCkOrderdetail selectTCkOrderdetailByCkId(String ckId)
    {
        return tCkOrderdetailMapper.selectTCkOrderdetailByCkId(ckId);
    }

    /**
     * 查询出库物料明细列表
     * 
     * @param tCkOrderdetail 出库物料明细
     * @return 出库物料明细
     */
    @Override
    public List<TCkOrderdetail> selectTCkOrderdetailList(TCkOrderdetail tCkOrderdetail)
    {
        return tCkOrderdetailMapper.selectTCkOrderdetailList(tCkOrderdetail);
    }

    /**
     * 查询工单出库任务
     *
     * @param tCkOrderdetail 出库物料明细
     * @return 出库物料明细
     */
    @Override
    public List<TCkOrderdetail> selectMesTask(TCkOrderdetail tCkOrderdetail)
    {
        return tCkOrderdetailMapper.selectMesTask(tCkOrderdetail);
    }


    /**
     * 新增出库物料明细
     * 
     * @param tCkOrderdetail 出库物料明细
     * @return 结果
     */
    @Override
    public int insertTCkOrderdetail(TCkOrderdetail tCkOrderdetail)
    {
        return tCkOrderdetailMapper.insertTCkOrderdetail(tCkOrderdetail);
    }

    /**
     * 修改出库物料明细
     * 
     * @param tCkOrderdetail 出库物料明细
     * @return 结果
     */
    @Override
    public int updateTCkOrderdetail(TCkOrderdetail tCkOrderdetail)
    {
        return tCkOrderdetailMapper.updateTCkOrderdetail(tCkOrderdetail);
    }

    /**
     * 批量删除出库物料明细
     * 
     * @param ckIds 需要删除的出库物料明细主键
     * @return 结果
     */
    @Override
    public int deleteTCkOrderdetailByCkIds(String ckIds)
    {
        return tCkOrderdetailMapper.deleteTCkOrderdetailByCkIds(Convert.toStrArray(ckIds));
    }

    /**
     * 删除出库物料明细信息
     * 
     * @param ckId 出库物料明细主键
     * @return 结果
     */
    @Override
    public int deleteTCkOrderdetailByCkId(String ckId)
    {
        return tCkOrderdetailMapper.deleteTCkOrderdetailByCkId(ckId);
    }

}
