package com.sundot.airport.check.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sundot.airport.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sundot.airport.check.mapper.CheckProjectItemMapper;
import com.sundot.airport.check.domain.CheckProjectItem;
import com.sundot.airport.check.service.ICheckProjectItemService;

/**
 * 检查单和检查记录和问题整改的检查项明细Service业务层处理
 *
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class CheckProjectItemServiceImpl extends ServiceImpl<CheckProjectItemMapper, CheckProjectItem> implements ICheckProjectItemService {
    @Autowired
    private CheckProjectItemMapper checkProjectItemMapper;

    /**
     * 查询检查单和检查记录和问题整改的检查项明细
     *
     * @param id 检查单和检查记录和问题整改的检查项明细主键
     * @return 检查单和检查记录和问题整改的检查项明细
     */
    @Override
    public CheckProjectItem selectCheckProjectItemById(Long id) {
        return checkProjectItemMapper.selectCheckProjectItemById(id);
    }

    /**
     * 查询检查单和检查记录和问题整改的检查项明细列表
     *
     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
     * @return 检查单和检查记录和问题整改的检查项明细
     */
    @Override
    public List<CheckProjectItem> selectCheckProjectItemList(CheckProjectItem checkProjectItem) {
        return checkProjectItemMapper.selectCheckProjectItemList(checkProjectItem);
    }

    /**
     * 新增检查单和检查记录和问题整改的检查项明细
     *
     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
     * @return 结果
     */
    @Override
    public int insertCheckProjectItem(CheckProjectItem checkProjectItem) {
        checkProjectItem.setCreateTime(DateUtils.getNowDate());
        return checkProjectItemMapper.insertCheckProjectItem(checkProjectItem);
    }

    /**
     * 修改检查单和检查记录和问题整改的检查项明细
     *
     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
     * @return 结果
     */
    @Override
    public int updateCheckProjectItem(CheckProjectItem checkProjectItem) {
        checkProjectItem.setUpdateTime(DateUtils.getNowDate());
        return checkProjectItemMapper.updateCheckProjectItem(checkProjectItem);
    }

    /**
     * 批量删除检查单和检查记录和问题整改的检查项明细
     *
     * @param ids 需要删除的检查单和检查记录和问题整改的检查项明细主键
     * @return 结果
     */
    @Override
    public int deleteCheckProjectItemByIds(Long[] ids) {
        return checkProjectItemMapper.deleteCheckProjectItemByIds(ids);
    }

    /**
     * 删除检查单和检查记录和问题整改的检查项明细信息
     *
     * @param id 检查单和检查记录和问题整改的检查项明细主键
     * @return 结果
     */
    @Override
    public int deleteCheckProjectItemById(Long id) {
        return checkProjectItemMapper.deleteCheckProjectItemById(id);
    }
}
