cjl
2024-01-31 3f667355c7013b459f3ab5ec0c1bc035d7e2d5aa
screen-job/src/main/java/com/moral/api/controller/PubController.java
@@ -21,6 +21,7 @@
import javax.mail.MessagingException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.util.*;
/**
@@ -177,7 +178,8 @@
    public void  excelDevice() throws IOException {
        String startTime = DateUtils.dateToDateString(DateUtils.addDays(new Date(),-1),DateUtils.yyyy_MM_dd_EN);
        List<DeviceExcelDTO> list = deviceService.ListDeviceExcel(startTime,null,72);
        String path = Objects.requireNonNull(this.getClass().getClassLoader().getResource("")).getPath();
       // String path = this.getClass().getClassLoader().getResource("/data/file").getPath();
        String path = System.getProperty("user.dir")+"/";
        String fileName = String.format("%s疾控中心数据-%s.xlsx",path,startTime);
        ByteArrayOutputStream out = null;
        try {