Commit 80182b24 authored by 吴琼's avatar 吴琼

xiugai

parent f98a3e53
...@@ -393,11 +393,11 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR ...@@ -393,11 +393,11 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
record.setExportBatchNo(maxExportBatchNo.intValue()+1); record.setExportBatchNo(maxExportBatchNo.intValue()+1);
//生成pdf //生成pdf
String directory =record.getSerialNo()+record.getUserName(); String directory =record.getSerialNo()+record.getUserName();
String pdfFileName = record.getOrderNo()+".pdf"; String pdfFileName = record.getUserId()+record.getUserName()+record.getOrderNo()+".pdf";
FileToZip.mkdir(uploadLocalPath+directory); FileToZip.mkdir(uploadLocalPath+directory);
log.info("导出文件生成pdf begin",pdfFileName); log.info("导出文件生成pdf begin:"+pdfFileName);
generatePDF(transactionReceiptVOList.get(0),uploadLocalPath+"/"+directory+"/"+pdfFileName); generatePDF(transactionReceiptVOList.get(0),uploadLocalPath+"/"+directory+"/"+pdfFileName);
log.info("导出文件生成pdf end",pdfFileName); log.info("导出文件生成pdf end:"+pdfFileName);
File file1 = new File(uploadLocalPath+"/"+directory+"/"+pdfFileName); File file1 = new File(uploadLocalPath+"/"+directory+"/"+pdfFileName);
InputStream inputStream = new FileInputStream(file1); InputStream inputStream = new FileInputStream(file1);
sftpUtil.upload(basePath+maxExportBatchNo+"/交易凭证/",directory,pdfFileName,inputStream); sftpUtil.upload(basePath+maxExportBatchNo+"/交易凭证/",directory,pdfFileName,inputStream);
...@@ -405,6 +405,7 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR ...@@ -405,6 +405,7 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
Map<String,Object> map =Maps.newHashMap(); Map<String,Object> map =Maps.newHashMap();
map.put("userId",record.getUserId()); map.put("userId",record.getUserId());
map.put("fileAddress",maxExportBatchNo+"/交易凭证/"+directory+"/"+pdfFileName); map.put("fileAddress",maxExportBatchNo+"/交易凭证/"+directory+"/"+pdfFileName);
log.info("需要签章得pdf路径:"+maxExportBatchNo+"/交易凭证/"+directory+"/"+pdfFileName);
filePathList.add(map); filePathList.add(map);
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -425,10 +426,10 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR ...@@ -425,10 +426,10 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
String url = contractUrl + "/contract/batch/sign"; String url = contractUrl + "/contract/batch/sign";
Map<String, String> header = Maps.newHashMap(); Map<String, String> header = Maps.newHashMap();
header.put("Content-type", "application/json"); header.put("Content-type", "application/json");
log.info("contractUrl /contract/batch/sign 调用签章接口 begin",filePathList); log.info("contractUrl /contract/batch/sign 调用签章接口 begin,"+filePathList);
String contractResult = httpService.post(url, header, filePathList); String contractResult = httpService.post(url, header, filePathList);
JSONObject json = JSONObject.parseObject(contractResult); JSONObject json = JSONObject.parseObject(contractResult);
log.info("contractUrl /contract/batch/sign 调用签章接口 end",json); log.info("contractUrl /contract/batch/sign 调用签章接口 end,"+json);
String jsonResult = json.getString("data"); String jsonResult = json.getString("data");
String businessCode = json.getString("businessCode"); String businessCode = json.getString("businessCode");
if(!"0000".equals(businessCode)){ if(!"0000".equals(businessCode)){
...@@ -436,6 +437,7 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR ...@@ -436,6 +437,7 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
throw new RuntimeException("签章失败!"); throw new RuntimeException("签章失败!");
} }
JSONObject jsonObject = JSONObject.parseObject(jsonResult); JSONObject jsonObject = JSONObject.parseObject(jsonResult);
JSONArray jsonArray = jsonObject.getJSONArray("successList"); JSONArray jsonArray = jsonObject.getJSONArray("successList");
List<String> updateSuccessList = new ArrayList<>(); List<String> updateSuccessList = new ArrayList<>();
if(jsonArray != null && jsonArray.size()>0){ if(jsonArray != null && jsonArray.size()>0){
......
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