Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
43543c34
Commit
43543c34
authored
Apr 18, 2024
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中心检测问题处理
parent
08481913
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
TaskController.java
...ejoin/amos/patrol/business/controller/TaskController.java
+12
-11
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/TaskController.java
View file @
43543c34
...
@@ -180,20 +180,23 @@ public class TaskController extends AbstractBaseController{
...
@@ -180,20 +180,23 @@ public class TaskController extends AbstractBaseController{
}
catch
(
UnsupportedEncodingException
e
)
{
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
Date
date
=
new
Date
();
Source
source
=
new
StreamSource
(
inputStream
);
Source
source
=
new
StreamSource
(
inputStream
);
try
{
String
path
=
request
.
getSession
().
getServletContext
().
getRealPath
(
"/"
);
String
dir
=
path
.
substring
(
0
,
path
.
indexOf
(
File
.
separator
)+
1
)
+
"print"
;
String
html
=
path
.
substring
(
0
,
path
.
indexOf
(
File
.
separator
)+
1
)
+
"print"
+
File
.
separator
+
"task_"
+
date
.
getTime
()
+
".html"
;
File
dirFile
=
new
File
(
dir
);
if
(!
dirFile
.
exists
())
{
dirFile
.
mkdirs
();
}
File
htmlFile
=
new
File
(
html
);
try
(
FileInputStream
fis
=
new
FileInputStream
(
htmlFile
);
){
ClassPathResource
classPathResource
=
new
ClassPathResource
(
"temp/template.xsl"
);
ClassPathResource
classPathResource
=
new
ClassPathResource
(
"temp/template.xsl"
);
InputStream
stream
=
classPathResource
.
getInputStream
();
InputStream
stream
=
classPathResource
.
getInputStream
();
Source
template
=
new
StreamSource
(
stream
);
Source
template
=
new
StreamSource
(
stream
);
//String html = "D://10.html";
//String html = "D://10.html";
Date
date
=
new
Date
();
String
path
=
request
.
getSession
().
getServletContext
().
getRealPath
(
"/"
);
String
dir
=
path
.
substring
(
0
,
path
.
indexOf
(
File
.
separator
)+
1
)
+
"print"
;
String
html
=
path
.
substring
(
0
,
path
.
indexOf
(
File
.
separator
)+
1
)
+
"print"
+
File
.
separator
+
"task_"
+
date
.
getTime
()
+
".html"
;
File
dirFile
=
new
File
(
dir
);
if
(!
dirFile
.
exists
())
{
dirFile
.
mkdirs
();
}
Result
result
=
new
StreamResult
(
html
);
Result
result
=
new
StreamResult
(
html
);
TransformerFactory
transformerFactory
=
TransformerFactory
.
newInstance
();
TransformerFactory
transformerFactory
=
TransformerFactory
.
newInstance
();
...
@@ -202,8 +205,6 @@ public class TaskController extends AbstractBaseController{
...
@@ -202,8 +205,6 @@ public class TaskController extends AbstractBaseController{
Transformer
transformer
=
transformerFactory
.
newTransformer
(
template
);
Transformer
transformer
=
transformerFactory
.
newTransformer
(
template
);
transformer
.
transform
(
source
,
result
);
transformer
.
transform
(
source
,
result
);
File
htmlFile
=
new
File
(
html
);
FileInputStream
fis
=
new
FileInputStream
(
htmlFile
);
String
data
=
IOUtils
.
toString
(
fis
,
"utf-8"
);
String
data
=
IOUtils
.
toString
(
fis
,
"utf-8"
);
fis
.
close
();
fis
.
close
();
if
(
htmlFile
.
exists
())
{
if
(
htmlFile
.
exists
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment