|
|
|
@ -79,6 +79,7 @@ public class SnEmailGatherTask { |
|
|
|
|
} |
|
|
|
|
log.info("邮箱采集接口执行结束--"); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("邮箱采集错误日志:{}", e); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} finally { |
|
|
|
|
log.info("邮箱采集--重置执行状态"); |
|
|
|
@ -164,6 +165,7 @@ public class SnEmailGatherTask { |
|
|
|
|
map.put("emailName",emailName); |
|
|
|
|
String pdfStream = map.get("pdfStream"); |
|
|
|
|
if(StringUtils.isNotBlank(pdfStream)){ |
|
|
|
|
log.debug("开始调用山能OCR识别---------"); |
|
|
|
|
List<OpenServiceOcr> openServiceOcrs = openServicePlatformService.ocrInvoice(pdfStream); |
|
|
|
|
if(openServiceOcrs != null && !openServiceOcrs.isEmpty()){ |
|
|
|
|
Map<String, Object> ocrResult = convertToOcrResult(openServiceOcrs, map, maintainVo); |
|
|
|
@ -213,8 +215,10 @@ public class SnEmailGatherTask { |
|
|
|
|
store.close(); |
|
|
|
|
log.info("邮箱采集使用时间:{}",System.currentTimeMillis() - startTime); |
|
|
|
|
} catch (MessagingException e) { |
|
|
|
|
log.error("邮箱采集邮件解析异常:{}", e); |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} catch (IOException e) { |
|
|
|
|
log.error("邮箱采集IO异常:{}", e); |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|