|
|
@@ -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; |
|
|
|
} |
|
|
|