import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.io.resource.ResourceUtil;
import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chushang.InspectionApplication;
import com.chushang.common.core.util.FileUtils;
import com.chushang.inspection.ins.GeneratedIns;
import com.chushang.inspection.ins.TemplateService;
import com.chushang.inspection.work.po.WrkInfo;
import com.chushang.inspection.work.service.WrkInfoService;
import com.deepoove.poi.XWPFTemplate;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.io.File;
import java.io.InputStream;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
 * @auther: zhao
 * @date: 2024/6/29 14:45
 */
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = InspectionApplication.class)
public class GenInsTest {


    @Resource
    WrkInfoService wrkInfoService;

    @Test
    public void genTest(){
        WrkInfo wrkInfo = new WrkInfo();
        wrkInfo.setDeptId(200L);
        wrkInfo.setLowerTaskId(200L);
        wrkInfo.setTaskId(200L);
        wrkInfo.setUserId(1L);
        wrkInfo.setUserName("admin");
        wrkInfo.setWorkNo(String.valueOf(IdUtil.getSnowflakeNextId()));
        wrkInfo.setWorkSort(1);
//        wrkInfo.setWrkId(1814239505998278658L);
        wrkInfoService.save(wrkInfo);

//        generatedIns.generated();

    }

}
