Commit db353bbc by HlQ

[fix] 处理解析合同文件 Json 数据异常

1 parent 60d82bad
......@@ -651,7 +651,7 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
var jsonArrR = jobR.path("result").withArray("list");
var fileListR = StreamSupport.stream(jsonArrR.spliterator(), false)
.map(v -> {
var fileArr = v.path("data").withArray("file_1");
var fileArr = JsonUtil.parseTree(v.path("data").path("file_1").asText());
var contractNo = v.path("data").path("serialNo").asText();
return (JsonNode) JsonUtil.createObj().put("contractNo", contractNo).set("fileArr", fileArr);
}).toList();
......@@ -670,7 +670,7 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
for (JsonNode entries : fileList) {
var contractNo = entries.path("contractNo").asText();
ArrayNode fileArr = entries.withArray("fileArr");
var fileArr = entries.path("fileArr");
if (ObjUtil.isNull(fileArr) || fileArr.isEmpty()) {
log.info("合同:{},没有文件", contractNo);
continue;
......@@ -689,7 +689,7 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
try {
bytes = HttpDownloader.downloadBytes(o.path("attachIndex").asText());
} catch (Exception e) {
log.error("合同:{},[{}] 文件同步失败", contractNo, filename);
log.error("合同:{},[{}] 文件同步失败", contractNo, filename, e);
continue;
}
var sha256 = SecureUtil.sha256().digestHex(bytes).toUpperCase();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!