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

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

import java.util.List;

/**
 * 生成工单业务层处理
 *
 * @author wanjing
 * @team tuoheng
 * @date 2022-12-07
 */
@Slf4j
@Service
public class GenerateWorkorderServiceImpl implements GenerateWorkorderService {

    @Autowired
    private GenerateWorkorderByManualService generateWorkorderByManualService;

    @Autowired
    private GenerateWorkorderByAutoService generateWorkorderByAutoService;


    @Override
    public JsonResult generateByManual(List<String> idList) {
        return generateWorkorderByManualService.generate(idList);
    }

    @Override
    public JsonResult generateByAuto(Inspection inspection, List<InspectionFile> inspectionFileList) {
        return generateWorkorderByAutoService.generate(inspection, inspectionFileList);
    }
}
