|
|
@ -395,27 +395,27 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa |
|
|
|
//安全隔离措施附页 (true,展示附件,false,不展示附件)
|
|
|
|
//安全隔离措施附页 (true,展示附件,false,不展示附件)
|
|
|
|
if (workTicketInfo.getIsSafety()) { |
|
|
|
if (workTicketInfo.getIsSafety()) { |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.SECURE_PAGE, params); |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.SECURE_PAGE, params); |
|
|
|
result.add(xwpfDocument); |
|
|
|
//result.add(xwpfDocument);
|
|
|
|
} |
|
|
|
} |
|
|
|
//危险点分析与预控措施票 (true,展示附件,false,不展示附件)
|
|
|
|
//危险点分析与预控措施票 (true,展示附件,false,不展示附件)
|
|
|
|
if (workTicketInfo.getIsHazard()) { |
|
|
|
if (workTicketInfo.getIsHazard()) { |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.SAFETY_PAGE, params); |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.SAFETY_PAGE, params); |
|
|
|
result.add(xwpfDocument); |
|
|
|
//result.add(xwpfDocument);
|
|
|
|
} |
|
|
|
} |
|
|
|
//动火工作票 (true,展示附件,false,不展示附件)
|
|
|
|
//动火工作票 (true,展示附件,false,不展示附件)
|
|
|
|
if (workTicketInfo.getIsRailway()) { |
|
|
|
if (workTicketInfo.getIsRailway()) { |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.FLIGHT_PAGE, params); |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.FLIGHT_PAGE, params); |
|
|
|
result.add(xwpfDocument); |
|
|
|
//result.add(xwpfDocument);
|
|
|
|
} |
|
|
|
} |
|
|
|
//有限空间监测记录单(true,展示附件,false,不展示附件)
|
|
|
|
//有限空间监测记录单(true,展示附件,false,不展示附件)
|
|
|
|
if (workTicketInfo.getIsLimited()) { |
|
|
|
if (workTicketInfo.getIsLimited()) { |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.SPACE_PAGE, params); |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.SPACE_PAGE, params); |
|
|
|
result.add(xwpfDocument); |
|
|
|
//result.add(xwpfDocument);
|
|
|
|
} |
|
|
|
} |
|
|
|
//每日开工和收工时间附页
|
|
|
|
//每日开工和收工时间附页
|
|
|
|
if (workTicketInfo.getIsStart()) { |
|
|
|
if (workTicketInfo.getIsStart()) { |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.START_PAGE, params); |
|
|
|
XWPFDocument xwpfDocument = this.fillDocument("template/" + TicketConstant.START_PAGE, params); |
|
|
|
result.add(xwpfDocument); |
|
|
|
//result.add(xwpfDocument);
|
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
@ -431,12 +431,7 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void exportTicketWord(List<XWPFDocument> documents, String savePath) throws IOException { |
|
|
|
private void exportTicketWord(List<XWPFDocument> documents, String savePath) throws IOException { |
|
|
|
FileOutputStream out = new FileOutputStream(savePath, true); |
|
|
|
FileOutputStream out = new FileOutputStream(savePath); |
|
|
|
Path file = Paths.get(path); |
|
|
|
|
|
|
|
if(Files.exists(file)) { |
|
|
|
|
|
|
|
Files.delete(file); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
new File(savePath).createNewFile(); |
|
|
|
|
|
|
|
for (XWPFDocument document : documents) { |
|
|
|
for (XWPFDocument document : documents) { |
|
|
|
document.write(out); |
|
|
|
document.write(out); |
|
|
|
} |
|
|
|
} |
|
|
|