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