记得上下班打卡 | git大法好,push需谨慎

Commit ee162f60 authored by jiangxiulong's avatar jiangxiulong

test

parent 1985b78f
...@@ -8,9 +8,12 @@ import com.google.zxing.common.BitMatrix; ...@@ -8,9 +8,12 @@ import com.google.zxing.common.BitMatrix;
import com.google.zxing.oned.Code128Writer; import com.google.zxing.oned.Code128Writer;
import com.google.zxing.qrcode.QRCodeWriter; import com.google.zxing.qrcode.QRCodeWriter;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.kylin.entity.KylinOrderExpress; import com.liquidnet.service.kylin.entity.KylinOrderExpress;
import com.liquidnet.service.kylin.entity.KylinOrderTickets; import com.liquidnet.service.kylin.entity.KylinOrderTickets;
import gui.ava.html.Html2Image; import gui.ava.html.Html2Image;
import javafx.collections.ObservableSet;
import javafx.print.Printer;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -155,6 +158,9 @@ public class CodeUtil { ...@@ -155,6 +158,9 @@ public class CodeUtil {
Doc doc = new SimpleDoc(fin, dof, das); Doc doc = new SimpleDoc(fin, dof, das);
ObservableSet<Printer> allPrinters = Printer.getAllPrinters();
logger.error("allPrinters", allPrinters);
logger.error("allPrinters1", JsonUtils.toJson(allPrinters));
DocPrintJob job = ps.createPrintJob(); DocPrintJob job = ps.createPrintJob();
job.print(doc, pras); job.print(doc, pras);
...@@ -199,11 +205,9 @@ public class CodeUtil { ...@@ -199,11 +205,9 @@ public class CodeUtil {
// 码图 // 码图
String replace1 = html.replace("images/yiweima.png", barCode).replace("images/erweima.png", qrCode); String replace1 = html.replace("images/yiweima.png", barCode).replace("images/erweima.png", qrCode);
logger.error("replace1", replace1);
// 收 寄图 // 收 寄图
String replace2 = replace1.replace("images/iconJi.png", pathName.concat("images/iconJi.png")) String replace2 = replace1.replace("images/iconJi.png", pathName.concat("images/iconJi.png"))
.replace("images/iconShou.png", pathName.concat("images/iconShou.png")); .replace("images/iconShou.png", pathName.concat("images/iconShou.png"));
logger.error("replace2", replace2);
String replace3 = replace2.replace("SF1010874393776", kylinOrderExpress.getMailno()) String replace3 = replace2.replace("SF1010874393776", kylinOrderExpress.getMailno())
.replace("755W-BA-0123456789", kylinOrderExpress.getDestRouteLabel()) .replace("755W-BA-0123456789", kylinOrderExpress.getDestRouteLabel())
...@@ -221,11 +225,9 @@ public class CodeUtil { ...@@ -221,11 +225,9 @@ public class CodeUtil {
.replace("18510989999", jTel) .replace("18510989999", jTel)
.replace("寄件地址北京市朝阳区摩登天空测试地址", jAddress) .replace("寄件地址北京市朝阳区摩登天空测试地址", jAddress)
; ;
logger.error("replace3", replace3);
Html2Image html2Image = Html2Image.fromHtml(replace3); Html2Image html2Image = Html2Image.fromHtml(replace3);
String imgPath = pathName.concat("qrcode/img.png"); String imgPath = pathName.concat("qrcode/img.png");
logger.error("imgPath", imgPath);
html2Image.getImageRenderer().saveImage(imgPath); html2Image.getImageRenderer().saveImage(imgPath);
......
...@@ -575,7 +575,6 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -575,7 +575,6 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
.eq(KylinOrderTickets::getOrderTicketsId, kylinOrderExpress.getOrderTicketsId()) .eq(KylinOrderTickets::getOrderTicketsId, kylinOrderExpress.getOrderTicketsId())
); );
String imgPath = codeUtil.html2img(kylinOrderExpress, jContact, jProvince.concat(jCity).concat(jAddress), jTel, orderInfo); String imgPath = codeUtil.html2img(kylinOrderExpress, jContact, jProvince.concat(jCity).concat(jAddress), jTel, orderInfo);
log.error("imgPath", imgPath);
codeUtil.drawImage(imgPath, 1); codeUtil.drawImage(imgPath, 1);
} }
return ResponseDto.success(); return ResponseDto.success();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment