兴安pdf文件优化
This commit is contained in:
@@ -567,10 +567,6 @@ public class VisCarryStuffController extends BaseController {
|
||||
});
|
||||
}
|
||||
|
||||
//查询申请二维码
|
||||
CheckCodeVo checkCodeVo = visCarryStuffService.selectStuffCheckCode(id);
|
||||
String code = checkCodeVo.getCode();
|
||||
|
||||
// 创建PDF文档
|
||||
Document document = new Document(new RectangleReadOnly(842F, 595F));
|
||||
document.setMargins(60, 60, 72, 72);
|
||||
@@ -623,7 +619,9 @@ public class VisCarryStuffController extends BaseController {
|
||||
rightColumn.setWidthPercentage(100);
|
||||
|
||||
// 生成二维码图片
|
||||
BarcodeQRCode qrCode = new BarcodeQRCode(code, 100, 100, null);
|
||||
CheckCodeVo checkCodeVo = visCarryStuffService.selectStuffCheckCode(id);
|
||||
if (ObjectUtil.isNotNull(checkCodeVo) && StrUtil.isNotBlank(checkCodeVo.getCode())) {
|
||||
BarcodeQRCode qrCode = new BarcodeQRCode(checkCodeVo.getCode(), 100, 100, null);
|
||||
Image qrCodeImage = qrCode.getImage();
|
||||
qrCodeImage.scaleAbsolute(100, 100);
|
||||
qrCodeImage.setAlignment(Element.ALIGN_CENTER);
|
||||
@@ -631,6 +629,7 @@ public class VisCarryStuffController extends BaseController {
|
||||
// 添加二维码到右边列
|
||||
rightColumn.addCell(createCell(qrCodeImage, Element.ALIGN_CENTER));
|
||||
rightColumn.addCell(createCell(new Paragraph("出门证二维码", contentFont), Element.ALIGN_CENTER));
|
||||
}
|
||||
|
||||
// 将左右列添加到主表格
|
||||
mainTable.addCell(createCell(leftColumn, Element.ALIGN_LEFT));
|
||||
|
||||
Reference in New Issue
Block a user