Преглед на файлове

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…
Отказ
Запис