package com.inspect.insreportdata.service.impl;

import com.inspect.insreportdata.domain.InspectionReportData;
import com.inspect.insreportdata.mapper.InspectionReportDataMapper;
import com.inspect.insreportdata.service.IInspectionReportDataService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InspectionReportDataServiceImpl implements IInspectionReportDataService {
    private final InspectionReportDataMapper inspectionReportDataMapper;

    public InspectionReportDataServiceImpl(InspectionReportDataMapper inspectionReportDataMapper) {
        this.inspectionReportDataMapper = inspectionReportDataMapper;
    }

    public InspectionReportData selectInspectionReportDataByLineId(Long lineId) {
        return this.inspectionReportDataMapper.selectInspectionReportDataByLineId(lineId);
    }

    public List<InspectionReportData> selectInspectionReportDataList(InspectionReportData inspectionReportData) {
        return this.inspectionReportDataMapper.selectInspectionReportDataList(inspectionReportData);
    }

    public List<InspectionReportData> selectListByStatus(InspectionReportData inspectionReportData) {
        return this.inspectionReportDataMapper.selectListByStatus(inspectionReportData);
    }

    public int insertInspectionReportData(InspectionReportData inspectionReportData) {
        this.inspectionReportDataMapper.insertInspectionReportData(inspectionReportData);
        return 1;
    }

    public int updateInspectionReportData(InspectionReportData inspectionReportData) {
        return this.inspectionReportDataMapper.updateInspectionReportData(inspectionReportData);
    }

    public int deleteInspectionReportDataByLineIds(Long[] lineIds) {
        return this.inspectionReportDataMapper.deleteInspectionReportDataByLineIds(lineIds);
    }

    public int deleteInspectionReportDataByLineId(Long lineId) {
        return this.inspectionReportDataMapper.deleteInspectionReportDataByLineId(lineId);
    }

    public int batchInsertInspectionReportData(List<InspectionReportData> list) {
        return this.inspectionReportDataMapper.batchInsertInspectionReportData(list);
    }
}
