| | |
| | | |
| | | setSysHeadToEnglish(tExamReportList, reportResultMap, reportType); |
| | | |
| | | writeFile(fileNameResult, reportResultMap); |
| | | |
| | | writeMutiFile(fileNameResult, reportResultMap); |
| | | |
| | | return AjaxResult.success(examUtilService.getLangOrLocalLangString("", tExamReportList.get(0).getProductName()) + "_DateReport.xlsx"); |
| | | } |
| | |
| | | writer.close(); |
| | | } |
| | | } |
| | | private void writeMutiFile(String fileNameResult, Map<String, List<List<Object>>> reportResultMap) { |
| | | FileUtil.del(fileNameResult); |
| | | ExcelWriter writer = null; |
| | | for (Map.Entry<String, List<List<Object>>> entryReport : reportResultMap.entrySet()) { |
| | | if (Objects.isNull(writer)) { |
| | | writer = new ExcelWriter(fileNameResult,entryReport.getKey()); |
| | | } |
| | | writer.setSheet(entryReport.getKey()); |
| | | StyleSet styleSet = writer.getStyleSet(); |
| | | styleSet.setBorder(BorderStyle.NONE, IndexedColors.OLIVE_GREEN); |
| | | writer.write(entryReport.getValue(), true); |
| | | writer.autoSizeColumnAll(); |
| | | writer.setSheet(entryReport.getKey()); |
| | | } |
| | | writer.close(); |
| | | } |
| | | private void setReportResultList(List<Object> demographyHeadSystem, List<List<Object>> reportResultList, Map<String, Object> textMap) { |
| | | |
| | | List<Object> reportValue = new ArrayList<>(); |
| | |
| | | private String getReportType(TExamReport tExamReport) { |
| | | String reportType = ReportTypeEnum.RuiLin.getCode(); |
| | | TExamPaper tExamPaper = itExamPaperService.selectTExamPaperById(tExamReport.getProductId()); |
| | | tExamPaper.getName(); |
| | | if (tExamPaper.getName().indexOf("睿邻")>0 || tExamPaper.getName().indexOf("RuiLin")>0 ) { |
| | | return reportType; |
| | | } |
| | | List<TReportTemplate> tReportTemplateList = itReportTemplateService.selectTReportTemplates(tExamPaper.getReportTemplateId()); |
| | | for (TReportTemplate tReportTemplate : tReportTemplateList) { |
| | | if (Objects.isNull(tReportTemplate.getReportType())) { |