diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java index 0e7452ff..adf333a0 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java @@ -4927,7 +4927,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl sarBussStandFilesList = sarBussStandFileEODao.selectList(objectQueryWrapperSarBussStandFile); - if(sarBussStandFilesList.isEmpty() && sarBussStandFilesList.size()==0){ + if(sarBussStandFilesList.size() == 0){ //存储的名称,key 路径 QueryWrapper onlineFileLogWrapper = new QueryWrapper<>(); onlineFileLogWrapper.eq("ATT_FILE_ID",sarBussStandFiles.get(0).getOriAttId()); @@ -4936,11 +4936,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl map = new HashMap<>(); @@ -108,16 +119,18 @@ public class OnlyofficePdfUtil { map.put("key",key); map.put("outputtype","pdf"); map.put("title",titleName+".pdf"); +// map.put("url","https://10.100.5.111:3306/file/"+onlineFilePath); map.put("url","https://srms.foton.com.cn/file/"+onlineFilePath); logger.info("=======================================https://srms.foton.com.cn/file/"+onlineFilePath); - logger.info("=======================================服务器路径"+url); //map.put("url","https://srms.foton.com.cn/file/model/task_768330d8/task_768330d8_top_768330d8_node.docx"); + logger.info("=========================map:{}",map); JSONObject requestJson = new JSONObject(map); // 创建HttpClientBuilder HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); // HttpClient CloseableHttpClient closeableHttpClient = httpClientBuilder.build(); - HttpPost httpPost = new HttpPost(url); + logger.info("=======================================服务器路径"+onlyOfficeUrl); + HttpPost httpPost = new HttpPost(onlyOfficeUrl); // 设置请求和传输超时时间 RequestConfig requestConfig = RequestConfig.custom() .setSocketTimeout(60000) @@ -159,40 +172,13 @@ public class OnlyofficePdfUtil { if (response != null) { response.close(); } - if (closeableHttpClient != null) { closeableHttpClient.close(); } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - - } - - public static byte[] readInputStream(InputStream inputStream) throws IOException { - - byte[] buffer = new byte[1024]; - - int len = 0; - - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - - while((len = inputStream.read(buffer)) != -1) { - - bos.write(buffer, 0, len); - - } - - bos.close(); - - return bos.toByteArray(); - } }