feat: There is no way the Buss and Convert
This commit is contained in:
+32
-33
@@ -6,11 +6,14 @@ import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.common.*;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.mq.service.CreateStandMQService;
|
||||
import com.adc.da.mq.CreateMQService;
|
||||
import com.adc.da.mq.CreateStandMQService;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonShareEODao;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
|
||||
@@ -29,7 +32,6 @@ import com.adc.da.slrs.sarStandFile.dao.SarStandFileDao;
|
||||
import com.adc.da.slrs.sarStandFile.entity.SarStandFile;
|
||||
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
||||
import com.adc.da.slrs.sarStandItems.entity.FindSarItemsPageReqDTO;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarItemVO;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
||||
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
|
||||
@@ -74,24 +76,15 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.beans.BeanInfo;
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.sql.Clob;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -182,6 +175,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private IAttFileEOService attFileEOService;
|
||||
|
||||
@Autowired
|
||||
private CreateMQService convertMq;
|
||||
|
||||
@Autowired
|
||||
private OtConvertMqDao otConvertEODao;
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
@@ -776,7 +775,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
sarStandFileEO.setOriAttId(fileInfo.getId());
|
||||
standFileList.add(sarStandFileEO);
|
||||
//多文档转换 PPT|PPTX|ppt|pptx|PDF|pdf|DOC|doc|DOCX|docx
|
||||
if (verifyFileType(fileInfo.getFileSuffix())) {
|
||||
if ("pdf".equals(fileInfo.getFileSuffix()) || "PDF".equals(fileInfo.getFileSuffix())) {
|
||||
SarStandFile newFileEO = new SarStandFile();
|
||||
newFileEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
newFileEO.setCreationTime(new Date());
|
||||
@@ -792,17 +791,17 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
newFileEO.setOriAttId(fileInfo.getId());
|
||||
standFileList.add(newFileEO);
|
||||
} else {
|
||||
// String filePath = fileInfo.getFilePath() + fileInfo.getFileName();
|
||||
// ConvertMqEO convert = new ConvertMqEO();
|
||||
// convert.setLawsId(standId);
|
||||
// convert.setAttId(fileInfo.getId());
|
||||
// convert.setFilePath(filePath);
|
||||
// convert.setAddOrUp("0");
|
||||
// convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||
// convert.setStandFileClassify(field);
|
||||
// convert.setConvertType(SarTypeEnum.STAND.getValue());
|
||||
// convert.setOriAttId(fileInfo.getId());
|
||||
// convertMq.sendMQ(convert);
|
||||
String filePath = fileInfo.getFilePath() + fileInfo.getFileName();
|
||||
OtConvertMq convert = new OtConvertMq();
|
||||
convert.setLawsId(standId);
|
||||
convert.setAttId(fileInfo.getId());
|
||||
convert.setFilePath(filePath);
|
||||
convert.setAddOrUp("0");
|
||||
convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||
convert.setStandFileClassify(field);
|
||||
convert.setConvertType(SarTypeEnum.STAND.getValue());
|
||||
convert.setOriAttId(fileInfo.getId());
|
||||
convertMq.sendMQ(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1152,18 +1151,18 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
SarStandFile sarStandFileEO = new SarStandFile();
|
||||
sarStandFileEO.setStandId(sarStandardsInfoEO.getId());
|
||||
Map map = (Map) JSONObject.fromObject(sarStandardsInfoEO.getSarStandAttrEOStr());
|
||||
sarStandFileEO.setIdlist(null);
|
||||
sarStandFileEO.setIdList(null);
|
||||
List<SarStandFile> listFile = sarStandFileEODao.selectFileByStandIdAndId(sarStandFileEO);
|
||||
// if (listFile != null) {
|
||||
// if (!listFile.isEmpty()) {
|
||||
// for (int f = 0; f < listFile.size(); f++) {
|
||||
// //删除文件信息表数据
|
||||
if (listFile != null) {
|
||||
if (!listFile.isEmpty()) {
|
||||
for (int f = 0; f < listFile.size(); f++) {
|
||||
//删除文件信息表数据
|
||||
// sarFileInfoEODao.deleteByfileId(listFile.get(f).getId());
|
||||
// //删除转换表ot_convert数据
|
||||
// otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//删除转换表ot_convert数据
|
||||
otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
||||
}
|
||||
}
|
||||
}
|
||||
sarStandPutTimeEODao.deleteByStandId(standId);
|
||||
// 修改属性表数据
|
||||
sarStandAttrInfoEODao.deleteStandAttrByStandId(standId);
|
||||
|
||||
Reference in New Issue
Block a user