|
|
|
@ -4,10 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.supervision.demo.dto.QARecordNodeDTO;
|
|
|
|
|
import com.supervision.police.domain.FileOcrProcess;
|
|
|
|
|
import com.supervision.police.domain.ModelRecordType;
|
|
|
|
|
import com.supervision.police.domain.NoteRecord;
|
|
|
|
|
import com.supervision.police.domain.NoteRecordSplit;
|
|
|
|
|
import com.supervision.police.domain.*;
|
|
|
|
|
import com.supervision.police.dto.NoteRecordDTO;
|
|
|
|
|
import com.supervision.police.dto.OCRTextDTO;
|
|
|
|
|
import com.supervision.police.dto.RecordFileDTO;
|
|
|
|
@ -36,6 +33,8 @@ public class OCRRecordServiceImpl implements OCRRecordService {
|
|
|
|
|
private final NoteRecordSplitService noteRecordSplitService;
|
|
|
|
|
|
|
|
|
|
private final ModelRecordTypeService modelRecordTypeService;
|
|
|
|
|
|
|
|
|
|
private final CasePersonService casePersonService;
|
|
|
|
|
@Override
|
|
|
|
|
public String saveRecord(NoteRecordReqVO noteRecordReqVO) {
|
|
|
|
|
|
|
|
|
@ -138,7 +137,12 @@ public class OCRRecordServiceImpl implements OCRRecordService {
|
|
|
|
|
log.info("submitRecordTask:笔录:{}对应的笔录文件为空...",recordId);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(noteRecord.getCasePersonId())){
|
|
|
|
|
CasePerson casePerson = casePersonService.getById(noteRecord.getCasePersonId());
|
|
|
|
|
if (Objects.nonNull(casePerson)){
|
|
|
|
|
noteRecord.setName(casePerson.getName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<NoteRecordSplit> allNoteRecordSplits = recordFileDTOS.stream()
|
|
|
|
|
.flatMap(recordFileDTO -> batchSaveRecordSplit(noteRecord, recordFileDTO).stream()).toList();
|
|
|
|
|
boolean taskStatus = recordSplitProcessService.recordProcessTaskStatusCheck(noteRecord.getCaseId(), noteRecord.getId(), allNoteRecordSplits.size());
|
|
|
|
|