package com.yunyan.web;

import com.yunyan.business.constant.TemplateEpType;
import com.yunyan.business.document.templateEpStrategy.AnnotationTplStrategyFactory;
import com.yunyan.business.document.templateEpStrategy.TplStrategy;
import com.yunyan.business.service.IFinalDataService;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;

@Slf4j
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class TplTest {

    @Autowired
    private IFinalDataService finalDataService;

    @Test
    public void testTpl() throws Exception {

        TplStrategy tplStrategy = AnnotationTplStrategyFactory.getTemplateStrategy(TemplateEpType.Y2024BT1.getCode());
        tplStrategy.exportSave(finalDataService, 16369L);
    }

}
