pdf转换(样式)

This commit is contained in:
gaojiabao
2023-06-14 15:57:20 +08:00
parent d37ae382b5
commit a67f4a1ce4
@@ -4920,27 +4920,49 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
objectQueryWrapperSarBussStandFile.eq("USE_MODEL", "WEB_FILE"); objectQueryWrapperSarBussStandFile.eq("USE_MODEL", "WEB_FILE");
List<SarBussStandFile> sarBussStandFilesList = sarBussStandFileEODao.selectList(objectQueryWrapperSarBussStandFile); List<SarBussStandFile> sarBussStandFilesList = sarBussStandFileEODao.selectList(objectQueryWrapperSarBussStandFile);
if(sarBussStandFilesList.isEmpty() && sarBussStandFilesList.size()==0){ if(sarBussStandFilesList.isEmpty() && sarBussStandFilesList.size()==0){
AttFileEO fileInfo = attFileEOService.getFileInfo(sarBussStandFiles.get(0).getOriAttId()); AttFileVo attFileVo = attFileEOService.wordConversionFilePdf(sarBussStandFiles.get(0).getOriAttId());
if(fileInfo!=null){ if(attFileVo!=null){
String fileName = ""; SarBussStandFile sarBussStandFile = new SarBussStandFile();
if(StringUtils.isNotBlank(fileInfo.getFileName())){ //sarBussStandFile.setId();
String[] splitInfo = fileInfo.getFileName().split("\\."); String uuId = com.adc.da.util.utils.UUID.randomUUID(20);
fileName = splitInfo[0]; sarBussStandFile.setId(uuId);
} sarBussStandFile.setStandId(sarBussStandFiles.get(0).getStandId());
sarBussStandFile.setStandFileClassify(sarBussStandFiles.get(0).getStandFileClassify());
Map<String, String> bussMap = new HashMap<>(); sarBussStandFile.setAttId(attFileVo.getId());
bussMap.put("FILE_SUFFIX",sarBussStandFiles.get(0).getFileSuffix()); sarBussStandFile.setFileName(filePath+attFileVo.getFilePath()+attFileVo.getFileName());
bussMap.put("CONVERFILENAME",filePath+fileInfo.getFilePath()+fileInfo.getFileName()); sarBussStandFile.setFileSuffix(attFileVo.getFileSuffix());
bussMap.put("SAVEPDFPATH",filePath+fileInfo.getFilePath()+fileName+".pdf"); sarBussStandFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
bussMap.put("STANDID",sarBussStandFiles.get(0).getStandId()); sarBussStandFile.setPassword(sarBussStandFiles.get(0).getPassword());
bussMap.put("STANDFILECLASSIFY",sarBussStandFiles.get(0).getStandFileClassify()); sarBussStandFile.setValidFlag(0);
bussMap.put("FILENAME",filePath+fileInfo.getFilePath()+fileName+".pdf"); sarBussStandFile.setCreationTime(new Date());
bussMap.put("PASSWORD",sarBussStandFiles.get(0).getPassword()); sarBussStandFile.setModifyTime(new Date());
bussMap.put("OAIATTID",sarBussStandFiles.get(0).getOriAttId()); sarBussStandFile.setOriAttId(sarBussStandFiles.get(0).getOriAttId());
createOnlineEditingFileMQService.OnlineEditingFileMQ(bussMap); sarBussStandFileEODao.insert(sarBussStandFile);
}else { }else {
logger.info("======================================word.doc转换失败================================="); logger.info("======================================word.doc转换失败=================================");
} }
// 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转换失败=================================");
// }
} }
} }