package com.zbf.system.service.impl;

import java.util.List;
import com.zbf.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import com.zbf.system.mapper.TRkWareNoticeTabMapper;
import com.zbf.system.domain.TRkWareNoticeTab;
import com.zbf.system.service.ITRkWareNoticeTabService;

/**
 * 入库通知单明细Service业务层处理
 *
 * @author tony
 * @date 2024-08-16
 */
@Service
public class TRkWareNoticeTabServiceImpl extends ServiceImpl<TRkWareNoticeTabMapper, TRkWareNoticeTab> implements ITRkWareNoticeTabService //修改
{
    @Autowired
    private TRkWareNoticeTabMapper tRkWareNoticeTabMapper;

    /**
     * 查询入库通知单明细
     *
     * @param id 入库通知单明细主键
     * @return 入库通知单明细
     */
    @Override
    public TRkWareNoticeTab selectTRkWareNoticeTabById(String id)
    {
        return tRkWareNoticeTabMapper.selectTRkWareNoticeTabById(id);
    }

    /**
     * 查询入库通知单明细列表
     *
     * @param tRkWareNoticeTab 入库通知单明细
     * @return 入库通知单明细
     */
    @Override
    public List<TRkWareNoticeTab> selectTRkWareNoticeTabList(TRkWareNoticeTab tRkWareNoticeTab)
    {
        return tRkWareNoticeTabMapper.selectTRkWareNoticeTabList(tRkWareNoticeTab);
    }

    /**
     * 新增入库通知单明细
     *
     * @param tRkWareNoticeTab 入库通知单明细
     * @return 结果
     */
    @Override
    public int insertTRkWareNoticeTab(TRkWareNoticeTab tRkWareNoticeTab)
    {
        tRkWareNoticeTab.setCreateTime(DateUtils.getNowDate());
        return tRkWareNoticeTabMapper.insertTRkWareNoticeTab(tRkWareNoticeTab);
    }

    /**
     * 修改入库通知单明细
     *
     * @param tRkWareNoticeTab 入库通知单明细
     * @return 结果
     */
    @Override
    public int updateTRkWareNoticeTab(TRkWareNoticeTab tRkWareNoticeTab)
    {
                tRkWareNoticeTab.setUpdateTime(DateUtils.getNowDate());
        return tRkWareNoticeTabMapper.updateTRkWareNoticeTab(tRkWareNoticeTab);
    }

    /**
     * 批量删除入库通知单明细
     *
     * @param ids 需要删除的入库通知单明细主键
     * @return 结果
     */
    @Override
    public int deleteTRkWareNoticeTabByIds(String[] ids)
    {
        return tRkWareNoticeTabMapper.deleteTRkWareNoticeTabByIds(ids);
    }

    /**
     * 删除入库通知单明细信息
     *
     * @param id 入库通知单明细主键
     * @return 结果
     */
    @Override
    public int deleteTRkWareNoticeTabById(String id)
    {
        return tRkWareNoticeTabMapper.deleteTRkWareNoticeTabById(id);
    }


    /**
     * 批量禁用
     *
     * @param id 入库通知单明细主键
     * @return 结果
     */
    @Override
    public int disabledTRkWareNoticeTabByIds(String[] ids) {
        return tRkWareNoticeTabMapper.disabledTRkWareNoticeTabByIds(ids);
    }

    /**
     * 批量启用
     *
     * @param id 入库通知单明细主键
     * @return 结果
     */
    @Override
    public int enableTRkWareNoticeTabByIds(String[] ids) {
        return tRkWareNoticeTabMapper.enableTRkWareNoticeTabByIds(ids);
    }

    /**
     * 修改状态
     *
     * @param tRkWareNoticeTab 工序管理主键
     * @return 结果
     */
    @Override
    public int updateStatus(TRkWareNoticeTab tRkWareNoticeTab) {
        return tRkWareNoticeTabMapper.updateTRkWareNoticeTab(tRkWareNoticeTab);
    }

}
