Commit 5a4f1d12 authored by 霍传世's avatar 霍传世

测试服务器生成的效率

parent bd70808e
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment