package com.ruoyi.business.service.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TCkPickingwavegoodsMapper;
import com.ruoyi.business.domain.TCkPickingwavegoods;
import com.ruoyi.business.service.ITCkPickingwavegoodsService;
import com.ruoyi.common.core.text.Convert;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 出库物料明细Service业务层处理
 * 
 * @author tony.wu
 * @date 2022-05-31
 */
@Service
public class TCkPickingwavegoodsServiceImpl extends ServiceImpl<TCkPickingwavegoodsMapper, TCkPickingwavegoods> implements ITCkPickingwavegoodsService
{
    @Autowired
    private TCkPickingwavegoodsMapper tCkPickingwavegoodsMapper;

    /**
     * 查询出库物料明细
     * 
     * @param pickingid 出库物料明细主键
     * @return 出库物料明细
     */
    @Override
    public TCkPickingwavegoods selectTCkPickingwavegoodsByPickingid(String pickingid)
    {
        return tCkPickingwavegoodsMapper.selectTCkPickingwavegoodsByPickingid(pickingid);
    }

    /**
     * 按日期条件查询
     *
     * @param startDate 开始时间
     * @param endDate 结束时间
     * @return 入库任务列表
     */
    @Override
    public List<TCkPickingwavegoods> selectTCkPickingwavegoodsByCreateDate(@Param("startDate") String startDate, @Param("endDate") String endDate)
    {
        return tCkPickingwavegoodsMapper.selectTCkPickingwavegoodsByCreateDate(startDate, endDate);
    }

    /**
     * 查询出库物料明细列表
     * 
     * @param tCkPickingwavegoods 出库物料明细
     * @return 出库物料明细
     */
    @Override
    public List<TCkPickingwavegoods> selectTCkPickingwavegoodsList(TCkPickingwavegoods tCkPickingwavegoods)
    {
        return tCkPickingwavegoodsMapper.selectTCkPickingwavegoodsList(tCkPickingwavegoods);
    }

    /**
     * 新增出库物料明细
     * 
     * @param tCkPickingwavegoods 出库物料明细
     * @return 结果
     */
    @Override
    public int insertTCkPickingwavegoods(TCkPickingwavegoods tCkPickingwavegoods)
    {
        return tCkPickingwavegoodsMapper.insertTCkPickingwavegoods(tCkPickingwavegoods);
    }

    /**
     * 修改出库物料明细
     * 
     * @param tCkPickingwavegoods 出库物料明细
     * @return 结果
     */
    @Override
    public int updateTCkPickingwavegoods(TCkPickingwavegoods tCkPickingwavegoods)
    {
        return tCkPickingwavegoodsMapper.updateTCkPickingwavegoods(tCkPickingwavegoods);
    }

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

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

    /**
     * 更新出库任务结果
     * @param tCkPickingwavegoods
     * @return
     */
    @Override
    public int updateGoodsOutResult(TCkPickingwavegoods tCkPickingwavegoods) {
        return tCkPickingwavegoodsMapper.updateGoodsOutResult(tCkPickingwavegoods);
    }

    @Override
    public int updateScanGoodsResult(TCkPickingwavegoods tCkPickingwavegoods) {
        return tCkPickingwavegoodsMapper.updateScanGoodsResult(tCkPickingwavegoods);
    }
    @Override
    public int updateEmptyOut(TCkPickingwavegoods tCkPickingwavegoods) {
        return tCkPickingwavegoodsMapper.updateEmptyOut(tCkPickingwavegoods);
    }
}
