|
@@ -4,15 +4,23 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.itextpdf.text.*;
|
|
|
+import com.itextpdf.text.pdf.BaseFont;
|
|
|
+import com.itextpdf.text.pdf.PdfPCell;
|
|
|
+import com.itextpdf.text.pdf.PdfPTable;
|
|
|
+import com.itextpdf.text.pdf.PdfWriter;
|
|
|
import com.usky.common.security.utils.SecurityUtils;
|
|
|
import com.usky.fire.domain.*;
|
|
|
import com.usky.fire.mapper.ReportIndexResultMapper;
|
|
|
import com.usky.fire.service.*;
|
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
|
+import com.usky.fire.service.config.pdf.MyHeaderFooter;
|
|
|
import com.usky.fire.service.vo.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.io.File;
|
|
|
+import java.io.FileOutputStream;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
@@ -65,12 +73,33 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
@Override
|
|
|
public void reportIndexResult() {
|
|
|
try {
|
|
|
- List<BaseCompany> baseCompanies = baseCompanyService.companyIdByTypeList("1");
|
|
|
+ List<BaseCompany> baseCompanies = baseCompanyService.companyIdByTypeList("4");
|
|
|
if (CollectionUtils.isNotEmpty(baseCompanies)) {
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
LocalDate date=LocalDate.now();
|
|
|
LocalDateTime dateTime=LocalDateTime.now();
|
|
|
for (int i = 0; i < baseCompanies.size(); i++) {
|
|
|
+ // 1.新建document对象
|
|
|
+ Document document = new Document(PageSize.A4);// 建立一个Document对象
|
|
|
+
|
|
|
+// 2.建立一个书写器(Writer)与document对象关联
|
|
|
+// File file =
|
|
|
+// new File("/var/www/usky-file/"+now.get(Calendar.YEAR)+"0"+now.get(Calendar.MONTH+1)+"/"+now.get(Calendar.YEAR)+now.get(Calendar.MONTH)+baseCompanies.get(i).getCompanyId()+".pdf");
|
|
|
+ File file = new File("D:\\"+now.get(Calendar.YEAR)+now.get(Calendar.MONTH)+baseCompanies.get(i).getCompanyId()+".pdf");
|
|
|
+ file.createNewFile();
|
|
|
+ PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(file));
|
|
|
+// writer.setPageEvent(new Watermark("hello word"));// 水印
|
|
|
+ writer.setPageEvent(new MyHeaderFooter());// 页眉/页脚
|
|
|
+ // 3.打开文档
|
|
|
+ document.open();
|
|
|
+ document.addTitle("fire report");// 标题
|
|
|
+ document.addAuthor("mhzd");// 作者
|
|
|
+// document.addSubject("Subject@iText pdf sample");// 主题
|
|
|
+// document.addKeywords("Keywords@iTextpdf");// 关键字
|
|
|
+// document.addCreator("Creator@umiz`s");// 创建者
|
|
|
+ DemReportDataVo demReportDataVo = new DemReportDataVo();
|
|
|
+ demReportDataVo.setCompanyName(baseCompanies.get(i).getCompanyName());
|
|
|
+ demReportDataVo.setLastMonthEndTime(date.toString());
|
|
|
ReportResult reportResult = new ReportResult();
|
|
|
reportResult.setObjectId(baseCompanies.get(i).getId());
|
|
|
reportResult.setReportObject(baseCompanies.get(i).getCompanyName());
|
|
@@ -97,12 +126,15 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
int fireAlarmOfflineNum = fireDeviceOfflineNum + smokeDeviceOfflineNum;
|
|
|
int fireAlarmHitchNum = fireDeviceHitchNum + smokeDeviceHitchNum;
|
|
|
int fireAlarmNum = fireDeviceNum + smokeDeviceNum;
|
|
|
+ demReportDataVo.setFireDeviceNum(fireAlarmNum);
|
|
|
double fireOnlineRate = 0;
|
|
|
double fireFaultRate = 0;
|
|
|
if (fireAlarmNum > 0) {
|
|
|
fireOnlineRate = 1 - Math.round(fireAlarmOfflineNum / fireAlarmNum * 100) * 0.01;
|
|
|
fireFaultRate = Math.round(fireAlarmHitchNum / fireAlarmNum * 100) * 0.01;
|
|
|
}
|
|
|
+ demReportDataVo.setFireOnlineRate(fireOnlineRate);
|
|
|
+ demReportDataVo.setFireFaultRate(fireFaultRate);
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
Calendar lastMonthFirstDateCal = Calendar.getInstance();
|
|
|
lastMonthFirstDateCal.add(Calendar.MONTH, -1);
|
|
@@ -115,6 +147,7 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
String lastYearFirstTime2 = format.format(lastYearFirstDateCal2.getTime());
|
|
|
Integer fireAlarmWcl = alarmFireService.fireAlarmCount(baseCompanies.get(i).getCompanyId(), 0,
|
|
|
"101", lastYearFirstTime2, lastMonthFirstTime);
|
|
|
+ demReportDataVo.setFireUnhandled(fireAlarmWcl);
|
|
|
LambdaQueryWrapper<AlarmFire> queryWrapper6 = Wrappers.lambdaQuery();
|
|
|
queryWrapper6.eq(AlarmFire::getCompanyId, baseCompanies.get(i).getCompanyId())
|
|
|
.eq(AlarmFire::getHandlingStatus, 1)
|
|
@@ -131,6 +164,7 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
.in(BaseDevice::getDeviceType, 2, 5, 6)
|
|
|
.notLike(BaseDevice::getDeviceName, "风机");
|
|
|
List<BaseDevice> list2 = baseDeviceService.list(queryWrapper2);
|
|
|
+ demReportDataVo.setWaterDeviceNum(list2.size());
|
|
|
double waterOnlineRate = 0;
|
|
|
double waterFaultRate = 0;
|
|
|
Integer waterAlarmWcl = 0;
|
|
@@ -168,12 +202,16 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
list7.get(0).getHandlingTime());
|
|
|
}
|
|
|
}
|
|
|
+ demReportDataVo.setWaterOnlineRate(waterOnlineRate);
|
|
|
+ demReportDataVo.setWaterFaultRate(waterFaultRate);
|
|
|
+ demReportDataVo.setWaterUnhandled(waterAlarmWcl);
|
|
|
LambdaQueryWrapper<BaseDevice> queryWrapper4 = Wrappers.lambdaQuery();
|
|
|
queryWrapper4.select(BaseDevice::getId, BaseDevice::getDeviceCode)
|
|
|
.eq(BaseDevice::getCompanyId, baseCompanies.get(i).getCompanyId())
|
|
|
.eq(BaseDevice::getDeviceType, 6)
|
|
|
.like(BaseDevice::getDeviceName, "风机");
|
|
|
List<BaseDevice> list4 = baseDeviceService.list(queryWrapper4);
|
|
|
+ demReportDataVo.setSmokeDeviceNum(list4.size());
|
|
|
double smokeOnlineRate = 0;
|
|
|
double smokeFaultRate = 0;
|
|
|
Integer smokeAlarmWcl = 0;
|
|
@@ -211,6 +249,9 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
list8.get(0).getHandlingTime());
|
|
|
}
|
|
|
}
|
|
|
+ demReportDataVo.setSmokeOnlineRate(smokeOnlineRate);
|
|
|
+ demReportDataVo.setSmokeFaultRate(smokeFaultRate);
|
|
|
+ demReportDataVo.setSmokeUnhandled(smokeAlarmWcl);
|
|
|
LambdaQueryWrapper<BaseCompanyPerson> queryWrapperPerson = Wrappers.lambdaQuery();
|
|
|
queryWrapperPerson.select(BaseCompanyPerson::getFireManageName)
|
|
|
.eq(BaseCompanyPerson::getCompanyId, baseCompanies.get(i).getCompanyId());
|
|
@@ -222,15 +263,18 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
.eq(DemEnforceInspectRecord::getInspectQualified, 0)
|
|
|
.between(DemEnforceInspectRecord::getInspectEndTime, lastYearFirstTime, date);
|
|
|
List<DemEnforceInspectRecord> list10 = demEnforceInspectRecordService.list(queryWrapper10);
|
|
|
+ demReportDataVo.setDoubleRandomNum(list10.size());
|
|
|
Calendar lastYearFirstDateCal3 = Calendar.getInstance();
|
|
|
lastYearFirstDateCal3.add(Calendar.YEAR, -3);
|
|
|
String lastYearFirstTime3 = format.format(lastYearFirstDateCal3.getTime());
|
|
|
+ demReportDataVo.setLastMonthFirstTime(lastYearFirstTime3);
|
|
|
LambdaQueryWrapper<DemLawSituation> queryWrapper11 = Wrappers.lambdaQuery();
|
|
|
queryWrapper11.select(DemLawSituation::getId)
|
|
|
.like(DemLawSituation::getPunishedPerson, baseCompanies.get(i).getCompanyName())
|
|
|
.eq(DemLawSituation::getEnable, 0)
|
|
|
.between(DemLawSituation::getPunishmentDecisionTime, lastYearFirstTime3, date);
|
|
|
List<DemLawSituation> list11 = demLawSituationService.list(queryWrapper11);
|
|
|
+ demReportDataVo.setPunishNum(list11.size());
|
|
|
LambdaQueryWrapper<DemEnforceReportComplaint> queryWrapper12 = Wrappers.lambdaQuery();
|
|
|
queryWrapper12.select(DemEnforceReportComplaint::getId)
|
|
|
.like(DemEnforceReportComplaint::getReportAddress, baseCompanies.get(i).getAddress())
|
|
@@ -238,14 +282,28 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
.in(DemEnforceReportComplaint::getFactFind, 1, 2)
|
|
|
.between(DemEnforceReportComplaint::getReportTime, lastYearFirstTime, date);
|
|
|
List<DemEnforceReportComplaint> list12 = demEnforceReportComplaintService.list(queryWrapper12);
|
|
|
+ demReportDataVo.setReportComplaintNum(list12.size());
|
|
|
Calendar lastYearFirstDateCal1 = Calendar.getInstance();
|
|
|
lastYearFirstDateCal1.add(Calendar.YEAR, -1);
|
|
|
String lastYearFirstTime1 = format.format(lastYearFirstDateCal1.getTime());
|
|
|
LambdaQueryWrapper<DemFireStatistics> queryWrapper13 = Wrappers.lambdaQuery();
|
|
|
- queryWrapper13.select(DemFireStatistics::getId)
|
|
|
+ queryWrapper13.select(DemFireStatistics::getId,DemFireStatistics::getDeathToll,
|
|
|
+ DemFireStatistics::getDirectPropertyLoss)
|
|
|
.like(DemFireStatistics::getFireAddress, baseCompanies.get(i).getAddress())
|
|
|
.between(DemFireStatistics::getFireTime, lastYearFirstTime1, date);
|
|
|
List<DemFireStatistics> list13 = demFireStatisticsService.list(queryWrapper13);
|
|
|
+ int deathToll=0;
|
|
|
+ int directPropertyLoss=0;
|
|
|
+ if (CollectionUtils.isNotEmpty(list13)){
|
|
|
+ for (int h = 0; h < list13.size(); h++) {
|
|
|
+ deathToll+=Integer.parseInt(list13.get(h).getDeathToll());
|
|
|
+ directPropertyLoss+=Integer.parseInt(list13.get(h).getDirectPropertyLoss());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ demReportDataVo.setMajorFireNum(deathToll);
|
|
|
+ demReportDataVo.setFireDisasterNum(directPropertyLoss);
|
|
|
+ demReportDataVo.setGeneralFireNum(list13.size());
|
|
|
+ demReportDataVo.setManagerStatus(0);
|
|
|
if (CollectionUtils.isNotEmpty(indexConfig1)) {
|
|
|
for (int l = 0; l < indexConfig1.size(); l++) {
|
|
|
ReportIndexResult reportIndexResult1 = new ReportIndexResult();
|
|
@@ -823,6 +881,7 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
}else {
|
|
|
reportIndexResult2.setIndexScore(0 * indexConfig3.get(j).getIndexWeight()* indexConfig2.get(k).getIndexWeight());
|
|
|
}
|
|
|
+ demReportDataVo.setManagerStatus(0);
|
|
|
} else {
|
|
|
reportIndexResult.setIndexScore(100 * indexConfig3.get(j).getIndexWeight());
|
|
|
if (reportIndexResult2.getIndexScore()!=null){
|
|
@@ -830,6 +889,7 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
}else {
|
|
|
reportIndexResult2.setIndexScore(100 * indexConfig3.get(j).getIndexWeight()* indexConfig2.get(k).getIndexWeight());
|
|
|
}
|
|
|
+ demReportDataVo.setManagerStatus(1);
|
|
|
}
|
|
|
reportIndexResult.setScoreType(1);
|
|
|
} else {
|
|
@@ -937,6 +997,19 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (reportResult.getOverallScore()!=null){
|
|
|
+ if (reportResult.getOverallScore()>=90){
|
|
|
+ demReportDataVo.setOverallRating("低风险");
|
|
|
+ }else if (reportResult.getOverallScore()>=80){
|
|
|
+ demReportDataVo.setOverallRating("一般风险");
|
|
|
+ }else if (reportResult.getOverallScore()>=60){
|
|
|
+ demReportDataVo.setOverallRating("较高风险");
|
|
|
+ }else {
|
|
|
+ demReportDataVo.setOverallRating("高风险");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.generatePDF(document,demReportDataVo);
|
|
|
+ document.close();
|
|
|
reportResultService.save(reportResult);
|
|
|
}
|
|
|
}
|
|
@@ -945,6 +1018,506 @@ public class ReportIndexResultServiceImpl extends AbstractCrudService<ReportInde
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 定义全局的字体静态变量
|
|
|
+ private static Font titlefont;
|
|
|
+ private static Font headfont;
|
|
|
+ private static Font keyfont;
|
|
|
+ private static Font textfont;
|
|
|
+ // 最大宽度
|
|
|
+ private static int maxWidth = 520;
|
|
|
+ // 静态代码块
|
|
|
+ static {
|
|
|
+ try {
|
|
|
+// 不同字体(这里定义为同一种字体:包含不同字号、不同style)
|
|
|
+ BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
|
|
|
+ titlefont = new Font(bfChinese, 16, Font.BOLD);
|
|
|
+ headfont = new Font(bfChinese, 14, Font.BOLD);
|
|
|
+ keyfont = new Font(bfChinese, 10, Font.BOLD);
|
|
|
+ textfont = new Font(bfChinese, 10, Font.NORMAL);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 生成PDF文件
|
|
|
+ public void generatePDF(Document document,DemReportDataVo demReportDataVo) throws Exception {
|
|
|
+
|
|
|
+// 段落
|
|
|
+ Paragraph paragraph = new Paragraph(demReportDataVo.getCompanyName()+"消防安全数字化管理综合分析报告", titlefont);
|
|
|
+ paragraph.setAlignment(1); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph.setIndentationLeft(12); //设置左缩进
|
|
|
+ paragraph.setIndentationRight(12); //设置右缩进
|
|
|
+ paragraph.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph.setLeading(20f); //行间距
|
|
|
+ paragraph.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph.setSpacingAfter(20f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph1 = new Paragraph(demReportDataVo.getCompanyName()+":", textfont);
|
|
|
+ paragraph1.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+
|
|
|
+ Paragraph paragraph2 =
|
|
|
+ new Paragraph("本次综合分析是通过贵单位在"+demReportDataVo.getLastMonthFirstTime()+"-"+demReportDataVo.getLastMonthEndTime()+
|
|
|
+ "日期间消防设施状况、消防自主管理状况、监督执法情况、火灾风险指数和建筑整体指数进行综合评估,现将综合分析报告如下:", textfont);
|
|
|
+ paragraph2.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph2.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph2.setLeading(20f); //行间距
|
|
|
+ paragraph2.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph2.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph3 = new Paragraph("一、整体评价", headfont);
|
|
|
+ paragraph3.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph3.setFirstLineIndent(24); //设置首行缩进
|
|
|
+
|
|
|
+ Paragraph paragraph4 = new Paragraph("贵单位在期间消防安全管理指数评价为:"+demReportDataVo.getOverallRating(), textfont);
|
|
|
+ paragraph4.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph4.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph4.setLeading(20f); //行间距
|
|
|
+ paragraph4.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph4.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph5 = new Paragraph("二、测评范围", headfont);
|
|
|
+ paragraph5.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph5.setFirstLineIndent(24); //设置首行缩进
|
|
|
+
|
|
|
+ Paragraph paragraph6 = new Paragraph("包含消防设施系统(火灾报警系统;消防水系统;防排烟系统;维保单位履职情况等 如实显示,没有的就不显示)、消防自主管理状况(组织制度落实情况;日常值班、巡检情况;预案、培训落实情况;微站实体化运行情况)、监督执法情况(双随机检查情况;处罚情况;投诉举报情况;重大隐患挂牌情况)和火灾风险指数(当年度火灾情况;上年度火灾情况)等项目进行综合测评。", textfont);
|
|
|
+ paragraph6.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph6.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph6.setLeading(20f); //行间距
|
|
|
+ paragraph6.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph6.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph7 = new Paragraph("三、主要风险及问题", headfont);
|
|
|
+ paragraph7.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph7.setFirstLineIndent(24); //设置首行缩进
|
|
|
+
|
|
|
+ Paragraph paragraph8 = new Paragraph("(一)消防设施问题", textfont);
|
|
|
+ paragraph8.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph8.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph8.setLeading(20f); //行间距
|
|
|
+ paragraph8.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph8.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ String fireText = "暂无问题";
|
|
|
+ if (demReportDataVo.getFireDeviceNum().equals(0)){
|
|
|
+ fireText = "暂无数据";
|
|
|
+ }else {
|
|
|
+ if (demReportDataVo.getFireOnlineRate()<0.95 && demReportDataVo.getFireFaultRate()>0.05 && demReportDataVo.getFireUnhandled()>0){
|
|
|
+ fireText="在线率低于95%,故障率高于5%,存在未处理告警"+demReportDataVo.getFireUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getFireOnlineRate()<0.95 && demReportDataVo.getFireFaultRate()>0.05){
|
|
|
+ fireText="在线率低于95%,故障率高于5%;";
|
|
|
+ }else if (demReportDataVo.getFireOnlineRate()<0.95 && demReportDataVo.getFireUnhandled()>0){
|
|
|
+ fireText="在线率低于95%,存在未处理告警"+demReportDataVo.getFireUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getFireFaultRate()>0.05 && demReportDataVo.getFireUnhandled()>0){
|
|
|
+ fireText="故障率高于5%,存在未处理告警"+demReportDataVo.getFireUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getFireOnlineRate()<0.95){
|
|
|
+ fireText="在线率低于95%;";
|
|
|
+ }else if (demReportDataVo.getFireFaultRate()>0.05){
|
|
|
+ fireText="故障率高于5%;";
|
|
|
+ }else if (demReportDataVo.getFireUnhandled()>0){
|
|
|
+ fireText="存在未处理告警"+demReportDataVo.getFireUnhandled()+"条;";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Paragraph paragraph9 = new Paragraph("火灾报警系统:"+fireText, textfont);
|
|
|
+ paragraph9.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph9.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph9.setLeading(20f); //行间距
|
|
|
+ paragraph9.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph9.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ String waterText = "暂无问题";
|
|
|
+ if (demReportDataVo.getWaterDeviceNum().equals(0)){
|
|
|
+ waterText = "暂无数据";
|
|
|
+ }else {
|
|
|
+ if (demReportDataVo.getWaterOnlineRate()<0.95 && demReportDataVo.getWaterFaultRate()>0.05 && demReportDataVo.getWaterUnhandled()>0){
|
|
|
+ waterText="在线率低于95%,故障率高于5%,存在未处理告警"+demReportDataVo.getWaterUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getWaterOnlineRate()<0.95 && demReportDataVo.getWaterFaultRate()>0.05){
|
|
|
+ waterText="在线率低于95%,故障率高于5%;";
|
|
|
+ }else if (demReportDataVo.getWaterOnlineRate()<0.95 && demReportDataVo.getWaterUnhandled()>0){
|
|
|
+ waterText="在线率低于95%,存在未处理告警"+demReportDataVo.getWaterUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getWaterFaultRate()>0.05 && demReportDataVo.getWaterUnhandled()>0){
|
|
|
+ waterText="故障率高于5%,存在未处理告警"+demReportDataVo.getWaterUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getWaterOnlineRate()<0.95){
|
|
|
+ waterText="在线率低于95%;";
|
|
|
+ }else if (demReportDataVo.getWaterFaultRate()>0.05){
|
|
|
+ waterText="故障率高于5%;";
|
|
|
+ }else if (demReportDataVo.getWaterUnhandled()>0){
|
|
|
+ waterText="存在未处理告警"+demReportDataVo.getWaterUnhandled()+"条;";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Paragraph paragraph26 = new Paragraph("消防水系统:"+waterText, textfont);
|
|
|
+ paragraph26.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph26.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph26.setLeading(20f); //行间距
|
|
|
+ paragraph26.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph26.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ String smokeText = "暂无问题";
|
|
|
+ if (demReportDataVo.getSmokeDeviceNum().equals(0)){
|
|
|
+ smokeText="暂无数据";
|
|
|
+ }else {
|
|
|
+ if (demReportDataVo.getSmokeOnlineRate()<0.95 && demReportDataVo.getSmokeFaultRate()>0.05 && demReportDataVo.getSmokeUnhandled()>0){
|
|
|
+ smokeText="在线率低于95%,故障率高于5%,存在未处理告警"+demReportDataVo.getSmokeUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getSmokeOnlineRate()<0.95 && demReportDataVo.getSmokeFaultRate()>0.05){
|
|
|
+ smokeText="在线率低于95%,故障率高于5%;";
|
|
|
+ }else if (demReportDataVo.getSmokeOnlineRate()<0.95 && demReportDataVo.getSmokeUnhandled()>0){
|
|
|
+ smokeText="在线率低于95%,存在未处理告警"+demReportDataVo.getSmokeUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getSmokeFaultRate()>0.05 && demReportDataVo.getSmokeUnhandled()>0){
|
|
|
+ smokeText="故障率高于5%,存在未处理告警"+demReportDataVo.getSmokeUnhandled()+"条;";
|
|
|
+ }else if (demReportDataVo.getSmokeOnlineRate()<0.95){
|
|
|
+ smokeText="在线率低于95%;";
|
|
|
+ }else if (demReportDataVo.getSmokeFaultRate()>0.05){
|
|
|
+ smokeText="故障率高于5%;";
|
|
|
+ }else if (demReportDataVo.getSmokeUnhandled()>0){
|
|
|
+ smokeText="存在未处理告警"+demReportDataVo.getSmokeUnhandled()+"条;";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Paragraph paragraph10 = new Paragraph("防排烟系统:"+smokeText, textfont);
|
|
|
+ paragraph10.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph10.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph10.setLeading(20f); //行间距
|
|
|
+ paragraph10.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph10.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph11 = new Paragraph("维保单位履职情况:暂无数据。", textfont);
|
|
|
+ paragraph11.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph11.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph11.setLeading(20f); //行间距
|
|
|
+ paragraph11.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph11.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph12 = new Paragraph("(二)消防自主管理问题", textfont);
|
|
|
+ paragraph12.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph12.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph12.setLeading(20f); //行间距
|
|
|
+ paragraph12.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph12.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph13 = new Paragraph("组织制度落实情况:暂无数据;", textfont);
|
|
|
+ paragraph13.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph13.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph13.setLeading(20f); //行间距
|
|
|
+ paragraph13.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph13.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph14 = new Paragraph("消防档案:暂无数据;", textfont);
|
|
|
+ paragraph14.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph14.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph14.setLeading(20f); //行间距
|
|
|
+ paragraph14.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph14.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph15 = new Paragraph("消防重点部位:暂无数据。", textfont);
|
|
|
+ paragraph15.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph15.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph15.setLeading(20f); //行间距
|
|
|
+ paragraph15.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph15.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph16 = new Paragraph("(三)监督执法情况", textfont);
|
|
|
+ paragraph16.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph16.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph16.setLeading(20f); //行间距
|
|
|
+ paragraph16.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph16.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph17 =
|
|
|
+ new Paragraph("上述时间段内监督检查发现隐患"+demReportDataVo.getDoubleRandomNum()+"处,"+"发现处罚"+demReportDataVo.getPunishNum()+
|
|
|
+ "起,"+"发现举报投诉"+demReportDataVo.getReportComplaintNum()+"起;",
|
|
|
+ textfont);
|
|
|
+ paragraph17.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph17.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph17.setLeading(20f); //行间距
|
|
|
+ paragraph17.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph17.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph18 = new Paragraph("(四)火灾情况", textfont);
|
|
|
+ paragraph18.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph18.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph18.setLeading(20f); //行间距
|
|
|
+ paragraph18.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph18.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph19 =
|
|
|
+ new Paragraph("上一年度发生"+demReportDataVo.getGeneralFireNum()+"起火灾,造成"+demReportDataVo.getMajorFireNum()+
|
|
|
+ "名人员伤亡,造成直接财产损失" +demReportDataVo.getFireDisasterNum()+
|
|
|
+ "万元。", textfont);
|
|
|
+ paragraph19.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph19.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph19.setLeading(20f); //行间距
|
|
|
+ paragraph19.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph19.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph20 = new Paragraph("四、防范对策及建议", headfont);
|
|
|
+ paragraph20.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph20.setFirstLineIndent(24); //设置首行缩进
|
|
|
+
|
|
|
+ Paragraph paragraph21 = new Paragraph("1、建议联系消防设施维保单位对本单位开展一次全面维护保养,对损坏、故障的设施要及时修复,确保消防设施完整好用;", textfont);
|
|
|
+ paragraph21.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph21.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph21.setLeading(20f); //行间距
|
|
|
+ paragraph21.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph21.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph22 = new Paragraph("2、建议对照重点单位消防档案管理办法,进一步完善员工安全培训记录、明确消防重点部位等内容;", textfont);
|
|
|
+ paragraph22.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph22.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph22.setLeading(20f); //行间距
|
|
|
+ paragraph22.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph22.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph23 = new Paragraph("3、建议对单位重点部位开展一轮全面自查,落实值班、巡查以及应急处置工作职责,确保“实名制”管理工作制度落实到位;", textfont);
|
|
|
+ paragraph23.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph23.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph23.setLeading(20f); //行间距
|
|
|
+ paragraph23.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph23.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph24 = new Paragraph("4、建议充分利用场所自身有利条件,在电子屏、明显位置循环播放宣传视频、张贴海报等形式加强消防安全提示。定期对单位员工开展消防安全教育和重点岗位专题培训,持续提高员工消防安全“一懂三会”基本能力。", textfont);
|
|
|
+ paragraph24.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph24.setFirstLineIndent(24); //设置首行缩进
|
|
|
+ paragraph24.setLeading(20f); //行间距
|
|
|
+ paragraph24.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ paragraph24.setSpacingAfter(10f); //设置段落下空白
|
|
|
+
|
|
|
+ Paragraph paragraph25 = new Paragraph("五、具体问题清单", headfont);
|
|
|
+ paragraph25.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
+ paragraph25.setFirstLineIndent(24); //设置首行缩进
|
|
|
+
|
|
|
+// 直线
|
|
|
+// Paragraph p1 = new Paragraph();
|
|
|
+// p1.add(new Chunk(new LineSeparator()));
|
|
|
+
|
|
|
+// 点线
|
|
|
+// Paragraph p2 = new Paragraph();
|
|
|
+// p2.add(new Chunk(new DottedLineSeparator()));
|
|
|
+
|
|
|
+// 超链接
|
|
|
+// Anchor anchor = new Anchor("baidu");
|
|
|
+// anchor.setReference("www.baidu.com");
|
|
|
+
|
|
|
+// 定位
|
|
|
+// Anchor gotoP = new Anchor("goto");
|
|
|
+// gotoP.setReference("#top");
|
|
|
+
|
|
|
+// 添加图片
|
|
|
+ Image image = Image.getInstance("https://img-blog.csdn.net/20180801174617455?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNzg0ODcxMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70");
|
|
|
+ image.setAlignment(Image.ALIGN_CENTER);
|
|
|
+ image.scalePercent(40); //依照比例缩放
|
|
|
+
|
|
|
+// 表格
|
|
|
+ PdfPTable table = createTable(new float[] { 40, 120, 120, 120, 80, 80 });
|
|
|
+ table.addCell(createCell("美好的一天", headfont, Element.ALIGN_LEFT, 6, false));
|
|
|
+ table.addCell(createCell("早上9:00", keyfont, Element.ALIGN_CENTER));
|
|
|
+ table.addCell(createCell("中午11:00", keyfont, Element.ALIGN_CENTER));
|
|
|
+ table.addCell(createCell("中午13:00", keyfont, Element.ALIGN_CENTER));
|
|
|
+ table.addCell(createCell("下午15:00", keyfont, Element.ALIGN_CENTER));
|
|
|
+ table.addCell(createCell("下午17:00", keyfont, Element.ALIGN_CENTER));
|
|
|
+ table.addCell(createCell("晚上19:00", keyfont, Element.ALIGN_CENTER));
|
|
|
+ Integer totalQuantity = 0;
|
|
|
+ for (int i = 0; i < 5; i++) {
|
|
|
+ table.addCell(createCell("起床", textfont));
|
|
|
+ table.addCell(createCell("吃午饭", textfont));
|
|
|
+ table.addCell(createCell("午休", textfont));
|
|
|
+ table.addCell(createCell("下午茶", textfont));
|
|
|
+ table.addCell(createCell("回家", textfont));
|
|
|
+ table.addCell(createCell("吃晚饭", textfont));
|
|
|
+ totalQuantity ++;
|
|
|
+ }
|
|
|
+ table.addCell(createCell("总计", keyfont));
|
|
|
+ table.addCell(createCell("", textfont));
|
|
|
+ table.addCell(createCell("", textfont));
|
|
|
+ table.addCell(createCell("", textfont));
|
|
|
+ table.addCell(createCell(String.valueOf(totalQuantity) + "件事", textfont));
|
|
|
+ table.addCell(createCell("", textfont));
|
|
|
+
|
|
|
+ document.add(paragraph);
|
|
|
+ document.add(paragraph1);
|
|
|
+ document.add(paragraph2);
|
|
|
+ document.add(paragraph3);
|
|
|
+ document.add(paragraph4);
|
|
|
+ document.add(paragraph5);
|
|
|
+ document.add(paragraph6);
|
|
|
+ document.add(paragraph7);
|
|
|
+ document.add(paragraph8);
|
|
|
+ document.add(paragraph9);
|
|
|
+ document.add(paragraph26);
|
|
|
+ document.add(paragraph10);
|
|
|
+ document.add(paragraph11);
|
|
|
+ document.add(paragraph12);
|
|
|
+ document.add(paragraph13);
|
|
|
+ document.add(paragraph14);
|
|
|
+ document.add(paragraph15);
|
|
|
+ document.add(paragraph16);
|
|
|
+ document.add(paragraph17);
|
|
|
+ document.add(paragraph18);
|
|
|
+ document.add(paragraph19);
|
|
|
+ document.add(paragraph20);
|
|
|
+ document.add(paragraph21);
|
|
|
+ document.add(paragraph22);
|
|
|
+ document.add(paragraph23);
|
|
|
+ document.add(paragraph24);
|
|
|
+ document.add(paragraph25);
|
|
|
+// document.add(anchor);
|
|
|
+// document.add(p2);
|
|
|
+// document.add(gotoP);
|
|
|
+// document.add(p1);
|
|
|
+ document.add(table);
|
|
|
+// document.add(image);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+/**------------------------创建表格单元格的方法start----------------------------*/
|
|
|
+ /**
|
|
|
+ * 创建单元格(指定字体)
|
|
|
+ * @param value
|
|
|
+ * @param font
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PdfPCell createCell(String value, Font font) {
|
|
|
+ PdfPCell cell = new PdfPCell();
|
|
|
+ cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
|
|
+ cell.setHorizontalAlignment(Element.ALIGN_CENTER);
|
|
|
+ cell.setPhrase(new Phrase(value, font));
|
|
|
+ return cell;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建单元格(指定字体、水平..)
|
|
|
+ * @param value
|
|
|
+ * @param font
|
|
|
+ * @param align
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PdfPCell createCell(String value, Font font, int align) {
|
|
|
+ PdfPCell cell = new PdfPCell();
|
|
|
+ cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
|
|
+ cell.setHorizontalAlignment(align);
|
|
|
+ cell.setPhrase(new Phrase(value, font));
|
|
|
+ return cell;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建单元格(指定字体、水平居..、单元格跨x列合并)
|
|
|
+ * @param value
|
|
|
+ * @param font
|
|
|
+ * @param align
|
|
|
+ * @param colspan
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PdfPCell createCell(String value, Font font, int align, int colspan) {
|
|
|
+ PdfPCell cell = new PdfPCell();
|
|
|
+ cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
|
|
+ cell.setHorizontalAlignment(align);
|
|
|
+ cell.setColspan(colspan);
|
|
|
+ cell.setPhrase(new Phrase(value, font));
|
|
|
+ return cell;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建单元格(指定字体、水平居..、单元格跨x列合并、设置单元格内边距)
|
|
|
+ * @param value
|
|
|
+ * @param font
|
|
|
+ * @param align
|
|
|
+ * @param colspan
|
|
|
+ * @param boderFlag
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PdfPCell createCell(String value, Font font, int align, int colspan, boolean boderFlag) {
|
|
|
+ PdfPCell cell = new PdfPCell();
|
|
|
+ cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
|
|
+ cell.setHorizontalAlignment(align);
|
|
|
+ cell.setColspan(colspan);
|
|
|
+ cell.setPhrase(new Phrase(value, font));
|
|
|
+ cell.setPadding(3.0f);
|
|
|
+ if (!boderFlag) {
|
|
|
+ cell.setBorder(0);
|
|
|
+ cell.setPaddingTop(15.0f);
|
|
|
+ cell.setPaddingBottom(8.0f);
|
|
|
+ } else if (boderFlag) {
|
|
|
+ cell.setBorder(0);
|
|
|
+ cell.setPaddingTop(0.0f);
|
|
|
+ cell.setPaddingBottom(15.0f);
|
|
|
+ }
|
|
|
+ return cell;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建单元格(指定字体、水平..、边框宽度:0表示无边框、内边距)
|
|
|
+ * @param value
|
|
|
+ * @param font
|
|
|
+ * @param align
|
|
|
+ * @param borderWidth
|
|
|
+ * @param paddingSize
|
|
|
+ * @param flag
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PdfPCell createCell(String value, Font font, int align, float[] borderWidth, float[] paddingSize, boolean flag) {
|
|
|
+ PdfPCell cell = new PdfPCell();
|
|
|
+ cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
|
|
+ cell.setHorizontalAlignment(align);
|
|
|
+ cell.setPhrase(new Phrase(value, font));
|
|
|
+ cell.setBorderWidthLeft(borderWidth[0]);
|
|
|
+ cell.setBorderWidthRight(borderWidth[1]);
|
|
|
+ cell.setBorderWidthTop(borderWidth[2]);
|
|
|
+ cell.setBorderWidthBottom(borderWidth[3]);
|
|
|
+ cell.setPaddingTop(paddingSize[0]);
|
|
|
+ cell.setPaddingBottom(paddingSize[1]);
|
|
|
+ if (flag) {
|
|
|
+ cell.setColspan(2);
|
|
|
+ }
|
|
|
+ return cell;
|
|
|
+ }
|
|
|
+/**------------------------创建表格单元格的方法end----------------------------*/
|
|
|
+
|
|
|
+
|
|
|
+/**--------------------------创建表格的方法start------------------- ---------*/
|
|
|
+ /**
|
|
|
+ * 创建默认列宽,指定列数、水平(居中、右、左)的表格
|
|
|
+ * @param colNumber
|
|
|
+ * @param align
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PdfPTable createTable(int colNumber, int align) {
|
|
|
+ PdfPTable table = new PdfPTable(colNumber);
|
|
|
+ try {
|
|
|
+ table.setTotalWidth(maxWidth);
|
|
|
+ table.setLockedWidth(true);
|
|
|
+ table.setHorizontalAlignment(align);
|
|
|
+ table.getDefaultCell().setBorder(1);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return table;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建指定列宽、列数的表格
|
|
|
+ * @param widths
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PdfPTable createTable(float[] widths) {
|
|
|
+ PdfPTable table = new PdfPTable(widths);
|
|
|
+ try {
|
|
|
+ table.setTotalWidth(maxWidth);
|
|
|
+ table.setLockedWidth(true);
|
|
|
+ table.setHorizontalAlignment(Element.ALIGN_CENTER);
|
|
|
+ table.getDefaultCell().setBorder(1);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return table;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建空白的表格
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public PdfPTable createBlankTable() {
|
|
|
+ PdfPTable table = new PdfPTable(1);
|
|
|
+ table.getDefaultCell().setBorder(0);
|
|
|
+ table.addCell(createCell("", keyfont));
|
|
|
+ table.setSpacingAfter(20.0f);
|
|
|
+ table.setSpacingBefore(20.0f);
|
|
|
+ return table;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<IndexResultVo> indexResultSelect(Integer id, String createDate) {
|
|
|
List<IndexResultVo> list = new ArrayList<>();
|