Quellcode durchsuchen

盖章修改

master
CMM vor 1 Jahr
Ursprung
Commit
68f35af579
2 geänderte Dateien mit 12 neuen und 4 gelöschten Zeilen
  1. +11
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java
  2. +1
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 11
- 1
pmapi/src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java Datei anzeigen

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.irs.sign;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.util.StrPool;
@@ -74,7 +75,16 @@ public class IRSAPIRequest {
throw new BizException("调用IRS盖章接口失败,印章编号为:" + sealSn + StrPool.SEMICOLON + e.getMessage());
}
// return obj;
return resp.getBytes();
JSONObject jsonObject = JSON.parseObject(resp, JSONObject.class);
String data = jsonObject.getString("data");
JSONObject object = JSON.parseObject(data, JSONObject.class);
// 获取盖好章的PDF文件内容Base64字符串
String signFileB64 = object.getString("signFileB64");
if (Objects.nonNull(signFileB64)){
return signFileB64.getBytes();
}else {
return null;
}
}




+ 1
- 3
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Datei anzeigen

@@ -494,9 +494,7 @@ public class TodoCenterManage {
Integer signType = req.getSignType();
signReq.setSignType(signType);
// 调用盖章接口,获取盖章后返回的pdf文件字符数组
byte[] signPdf = new byte[0];

signPdf = IRSAPIRequest.createSignPdf(signReq);
byte[] signPdf = IRSAPIRequest.createSignPdf(signReq);

// 转换成MultipartFile
MultipartFile multipartFile = new MockMultipartFile("file", originalFileName, "application/pdf", signPdf);


Laden…
Abbrechen
Speichern