|
@@ -27,6 +27,8 @@ import com.ruoyi.common.utils.file.FileUtils;
|
|
|
import com.ruoyi.system.entity.BpmProcess;
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.system.mapper.BpmProcessMapper;
|
|
@@ -54,6 +56,9 @@ import javax.xml.transform.stream.StreamResult;
|
|
|
*/
|
|
|
@Service
|
|
|
public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
+
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(BpmProcessServiceImpl.class);
|
|
|
+
|
|
|
@Autowired
|
|
|
private BpmProcessMapper bpmProcessMapper;
|
|
|
|
|
@@ -216,7 +221,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
downloadName = new String(downloadName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
-// log.error("系统异常", e);
|
|
|
+ log.error("系统异常", e);
|
|
|
}
|
|
|
|
|
|
if (list.size()>1){
|
|
@@ -250,7 +255,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
String path = t;
|
|
|
//压缩文件中每个文件的文件名称
|
|
|
String name = t.substring(t.lastIndexOf("\\")+1);
|
|
|
-// log.info("batchDownloadFile:[filePath:{}]", path);
|
|
|
+ log.info("batchDownloadFile:[filePath:{}]", path);
|
|
|
File file = new File(path);
|
|
|
if (!file.exists()) {
|
|
|
throw new RuntimeException("文件不存在");
|
|
@@ -268,7 +273,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
os.write(b, 0, length);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
-// log.error("系统异常", e);
|
|
|
+ log.error("系统异常", e);
|
|
|
} finally {
|
|
|
//关闭流
|
|
|
assert fs != null;
|
|
@@ -277,11 +282,11 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
-// log.error("下载文件出错![{}]", e.getMessage());
|
|
|
+ log.error("下载文件出错![{}]", e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
-// log.error("系统异常", e);
|
|
|
+ log.error("系统异常", e);
|
|
|
} finally {
|
|
|
//关闭流
|
|
|
try {
|
|
@@ -293,7 +298,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
zipOs.close();
|
|
|
}
|
|
|
} catch (IOException e) {
|
|
|
-// log.error("系统异常", e);
|
|
|
+ log.error("系统异常", e);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -330,7 +335,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
|
|
|
fis.close();
|
|
|
}
|
|
|
} catch (IOException ex) {
|
|
|
-// log.error("系统异常", ex);
|
|
|
+ log.error("系统异常", ex);
|
|
|
}
|
|
|
}
|
|
|
|