package digital.laboratory.platform.inspection.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.inspection.dto.TestRecordArgumentDto;
import digital.laboratory.platform.inspection.entity.TestRecordInstrumentCondition;
import digital.laboratory.platform.inspection.vo.TestRecordInstrumentConditionVo;
import org.apache.commons.fileupload.FileItem;

import java.io.File;
import java.util.List;

public interface TestRecordInstrumentConditionService extends IService<TestRecordInstrumentCondition> {
    TestRecordInstrumentCondition addInstrumentCondition(TestRecordInstrumentCondition testRecordInstrumentCondition);

    boolean delInstrumentCondition(String id);

    TestRecordInstrumentCondition updateInstrumentCondition(TestRecordInstrumentCondition testRecordInstrumentCondition);

    TestRecordInstrumentCondition getInstrumentConditionByTestId(String id);


    boolean useInstrumentConditionToTemplate(TestRecordArgumentDto testRecordArgumentDto);


    List<String> copyCondition(List<String> idList, String testId);

    String generatedOrNot(String testId);

    boolean createConditionWordByTest(String testId) throws Exception;

    //为模板创建仪器条件word
    boolean createConditionWordByTemplate(String templateId) throws Exception;

    void copyConditionWord(String templateId, String testId) throws Exception;

    boolean mergeFile(String testId) throws Exception;

    //todo:一个文件类型转换的封装方法
    FileItem getMultipartFile(File file, String fieldName);
}
