Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SchoolReportGen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
霍传世
SchoolReportGen
Commits
13b84537
Commit
13b84537
authored
Oct 30, 2024
by
霍传世
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多线程测试生成PDF
parent
59843676
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/main/java/com/example/pdfgenerator/controller/GeneratorAllTypePdfByProvinceController.java
...r/controller/GeneratorAllTypePdfByProvinceController.java
+4
-4
No files found.
src/main/java/com/example/pdfgenerator/controller/GeneratorAllTypePdfByProvinceController.java
View file @
13b84537
...
...
@@ -147,7 +147,7 @@ public class GeneratorAllTypePdfByProvinceController {
.
concat
(
" "
).
concat
(
fileName
);
synthesisSchoolReportParameter
.
setCommand
(
command
);
synthesisSchoolReportParameter
.
setPrefix
(
"/myworkSpace/basic/"
);
fileToUrl
.
put
(
fileName
.
replace
(
"/myworkSpace/basic/"
,
""
),
"Pdf
Subject
Test/"
+
fileName
.
replace
(
"/myworkSpace/subject/"
,
""
));
fileToUrl
.
put
(
fileName
.
replace
(
"/myworkSpace/basic/"
,
""
),
"PdfTest/"
+
fileName
.
replace
(
"/myworkSpace/subject/"
,
""
));
}
else
{
String
command
=
"node /myworkSpace/puppeteer.js \"http://localhost:8080/pdf/basic?province=condition5&school=condition1&examId=condition4®ion=非改革&branch=condition3&subjectType=常规\" pdf "
;
String
fileName
=
"/myworkSpace/basic/"
+
synthesisSchoolReportParameter
.
getRegion
()+
synthesisSchoolReportParameter
.
getProvince
()+
synthesisSchoolReportParameter
.
getSchool
()+
synthesisSchoolReportParameter
.
getExamId
()+
".pdf"
;
...
...
@@ -155,7 +155,7 @@ public class GeneratorAllTypePdfByProvinceController {
.
concat
(
" "
).
concat
(
fileName
);
synthesisSchoolReportParameter
.
setCommand
(
command
);
synthesisSchoolReportParameter
.
setPrefix
(
"/myworkSpace/basic/"
);
fileToUrl
.
put
(
fileName
.
replace
(
"/myworkSpace/basic/"
,
""
),
"Pdf
Subject
Test/"
+
fileName
.
replace
(
"/myworkSpace/subject/"
,
""
));
fileToUrl
.
put
(
fileName
.
replace
(
"/myworkSpace/basic/"
,
""
),
"PdfTest/"
+
fileName
.
replace
(
"/myworkSpace/subject/"
,
""
));
}
}
...
...
@@ -229,7 +229,7 @@ public class GeneratorAllTypePdfByProvinceController {
Map
<
String
,
List
<
ClassBasicReportParameters
>>
classSubjectReport
=
synthesisClassSubjectReportParameters
.
stream
().
collect
(
Collectors
.
groupingBy
(
ClassBasicReportParameters:
:
getProvince
));
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
5
);
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
8
);
...
...
@@ -460,7 +460,7 @@ public class GeneratorAllTypePdfByProvinceController {
filePrefix
=
parametersTwo
.
getPrefix
();
}
logger
.
info
(
"RetryCommand:l
oading
"
);
logger
.
info
(
"RetryCommand:l
s
"
);
ProcessBuilder
processBuilderClassSubject
=
new
ProcessBuilder
();
processBuilderClassSubject
.
command
(
"bash"
,
"-c"
,
command
);
processBuilderClassSubject
.
redirectErrorStream
(
true
);
// 合并标准输出和错误输出
...
...
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