|
|
@@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.context.annotation.Profile;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import tk.mybatis.mapper.entity.Example;
|
|
|
@@ -134,7 +135,8 @@ public class MountArchiveFileJob {
|
|
|
// TODO: 2021/3/17 发送rabbitmq 队列消息
|
|
|
if (ObjectUtil.isNotNull(archiveRVO)) {
|
|
|
OcrEtlVO ocrBean = BeanUtil.copyProperties(archiveRVO, OcrEtlVO.class);
|
|
|
- ocrBean.setFileUrl(serverFileUrlPrefix + archiveFileDTO.getFilePath() + "/" + archiveFileDTO.getFileName());
|
|
|
+// ocrBean.setFileUrl(serverFileUrlPrefix + archiveFileDTO.getFilePath() + "/" + archiveFileDTO.getFileName());
|
|
|
+ ocrBean.setFileUrl(archiveFileDTO.getFilePath() + "/" + archiveFileDTO.getFileName());
|
|
|
ocrBean.setSecondaryArchiveId(secondaryArchiveDTO.getId());
|
|
|
log.info("【ocr识别】发起识别队列,参数[{}]", JSON.toJSONString(ocrBean));
|
|
|
rabbitTemplate.convertAndSend(dataExchangeName, ocrBindingKey, JSON.toJSONString(ocrBean));
|
|
|
@@ -159,6 +161,7 @@ public class MountArchiveFileJob {
|
|
|
public void testOcr(){
|
|
|
// TODO: 2021/5/7 提交已经归档但是未ocr识别的历史数据进行ocr识别
|
|
|
Example example = new Example(ArchiveFileDTO.class);
|
|
|
+// example.and().andLike("originalFileName","%ZY·BH%");
|
|
|
example.setOrderByClause("id ASC");
|
|
|
List<ArchiveFileDTO> archiveFileDTOS = archiveFileMapper.selectByExample(example);
|
|
|
for (int i = 0; i < archiveFileDTOS.size(); i++) {
|
|
|
@@ -166,7 +169,8 @@ public class MountArchiveFileJob {
|
|
|
ArchiveRVO archiveRVO = archiveMapper.selectByPk(archiveFileDTO.getArchiveId());
|
|
|
OcrEtlVO ocrBean = BeanUtil.copyProperties(archiveRVO, OcrEtlVO.class);
|
|
|
ocrBean.setSecondaryArchiveId(archiveFileDTO.getSecondaryArchiveId());
|
|
|
- ocrBean.setFileUrl(serverFileUrlPrefix + archiveFileDTO.getFilePath() + "/" + archiveFileDTO.getFileName());
|
|
|
+// ocrBean.setFileUrl(serverFileUrlPrefix + archiveFileDTO.getFilePath() + "/" + archiveFileDTO.getFileName());
|
|
|
+ ocrBean.setFileUrl(archiveFileDTO.getFilePath() + "/" + archiveFileDTO.getFileName());
|
|
|
log.info("【ocr识别】发起识别队列,参数[{}]", JSON.toJSONString(ocrBean));
|
|
|
rabbitTemplate.convertAndSend(dataExchangeName, ocrBindingKey, JSON.toJSONString(ocrBean));
|
|
|
}
|