This commit is contained in:
linfso 2025-07-08 10:18:23 +08:00
parent e9475b8484
commit 5c8b1029e1
3 changed files with 0 additions and 112 deletions

View File

@ -1,19 +0,0 @@
package com.xdadan.erp.emis.service.notice;
import com.xdadan.erp.common.utils.StringUtils;
/**
* 通知工具
*
* @author xdadan
*/
public class NoticeUtils
{
// public static void pushToUser(String uid, String message) {
// if(!StringUtils.isEmpty(uid)&&!StringUtils.isEmpty(message)){
// AsyncManager.me().execute(AsyncFactory.sendAlertMsgToUser(uid,message));
// }
// }
}

View File

@ -345,7 +345,6 @@ public class CvtTplToCpcl {
paramMap.put("k10", "缅甸快递");
paramMap.put("k11", "探路特快");
String printCmd=getPrintCmd(cmd,paramMap);
System.out.println(printCmd);
@ -482,11 +481,7 @@ public class CvtTplToCpcl {
"FORM\n" +
"PRINT\n" +
"";
// System.out.println(tplXmlStr);
}
}

View File

@ -1,88 +0,0 @@
package com.xdadan.erp.emis.service.warehouse;
import com.deepoove.poi.XWPFTemplate;
import java.io.*;
import java.util.Map;
public class DocXdocUtils {
/**
* 填充数据
* @param input 输入word文件数据流
* @param data 需要替换的数据映射
* @param output 输出的word文件数据量
* @throws IOException
*/
public static void fillData(InputStream input, Map<String, Object> data, OutputStream output) throws IOException {
//使用poi-tl.jar中的类填充数据
try(XWPFTemplate template = XWPFTemplate.compile(input) ){
template.render(data).writeAndClose(output);
}catch (Exception ex){
throw ex;
}
}
// private static PdfOptions getPdfOptions() {
// PdfOptions pdfOptions = PdfOptions.create();
//
// pdfOptions.fontProvider(new IFontProvider() {
// public Font getFont(String familyName, String encoding, float size, int style, Color color) {
// try {
//
// BaseFont bfSimfang = BaseFont.createFont("/font/simfang.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
// BaseFont bfSimSun = BaseFont.createFont("/font/simsun.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
// BaseFont bfSimHei = BaseFont.createFont("/font/simhei.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
//
// Font fontSimfang = new Font(bfSimfang, size, style, color);
// fontSimfang.setFamily("仿宋");
//
// Font fontSimSun = new Font(bfSimSun, size, style, color);
// fontSimSun.setFamily("宋体");
//
// Font fontSimHei = new Font(bfSimHei, size, style, color);
// fontSimHei.setFamily("黑体");
//
// System.out.println("===>familyName==>"+familyName);
// if ("仿宋".equals(familyName)) {
// return fontSimfang;
// }
// else if ("宋体".equals(familyName)) {
// return fontSimSun;
// }
// else if ("黑体".equals(familyName)) {
// return fontSimHei;
// }
//
// return fontSimSun;
// } catch (Throwable e) {
// e.printStackTrace();
// // An error occurs, use the default font provider.
// return ITextFontRegistry.getRegistry().getFont(familyName, encoding, size, style, color);
// }
// }
// });
// return pdfOptions;
// }
// public static void convertToPdf(String wordFile, String pdfFile) throws IOException {
// try (InputStream in = new FileInputStream(wordFile);
// OutputStream out = new FileOutputStream(pdfFile)) {
// PdfOptions options = getPdfOptions();
// XWPFDocument document = new XWPFDocument(in);
// PdfConverter.getInstance().convert(document, out, options);
// }
// }
// public static void main(String[] args) {
// try {
//
// String srcFile="/Users/alan/Downloads/1.docx";
// String destFile="/Users/alan/Downloads/6.pdf";
// convertToPdf(srcFile,destFile);
//
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
}