package com.tuoheng.admin.service.report.generate;

import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 生成报告业务层处理
 *
 * @author wanjing
 * @team tuoheng
 * @date 2023-06-27
 */
@Slf4j
@Service
public class GenerateReportServiceImpl implements GenerateReportService {

    @Autowired
    private GenerateReportByManualService generateReportByManualService;

    @Autowired
    private GenerateReportByAutoService generateReportByAutoService;

    @Override
    public JsonResult generateByManual(String id) {
        return generateReportByManualService.generate(id);
    }

    @Override
    public JsonResult generateByAuto(Inspection inspection) {
        return generateReportByAutoService.generate(inspection);
    }
}
