发布稿文件转换 在线编辑与非在线编辑
This commit is contained in:
+29
-6
@@ -4920,7 +4920,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
QueryWrapper<SarBussStandFile> objectQueryWrapper = new QueryWrapper<>();
|
||||
objectQueryWrapper.eq("ORI_ATT_ID",fileId);
|
||||
objectQueryWrapper.eq("USE_MODEL","SOURCE_FILE");
|
||||
objectQueryWrapper.eq("FILE_SUFFIX","docx");
|
||||
//objectQueryWrapper.ne("FILE_SUFFIX","docx");
|
||||
List<SarBussStandFile> sarBussStandFiles = sarBussStandFileEODao.selectList(objectQueryWrapper);
|
||||
if(!sarBussStandFiles.isEmpty()) {
|
||||
QueryWrapper<SarBussStandFile> objectQueryWrapperSarBussStandFile = new QueryWrapper<>();
|
||||
@@ -4929,9 +4929,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
List<SarBussStandFile> sarBussStandFilesList = sarBussStandFileEODao.selectList(objectQueryWrapperSarBussStandFile);
|
||||
if(sarBussStandFilesList.size() == 0){
|
||||
//存储的名称,key 路径
|
||||
QueryWrapper<OnlineFileLog> onlineFileLogWrapper = new QueryWrapper<>();
|
||||
onlineFileLogWrapper.eq("ATT_FILE_ID",sarBussStandFiles.get(0).getOriAttId());
|
||||
List<OnlineFileLog> onlineFileLogs = onlineFileLogDao.selectList(onlineFileLogWrapper);
|
||||
List<OnlineFileLog> onlineFileLogs = null;
|
||||
if(StringUtils.isNotBlank(sarBussStandFiles.get(0).getFileSuffix()) && sarBussStandFiles.get(0).getFileSuffix().equals("docx")){
|
||||
QueryWrapper<OnlineFileLog> onlineFileLogWrapper = new QueryWrapper<>();
|
||||
onlineFileLogWrapper.eq("ATT_FILE_ID",sarBussStandFiles.get(0).getOriAttId());
|
||||
onlineFileLogs = onlineFileLogDao.selectList(onlineFileLogWrapper);
|
||||
}
|
||||
if(!onlineFileLogs.isEmpty()){
|
||||
if(StringUtils.isNotBlank(onlineFileLogs.get(0).getOLdFileName()) && StringUtils.isNotBlank(onlineFileLogs.get(0).getFilekey()) && StringUtils.isNotBlank(onlineFileLogs.get(0).getFilePath())){
|
||||
try {
|
||||
@@ -4978,9 +4981,29 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
logger.info("======================未能查询到在线编辑的日志文件================");
|
||||
//是空则证明 当前文件是普通pdf 非在线编辑
|
||||
AttFileEO fileInfo = attFileEOService.getFileInfo(sarBussStandFiles.get(0).getOriAttId());
|
||||
if(fileInfo!=null){
|
||||
String fileName = "";
|
||||
if(StringUtils.isNotBlank(fileInfo.getFileName())){
|
||||
String[] splitInfo = fileInfo.getFileName().split("\\.");
|
||||
fileName = splitInfo[0];
|
||||
}
|
||||
Map<String, String> bussMap = new HashMap<>();
|
||||
bussMap.put("FILE_SUFFIX",sarBussStandFiles.get(0).getFileSuffix());
|
||||
bussMap.put("CONVERFILENAME",filePath+fileInfo.getFilePath()+fileInfo.getFileName());
|
||||
bussMap.put("SAVEPDFPATH",filePath+fileInfo.getFilePath()+fileName+".pdf");
|
||||
bussMap.put("STANDID",sarBussStandFiles.get(0).getStandId());
|
||||
bussMap.put("STANDFILECLASSIFY",sarBussStandFiles.get(0).getStandFileClassify());
|
||||
bussMap.put("FILENAME",filePath+fileInfo.getFilePath()+fileName+".pdf");
|
||||
bussMap.put("PASSWORD",sarBussStandFiles.get(0).getPassword());
|
||||
bussMap.put("OAIATTID",sarBussStandFiles.get(0).getOriAttId());
|
||||
logger.info("======================================word.doc发送mq=================================");
|
||||
createOnlineEditingFileMQService.OnlineEditingFileMQ(bussMap);
|
||||
}else {
|
||||
logger.info("======================================word.doc转换失败=================================");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user