删除多余日志
This commit is contained in:
@@ -21,7 +21,6 @@ public class WordUtil2 {
|
||||
public void getWord(String path, Map<String, Object> params, String fileName, HttpServletResponse response)
|
||||
throws Exception {
|
||||
path = ClearPathUtil.cleanString(path);
|
||||
// File file = new File(path);
|
||||
InputStream inStream = null;
|
||||
CustomXWPFDocument doc = null;
|
||||
//读取报告模板
|
||||
|
||||
@@ -175,32 +175,20 @@ public class ExportModelController extends BaseController {
|
||||
try {
|
||||
rtfPathResource = new ClassPathResource(rtfPath);
|
||||
picPathResource = new ClassPathResource(picPath);
|
||||
// rtfPath = getClass().getClassLoader().getResource(rtfPath).getPath();
|
||||
// picPath = getClass().getClassLoader().getResource(picPath).getPath();
|
||||
rtfPath = rtfPath.replaceAll("%20", " ");
|
||||
picPath = picPath.replaceAll("%20", " ");
|
||||
} catch (Exception e1) {
|
||||
log.info("获取报表发生异常,异常是" + e1.getMessage());
|
||||
}
|
||||
|
||||
log.error(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
|
||||
log.info(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
|
||||
log.error(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
|
||||
log.info(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
|
||||
log.error(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
|
||||
log.info(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
|
||||
|
||||
File tmpfile = new File(rtfPath);
|
||||
if (!tmpfile.exists()) {
|
||||
return "pathfail"+rtfPath;
|
||||
}
|
||||
// File tmpfile = new File(rtfPath);
|
||||
// if (!tmpfile.exists()) {
|
||||
// return "pathfail";
|
||||
// }
|
||||
|
||||
InputStream ins = null;
|
||||
try {
|
||||
// ins = new FileInputStream(rtfPath);
|
||||
ins = rtfPathResource.getInputStream();
|
||||
if (null != ins) {
|
||||
flagPath = true;
|
||||
@@ -224,8 +212,6 @@ public class ExportModelController extends BaseController {
|
||||
if (ObjectUtil.isNotEmpty(file)) {
|
||||
byte[] bytes = file.getBytes();
|
||||
|
||||
// byte[] image = (byte[]) session.getAttribute("image");
|
||||
// String contentType = (String) session.getAttribute("contentType");
|
||||
header.put("width", 400);
|
||||
header.put("height", 250);
|
||||
header.put("type", file.getContentType());
|
||||
@@ -234,7 +220,6 @@ public class ExportModelController extends BaseController {
|
||||
InputStream inStream = null;
|
||||
byte[] data = null;
|
||||
try {
|
||||
// inStream = new FileInputStream(new File(picPath));
|
||||
inStream = picPathResource.getInputStream();
|
||||
data = new byte[inStream.available()];
|
||||
inStream.read(data);
|
||||
|
||||
Reference in New Issue
Block a user