package com.ruoyi.project.check.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.check.mapper.TCheckRepairpointsMapper;
import com.ruoyi.project.check.domain.TCheckRepairpoints;
import com.ruoyi.project.check.service.ITCheckRepairpointsService;

/**
 * 维修点Service业务层处理
 *
 * @author ruoyi
 * @date 2022-12-06
 */
@Service
public class TCheckRepairpointsServiceImpl implements ITCheckRepairpointsService {
    @Autowired
    private TCheckRepairpointsMapper tCheckRepairpointsMapper;

    /**
     * 查询维修点
     *
     * @param checkId 维修点主键
     * @return 维修点
     */
    @Override
    public TCheckRepairpoints selectTCheckRepairpointsByCheckId(Long checkId) {
        return tCheckRepairpointsMapper.selectTCheckRepairpointsByCheckId(checkId);
    }

    /**
     * 查询维修点列表
     *
     * @param tCheckRepairpoints 维修点
     * @return 维修点
     */
    @Override
    public List<TCheckRepairpoints> selectTCheckRepairpointsList(TCheckRepairpoints tCheckRepairpoints) {
        return tCheckRepairpointsMapper.selectTCheckRepairpointsList(tCheckRepairpoints);
    }

    @Override
    public List<TCheckRepairpoints> selectTCheckRepairpointsByIds(Long[] ids) {
        return tCheckRepairpointsMapper.selectTCheckRepairpointsByIds(ids);
    }

    @Override
    public List<TCheckRepairpoints> selectRepairpointsByInspectionId(Long inspectionId) {
        return tCheckRepairpointsMapper.selectRepairpointsByInspectionId(inspectionId);
    }

    /**
     * 新增维修点
     *
     * @param tCheckRepairpoints 维修点
     * @return 结果
     */
    @Override
    public int insertTCheckRepairpoints(TCheckRepairpoints tCheckRepairpoints) {
        return tCheckRepairpointsMapper.insertTCheckRepairpoints(tCheckRepairpoints);
    }

    @Override
    public int insertTCheckRepairpointsByList(List<TCheckRepairpoints> tCheckRepairpoints) {
        return tCheckRepairpointsMapper.insertTCheckRepairpointsByList(tCheckRepairpoints);
    }

    /**
     * 修改维修点
     *
     * @param tCheckRepairpoints 维修点
     * @return 结果
     */
    @Override
    public int updateTCheckRepairpoints(TCheckRepairpoints tCheckRepairpoints) {
        return tCheckRepairpointsMapper.updateTCheckRepairpoints(tCheckRepairpoints);
    }

    @Override
    public int updateTCheckRepairpointsByCheckIds(TCheckRepairpoints tCheckRepairpoints) {
        return tCheckRepairpointsMapper.updateTCheckRepairpointsByCheckIds(tCheckRepairpoints);
    }

    /**
     * 批量删除维修点
     *
     * @param checkIds 需要删除的维修点主键
     * @return 结果
     */
    @Override
    public int deleteTCheckRepairpointsByCheckIds(Long[] checkIds) {
        return tCheckRepairpointsMapper.deleteTCheckRepairpointsByCheckIds(checkIds);
    }

    /**
     * 删除维修点信息
     *
     * @param checkId 维修点主键
     * @return 结果
     */
    @Override
    public int deleteTCheckRepairpointsByCheckId(Long checkId) {
        return tCheckRepairpointsMapper.deleteTCheckRepairpointsByCheckId(checkId);
    }

    @Override
    public int updateTCheckRepairpointsByUpload(TCheckRepairpoints tCheckRepairpoints) {
        return tCheckRepairpointsMapper.updateTCheckRepairpointsByUpload(tCheckRepairpoints);
    }

    @Override
    public int updateApproveStatusByIds(TCheckRepairpoints tCheckRepairpoints) {
        return tCheckRepairpointsMapper.updateApproveStatusByIds(tCheckRepairpoints);
    }
}
