1. ocr证据识别功能bug修复

topo_dev
xueqingkun 8 months ago
parent e90f67c997
commit 628037c0ec

@ -82,9 +82,15 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
ModelCase modelCase = modelCaseService.getById(records.getCaseId());
Assert.notEmpty(modelCase.getCaseNo(), "案件编号不能为空");
boolean isUpdate = StrUtil.isNotEmpty(records.getId());
NoteRecord record = records.toNoteRecord();
String recordId = noteRecordService.saveOrUpdRecord(record);
if (isUpdate){
// 如果是更新操作,不进行三元组提取。
return recordId;
}
if (CollUtil.isEmpty(records.getFileIdList())) {
log.info("uploadRecords:文件内容为空...不进行笔录分析操作...");
return recordId;
@ -253,7 +259,7 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
String context = WordReadUtil.readWordInMinio(minioService, fileId);
if (StrUtil.isEmpty(context)) {
log.info("文件id:{}内容为空,不进行解析...", fileId);
return null;
return new ArrayList<>();
}
MinioFile minioFile = minioService.getMinioFile(fileId);

@ -67,6 +67,7 @@ public class OCRRecordServiceImpl implements OCRRecordService {
public List<RecordFileDTO> queryFileList(String recordId) {
NoteRecord noteRecord = noteRecordService.getById(recordId);
Assert.notNull(noteRecord, "笔录不存在,可能已经被删除!");
String fileIds = noteRecord.getFileIds();
if (StrUtil.isEmpty(fileIds)){
log.info("queryFileList:笔录:{}对应的fileIds为空...",recordId);

Loading…
Cancel
Save