package com.ruoyi.app.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.app.mapper.EntranceInspectionMapper;
import com.ruoyi.app.model.EntranceInspection;
import com.ruoyi.app.service.IEntranceInspectionService;

/**
 * 入场检验Service业务层处理
 * 
 * @author coede
 * @date 2025-03-19
 */
@Service
public class EntranceInspectionServiceImpl implements IEntranceInspectionService 
{
    @Autowired
    private EntranceInspectionMapper entranceInspectionMapper;

    /**
     * 查询入场检验
     * 
     * @param id 入场检验主键
     * @return 入场检验
     */
    @Override
    public EntranceInspection selectEntranceInspectionById(Long id)
    {
        return entranceInspectionMapper.selectEntranceInspectionById(id);
    }

    /**
     * 查询入场检验列表
     * 
     * @param entranceInspection 入场检验
     * @return 入场检验
     */
    @Override
    public List<EntranceInspection> selectEntranceInspectionList(EntranceInspection entranceInspection)
    {
        return entranceInspectionMapper.selectEntranceInspectionList(entranceInspection);
    }

    /**
     * 新增入场检验
     * 
     * @param entranceInspection 入场检验
     * @return 结果
     */
    @Override
    public int insertEntranceInspection(EntranceInspection entranceInspection)
    {
        entranceInspection.setCreateTime(DateUtils.getNowDate());
        return entranceInspectionMapper.insertEntranceInspection(entranceInspection);
    }

    /**
     * 修改入场检验
     * 
     * @param entranceInspection 入场检验
     * @return 结果
     */
    @Override
    public int updateEntranceInspection(EntranceInspection entranceInspection)
    {
        entranceInspection.setUpdateTime(DateUtils.getNowDate());
        return entranceInspectionMapper.updateEntranceInspection(entranceInspection);
    }

    /**
     * 批量删除入场检验
     * 
     * @param ids 需要删除的入场检验主键
     * @return 结果
     */
    @Override
    public int deleteEntranceInspectionByIds(Long[] ids)
    {
        return entranceInspectionMapper.deleteEntranceInspectionByIds(ids);
    }

    /**
     * 删除入场检验信息
     * 
     * @param id 入场检验主键
     * @return 结果
     */
    @Override
    public int deleteEntranceInspectionById(Long id)
    {
        return entranceInspectionMapper.deleteEntranceInspectionById(id);
    }
}
