Commit 31ad3c7a authored by 霍传世's avatar 霍传世

具体到学校的生成表

parent cf232274
......@@ -46,7 +46,7 @@ public class GeneratorAllTypePdfByProvinceController {
private static final String bucketName = "schoolreportpdf-1317275686";
@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,@RequestParam(value = "schoolName",required = false)String schoolName) throws IOException, InterruptedException {
String suffix = examId.trim().replace("TDA","").replace("G3","").replace("G2","").trim();
......@@ -88,7 +88,7 @@ public class GeneratorAllTypePdfByProvinceController {
List<String> provinceList = Arrays.asList(provinceName.split("#"));
String appendStatement = "and province in (" ;
String appendStatement = " and province in (" ;
for (String s : provinceList) {
appendStatement = appendStatement +"'"+s+"',";
......@@ -104,6 +104,24 @@ public class GeneratorAllTypePdfByProvinceController {
}
if(schoolName!=null){
List<String> schoolList = Arrays.asList(schoolName.split("#"));
String appendStatement = " and school in (" ;
for (String s : schoolList) {
appendStatement = appendStatement +"'"+s+"',";
}
appendStatement = appendStatement.substring(0,appendStatement.length()-1)+") ";
synthesisSchoolSubjectReportSql = synthesisSchoolSubjectReportSql + " " + appendStatement;
synthesisSchoolReportSql = synthesisSchoolReportSql + " " + appendStatement ;
synthesisClassSubjectReportSql = synthesisClassSubjectReportSql + " " + appendStatement;
synthesisClassReportSql = synthesisClassReportSql + " " + appendStatement;
}
synthesisSchoolSubjectReportSql = synthesisSchoolSubjectReportSql + " group by school,exam_id,province,region1,sub_subject";
synthesisSchoolReportSql = synthesisSchoolReportSql + " " + " group by school,exam_id,province,region1";
......@@ -112,8 +130,17 @@ public class GeneratorAllTypePdfByProvinceController {
synthesisClassReportSql = synthesisClassReportSql + " " + " GROUP BY\n" + "\tclass,\n" + "\tschool,\n" + "\texam_id,\n" + "\tprovince,\n" + "\tregion1\n";
System.out.println(1);
System.out.println(synthesisSchoolSubjectReportSql);
System.out.println(2);
System.out.println(synthesisSchoolReportSql);
System.out.println(3);
System.out.println(synthesisClassSubjectReportSql);
System.out.println(4);
System.out.println(synthesisClassReportSql);
List<BasicReportParameters> synthesisSchoolSubjectReportParameters = this.reportJdbcTemplate.query(synthesisSchoolSubjectReportSql, new Object[]{}, new BeanPropertyRowMapper<>(BasicReportParameters.class));
......
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