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
5a4f1d12
Commit
5a4f1d12
authored
Dec 26, 2024
by
霍传世
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试服务器生成的效率
parent
bd70808e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
57 deletions
+56
-57
src/main/java/com/example/pdfgenerator/controller/GeneratorAllTypePdfByProvinceController.java
...r/controller/GeneratorAllTypePdfByProvinceController.java
+56
-57
No files found.
src/main/java/com/example/pdfgenerator/controller/GeneratorAllTypePdfByProvinceController.java
View file @
5a4f1d12
...
...
@@ -41,7 +41,6 @@ public class GeneratorAllTypePdfByProvinceController {
@RequestMapping
(
"/GeneratorByProvinceName"
)
public
ResponseEntity
generatorName
(
@RequestParam
(
"examId"
)
String
examId
,
@RequestParam
(
value
=
"provinceName"
,
required
=
false
)
String
provinceName
,
@RequestParam
(
value
=
"schoolName"
,
required
=
false
)
String
schoolName
)
throws
IOException
,
InterruptedException
{
System
.
out
.
println
(
provinceName
);
String
suffix
=
examId
.
trim
().
replace
(
"TDA"
,
""
).
replace
(
"G3"
,
""
).
replace
(
"G2"
,
""
).
trim
();
...
...
@@ -283,19 +282,19 @@ public class GeneratorAllTypePdfByProvinceController {
}
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
process
.
getInputStream
()));
String
line
;
// while (true) {
// try {
// if (!((line = reader.readLine()) != null)) break;
// } catch (IOException e) {
// throw new RuntimeException(e);
// }
// }
while
((
line
=
reader
.
readLine
())
!=
null
)
{
// 如果输出了 "DONE",表示生成完毕
if
(
"DONE"
.
equals
(
line
))
{
break
;
// 跳出循环
while
(
true
)
{
try
{
if
(!((
line
=
reader
.
readLine
())
!=
null
))
break
;
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
// while ((line = reader.readLine()) != null) {
// // 如果输出了 "DONE",表示生成完毕
// if ("DONE".equals(line)) {
// break; // 跳出循环
// }
// }
try
{
int
exitCode
=
process
.
waitFor
();
}
catch
(
InterruptedException
e
)
{
...
...
@@ -337,19 +336,19 @@ public class GeneratorAllTypePdfByProvinceController {
}
BufferedReader
readerSubject
=
new
BufferedReader
(
new
InputStreamReader
(
processSubject
.
getInputStream
()));
String
lineSubject
;
// while (true) {
// try {
// if (!((lineSubject = readerSubject.readLine()) != null)) break;
// } catch (IOException e) {
// throw new RuntimeException(e);
// }
// }
while
((
lineSubject
=
readerSubject
.
readLine
())
!=
null
)
{
// 如果输出了 "DONE",表示生成完毕
if
(
"DONE"
.
equals
(
lineSubject
))
{
break
;
// 跳出循环
while
(
true
)
{
try
{
if
(!((
lineSubject
=
readerSubject
.
readLine
())
!=
null
))
break
;
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
// while ((lineSubject = readerSubject.readLine()) != null) {
// // 如果输出了 "DONE",表示生成完毕
// if ("DONE".equals(lineSubject)) {
// break; // 跳出循环
// }
// }
try
{
int
exitCodeSubject
=
processSubject
.
waitFor
();
}
catch
(
InterruptedException
e
)
{
...
...
@@ -393,19 +392,19 @@ public class GeneratorAllTypePdfByProvinceController {
}
BufferedReader
readerClass
=
new
BufferedReader
(
new
InputStreamReader
(
processClass
.
getInputStream
()));
String
lineClass
;
// while (true) {
// try {
// if (!((lineClass = readerClass.readLine()) != null)) break;
// } catch (IOException e) {
// throw new RuntimeException(e);
// }
// }
while
((
lineClass
=
readerClass
.
readLine
())
!=
null
)
{
// 如果输出了 "DONE",表示生成完毕
if
(
"DONE"
.
equals
(
lineClass
))
{
break
;
// 跳出循环
while
(
true
)
{
try
{
if
(!((
lineClass
=
readerClass
.
readLine
())
!=
null
))
break
;
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
// while ((lineClass = readerClass.readLine()) != null) {
// // 如果输出了 "DONE",表示生成完毕
// if ("DONE".equals(lineClass)) {
// break; // 跳出循环
// }
// }
try
{
int
exitCodeSubject
=
processClass
.
waitFor
();
}
catch
(
InterruptedException
e
)
{
...
...
@@ -448,19 +447,19 @@ public class GeneratorAllTypePdfByProvinceController {
}
BufferedReader
readerClassSubject
=
new
BufferedReader
(
new
InputStreamReader
(
processClassSubject
.
getInputStream
()));
String
lineClassSubject
;
// while (true) {
// try {
// if (!((lineClassSubject = readerClassSubject.readLine()) != null)) break;
// } catch (IOException e) {
// throw new RuntimeException(e);
// }
// }
while
((
lineClassSubject
=
readerClassSubject
.
readLine
())
!=
null
)
{
// 如果输出了 "DONE",表示生成完毕
if
(
"DONE"
.
equals
(
lineClassSubject
))
{
break
;
// 跳出循环
while
(
true
)
{
try
{
if
(!((
lineClassSubject
=
readerClassSubject
.
readLine
())
!=
null
))
break
;
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
// while ((lineClassSubject = readerClassSubject.readLine()) != null) {
// // 如果输出了 "DONE",表示生成完毕
// if ("DONE".equals(lineClassSubject)) {
// break; // 跳出循环
// }
// }
try
{
int
exitCodeSubjectClass
=
processClassSubject
.
waitFor
();
}
catch
(
InterruptedException
e
)
{
...
...
@@ -518,19 +517,19 @@ public class GeneratorAllTypePdfByProvinceController {
}
BufferedReader
readerClassSubject
=
new
BufferedReader
(
new
InputStreamReader
(
processClassSubject
.
getInputStream
()));
String
lineClassSubject
;
// while (true) {
// try {
// if (!((lineClassSubject = readerClassSubject.readLine()) != null)) break;
// } catch (IOException e) {
// throw new RuntimeException(e);
// }
// }
while
((
lineClassSubject
=
readerClassSubject
.
readLine
())
!=
null
)
{
// 如果输出了 "DONE",表示生成完毕
if
(
"DONE"
.
equals
(
lineClassSubject
))
{
break
;
// 跳出循环
while
(
true
)
{
try
{
if
(!((
lineClassSubject
=
readerClassSubject
.
readLine
())
!=
null
))
break
;
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
// while ((lineClassSubject = readerClassSubject.readLine()) != null) {
// // 如果输出了 "DONE",表示生成完毕
// if ("DONE".equals(lineClassSubject)) {
// break; // 跳出循环
// }
// }
try
{
int
exitCodeSubjectClass
=
processClassSubject
.
waitFor
();
}
catch
(
InterruptedException
e
)
{
...
...
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