This commit is contained in:
gaojiabao
2023-06-19 14:45:43 +08:00
parent 3a523968c9
commit 579b54d2be
2 changed files with 4 additions and 11 deletions
@@ -219,9 +219,6 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
@Autowired
private OnlineFileLogDao onlineFileLogDao;
@Autowired
private OnlyofficePdfUtil onlyofficePdfUtil;
@Override
public SarBussionessStand getStandInfoByReviseStatus(String reviseStatus,String standSort,String taskId){
SarBussionessStand bussionessStand = new SarBussionessStand();
@@ -4932,7 +4929,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
if(!onlineFileLogs.isEmpty()){
if(StringUtils.isNotBlank(onlineFileLogs.get(0).getOLdFileName()) && StringUtils.isNotBlank(onlineFileLogs.get(0).getFilekey()) && StringUtils.isNotBlank(onlineFileLogs.get(0).getFilePath())){
try {
onlyofficePdfUtil.downloadFile(onlineFileLogs.get(0).getOLdFileName(), onlineFileLogs.get(0).getFilekey(), onlineFileLogs.get(0).getFilePath());
OnlyofficePdfUtil.downloadFile(filePath,onlineFileLogs.get(0).getOLdFileName(), onlineFileLogs.get(0).getFilekey(), onlineFileLogs.get(0).getFilePath());
File file = new File(filePath+"/onlineFile/"+onlineFileLogs.get(0).getOLdFileName());
if(file.exists()){
AttFileVo attFileVo = attFileEOService.saveFileInfo(file);
@@ -19,7 +19,6 @@ import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import java.io.*;
import java.util.HashMap;
@@ -27,10 +26,7 @@ import java.util.Map;
public class OnlyofficePdfUtil {
@Value("${file.path}")
private String filePathInfo;//文件存储路径
public ResponseMessage downloadFile(String filePdfName, String key, String onlineFilePath) throws Exception {
public static ResponseMessage downloadFile(String filePathInfo,String filePdfName, String key, String onlineFilePath) throws Exception {
String filePath = filePathInfo+"/onlineFile/"+filePdfName;
@@ -144,7 +140,7 @@ public class OnlyofficePdfUtil {
}
public String analysisXML(String xmlString) throws DocumentException {
public static String analysisXML(String xmlString) throws DocumentException {
Document document = DocumentHelper.parseText(xmlString);
@@ -158,7 +154,7 @@ public class OnlyofficePdfUtil {
}
public String convertFile(String key,String onlineFilePath) throws Exception{
public static String convertFile(String key, String onlineFilePath) throws Exception{
String url = "http://47.92.92.38:8103/7.2.1-34/ConvertService.ashx";