|
|
@ -70,7 +70,6 @@ import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import sun.misc.BASE64Encoder; |
|
|
|
|
|
|
|
import java.io.*; |
|
|
|
import java.text.NumberFormat; |
|
|
@ -456,7 +455,7 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord |
|
|
|
document.saveToFile("textwatermark.docx",FileFormat.Docx );*/ |
|
|
|
//生成出门证文件名
|
|
|
|
String pdfName = "预付款申请_" + dateStr + seconds + ".pdf"; |
|
|
|
WordUtils.doc2pdf(wordPath, targetPath, pdfName,"anrui"); |
|
|
|
WordUtils.doc2pdf(wordPath, targetPath, pdfName,createByName); |
|
|
|
/*try { |
|
|
|
PdfWaterMark.addWaterMark("D:\\anrui\\upload\\" + "template/" + dateStr + "/" + pdfName,"D:\\anrui\\upload\\" + "template/" + dateStr + "/" + pdfName,createByName,10); |
|
|
|
} catch (Exception e) { |
|
|
@ -496,8 +495,9 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
// 对字节数组进行Base64编码,得到Base64编码的字符串
|
|
|
|
BASE64Encoder encoder = new BASE64Encoder(); |
|
|
|
String base64Str = encoder.encode(data); |
|
|
|
//BASE64Encoder encoder = new BASE64Encoder();
|
|
|
|
Base64.Encoder encoder = Base64.getEncoder(); |
|
|
|
String base64Str = encoder.encodeToString(data); |
|
|
|
return base64Str; |
|
|
|
} |
|
|
|
|
|
|
|