Commit 9cfb58dd authored by 霍传世's avatar 霍传世

多线程测试生成PDF

parent 66fe976a
...@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -44,19 +45,19 @@ public class GeneratorAllTypePdfByProvinceController { ...@@ -44,19 +45,19 @@ public class GeneratorAllTypePdfByProvinceController {
private static final String bucketName = "schoolreportpdf-1317275686"; private static final String bucketName = "schoolreportpdf-1317275686";
@RequestMapping("/GeneratorByProvinceName") @GetMapping("/GeneratorByProvinceName")
public ResponseEntity generatorName(@RequestParam("examId")String examId, @RequestParam(value = "provinceName",required = false)String provinceName) throws IOException, InterruptedException { public ResponseEntity generatorName(@RequestParam("examId")String examId, @RequestParam(value = "provinceName",required = false)String provinceName) throws IOException, InterruptedException {
String suffix = examId.trim().replace("TDA","").replace("G3","").replace("G2","").trim(); String suffix = examId.trim().replace("TDA","").replace("G3","").replace("G2","").trim();
String synthesisSchoolSubjectReportSql = "select \n" + String synthesisSchoolSubjectReportSql = "select \n" +
"school,exam_id,province,region1,sub_subject\n" + "school,exam_id,province,region1 as region,sub_subject\n" +
"from \n" + "from \n" +
"base_school_subject_tda"+suffix+" \n" + "base_school_subject_tda"+suffix+" \n" +
" where subject_type = '常规' \n"; " where subject_type = '常规' \n";
String synthesisSchoolReportSql = "select \n" + String synthesisSchoolReportSql = "select \n" +
"school,exam_id,province,region1\n" + "school,exam_id,province,region1 as region\n" +
"from \n" + "from \n" +
"base_school_subject_tda"+suffix+" where subject_type = '常规' \n"; "base_school_subject_tda"+suffix+" where subject_type = '常规' \n";
...@@ -233,7 +234,7 @@ public class GeneratorAllTypePdfByProvinceController { ...@@ -233,7 +234,7 @@ public class GeneratorAllTypePdfByProvinceController {
//分组开始执行记录 // 分组开始执行记录
for (String key : schoolReport.keySet()) { for (String key : schoolReport.keySet()) {
logger.info("province:"+key+ "Gen"); logger.info("province:"+key+ "Gen");
List<BasicReportParameters> schoolBasicReport = schoolReport.get(key); List<BasicReportParameters> schoolBasicReport = schoolReport.get(key);
......
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