合并分支 'dev_20230216' 到 'master'
Dev 20230216 查看合并请求 laws-foton-slrs/foton-slrs-system-rest!100
This commit is contained in:
+5
@@ -348,6 +348,7 @@ public class ActSarItemsBussEOService {
|
||||
String prcCreateUser = String.valueOf(standMap.get("prcCreateUser"));
|
||||
String standType = String.valueOf(standMap.get("standType"));
|
||||
String DTQBBHBUSS = String.valueOf(standMap.get("DTQBBHBUSS"));
|
||||
String standNum = String.valueOf(standMap.get("standNum"));//修订时顺序号
|
||||
// String isJudge = String.valueOf(standMap.get("ifIn")); //是否经过技术评估
|
||||
SarBussionessStand sarBussionessStand = new SarBussionessStand();
|
||||
// if(standMap.containsKey("standId")) {
|
||||
@@ -415,6 +416,10 @@ public class ActSarItemsBussEOService {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(sarBussionessStand.getStandNumber())){
|
||||
sarBussionessStand.setStandNumber(standNum);
|
||||
sarBussionessStand.setStandSn(standNum);
|
||||
}
|
||||
|
||||
|
||||
List<SarBussionessStand> lawsList = iSarBussionessStandService.selectStandardsByStandNumber(standCode);
|
||||
|
||||
@@ -2,10 +2,10 @@ package com.adc.da.convert.mq;
|
||||
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
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;
|
||||
@@ -420,5 +420,66 @@ public class SendConvertMQService {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@RabbitListener(bindings = @QueueBinding(
|
||||
value = @Queue(value = "createBussMQ_online_MQ_file", durable = "true"),
|
||||
exchange = @Exchange(value = "create-online_MQ_file", ignoreDeclarationExceptions = "true"),
|
||||
key = "create-key_online_MQ_file"))
|
||||
public void createMQ(Map<String,String> bussMap) throws Exception{
|
||||
try{
|
||||
try{
|
||||
if(bussMap!=null) {
|
||||
String fileType = bussMap.get("FILE_SUFFIX");
|
||||
String converfilename = bussMap.get("CONVERFILENAME");
|
||||
String savePdfPath = bussMap.get("SAVEPDFPATH");
|
||||
String standId = bussMap.get("STANDID");
|
||||
String standFileClassify = bussMap.get("STANDFILECLASSIFY");
|
||||
String fileName = bussMap.get("FILENAME");
|
||||
String password = bussMap.get("PASSWORD");
|
||||
String oriAttId = bussMap.get("OAIATTID");
|
||||
logger.info("*****bussMap*******"+bussMap.toString());
|
||||
if(StringUtils.isNotBlank(fileType) && StringUtils.isNotBlank(converfilename) && StringUtils.isNotBlank(savePdfPath)) {
|
||||
AsposeOfficeConvertUtils.convertOfficeFileToPDF(fileType, converfilename, savePdfPath);
|
||||
File pdfFile = new File(savePdfPath);
|
||||
if(pdfFile.exists()) {
|
||||
logger.info("*****转换后的pdf文件路径*******" + savePdfPath);
|
||||
AttFileVo attFileVo = attFileEOService.saveFileInfo(pdfFile);
|
||||
if (attFileVo != null) {
|
||||
if (StringUtils.isNotBlank(standId)
|
||||
&& StringUtils.isNotBlank(standFileClassify)
|
||||
&& StringUtils.isNotBlank(fileName)
|
||||
&& StringUtils.isNotBlank(oriAttId)
|
||||
) {
|
||||
SarBussStandFile sarBussStandFile = new SarBussStandFile();
|
||||
//sarBussStandFile.setId();
|
||||
String uuId = com.adc.da.util.utils.UUID.randomUUID(20);
|
||||
sarBussStandFile.setId(uuId);
|
||||
sarBussStandFile.setStandId(standId);
|
||||
sarBussStandFile.setStandFileClassify(standFileClassify);
|
||||
sarBussStandFile.setAttId(attFileVo.getId());
|
||||
sarBussStandFile.setFileName(fileName);
|
||||
sarBussStandFile.setFileSuffix(attFileVo.getFileSuffix());
|
||||
sarBussStandFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
sarBussStandFile.setPassword(password);
|
||||
sarBussStandFile.setValidFlag(0);
|
||||
sarBussStandFile.setCreationTime(new Date());
|
||||
sarBussStandFile.setModifyTime(new Date());
|
||||
sarBussStandFile.setOriAttId(oriAttId);
|
||||
sarBussStandFileEODao.insert(sarBussStandFile);
|
||||
logger.error("在线编辑企业标准添加成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
logger.error("在线编辑企业标准参数为空");
|
||||
}
|
||||
}
|
||||
}catch(InterruptedException e){
|
||||
logger.error(e.toString());
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("在线编辑企业标准消息队列进入转换前失败!");
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.mq;
|
||||
|
||||
import org.springframework.amqp.core.AmqpTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class CreateOnlineEditingFileMQService {
|
||||
|
||||
@Autowired
|
||||
private AmqpTemplate rabbitTemplate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param
|
||||
* @param
|
||||
*/
|
||||
public void OnlineEditingFileMQ(Map<String,String> standMap){
|
||||
//发送消息队列
|
||||
this.rabbitTemplate.convertAndSend("create-online_MQ_file", "create-key_online_MQ_file", standMap);
|
||||
}
|
||||
}
|
||||
+22
-20
@@ -8,6 +8,7 @@ import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.mq.CreateMQService;
|
||||
import com.adc.da.mq.CreateOnlineEditingFileMQService;
|
||||
import com.adc.da.mq.CreateStandMQService;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
@@ -19,8 +20,6 @@ import com.adc.da.slrs.NewsFeed.entity.NewsFeed;
|
||||
import com.adc.da.slrs.NewsFeed.service.INewsFeedService;
|
||||
import com.adc.da.slrs.OnlineFileLog.dao.OnlineFileLogDao;
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
|
||||
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanLogDao;
|
||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||
@@ -155,6 +154,9 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
@Autowired
|
||||
private CreateStandMQService createStandMQService;
|
||||
|
||||
@Autowired
|
||||
private CreateOnlineEditingFileMQService createOnlineEditingFileMQService;
|
||||
|
||||
@Autowired
|
||||
private ISarUpdLogService sarUpdLogEOService;
|
||||
|
||||
@@ -4918,24 +4920,24 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
objectQueryWrapperSarBussStandFile.eq("USE_MODEL", "WEB_FILE");
|
||||
List<SarBussStandFile> sarBussStandFilesList = sarBussStandFileEODao.selectList(objectQueryWrapperSarBussStandFile);
|
||||
if(sarBussStandFilesList.isEmpty() && sarBussStandFilesList.size()==0){
|
||||
AttFileVo attFileVo = attFileEOService.wordConversionFilePdf(sarBussStandFiles.get(0).getOriAttId());
|
||||
if(attFileVo!=null){
|
||||
SarBussStandFile sarBussStandFile = new SarBussStandFile();
|
||||
//sarBussStandFile.setId();
|
||||
String uuId = com.adc.da.util.utils.UUID.randomUUID(20);
|
||||
sarBussStandFile.setId(uuId);
|
||||
sarBussStandFile.setStandId(sarBussStandFiles.get(0).getStandId());
|
||||
sarBussStandFile.setStandFileClassify(sarBussStandFiles.get(0).getStandFileClassify());
|
||||
sarBussStandFile.setAttId(attFileVo.getId());
|
||||
sarBussStandFile.setFileName(filePath+attFileVo.getFilePath()+attFileVo.getFileName());
|
||||
sarBussStandFile.setFileSuffix(attFileVo.getFileSuffix());
|
||||
sarBussStandFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||
sarBussStandFile.setPassword(sarBussStandFiles.get(0).getPassword());
|
||||
sarBussStandFile.setValidFlag(0);
|
||||
sarBussStandFile.setCreationTime(new Date());
|
||||
sarBussStandFile.setModifyTime(new Date());
|
||||
sarBussStandFile.setOriAttId(sarBussStandFiles.get(0).getOriAttId());
|
||||
sarBussStandFileEODao.insert(sarBussStandFile);
|
||||
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());
|
||||
createOnlineEditingFileMQService.OnlineEditingFileMQ(bussMap);
|
||||
}else {
|
||||
logger.info("======================================word.doc转换失败=================================");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user