package com.zbf.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zbf.system.domain.InventoryCheck;
import com.zbf.system.mapper.InventoryCheckMapper;
import com.zbf.system.service.IInventoryCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 盘点主Service业务层处理
 *
 * @author tony
 * @date 2024-10-31
 */
@Service
public class InventoryCheckServiceImpl extends ServiceImpl<InventoryCheckMapper, InventoryCheck> implements IInventoryCheckService //修改
{
    @Autowired
    private InventoryCheckMapper inventoryCheckMapper;

    /**
     * 查询盘点主
     *
     * @param id 盘点主主键
     * @return 盘点主
     */
    @Override
    public InventoryCheck selectInventoryCheckById(Long id)
    {
        return inventoryCheckMapper.selectInventoryCheckById(id);
    }

    /**
     * 查询盘点主列表
     *
     * @param inventoryCheck 盘点主
     * @return 盘点主
     */
    @Override
    public List<InventoryCheck> selectInventoryCheckList(InventoryCheck inventoryCheck)
    {
        return inventoryCheckMapper.selectInventoryCheckList(inventoryCheck);
    }

    /**
     * 新增盘点主
     *
     * @param inventoryCheck 盘点主
     * @return 结果
     */
    @Override
    public int insertInventoryCheck(InventoryCheck inventoryCheck)
    {
        return inventoryCheckMapper.insertInventoryCheck(inventoryCheck);
    }

    /**
     * 修改盘点主
     *
     * @param inventoryCheck 盘点主
     * @return 结果
     */
    @Override
    public int updateInventoryCheck(InventoryCheck inventoryCheck)
    {
        return inventoryCheckMapper.updateInventoryCheck(inventoryCheck);
    }

    /**
     * 批量删除盘点主
     *
     * @param ids 需要删除的盘点主主键
     * @return 结果
     */
    @Override
    public int deleteInventoryCheckByIds(Long[] ids)
    {
        return inventoryCheckMapper.deleteInventoryCheckByIds(ids);
    }

    /**
     * 删除盘点主信息
     *
     * @param id 盘点主主键
     * @return 结果
     */
    @Override
    public int deleteInventoryCheckById(Long id)
    {
        return inventoryCheckMapper.deleteInventoryCheckById(id);
    }


    /**
     * 批量禁用
     *
     * @param id 盘点主主键
     * @return 结果
     */
    @Override
    public int disabledInventoryCheckByIds(Long[] ids) {
        return inventoryCheckMapper.disabledInventoryCheckByIds(ids);
    }

    /**
     * 批量启用
     *
     * @param id 盘点主主键
     * @return 结果
     */
    @Override
    public int enableInventoryCheckByIds(Long[] ids) {
        return inventoryCheckMapper.enableInventoryCheckByIds(ids);
    }

    /**
     * 修改状态
     *
     * @param inventoryCheck 工序管理主键
     * @return 结果
     */
    @Override
    public int updateStatus(InventoryCheck inventoryCheck) {
        return inventoryCheckMapper.updateInventoryCheck(inventoryCheck);
    }

}
