瀏覽代碼

debug 文件解析

tags/24080901
PoffyZhang 1 年之前
父節點
當前提交
76b2029c18
共有 1 個文件被更改,包括 17 次插入12 次删除
  1. +17
    -12
      pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java

+ 17
- 12
pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java 查看文件

@@ -992,19 +992,24 @@ public class GovProjectCollectionManage {
String[] baseProjBasisFileArr = baseProjBasisFile.split(";");
StringJoiner sj = new StringJoiner(";");
for(String bpb : baseProjBasisFileArr){
JSONArray fileArray = JSON.parseArray(bpb);
fileArray.forEach(j -> {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(j));
byte[] btyes = wpsConvertManage.downloadToPdfStream(jsonObject.getLong("id"));
String suffix = jsonObject.getString("suffix");
String originalFileName = jsonObject.getString("originalFileName");
if(!BizConst.DEV.equals(active)){
originalFileName = originalFileName.replace(StrPool.DOT + suffix, ".pdf");
}
try{
JSONArray fileArray = JSON.parseArray(bpb);
fileArray.forEach(j -> {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(j));
byte[] btyes = wpsConvertManage.downloadToPdfStream(jsonObject.getLong("id"));
String suffix = jsonObject.getString("suffix");
String originalFileName = jsonObject.getString("originalFileName");
if(!BizConst.DEV.equals(active)){
originalFileName = originalFileName.replace(StrPool.DOT + suffix, ".pdf");
}
// upload(btyes,"/temp",originalFileName);
String oss = ProvincialManage.uploadToOss(btyes, originalFileName);
sj.add(oss);
});
String oss = ProvincialManage.uploadToOss(btyes, originalFileName);
sj.add(oss);
});
}catch (Exception e){
log.error("解析文件出错!" + e);
}

}
return sj;
}


Loading…
取消
儲存