md
This commit is contained in:
parent
efd1cab3a3
commit
0fcadbc80b
@ -950,7 +950,7 @@ public class EmisWaybillController extends EmisBaseController
|
||||
|
||||
if(tplCodeArr.length>0){
|
||||
for (String tpCodeItem:tplCodeArr) {
|
||||
if("TAN-GC-130".equals(tpCodeItem)) {
|
||||
if("TAN-GC-130".equals(tpCodeItem) || "TAN-ENGC-130".equals(tpCodeItem) ) {
|
||||
|
||||
// 循环获取主单信息
|
||||
String billSubCodeAllStr="";
|
||||
@ -1030,9 +1030,37 @@ public class EmisWaybillController extends EmisBaseController
|
||||
// fileArrAll.addAll(fileArr);
|
||||
}else{
|
||||
// 直接获取
|
||||
String strArry = PrintUtils.getPdfByBillCode(billCode, tpCodeItem, printManCode);
|
||||
JSONArray fileArr = JSONArray.parseArray(strArry);
|
||||
fileArrAll.addAll(fileArr);
|
||||
// String strArry = PrintUtils.getPdfByBillCode(billCode, tpCodeItem, printManCode);
|
||||
// JSONArray fileArr = JSONArray.parseArray(strArry);
|
||||
// fileArrAll.addAll(fileArr);
|
||||
|
||||
|
||||
String[] billCodeArr = billCode.split(",");
|
||||
if(billCodeArr.length>0) {
|
||||
// IXddTplPrint xtp = new TanexPdfPrinter();
|
||||
for (String billCodeItem : billCodeArr) {
|
||||
|
||||
String uuid = UUID.fastUUID().toString();
|
||||
JSONObject jObjImg = new JSONObject();
|
||||
jObjImg.put("billCode",billCodeItem);
|
||||
jObjImg.put("tplCode",tpCodeItem);
|
||||
jObjImg.put("printManCode",printManCode);
|
||||
|
||||
redissonService.setStr("PRINT-IMG-"+uuid,jObjImg.toJSONString(),1800);
|
||||
|
||||
JSONObject jObj = new JSONObject();
|
||||
jObj.put("result", "success");
|
||||
// jObj.put("billCodeItem", item);
|
||||
// jObj.put("file", pdfBase64Data);
|
||||
String imageUrl="https://api.emis.tanex56.com/api/bizsvr/emis/common/getBillPng/"+uuid;
|
||||
jObj.put("imageUrl", imageUrl);
|
||||
jObj.put("fileType", "URL");
|
||||
|
||||
fileArrAll.add(jObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,8 +25,8 @@ public class TanexPdfPrinter extends XddBasePrint {
|
||||
/**
|
||||
* 模版文件
|
||||
*/
|
||||
private static String tplPath="/Users/alan/work/git/tanex56/emis-service/emis-biz/src/main/resources/tpl/";
|
||||
// private static String tplPath="tpl/";
|
||||
// private static String tplPath="/Users/alan/work/git/tanex56/emis-service/emis-biz/src/main/resources/tpl/";
|
||||
private static String tplPath="tpl/";
|
||||
|
||||
|
||||
@Override
|
||||
@ -86,9 +86,9 @@ public class TanexPdfPrinter extends XddBasePrint {
|
||||
|
||||
String tplFileName=tplPath+tplCode+".pdf";
|
||||
ClassPathResource classPathResource = new ClassPathResource(tplFileName);
|
||||
// InputStream tplInStream = classPathResource.getInputStream();
|
||||
InputStream tplInStream = classPathResource.getInputStream();
|
||||
|
||||
InputStream tplInStream = new FileInputStream(new File(tplFileName));
|
||||
// InputStream tplInStream = new FileInputStream(new File(tplFileName));
|
||||
|
||||
// 生成pdf文件
|
||||
// byte[] bytes =Base64.getDecoder().decode(tplStrBase64);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user