|
|
@@ -85,7 +85,6 @@ public class PdfUtil {
|
|
|
cell.setPaddingLeft(8f);
|
|
|
cell.setPaddingRight(8f);
|
|
|
cell.setPaddingBottom(8f);
|
|
|
- cell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);
|
|
|
if (PdfPCell.ALIGN_MIDDLE != align) {
|
|
|
cell.setHorizontalAlignment(align);
|
|
|
} else {
|
|
|
@@ -257,41 +256,41 @@ public class PdfUtil {
|
|
|
table.setSplitLate(false);
|
|
|
table.setSplitRows(true);
|
|
|
//第一行
|
|
|
- createPDFCell(tableFont, table, "接待机构", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("inOrg").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
- createPDFCell(tableFont, table, "接待日期", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("time").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "接待机构", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("inOrg").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "接待日期", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("time").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
//第二行
|
|
|
- createPDFCell(tableFont, table, "来访事由", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("reasons").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
- createPDFCell(tableFont, table, "审批人", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("approveUser").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "来访事由", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("reasons").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "审批人", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("approveUser").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
//第三行
|
|
|
- createPDFCell(tableFont, table, "来访单位", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("outOrgName").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
- createPDFCell(tableFont, table, "来访人员", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("userName").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "来访单位", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("outOrgName").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "来访人员", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("userName").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
//第四行
|
|
|
- createPDFCell(tableFont, table, "证件类型", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("idType").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
- createPDFCell(tableFont, table, "证件号码", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("idCard").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "证件类型", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("idType").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "证件号码", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("idCard").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
//第五行
|
|
|
- createPDFCell(tableFont, table, "进入时间", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("inTime").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
- createPDFCell(tableFont, table, "离开时间", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("outTime").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "进入时间", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("inTime").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "离开时间", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("outTime").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
|
|
|
//第六行
|
|
|
- createPDFCell(tableFont, table, "陪同人员", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("accompanyingPerson").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
- createPDFCell(tableFont, table, "登记人员", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("createBy").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "陪同人员", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("accompanyingPerson").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
+ createPDFCell(tableFont, table, "登记人员", Element.ALIGN_MIDDLE, 1, 1);
|
|
|
+ createPDFCell(tableFont, table, data.get("createBy").toString(), Element.ALIGN_MIDDLE, 2, 1);
|
|
|
// /statics/2023/12/05/20231205183106A001.png
|
|
|
//证件图片
|
|
|
- createPDFCell(tableFont, table, "证件图片", Element.ALIGN_CENTER, 1, 60);
|
|
|
+ createPDFCell(tableFont, table, "证件图片", Element.ALIGN_MIDDLE, 1, 65);
|
|
|
//证件图片 图片填充
|
|
|
- final PdfPTable imageTable1 = getImage((List<String>) data.get("imageFile"), 2, 150, 130, 2);
|
|
|
+ final PdfPTable imageTable1 = getImage((List<String>) data.get("imageFile"), 2, 200, 150, 2);
|
|
|
final PdfPCell cell1 = new PdfPCell();
|
|
|
cell1.setNoWrap(false);
|
|
|
cell1.setPaddingLeft(8f);
|
|
|
@@ -299,12 +298,12 @@ public class PdfUtil {
|
|
|
cell1.setPaddingBottom(8f);
|
|
|
cell1.setPaddingTop(8f);
|
|
|
cell1.setColspan(5);
|
|
|
- cell1.setRowspan(60);
|
|
|
+ cell1.setRowspan(65);
|
|
|
//cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
cell1.addElement(imageTable1);
|
|
|
table.addCell(cell1);
|
|
|
- createPDFCell(tableFont, table, "介绍信附件", Element.ALIGN_CENTER, 1, 60);
|
|
|
- final PdfPTable imageTable2 = getImage((List<String>) data.get("file"), 2, 150, 130, 2);
|
|
|
+ createPDFCell(tableFont, table, "介绍信附件", Element.ALIGN_MIDDLE, 1, 65);
|
|
|
+ final PdfPTable imageTable2 = getImage((List<String>) data.get("file"), 2, 200, 150, 2);
|
|
|
final PdfPCell cell2 = new PdfPCell();
|
|
|
cell2.setNoWrap(false);
|
|
|
cell2.setPaddingLeft(8f);
|
|
|
@@ -312,12 +311,12 @@ public class PdfUtil {
|
|
|
cell2.setPaddingBottom(8f);
|
|
|
cell2.setPaddingTop(8f);
|
|
|
cell2.setColspan(5);
|
|
|
- cell2.setRowspan(60);
|
|
|
+ cell2.setRowspan(65);
|
|
|
//cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
cell2.addElement(imageTable2);
|
|
|
table.addCell(cell2);
|
|
|
- createPDFCell(tableFont, table, "身份核验材料", Element.ALIGN_CENTER, 1, 60);
|
|
|
- final PdfPTable imageTable3 = getImage((List<String>) data.get("checkImage"), 2, 150, 130, 2);
|
|
|
+ createPDFCell(tableFont, table, "身份核验材料", Element.ALIGN_MIDDLE, 1, 65);
|
|
|
+ final PdfPTable imageTable3 = getImage((List<String>) data.get("checkImage"), 2, 200, 150, 2);
|
|
|
final PdfPCell cell3 = new PdfPCell();
|
|
|
cell3.setNoWrap(false);
|
|
|
cell3.setPaddingLeft(8f);
|
|
|
@@ -325,7 +324,7 @@ public class PdfUtil {
|
|
|
cell3.setPaddingBottom(8f);
|
|
|
cell3.setPaddingTop(8f);
|
|
|
cell3.setColspan(5);
|
|
|
- cell3.setRowspan(60);
|
|
|
+ cell3.setRowspan(65);
|
|
|
//cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
cell3.addElement(imageTable3);
|
|
|
table.addCell(cell3);
|