feat: There is no way the, convert
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.adc.da.convert.common;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
public class AsposeOfficeConvertUtils {
|
||||
|
||||
public static void convertOfficeFileToPDF(String fileType,String attFilePath,String savePdfPath) throws Exception {
|
||||
if(StringUtils.isNotBlank(fileType)){
|
||||
//去掉文件类型中的点
|
||||
fileType = fileType.replace(".","");
|
||||
fileType = fileType.toUpperCase();
|
||||
switch (fileType){
|
||||
case "DOC":
|
||||
WordTPdfUtils.doc2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "DOCX":
|
||||
WordTPdfUtils.doc2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "PPT":
|
||||
SlidesTPdfUtils.ppt2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "PPTX":
|
||||
SlidesTPdfUtils.ppt2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "XLS":
|
||||
ExcelTPdfUtils.excel2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
case "XLSX":
|
||||
ExcelTPdfUtils.excel2pdf(attFilePath,savePdfPath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.adc.da.convert.common;
|
||||
|
||||
import com.aspose.cells.PdfSaveOptions;
|
||||
import com.aspose.cells.Workbook;
|
||||
import com.aspose.cells.License;
|
||||
import com.aspose.slides.Presentation;
|
||||
import com.aspose.slides.SaveFormat;
|
||||
import org.aspectj.weaver.ast.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class ExcelTPdfUtils {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(WordTPdfUtils.class);
|
||||
private static final String myLicense = "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";
|
||||
|
||||
/**
|
||||
* 获取license 去除水印
|
||||
* @return
|
||||
*/
|
||||
public static boolean getLicense() {
|
||||
boolean result = false;
|
||||
try {
|
||||
ByteArrayInputStream is = new ByteArrayInputStream(myLicense.getBytes());
|
||||
License aposeLic = new License();
|
||||
aposeLic.setLicense(is);
|
||||
result = true;
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* excel 转为pdf 输出。
|
||||
*
|
||||
* @param sourceFilePath excel文件
|
||||
* @param desFilePathd pad 输出文件目录
|
||||
*/
|
||||
public static void excel2pdf(String sourceFilePath, String desFilePathd ) throws Exception {
|
||||
if (!getLicense()) { // 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||
return;
|
||||
}
|
||||
File file = new File(desFilePathd); // 新建一个空白pdf文档
|
||||
FileOutputStream fileOS = null;
|
||||
try {
|
||||
fileOS = new FileOutputStream(desFilePathd);
|
||||
long old = System.currentTimeMillis();
|
||||
Workbook wb = new Workbook(sourceFilePath);// 原始excel路径
|
||||
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
|
||||
pdfSaveOptions.setOnePagePerSheet(true);
|
||||
int[] autoDrawSheets={3};
|
||||
//当excel中对应的sheet页宽度太大时,在PDF中会拆断并分页。此处等比缩放。
|
||||
// autoDraw(wb,autoDrawSheets);
|
||||
int[] showSheets={0};
|
||||
//隐藏workbook中不需要的sheet页。
|
||||
printSheetPage(wb,showSheets);
|
||||
wb.save(fileOS, pdfSaveOptions);
|
||||
fileOS.flush();
|
||||
fileOS.close();
|
||||
long now = System.currentTimeMillis();
|
||||
logger.info("转换文档:"+sourceFilePath+" "+"共耗时:" + ((now - old) / 1000.0) + "秒");
|
||||
} catch (Exception e) {
|
||||
if(fileOS!=null){
|
||||
fileOS.flush();
|
||||
fileOS.close();
|
||||
}
|
||||
file.delete();
|
||||
logger.error("Document Convert Error:"+sourceFilePath);
|
||||
logger.error(e.getMessage(),e);
|
||||
throw new Exception("Document Convert Error:"+sourceFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置打印的sheet 自动拉伸比例
|
||||
* @param wb
|
||||
* @param page 自动拉伸的页的sheet数组
|
||||
*/
|
||||
public static void autoDraw(Workbook wb,int[] page){
|
||||
if(null!=page&&page.length>0){
|
||||
for (int i = 0; i < page.length; i++) {
|
||||
wb.getWorksheets().get(i).getHorizontalPageBreaks().clear();
|
||||
wb.getWorksheets().get(i).getVerticalPageBreaks().clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 隐藏workbook中不需要的sheet页。
|
||||
* @param wb
|
||||
* @param page 显示页的sheet数组
|
||||
*/
|
||||
public static void printSheetPage(Workbook wb,int[] page){
|
||||
for (int i= 1; i < wb.getWorksheets().getCount(); i++) {
|
||||
wb.getWorksheets().get(i).setVisible(false);
|
||||
}
|
||||
if(null==page||page.length==0){
|
||||
wb.getWorksheets().get(0).setVisible(true);
|
||||
}else{
|
||||
for (int i = 0; i < page.length; i++) {
|
||||
wb.getWorksheets().get(i).setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String sourceFilePath="E:\\EXCELTEXT\\一阶段问题清单426.xlsx";
|
||||
String desFilePath="E:\\EXCELTEXT\\一阶段问题清单426.pdf";
|
||||
try {
|
||||
excel2pdf(sourceFilePath, desFilePath);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.adc.da.convert.common;
|
||||
|
||||
import com.aspose.slides.Presentation;
|
||||
import com.aspose.slides.License;
|
||||
import com.aspose.slides.SaveFormat;
|
||||
import org.aspectj.weaver.ast.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* 采用破解版的Aspire插件转换文件
|
||||
*/
|
||||
public class SlidesTPdfUtils {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SlidesTPdfUtils.class);
|
||||
private static final String myLicense = "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";
|
||||
|
||||
public static boolean getLicense() {
|
||||
boolean result = false;
|
||||
try {
|
||||
ByteArrayInputStream is = new ByteArrayInputStream(myLicense.getBytes());
|
||||
License aposeLic = new License();
|
||||
aposeLic.setLicense(is);
|
||||
result = true;
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static void ppt2pdf(String inPath, String outPath) throws Exception{
|
||||
if (!getLicense()) { // 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||
return;
|
||||
}
|
||||
File file = new File(outPath); // 新建一个空白pdf文档
|
||||
FileOutputStream os =null;
|
||||
try {
|
||||
long old = System.currentTimeMillis();
|
||||
os = new FileOutputStream(file);
|
||||
Presentation pres = new Presentation(inPath);
|
||||
pres.save(os, SaveFormat.Pdf);
|
||||
os.flush();
|
||||
os.close();
|
||||
// EPUB, XPS, SWF 相互转换
|
||||
long now = System.currentTimeMillis();
|
||||
logger.info("转换文档:"+inPath+" "+"共耗时:" + ((now - old) / 1000.0) + "秒");
|
||||
} catch (Exception e) {
|
||||
if(os!=null){
|
||||
os.flush();
|
||||
os.close();
|
||||
}
|
||||
file.delete();
|
||||
logger.error("Document Convert Error:"+inPath);
|
||||
logger.error(e.getMessage(),e);
|
||||
throw new Exception("Document Convert Error:"+inPath);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String sourceFilePath="E:\\PPTTEXT\\2.pptx";
|
||||
String desFilePath="E:\\PPTTEXT\\2.pdf";
|
||||
ppt2pdf(sourceFilePath, desFilePath);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.adc.da.convert.common;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.aspose.words.Document;
|
||||
import org.aspectj.weaver.ast.Test;
|
||||
import com.aspose.words.License;
|
||||
import com.aspose.words.SaveFormat;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 采用破解版的Aspire插件转换文件
|
||||
*/
|
||||
public class WordTPdfUtils {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(WordTPdfUtils.class);
|
||||
|
||||
private static final String myLicense = "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";
|
||||
|
||||
public static boolean getLicense() {
|
||||
boolean result = false;
|
||||
try {
|
||||
ByteArrayInputStream is = new ByteArrayInputStream(myLicense.getBytes());
|
||||
License aposeLic = new License();
|
||||
aposeLic.setLicense(is);
|
||||
result = true;
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static void doc2pdf(String inPath, String outPath) throws Exception{
|
||||
if (!getLicense()) { // 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||
return;
|
||||
}
|
||||
File file = new File(outPath); // 新建一个空白pdf文档
|
||||
FileOutputStream os = new FileOutputStream(file);
|
||||
try {
|
||||
long old = System.currentTimeMillis();
|
||||
Document doc = new Document(inPath); // Address是将要被转化的word文档
|
||||
doc.save(os, SaveFormat.PDF);// 全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF,
|
||||
os.flush();
|
||||
os.close();
|
||||
// EPUB, XPS, SWF 相互转换
|
||||
long now = System.currentTimeMillis();
|
||||
logger.info("转换文档:"+inPath+" "+"共耗时:" + ((now - old) / 1000.0) + "秒");
|
||||
} catch (Exception e) {
|
||||
if(os!=null){
|
||||
os.flush();
|
||||
os.close();
|
||||
}
|
||||
file.delete();
|
||||
logger.error("Document Convert Error:"+inPath);
|
||||
logger.error(e.getMessage(),e);
|
||||
throw new Exception("Document Convert Error:"+inPath);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,12 +4,15 @@ import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.common.SarTypeEnum;
|
||||
import com.adc.da.common.UseModuleEnum;
|
||||
import com.adc.da.convert.common.AsposeOfficeConvertUtils;
|
||||
import com.adc.da.convert.common.DocConverterPdf;
|
||||
import com.adc.da.mq.CreateMQService;
|
||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||
import com.adc.da.slrs.otConvertMq.service.IOtConvertMqService;
|
||||
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||
import com.adc.da.slrs.sarLawsFile.dao.SarLawsFileDao;
|
||||
import com.adc.da.slrs.sarLawsFile.entity.SarLawsFile;
|
||||
import com.adc.da.slrs.sarStandFile.dao.SarStandFileDao;
|
||||
import com.adc.da.slrs.sarStandFile.entity.SarStandFile;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
@@ -62,6 +65,9 @@ public class SendConvertMQService {
|
||||
@Autowired
|
||||
private SarBussStandFileDao sarBussStandFileEODao;
|
||||
|
||||
@Autowired
|
||||
private SarLawsFileDao sarLawsFileDao;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SendConvertMQService.class);
|
||||
|
||||
@RabbitListener(bindings = @QueueBinding(
|
||||
@@ -152,6 +158,7 @@ public class SendConvertMQService {
|
||||
public ResponseMessage docUploadConvert(OtConvertMq convertMqEO) throws Exception{
|
||||
//保存在数据库中的ID
|
||||
String path = localFilePath + convertMqEO.getFilePath();
|
||||
path = path.replace("//","/");
|
||||
String convertId = convertMqEO.getId();
|
||||
try {
|
||||
//进入转换方法中,修改OT_CONVERT表中状态为转换中
|
||||
@@ -164,24 +171,28 @@ public class SendConvertMQService {
|
||||
String converfilename = path.replaceAll("\\\\", "/");
|
||||
logger.info("*****上传路径:*******"+localFilePath);
|
||||
logger.info("************文件路径:**********" + convertMqEO.getFilePath());
|
||||
logger.info("************接口:**********" + port);
|
||||
// logger.info("************接口:**********" + port);
|
||||
logger.info("*****上传路径替换,加入文件名*******"+converfilename);
|
||||
//截取文件类型
|
||||
int index = converfilename.lastIndexOf(".");
|
||||
String fileType = converfilename.substring(index,converfilename.length());
|
||||
String fileOriName = converfilename.substring(0,index);
|
||||
//调用转换类DocConverter,并将需要转换的文件传递给该类的构造方法
|
||||
DocConverterPdf d = new DocConverterPdf(converfilename,fileType);
|
||||
d.setConvertHost(convertHost);
|
||||
//调用conver方法开始转换,先执行doc2pdf()将office文件转换为pdf;再执行pdf2swf()将pdf转换为swf;
|
||||
File getPdf = d.conver(fileType);
|
||||
//调用getswfPath()方法,打印转换后的swf文件路径
|
||||
String dPath = d.getpdfPath();
|
||||
logger.info("*****转换后的pdf文件路径*******"+dPath);
|
||||
// //调用转换类DocConverter,并将需要转换的文件传递给该类的构造方法
|
||||
// DocConverterPdf d = new DocConverterPdf(converfilename,fileType);
|
||||
// d.setConvertHost(convertHost);
|
||||
// //调用conver方法开始转换,先执行doc2pdf()将office文件转换为pdf;再执行pdf2swf()将pdf转换为swf;
|
||||
// File getPdf = d.conver(fileType);
|
||||
// //调用getswfPath()方法,打印转换后的swf文件路径
|
||||
// String dPath = d.getpdfPath();
|
||||
String savePdfFileName = converfilename.substring(0, converfilename.lastIndexOf("."));
|
||||
String savePdfPath = savePdfFileName+".pdf";
|
||||
AsposeOfficeConvertUtils.convertOfficeFileToPDF(fileType,converfilename,savePdfPath);
|
||||
File pdfFile = new File(savePdfPath);
|
||||
logger.info("*****转换后的pdf文件路径*******"+savePdfPath);
|
||||
//判断是否转换成功,修改数据状态
|
||||
if(!dPath.isEmpty() && getPdf.length()>0){
|
||||
if(!savePdfPath.isEmpty() && pdfFile.length()>0){
|
||||
// 上传转换后文件
|
||||
String pdfId = attFileEOService.saveFileAttId(getPdf);
|
||||
String pdfId = attFileEOService.saveFileAttId(pdfFile);
|
||||
logger.info("////////转换后文件id"+pdfId);
|
||||
int count = 0;
|
||||
if("0".equals(convertMqEO.getAddOrUp())){
|
||||
@@ -212,11 +223,11 @@ public class SendConvertMQService {
|
||||
convertMqEO.setModifyTime(new Date());
|
||||
convertMqEO.setMqState(2);
|
||||
convertMqEOService.updateById(convertMqEO);
|
||||
if(convertMqEO.getAgainNum()<=5){
|
||||
throw new Exception("转换失败");
|
||||
}
|
||||
// if(convertMqEO.getAgainNum()<=5){
|
||||
// throw new Exception("转换失败");
|
||||
// }
|
||||
}
|
||||
return Result.success(dPath);
|
||||
return Result.success(savePdfPath);
|
||||
} else {
|
||||
logger.error("转换时未获取到文件路径!");
|
||||
return Result.error("文件存储失败,请重试");
|
||||
@@ -228,7 +239,7 @@ public class SendConvertMQService {
|
||||
convertMqEO.setId(convertId);
|
||||
convertMqEO.setMqState(2);
|
||||
convertMqEOService.updateById(convertMqEO);
|
||||
this.restartUploadConvert(convertMqEO);
|
||||
// this.restartUploadConvert(convertMqEO);
|
||||
return Result.error("r0072", "文件转换失败,请重试");
|
||||
}
|
||||
}
|
||||
@@ -270,14 +281,14 @@ public class SendConvertMQService {
|
||||
lawsFile.setModifyTime(new Date());
|
||||
lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
countSuccess = sarStandFileEODao.updateByPrimaryKeySelective(lawsFile);
|
||||
} else if (SarTypeEnum.LAWS.getValue().equals(convertMq.getConvertType())) {
|
||||
// SarLawsFile lawsFile = new SarLawsFile();
|
||||
// lawsFile.setId(convertMq.getPdfId());
|
||||
// lawsFile.setAttId(pdfId);
|
||||
// lawsFile.setOriAttId(convertMq.getOriAttId());
|
||||
// lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
// lawsFile.setModifyTime(new Date());
|
||||
// countSuccess = sarLawsFileEODao.updateByPrimaryKeySelective(lawsFile);
|
||||
} else if (SarTypeEnum.LAWS_STAND.getValue().equals(convertMq.getConvertType())) {
|
||||
SarLawsFile lawsFile = new SarLawsFile();
|
||||
lawsFile.setId(convertMq.getPdfId());
|
||||
lawsFile.setAttId(pdfId);
|
||||
lawsFile.setOriAttId(convertMq.getOriAttId());
|
||||
lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
lawsFile.setModifyTime(new Date());
|
||||
countSuccess = sarLawsFileDao.updateByPrimaryKeySelective(lawsFile);
|
||||
} else if (SarTypeEnum.BUSINESS.getValue().equals(convertMq.getConvertType())) {
|
||||
SarBussStandFile lawsFile = new SarBussStandFile();
|
||||
lawsFile.setId(convertMq.getPdfId());
|
||||
@@ -336,21 +347,21 @@ public class SendConvertMQService {
|
||||
lawsFile.setFileName(fileOriName+".pdf");
|
||||
lawsFile.setFileSuffix("pdf");
|
||||
countSuccess = sarStandFileEODao.insertSelective(lawsFile);
|
||||
} else if (SarTypeEnum.LAWS.getValue().equals(convertMq.getConvertType())) {
|
||||
// SarLawsFile lawsFile = new SarLawsFile();
|
||||
// lawsFile.setId(UUID.randomUUID(20));
|
||||
// lawsFile.setLawsId(convertMq.getLawsId());
|
||||
// lawsFile.setResId(convertMq.getResId());
|
||||
// lawsFile.setAttId(pdfId);
|
||||
// lawsFile.setOriAttId(convertMq.getOriAttId());
|
||||
// lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
// lawsFile.setValidFlag("0");
|
||||
// lawsFile.setCreationTime(new Date());
|
||||
// lawsFile.setModifyTime(new Date());
|
||||
// lawsFile.setLawsFileClassify(convertMq.getLawsFileClassify());
|
||||
// lawsFile.setFileName(fileOriName+".pdf");
|
||||
// lawsFile.setFileSuffix("pdf");
|
||||
// countSuccess = sarLawsFileEODao.insertSelective(lawsFile);
|
||||
} else if (SarTypeEnum.LAWS_STAND.getValue().equals(convertMq.getConvertType())) {
|
||||
SarLawsFile lawsFile = new SarLawsFile();
|
||||
lawsFile.setId(UUID.randomUUID(20));
|
||||
lawsFile.setLawsId(convertMq.getLawsId());
|
||||
lawsFile.setResId(convertMq.getResId());
|
||||
lawsFile.setAttId(pdfId);
|
||||
lawsFile.setOriAttId(convertMq.getOriAttId());
|
||||
lawsFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
lawsFile.setValidFlag(0);
|
||||
lawsFile.setCreationTime(new Date());
|
||||
lawsFile.setModifyTime(new Date());
|
||||
lawsFile.setLawsFileClassify(convertMq.getLawsFileClassify());
|
||||
lawsFile.setFileName(fileOriName+".pdf");
|
||||
lawsFile.setFileSuffix("pdf");
|
||||
countSuccess = sarLawsFileDao.insertSelective(lawsFile);
|
||||
} else if (SarTypeEnum.BUSINESS.getValue().equals(convertMq.getConvertType())) {
|
||||
SarBussStandFile lawsFile = new SarBussStandFile();
|
||||
lawsFile.setId(UUID.randomUUID(20));
|
||||
|
||||
Reference in New Issue
Block a user