From 12448cb6604875e3b3df367e3b132dd1db45bff8 Mon Sep 17 00:00:00 2001
From: cjl <909710561@qq.com>
Date: Thu, 25 Jan 2024 09:58:23 +0800
Subject: [PATCH] fix:补充提交
---
screen-job/src/main/java/com/moral/api/controller/PubController.java | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/screen-job/src/main/java/com/moral/api/controller/PubController.java b/screen-job/src/main/java/com/moral/api/controller/PubController.java
index c1b1b4e..c29aa7e 100644
--- a/screen-job/src/main/java/com/moral/api/controller/PubController.java
+++ b/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 {
--
Gitblit v1.8.0