|
|
|
@ -150,6 +150,30 @@ public class OCRRecordServiceImpl implements OCRRecordService {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Boolean deleteFile(String recordId, String fileId) {
|
|
|
|
|
|
|
|
|
|
Assert.notEmpty(recordId, "recordId不能为空");
|
|
|
|
|
if (StrUtil.isEmpty(fileId)){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NoteRecord noteRecord = noteRecordService.getById(recordId);
|
|
|
|
|
Assert.notNull(noteRecord, "recordId:{}对应的笔录信息不存在", recordId);
|
|
|
|
|
|
|
|
|
|
String fileIds = noteRecord.getFileIds();
|
|
|
|
|
if (StrUtil.isEmpty(fileIds)){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String fileIdJoin = Arrays.stream(fileIds.split(","))
|
|
|
|
|
.filter(id -> !id.equals(fileId)).collect(Collectors.joining(","));
|
|
|
|
|
noteRecordService.lambdaUpdate().set(NoteRecord::getFileIds, fileIdJoin).eq(NoteRecord::getId, recordId).update();
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<NoteRecordSplit> batchSaveRecordSplit(NoteRecord noteRecord, RecordFileDTO recordFileDTO) {
|
|
|
|
|
|
|
|
|
|
String ocrText = recordFileDTO.getOcrText();
|
|
|
|
|